deep-text-recognition-benchmark icon indicating copy to clipboard operation
deep-text-recognition-benchmark copied to clipboard

Error when creating my own lmdb dataset

Open minhdc opened this issue 4 years ago • 2 comments

I followed the instruction of how to create your own lmdb dataset in README, but the following error occured:

`Traceback (most recent call last):

File "create_lmdb_dataset.py", line 88, in fire.Fire(createDataset)

File "/home/extreme45nm/anaconda3/lib/python3.7/site-packages/fire/core.py", line 138, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name)

File "/home/extreme45nm/anaconda3/lib/python3.7/site-packages/fire/core.py", line 468, in _Fire target=component.name)

File "/home/extreme45nm/anaconda3/lib/python3.7/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace component = fn(*varargs, **kwargs)

File "create_lmdb_dataset.py", line 48, in createDataset imagePath, label = datalist[i].strip('\n').split('\t')

ValueError: not enough values to unpack (expected 2, got 1) `

minhdc avatar Dec 29 '20 15:12 minhdc

It seems that there may be a problem in assigning imagePath and label. So I modified the code in create_lmdb_dataset.py as following:

Before: imagePath, label = datalist[i].strip('\n').split('\t')

After: imagePath = datalist[i].strip('\n').split('\t')[0] label = datalist[i].strip('\n').split('\t')[1] `

And I was be able to create my own lmdb dataset.

minhdc avatar Dec 29 '20 15:12 minhdc

I have a same problem. i have a change '\t' -> ' '

shinsjn avatar Aug 11 '22 07:08 shinsjn