Machine Learning Engineer - Dog Breed Classifier
MIT License
See project report
In this project, I make the first steps towards developing an algorithm that could be used as part of a mobile or web app. At the end of this project, my code will accept any user-supplied image as input. If a dog is detected in the image, it will provide an estimate of the dog's breed. If a human is detected, it will provide an estimate of the dog breed that is most resembling.
In this real-world setting, I need to piece together a series of models to perform different tasks; for instance, the algorithm that detects humans in an image will be different from the CNN that infers dog breed. There are many points of possible failure, and no perfect algorithm exists. y imperfect solution will nonetheless create a fun user experience!
git clone https://github.com/udacity/dog-project.git
cd dog-project
Download the dog dataset. Unzip the folder and place it in the repo, at location path/to/dog-project/dogImages
.
Download the human dataset. Unzip the folder and place it in the repo, at location path/to/dog-project/lfw
. If you are using a Windows machine, you are encouraged to use 7zip to extract the folder.
Donwload the VGG-16 bottleneck features for the dog dataset. Place it in the repo, at location path/to/dog-project/bottleneck_features
.
(Optional) If you plan to install TensorFlow with GPU support on your local machine, follow the guide to install the necessary NVIDIA software on your system. If you are using an EC2 GPU instance, you can skip this step.
(Optional) If you are running the project on your local machine (and not using AWS), create (and activate) a new environment.
requirements/dog-linux.yml
to requirements/dog-linux-gpu.yml
):conda env create -f requirements/dog-linux.yml
source activate dog-project
requirements/dog-mac.yml
to requirements/dog-mac-gpu.yml
):conda env create -f requirements/dog-mac.yml
source activate dog-project
NOTE: Some Mac users may need to install a different version of OpenCV
conda install --channel https://conda.anaconda.org/menpo opencv3
requirements/dog-windows.yml
to requirements/dog-windows-gpu.yml
):conda env create -f requirements/dog-windows.yml
activate dog-project
(Optional) If you are running the project on your local machine (and not using AWS) and Step 6 throws errors, try this alternative step to create your environment.
requirements/requirements.txt
to requirements/requirements-gpu.txt
):conda create --name dog-project python=3.5
source activate dog-project
pip install -r requirements/requirements.txt
NOTE: Some Mac users may need to install a different version of OpenCV
conda install --channel https://conda.anaconda.org/menpo opencv3
requirements/requirements.txt
to requirements/requirements-gpu.txt
):conda create --name dog-project python=3.5
activate dog-project
pip install -r requirements/requirements.txt
(Optional) If you are using AWS, install Tensorflow.
sudo python3 -m pip install -r requirements/requirements-gpu.txt
Switch Keras backend to TensorFlow.
KERAS_BACKEND=tensorflow python -c "from keras import backend"
set KERAS_BACKEND=tensorflow
python -c "from keras import backend"
(Optional) If you are running the project on your local machine (and not using AWS), create an IPython kernel for the dog-project
environment.
python -m ipykernel install --user --name dog-project --display-name "dog-project"
jupyter notebook dog_app.ipynb
NOTE: While some code has already been implemented to get you started, you will need to implement additional functionality to successfully answer all of the questions included in the notebook. Unless requested, do not modify code that has already been included.
Your project will be reviewed by a Udacity reviewer against the CNN project rubric. Review this rubric thoroughly, and self-evaluate your project before submission. All criteria found in the rubric must meet specifications for you to pass.
When you are ready to submit your project, collect the following files and compress them into a single archive for upload:
dog_app.ipynb
file with fully functional code, all code cells executed and displaying output, and all questions answered.report.html
or report.pdf
.dogImages/
or lfw/
folders. Likewise, please do not include the bottleneck_features/
folder.
Alternatively, your submission could consist of the GitHub link to your repository.