clovaai / deep-text-recognition-benchmark

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

I am getting AssertionError: datasets should not be an empty iterable #417

Closed alikhalil98771 closed 5 months ago

alikhalil98771 commented 5 months ago

AssertionError: datasets should not be an empty iterable when i run in deep-text-recognition-benchmark

!python train.py --train_data lmdb_output --valid_data lmdb_output --select_data "/" --batch_ratio 1.0 --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --batch_size 2 --data_filtering_off --workers 0 --batch_max_length 80 --num_iter 10 --valInterval 5 --saved_model TPS-ResNet-BiLSTM-Attn.pth

Full error: Traceback (most recent call last): File "/content/deep-text-recognition-benchmark/train.py", line 317, in train(opt) File "/content/deep-text-recognition-benchmark/train.py", line 31, in train train_dataset = Batch_Balanced_Dataset(opt) File "/content/deep-text-recognition-benchmark/dataset.py", line 42, in init _dataset, _dataset_log = hierarchical_dataset(root=opt.train_data, opt=opt, select_data=[selected_d]) File "/content/deep-text-recognition-benchmark/dataset.py", line 124, in hierarchical_dataset concatenated_dataset = ConcatDataset(dataset_list) File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataset.py", line 317, in init assert len(self.datasets) > 0, 'datasets should not be an empty iterable' # type: ignore[arg-type] AssertionError: datasets should not be an empty iterable

alikhalil98771 commented 5 months ago

I changed to this !python train.py --train_data lmbd_output/ --valid_data lmbd_output/ --select_data "/" --batch_ratio 0.5 --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --batch_size 2 --data_filtering_off --workers 0 --batch_max_length 80 --num_iter 10 --valInterval 5 --saved_model TPS-ResNet-BiLSTM-Attn.pth