-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImageClassifierCleaner throws KeyError #606
Comments
I have the same problem. The problem is that im.mode='RGBA' which throws a KeyError in JpegImagePlugin.py:
I tried converting the images to RGB and re-saving them, but no luck, so I'm guessing fastai converts them to RGBA somewhere along the way?
|
I actually dropped this investigation a while ago since I found out @jph00 is onto preparing the second edition of the book while the recent course of fastai didn't cover the type of production fastai API intended (@jph00 changed the focus quite rightfully into another tool called Gradio, which I believe is the new hype around the community, also great advertising came from both deeplearning.ai and Huggingface communities), but out of curiosity about @ed-kung's investigations I ran through it and it is apparently fine now! I don't know what made this happen but I list possible options that might be suspicious, so i t might not be an actual solution, I guess |
Strange. I have the current latest versions of every package so no clue what might be causing it! And yes, I'm using Gradio as well. |
Ok. I downgraded to pillow 9.5.0 and now it works. |
The open_thumb function of this widget converts to RBGA. I deleted the .convert('RGBA') part of the code below and the widget no longer throws a KeyError. Seems to work, but I have no idea whether that's needed for something else.
The rest of the code is here: https://github.com/fastai/fastai/blob/master/fastai/vision/widgets.py |
I was doing everything fine, in 02_production.ipynb, until I reach this cell:
cleaner = ImageClassifierCleaner(learn)
cleaner
The only thing I changed was using DuckDuckGo Image Search instead of Microsoft Azure,
any help would be appreciated!
The text was updated successfully, but these errors were encountered: