Cant't training the model by the trainer.py
As shown below,easyocr have a error when I use trainer.ipynb
Traceback (most recent call last):
File "trainer.py", line 33, in <module>
train(opt, amp=False)
File "/home/EasyOCR/trainer/train.py", line 44, in train
valid_dataset, valid_dataset_log = hierarchical_dataset(root=o
File "/home/EasyOCR/trainer/dataset.py", line 138, in hierarchic
concatenated_dataset = ConcatDataset(dataset_list)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/da
assert len(self.datasets) > 0, 'datasets should not be an empt
AssertionError: datasets should not be an empty iterable
I had the same problem and discovered that I did not have the correct directory structures in the all_data folder. You need to have an en_filtered and an en_val folders under the all_data folder. Put all your training images in the folder en_filtered and your validation images in en_val. Don't forget to include the corresponding labels.csv in each of the folders. I got past the assertion error but got another issue with thread spawning.
@Metcomtech how you train it? in your local system? or any Cloud Server? Can you please tell me configuration of the system, Thanks
I did the training locally. My machine has a Xeon Gold 5120 processor with 14 cores and 32 Gb of memory. Training was very slow even with my workstation. What I have found however the most accurate solution had often occurred very early in the training process. A longer training time and higher number of steps do not guarantee greater accuracy. My suggestion is if you only have a low spec machine, start with low step count and progressively increase the step count until the validation accuracy starts to level off, then that will be the best solution. You can try to extend the training by increasing the step count but my guess is that will be a waste of time as the accuracy will not improve.
@Metcomtech how much images in your training images and how long did it take to finish the training ?
I am training only 25 training images, it took 1 hour and still running
Can you show the config?