Open enricodata opened 4 years ago
When running the following code: import Augmentor p = Augmentor.Pipeline(path) p.rotate(probability=1, max_left_rotation=5, max_right_rotation=5) p.random_distortion(probability=1, grid_width=4, grid_height=4, magnitude=8) p.flip_left_right(probability=0.5) p.flip_top_bottom(probability=0.5) p.zoom_random(probability=0.5, percentage_area=0.8) p.sample(10000)
I get the errors below.
why is that happening?
KeyError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/PIL/JpegImagePlugin.py in _save(im, fp, filename) 618 try: --> 619 rawmode = RAWMODE[im.mode] 620 except KeyError:
KeyError: 'RGBA'
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last) 10 frames /usr/local/lib/python3.6/dist-packages/Augmentor/Pipeline.py in _execute(self, augmentor_image, save_to_disk, multi_threaded) 250 --> 251 images[i].save(os.path.join(augmentor_image.output_directory, save_name)) 252
/usr/local/lib/python3.6/dist-packages/PIL/Image.py in save(self, fp, format, **params) 2083 try: -> 2084 save_handler(self, fp, filename) 2085 finally:
/usr/local/lib/python3.6/dist-packages/PIL/JpegImagePlugin.py in _save(im, fp, filename) 620 except KeyError: --> 621 raise IOError("cannot write mode %s as JPEG" % im.mode) 622
OSError: cannot write mode RGBA as JPEG
AttributeError Traceback (most recent call last)
@enricodata The reason of this error may be an incorrect file extension. The problem is I don't know how to find this image - the log seems to be incomplete
When running the following code: import Augmentor p = Augmentor.Pipeline(path) p.rotate(probability=1, max_left_rotation=5, max_right_rotation=5) p.random_distortion(probability=1, grid_width=4, grid_height=4, magnitude=8) p.flip_left_right(probability=0.5) p.flip_top_bottom(probability=0.5) p.zoom_random(probability=0.5, percentage_area=0.8) p.sample(10000)
I get the errors below.
why is that happening?
`Processing <PIL.Image.Image image mode=RGB size=2000x1000 at 0x7F12BB48AB00>: 7%|▋ | 655/10000 [12:54<3:04:10, 1.18s/ Samples]
KeyError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/PIL/JpegImagePlugin.py in _save(im, fp, filename) 618 try: --> 619 rawmode = RAWMODE[im.mode] 620 except KeyError:
KeyError: 'RGBA'
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last) 10 frames /usr/local/lib/python3.6/dist-packages/Augmentor/Pipeline.py in _execute(self, augmentor_image, save_to_disk, multi_threaded) 250 --> 251 images[i].save(os.path.join(augmentor_image.output_directory, save_name)) 252
/usr/local/lib/python3.6/dist-packages/PIL/Image.py in save(self, fp, format, **params) 2083 try: -> 2084 save_handler(self, fp, filename) 2085 finally:
/usr/local/lib/python3.6/dist-packages/PIL/JpegImagePlugin.py in _save(im, fp, filename) 620 except KeyError: --> 621 raise IOError("cannot write mode %s as JPEG" % im.mode) 622
OSError: cannot write mode RGBA as JPEG
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)