ImageCleaner doesn't render

I tried to use ImageCleaner to clean my dataset, like so:
ImageCleaner(ds, idxs, path)

but this is what I got:

Button(button_style='primary', description='Next Batch', layout=Layout(width='auto'), style=ButtonStyle())
<fastai.widgets.image_cleaner.ImageCleaner at 0x7f4f54319400>

I tried reading the source code for ImageCleaner but I’m not a jupyter expert and haven’t managed to figure out what I am doing wrong. Thanks for any pointers on how to fix.


Some other thread suggested restarting the notebook after trusting it. I tried that and that did the trick.


I’m encountering this problem too.
Currently using GCP on MacOS Firefox.
I’ve tried trusting and restarting the notebook but it still doesn’t work.
There was a suggestion to update the fastai package but it’s already on 1.0.42.
Any suggestions on how to debug or fix? Thanks

1 Like

I was experiencing the same thing on GCP, so I opened an issue on GitHub about this: #1539. We’ll have to wait and see.

I was running the notebook on my local linux server, so can’t really comment about GCP. Hope you find a fix,

Following the issue on #1539, the widget is not supported on Jupyter Lab, but will work on Jupyter Notebooks (localhost:8080/tree).

Thanks to @amqdn for raising the issue and @fpingham for the solution.


Hi all,
I ran into a problem with ImageCleaner with the lesson2-download.ipynb [Cleaning Up section] running on but it had a different error from the other errors above.
I ran

conda update conda
conda install -c fastai fastai

at the start and restarted my kernel to make sure I got the latest fastai libraries. I also did a

git pull

to make sure I got the latest notebooks (as of Feb 24, 2019).

I haven’t investigated it deeply but it looks to me like it might be a bug (see screenshot below).

Has anyone run the ImageCleaner on
successfully recently?

Best regards,

1 Like

What do you mean by “trusting” the notebook?

Hi, I have successfully run these 2 lines of code in google colab:

  1. from fastai.widgets import *
  2. ds, idxs = DatasetFormatter().from_toplosses(learn, ds_type=DatasetType.Valid)

But the next line of code is just not completing running or getting ended due to getting disconnected.

ImageCleaner(ds, idxs, path)

Anyone know why this is happening plzz?

1 Like

jupyter trust notebook-name.ipynb

Hi @cg123,

ImageCleaner doesn’t work in colab. See this thread.

As an alternative, you can try this method which is what I did.




Thnx for the info butch, actually I thought of doing the same. And already started doing it. But, got anew pb of getting blank jupyter notebook yesterday after installing it. maybe I need to re-install it again and try it once more. @butchland

I’m getting the same error in Any update?

If you use GCP, enter this url

I am running notebook on laptop as there was a suggestion that ImageCleaner will not work on Colab. However ImagCleaner does not render but produce following output:


Button(button_style=‘primary’, description=‘Next Batch’, layout=Layout(width=‘auto’), style=ButtonStyle())


<fastai.widgets.image_cleaner.ImageCleaner at 0x26096730160>

Looks like an issue with some missing package of Jupyter notebook.
Any suggestions?


I have the same problem.

1 Like

I use Salamander, and got them same output as this. So did you solve it?

1 Like

In the file I changed ‘cpu’ to ‘cuda’ and it just took a long time to showcase 6800 images. Although I would’ve only been interested in seeing images that were misclassified.

Same problem…

I didn’t run the notebook in colab or jupyter lab…

finally i solved this problem(If that happened on mac or windows) by running these codes in the terminal:

# for mac terminal, use the command below; for windows cmd, add '--user' to the end of each command.

###  First, reinstall ipywidgets and widgetsnbextension 
pip install --upgrade --force-reinstall ipywidgets

pip install --upgrade --force-reinstall widgetsnbextension 

### Second, install jupyter-js-widgets/extension
jupyter nbextension install --py widgetsnbextension

### Third, enable  widgetsnbextension
jupyter nbextension enable --py widgetsnbextension --sys-prefix

now, we can enjoy lesson2_download.ipynb again. Simply type jupyter notebook in the terminal and open it in the browser.

more details:

1 Like