clovaai / deep-text-recognition-benchmark

Text recognition (optical character recognition) with deep learning methods, ICCV 2019
Apache License 2.0
3.76k stars 1.11k forks source link

Type error: #126

Open Ma01180724 opened 4 years ago

Ma01180724 commented 4 years ago

Traceback (most recent call last): File "/home/mxt/dataset/deep-text-recognition-benchmark-master/train.py", line 283, in train(opt) File "/home/mxt/dataset/deep-text-recognition-benchmark-master/train.py", line 26, in train train_dataset = Batch_Balanced_Dataset(opt) File "/home/mxt/dataset/deep-text-recognition-benchmark-master/dataset.py", line 37, in init _dataset = hierarchical_dataset(root=opt.train_data, opt=opt, select_data=[selected_d]) File "/home/mxt/dataset/deep-text-recognition-benchmark-master/dataset.py", line 102, in hierarchical_dataset dataset = LmdbDataset(dirpath, opt) File "/home/mxt/dataset/deep-text-recognition-benchmark-master/dataset.py", line 123, in init nSamples = int(txn.get('num-samples'.encode())) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

hyungkwonko commented 4 years ago

As I had the same issue, you may consider regenerating lmdb files which for me was the problem.

Aldemaro14 commented 4 years ago

@hyungkwonko hey man, I'm having the same issue, also tried to regenerate the data, but still the same problem, any advice????

hyungkwonko commented 4 years ago

@Aldemaro14 in my case, the size of .lmdb file was 0. If you were in the same situation, you may reconsider checking the sanity of .lmdb files. Otherwise you may have different issue (library version, etc). Hope it helps.