ImageClassifierCleaner renders with images and dropdowns, however changing which category I am inspecting or switching between Train or Validate, no update happens in the UI to refresh the images displayed. I am running the code per the book:
cleaner = ImageClassifierCleaner(learner)
Based on the Practical Deep Learning for Coders video for Lesson 2, switching between the sets should update the UI (link to video with timecode showing expected behavior).
Has anyone else run into this issue? Or have a workaround?
Do you work at Google Colab? Sometimes you have to wait longer or start the cell again.
Thanks for your message Karol. I am using Paperspace with VSCode. Unfortunately restarting it has no affect on it.
I have also seen the same occur on my personal system. I have successfully used the cleaner function before on Google Collab and it was working fine there, but on my system, it is failing. The images themselves are not loading.
I tried running the same stuff again on my system and found out that I was doing multiple label classification and used cleaner for it. And that was causing the issue, If you could provide your code, image or a link to the project, It will be helpful in resolving your issue.
Thanks @Adhe11 for taking a look. I exported the python code from the Jupyter notebook:
! [ -e /content ] && pip install -Uqq fastbook
from fastbook import *
from fastai.vision.widgets import *
from fastai.vision.all import *
path = untar_data(URLs.PETS)/'images'
def is_cat(x): return x.isupper()
dls = ImageDataLoaders.from_name_func(
path, get_image_files(path), valid_pct=0.2, seed=42,
learn = vision_learner(dls, resnet34, metrics=error_rate)
cleaner = ImageClassifierCleaner(learn)
As you can see it’s pretty simple…
I tried your code and it is working fine. The thing is after every time you make a change the widget takes some time to load.
I don’t know how Paperspace show that the system is working, but when I selected a category or train/validation set, a loading symbol occurs implying that the system is loading something. This happens both in jupyter notebook and VS Code.
In VS Code sometimes you have to move the scroll bar of the images/widgets for it to detect that you have made some changes. Then you will see that the code block is loading something. After that, it should work as desired.
Thanks @Adhe11. Unfortunately this seems to be an issue with VS Code. I am also attempting to use Ipywidget’s
@interact, used in Lesson 3, and facing a similar issue. VS Code has a known issue with that library Github issue link. So potentially this is similar.
In case anyone else comes across this thread, my workaround has been to launch JupyterLab from the Paperspace notebook.