Open Jiayou-Chao opened 1 year ago
The prepared lmdb dataset can be downloaded directly from google drive.
It looks like the error is caused by some broken images from mjsynth dataset. A temporary solution can be directly downloading generated lmdb files from other people. For example, it is available at https://aistudio.baidu.com/aistudio/datasetdetail/114635.
Hi @Jiayou-Chao One possible solution is to modify the loading function like this https://github.com/open-mmlab/mmocr/blob/d7c59f3325aaf4cbf6ddd3ec69f03230bc582d19/mmocr/datasets/transforms/loading.py#L182 -->
img = results['img']
if img is None:
return None
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
1.x branch https://github.com/open-mmlab/mmocr/tree/dev-1.x
Environment
Reproduces the problem - code sample
The mjsynth dataset was prepared by
python tools/dataset_converters/prepare_dataset.py mjsynth --task textrecog --lmdb
.The config file for the dataset is changed to:
Reproduces the problem - command or script
Reproduces the problem - error message
Additional information
I'm not sure if #1896 is the cause of this issue. It looks like it is due to an empty image. But given
ignore_empty=True
is set, why did this still happen?