You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to download the unofficial training set and getting this:
$ python3 download.py --dataset_path ./data/annotations_unofficial.json
Note. If for any reason the connection is broken. Just call me again and I will start where I left.
Traceback (most recent call last):......] - 26/3831
File "/opt/homebrew/lib/python3.11/site-packages/PIL/JpegImagePlugin.py", line 640, in _save
rawmode = RAWMODE[im.mode]
~~~~~~~^^^^^^^^^
KeyError: 'RGBA'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/hackeron/Garbage-Detection/faster-rcnn/TACO/download.py", line 49, in <module>
img.save(file_path)
File "/opt/homebrew/lib/python3.11/site-packages/PIL/Image.py", line 2432, in save
save_handler(self, fp, filename)
File "/opt/homebrew/lib/python3.11/site-packages/PIL/JpegImagePlugin.py", line 643, in _save
raise OSError(msg) from e
OSError: cannot write mode RGBA as JPEG
As a temporary workaround I edited JpegImagePlugin.py to ignore RGBA images:
def _save(im, fp, filename):
if im.width == 0 or im.height == 0:
msg = "cannot write empty image as JPEG"
raise ValueError(msg)
try:
if im.mode == 'RGBA':
return
rawmode = RAWMODE[im.mode]
The text was updated successfully, but these errors were encountered:
I'm trying to download the unofficial training set and getting this:
As a temporary workaround I edited JpegImagePlugin.py to ignore RGBA images:
The text was updated successfully, but these errors were encountered: