ImageCleaner doesn't render

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.

4 Likes

Hi all,
I ran into a problem with ImageCleaner with the lesson2-download.ipynb [Cleaning Up section] running on Crestle.ai 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 Crestle.ai
successfully recently?

Best regards,
Butch

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.

HTH.

Butch

2 Likes

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 crestle.ai. Any update?

If you use GCP, enter this url
http://localhost:8080

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:

HBox(children=(VBox(children=(Image(value=b’\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00d\x00d\x00\x00\xff…

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

Out[26]:

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

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

2 Likes

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 imagecleaner.py 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: https://github.com/fastai/fastai/issues/1539

1 Like

I am facing the same issue and the above attempts did not resolve it for me.
When running ImageCleaner(ds, idxs, path) I am only seeing a Next Batch button and the line
<fastai.widgets.image_cleaner.ImageCleaner at 0x7fb142e4b190>. There are no images being shown.

I am sitting on a VM Instance of a Compute Engine on Google Cloud Platform. I have tried the commands suggested by @Karl_Mason. When I run these commands:

pip install --upgrade --force-reinstall ipywidgets --user
pip install --upgrade --force-reinstall widgetsnbextension --user

I get the following errors:

ERROR: spyder 3.3.6 requires pyqt5<5.13; python_version >= "3", which is not installed.
ERROR: spyder 3.3.6 requires pyqtwebengine<5.13; python_version >= "3", which is not installed.
ERROR: fastai 1.0.57 requires nvidia-ml-py3, which is not installed.
ERROR: thinc 6.12.1 has requirement msgpack<0.6.0,>=0.5.6, but you'll have msgpack 0.6.1 which is incompatible.
ERROR: fairing 0.5.3 has requirement tornado<6.0.0,>=5.1.1, but you'll have tornado 6.0.3 which is incompatible.
ERROR: datalab 1.1.5 has requirement pandas-profiling==1.4.0, but you'll have pandas-profiling 2.3.0 which is incompatible.

I also restarted my VM instance afterwards. I am using jupyter notebook and not JupyterLab

While I try this code and its successfully Run:

!pip install ipywidgets
from fastai.widgets import *

ds, idxs = DatasetFormatter().from_toplosses(learn, ds_type=DatasetType.Valid)

ImageCleaner(ds, idxs, path)