CDistNet icon indicating copy to clipboard operation
CDistNet copied to clipboard

train for other language

Open raminrahimi6970 opened this issue 3 years ago • 2 comments

hello thanks for your paper and released codes I want to train your code for other language but I see in lmdbdataset that you use English char and limit the max length to 30 that is true? I should change line 245 and 246?

`def len(self): return self.length

def get(self,idx):
    with self.env.begin(write=False) as txn:
        image_key, label_key = f'image-{idx+1:09d}', f'label-{idx+1:09d}'
        label = str(txn.get(label_key.encode()), 'utf-8')  # label
        label = re.sub('[^0-9a-zA-Z]+', '', label)
        label = label[:30]`

raminrahimi6970 avatar Jun 17 '22 07:06 raminrahimi6970