Set up the kaggle CLI, and use it to download data for the Dogs vs Cats: Redux competition (a different dataset than the one we shared with you) to your EC2 instance.
Successfully submit to the above competition, using kaggle-cli, and try to get in the top 50%
Modify the lesson 1 notebook to work with the new dataset.
Look through other image data sets and choose one to work on during the course. You should talk with your group about whether you all want to work on the same dataset or not (either is fine). Check if a forum thread already exists for that dataset, and if not, create one. You can use the thread to talk with other students who are working with the same dataset.
Download the data to your EC2 instance, and modify the lesson 1 notebook to run on a sample subset of the data.
I am working through Dogs and Cats and finding myself having trouble with the %matplotlib inline command. Other commands work fine but when I get to the point that images are supposed to be generated, I see nothing even though the code appears to run. Any words of wisdom on how to address this problem?
@ashley.fuller when asking for help, try to provide all the information you can to help the folks here help you. In particular, tell us exactly what error messages you receive, and what you’ve typed - particularly if you’ve done anything differently to the lesson1 notebook. And let us know what you’re running on - AWS p2 or t2 instance? Your own computer (if so, what OS)? Screenshots can also be helpful.
With this information I hope we’ll be able to fix your issue quickly!
Sorry! I am running on my own mac OS X El Capitan version 10.11.5 using t2large. I simply ran the line as it appears in the lesson:
I got no error message and so thought everything was alright. But when I reach the line:
It runs, but no plots appear. Am not getting error messages though. My best guess is that the matplotlib line went wrong somehow–I see no pictures!
I can run the lesson 1 notebook on the dogcats data with no problem.
However, I am not sure how to run it with Dogs vs Cats:Redux. data. I downloaded the train and test files from kaggle using kaggle-cli but there are not separated into dogs/cats images. Can you explain in more details how we are supposed to run the vgg on this new data and submit it?
@layla.tadjpour you’ll need to write a script that separates it into the correct folder names. If you get stuck, you’ll find one written for you by @vshets that you could look at for inspiration in this thread: Kaggle Questions
Anyone else having an issue where the after the model is finetuned to make predictions on the dogs vs cats redux data, the predictions are binary? When I generate predictions on dogs/cats data with the vgg model before fine tuning, I get fractional probabilities for each of the 1000 imagenet categories (eg. .23 likelihood of Egyptian cat). However, after finetuning, I never get any predictions with fractional probabilities between 0 and 1, they’re always exactly 0 or exactly 1. The reason I ask is because the scoring function on kaggle is more forgiving of incorrect predictions closer to .5, eg for a given example, .55 likelihood of dog, .45 of cat, rather than 1 of dog, 0 of cat.
I’m having the same issue, but in addition it’s assigning classes of goldfish and tench to the images instead of dog and cat. These are the first two classes in the original vgg/imagenet model, so I guess Keras didn’t pull the names from the training directory structure?
I can totally replace the labels, but I get the idea I’ve missed something.
Can I reflect back what I think the todo list is for lesson 1?
Get AWS instance running (either g2 or m4 if not yet approved for g2) after contacting support etc.
Setup ssh keys as per instructions in setup video
install bash setup script onto server instance
launch jupyter notebook on the instance
once the notebook is running, review the lesson 1 notebook notes and run each cell of code to figure out what python and vgg is doing
install kaggle CLI onto the server instance
use the kaggle CLI to download the current data for the Dogs vs. Cats Redux competition
configure the new data to the file structure in the same way that was used in the sample lesson 1 notebook
make a copy of the lesson 1 notebook and use the new copy to draw in the new Dogs Vs. Cats data (including moving utils.py and vgg16.py to the new folder where the new notebook sits?)
Run the relevant code cells on the sample set of new Dogs v. Cats data to make a prediction on the new image data set.
Once, the sample set works, modify the jupyter notebook to use the on the new test data images
write a script that takes the predict() data of the new Dogs vs. Cats data and writes the data to a new csv file in the format of the sample_submission.csv file that was downloaded with the Dogs vs. Cats
submit that new submission.csv file to the kaggle via the CLI tool
check the public scoreboard for your own ranking
modify or tune current code in the lesson 1 notebook to try to get into the top 50% ranking of the current Dogs v Cats competition
start exploring the other new datasets on kaggle and decide which one you or some teammates would like to study further during the course
download the new data to your EC2 instance and repeat the previous steps with your brand new data.
Is this about right?
I understand that the first lesson is mostly about getting comfortable with a terminal to manipulate a server instance in the cloud, how to organize raw data, and how to participate in the kaggle community.
Are we also learning how to fine tune the model onto the data? the examples with the VGG() model seem already optimized with batch=64. To submit to the kaggle competition did you mean for us to optimize the “the Create a VGG model from scratch in Keras” with the new Dogs v Cats data in order to get above 50% in the kaggle ranking?