Using Lesson 1 model to predict for images from the Web

With the goal of correctly classifying if a given picture is that of a golf course or not, I downloaded golf course and other landscape jpgs from the Internet.

I would like to use Lesson1 model to train based on images i have and then to correctly identify if images in validation set are that of a golf course or not.

Not sure how to get the data ready for the Lesson 1 model :

  1. should i upload the images to tree/courses/dl1/data/ in a new folder?
  2. does the model in lesson1 automatically split the data into train and validation?
  3. how can i set the labels for the training data that actually are of golf courses vs other landscape, so that the model can learn.

Thanks.

to get the data ready

  1. should i upload the images to tree/courses/dl1/data/ in a new folder?
    –> It is not necessary to have this path only you can give a different path in PATH variable. The given PATH folder should contain folders named “train” and “valid”. So its all upto you where you want to have these folders.

2.does the model in lesson1 automatically split the data into train and validation?
–> no. it does not. as told above you have to make separate folders named “train” and “valid”. Model takes train folder for training and valid for validation set.

3.how can i set the labels for the training data that actually are of golf courses vs other landscape, so that the model can learn.
–> as was told in videos there are two ways to do that, one you can use csv file where you have image name and label table or you have to make folders named on labels for your predictor “golf course” and “others” could be the names of folders(its upto you what you wish to have). And these folders should be inside both “train” and “valid” folders. The model will automatically determine the label using folder names.

I hope this will help.

1 Like