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
Asking for a CYMK jpeg file to be converted to RGB by decode_jpeg() currently results in the following error:
fromtorchvision.ioimportread_file, decode_jpeg, ImageReadModepath="test/assets/fakedata/logos/cmyk_pytorch.jpg"decode_jpeg(read_file(path), mode=ImageReadMode.RGB) # ImageReadMode.UNCHANGED would work
RuntimeError: Unsupported color conversion request
This is an important feature to support because the ImageNet dataset has ~20 CMYK images, which means we currently cannot decode ImageNet files with decode_jpeg(): we have to rely on PIL.
According to this comment in our code there should be a way to support this:
Asking for a CYMK jpeg file to be converted to RGB by
decode_jpeg()
currently results in the following error:This is an important feature to support because the ImageNet dataset has ~20 CMYK images, which means we currently cannot decode ImageNet files with
decode_jpeg()
: we have to rely on PIL.According to this comment in our code there should be a way to support this:
vision/torchvision/csrc/io/image/cpu/decode_jpeg.cpp
Lines 120 to 124 in 9b432d0
The text was updated successfully, but these errors were encountered: