Lesson 1 In-Class Discussion ✅

disclaimer : i am no expert at this, but which method in the ImageDataBunch is causing the issue ?

This might be a good starting point : https://docs.fast.ai/vision.data.html#ImageDataBunch

Yep, went through the documentation. It seems to work only after all necessary arguments are added, such as valid_pct, for the from_folder type. Thanks for the help!

Hi, I am having trouble getting the google images urls using the javascript

      urls = Array.from(document.querySelectorAll('.rg_di.rg_meta')).map(el=>JSON.parse(el.textContent).ou);   
window.open('data:text/csv;charset=utf-8,' + escape(urls.join('\n')));

Running in the google chrome console I get a .csv file but it is empty (0 bytes). Any ideas what I am doing wrong? I am running Linux Mint.

There is an easier way to download google images using the google-images-download python module in your jupyter notebook.
Here are the steps to download the different bears images

First install the python module
!pip install google_images_download
Then in the subsequent cells, start downloadig the grizzly bears (-k grizzly argument below)
!googleimagesdownload -k grizzly -l 100
A new folder called downloads/grizzly will be created with 100 images in it (that’s the -100 argument n the command above)
Do the same thing for the other categories
!googleimagesdownload -k ‘black bear’ -l 100
!googleimagesdownload -k ‘teddy bear’ -l 100

Run the ls command
!ls downloads/
and you should have the 3 following folders
‘black bear’ grizzly ‘teddy bear’

2 Likes

Hi

I am experimenting with the concepts in lesson-1. However, when working with lr_find(), I see an empty graph on plotting the lr graph.

Kindly, can someone help me understand why the lr_find plot is coming out to be empty.

Thanks
Gopi

This thread might help: Blank lr plot returned

1 Like

Thanks @nbharatula. Going over the discussion now :slight_smile:

What does he mean by ‘model’? Is he going to explain what it is later?

anyone can explain me about backward,i want to write it personally in math

Hi earthyearth hope your are well!
From lesson 1 don’t think I heard a precise definition of a model.
However the post below gives one definition and is an easy read, combine it with lesson 1 info and it should help your understanding.

Cheers mrfabulous1 :smiley::smiley:

2 Likes

Anyone starting the assignment and wanna discuss through it together?

I had the same problem a few moments ago. Are you using lr_find() and the plot command on the same cell? It solved when I put them on different cells.

Finished the assignment building my own dataset. In fact I used one of the resources from:


It really helps.

2 Likes

Does anyone know how can I modify this regular expression to match the following format?

path_lbl = path/'labels'
path_img = path/'images'
get_y_fn = lambda x: path_lbl/f'{x.stem}_P{x.suffix}'

Example

images

case_00004_imaging_127.tif 
case_00004_imaging_128.tif 
case_00004_imaging_1290.tif

labels 
case_00004_segmentation_127.tif 
case_00004_segmentation_128.tif 
case_00004_segmentation_1290.tif

For the URLs.PETS, when I input the url to the chrome, this come out. Why not I download the data when I copy the URLs.PETS to the chrome? THANK YOU! I use linux system

Could you post the error message you get? And what’s the output of path?

The actual link you’re looking for needs to have the .tgz extension in order to download the data. This is the url you’re looking for https://s3.amazonaws.com/fast-ai-imageclas/oxford-iiit-pet.tgz
To see all the datasets that fastai uses, I found this handy: https://course.fast.ai/datasets

Thanks for your help!

why the output of type(URLs) is type?

I was able to figure it out. It was the path. Thank you.