Is download_images function broken?

I was following the create your dataset tutorial, and it looks like the download_images function does not exist…

1 Like

same issue on my end. Did a git pull to be on most current repo version and imported both fastai and fastai.vision, but still:

There was an issue with download_images not actually downloading: https://github.com/fastai/fastai/issues/978

This could be related to that, if it’s been removed.

You need to update the fastai library. You can do this by running

conda install -c fastai fastai

2 Likes

I see the same issue (after updating the libraries)

What platform are you all running on? I’m having this problem on Salamander. See:

I am myself on Salamander with this issue. Just repeated the GPU related conda steps from the steps of the installation thread (i.e.
conda install -c pytorch pytorch-nightly cuda92
conda install -c fastai torchvision-nightly
conda install -c fastai fastai
), but now a) fastai is on different version depending on whom you ask (conda list or show_install) and b) download_images still not known

For Salamander the steps are a little different:

http://course-v3.fast.ai/update_salamander.html

1 Like

I’m using fastai version: 1.0.20

I’m running the download_images function, and I get this error:

BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore

It should not return that. I am running it and not getting that error. Are your running on a server or on a local machine?

I’m running it on my local machine

Is it able to download a few images? Or does it break before printing anything?

I get the same problem and I just updated it again. I am running on my local machine


NameError Traceback (most recent call last)
in
----> 1 download_images(path/file, dest, max_pics=200)

NameError: name ‘download_images’ is not defined

anaconda-navigator shows i am on 1.0.4, with no option to update. conda update says it is the newest version too

I am installing now with conda install -c fastai fastai=1.0.20 to force new version

now i’m getting


ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from fastai import *
2 from fastai.vision import *

ModuleNotFoundError: No module named ‘fastai’

In lesson_2 download notebook there was no lines for autoupdate packages. If you’ve run your notebook and then understood that fastai library was out of date I think these lines may help you… Anyway it helps me :slight_smile:
%reload_ext autoreload
%autoreload 2
%matplotlib inline

I got it working now, i recreated fast.ai environment and installed jupyter into it too

@lesscomfortable is there a way to modify this function so that it can download more than 400 images?

If you scroll down in Google until you can’t anymore and then run the script you should have ~700 pictures. Google does not allow more images to be displayed. If you want more images, you can run the script on one Google Search and then run it again on a related one (e.g. searching in two languages like ‘tiger’/‘tigre’ or searching related terms like ‘dish’/‘plate’).

1 Like