Anyone starting the course July 2019

untar_data seems to be used for downloading and unpacking a dataset from a URL (see the docs), not for loading in data that is local. The lesson2-download notebook may be more useful as a reference on how work with data that you already have.

if you’re still running into issues, could you show more of your commands and what the errors are?

#Murali
I am on 3 week
Would you like to collaborate

I am on week 1. I am using google collab

Hi all, another newbie here! I am using Colab and I am trying to get going with the do your image classifier but I am getting stuck with the part when you have to upload your data and the csv files (I am using lecture 2 as template). What I reckon is the fast ai library is pointing at some other location and I can’t understand how to make the root directory be in my google drive…the bit in the lecture assumes that you are running your jupyter notebook off your local machine so it’s not helpful with this to the best of my understanding.
I think I manage to get the Colab to be rooted in the Drive folder by using the code from this article (where it says ‘Mounting Google Drive’) https://medium.com/lean-in-women-in-tech-india/google-colab-the-beginners-guide-5ad3b417dfa

But then if assuming that’s working then I don’t think I manage to get the fastai to look into the google drive. Seems to me I am missing some obvious key bit here.
Would appreciate your help!
Cheers
Val

Hi Val,

Could you give some more details on your error?

I changed the code in the section Create directory and upload urls file into your server, and making sure path points to the path where your gdrive is mounted and you want to save your images, like: /content/gdrive/My Drive/fastai-v3/data/bears. I think that was the only place where I needed to change the path to be specific to GDrive.

In the part where you upload your URL files, I instead went to my GDrive and put the files there (instead of using the Upload button that is shown in the notebook). I did this after running the dest.mkdir() commands, so the proper folders would be created and I could see them in my GDrive (such as fastai-v3/data/bears in this example). It took a few seconds to sync at some point, and I might have had to refresh the Drive page.

Hope this helps,
Lee

Hi @Valentin,
Here is a Jupyter notebook that shows you how to set up for fastai v1 in Google Colab


Hope it will help you solve the problem.
Cheers,
Joseph

1 Like

Hello, thanks for your help! I followed the suggested notebook and cloned the course v3 repo into my Drive as suggested.
I am still struggling to understand how the file structure works.
Basically I can’t understand what’s the right location for me to upload the two csv files which were outputed from the google image search javascript code.
I presume first it should go in the root directory (in that case straight into the main MyDrive), but I got error
then I thought I should create in the root directory a folder data and then subfolder ‘guitars’ (I am trying to create classifier which looks at picture of person playing guitar and trying to see whether the resnet would correctly classify the guitar model…so this would be mirroring the ‘bears’ structure from the lecture file) and then the files should be there to be discovered by running the script. However, I am getting the error that it is not finding the files or folder - so I am not sure where I go wrong. Presume its something dead obvious but I can’t see it at the moment…sorry! Here is a screenshot of the error.

@jianjye Any luck with your personal project …

the location of the csv files seems correct. I think the path variable may need to be the full path (so something like path = "/content/gdrive/My Drive/.../data/guitars", where the ... is whatever the full path is from the root of your GDrive).

For example this is what your GDrive directory structure could look like:

My\ Drive
  ./fastai-v3
    ./data
      ./guitars
        ./strat
        ./les_paul
        ./strat.csv
        ./les_paul.csv

and here’s some corresponding python code which should work with that:

from google.colab import drive
drive.mount('/content/gdrive', force_remount=True)

folder = 'strat'
file = 'strat.csv'

folder = 'les_paul'
file = 'les_paul.csv'

classes = ['strat', 'les_paul']

# run once with the "strat" variables set, once with the "les_paul" variables set
path = Path('/content/gdrive/My Drive/fastai-v3/data/guitars')
dest = path/folder
dest.mkdir(parents=True, exist_ok=True)
download_images(path/file, dest, max_pics=200)

Hope this helps!

@ltirrell Sure. I was stuck at lesson 1 for a while (mostly distracted by a lot content available on Internet :slight_smile: )

I will start lesson 2 next week.

I am also using Google colab and found it straightforward.

How do I get this all working in Spyder? I can’t figure it out. Can’t even import fastai without an error

IDK much but would suggest using colab or any other service .

1 Like

Use the anaconda python distribution

can we guys form a group on signal or discord ?

1 Like

I built a traffic classifier that would take CCTV images and decide if it’s heavy_traffic or not. Not sure if I am doing it right but I got 6% error rate using Resnet50 which seems pretty good.

I have some screenshots at my Twitter: https://twitter.com/jjsee/status/1166972223732584448

It was actually quite straight forward to build this as I only have to modify lesson-2 slightly to fit my classes.

2 Likes

I used pandas for reading .json files in the PASCAL dataset and it is throwing an error “Arrays must be all same length”.Does anyone have any suggestions to correct the error or any other way to read the .json files. Stack Overflow is not helping…

I started following you on twitter and like Jeremy said it’s really really hard to overfit a deep learning model so you are in a good spot with that 6 percent error, good work :slight_smile:

I am in love with google colab. Free + connectivity with google drive+ easy setup+good community in fastai to help with colab. <3

1 Like

This is such a good idea. Have you guys already formed one?

I like Sypder alot but no no for DataScience