TextRecognitionDataGenerator
TextRecognitionDataGenerator copied to clipboard
KeyError: <weakref at 0x1a29a3e048; to 'tqdm' at 0x1a29a409b0>
when I input this command trdg --output_dir /Users/zhaoyu/Desktop/synthimage/ -c 2 -rs -sym -r -f 64 -k 4 -rk --blur 3 --random_blur -b 3 -cs 0 -fi -ft /Users/zhaoyu/Desktop/MicrosoftYaHeiUI.ttf then 0%| | 0/2 [00:00<?, ?it/s]multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/Users/zhaoyu/anaconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/zhaoyu/anaconda3/lib/python3.6/site-packages/trdg/data_generator.py", line 21, in generate_from_tuple cls.generate(*t) File "/Users/zhaoyu/anaconda3/lib/python3.6/site-packages/trdg/data_generator.py", line 208, in generate final_image = background_img.filter(gaussian_filter) File "/Users/zhaoyu/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 1177, in filter return self._new(filter.filter(self.im)) File "/Users/zhaoyu/anaconda3/lib/python3.6/site-packages/PIL/ImageFilter.py", line 168, in filter return image.gaussian_blur(self.radius) ValueError: image has wrong mode """
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/zhaoyu/anaconda3/bin/trdg", line 11, in
I'll try and reproduce the bug later today. Thank you for opening an issue.
I am afraid I am unable to reproduce your issue on Ubuntu 18.04 with trdg==1.5.0
with the same parameters except for the font which I don't have. I did notice that you were using picture backgrounds so that could be it, are there any pictures in your set that are grayscale?
Because some of his pictures are not RGB mode.