-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 29867c4
Showing
38 changed files
with
63,470 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
dogImages/ | ||
lfw/ | ||
saved_models/weights.best.from_scratch.hdf5 | ||
saved_models/weights.best.vgg16.hdf5 | ||
.ipynb_checkpoints/ | ||
bottleneck_features/DogVGG16Data.npz |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
s is a comment. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These owners will be the default owners for everything in | ||
# the repo. | ||
* @cgearhart @luisguiserrano | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2017 Udacity, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
[//]: # (Image References) | ||
|
||
[image1]: ./images/sample_dog_output.png "Sample Output" | ||
[image2]: ./images/vgg16_model.png "VGG-16 Model Keras Layers" | ||
[image3]: ./images/vgg16_model_draw.png "VGG16 Model Figure" | ||
|
||
|
||
## Project Overview | ||
|
||
Welcome to the Convolutional Neural Networks (CNN) project in the AI Nanodegree! In this project, you will learn how to build a pipeline that can be used within a web or mobile app to process real-world, user-supplied images. Given an image of a dog, your algorithm will identify an estimate of the canine’s breed. If supplied an image of a human, the code will identify the resembling dog breed. | ||
|
||
![Sample Output][image1] | ||
|
||
Along with exploring state-of-the-art CNN models for classification, you will make important design decisions about the user experience for your app. Our goal is that by completing this lab, you understand the challenges involved in piecing together a series of models designed to perform various tasks in a data processing pipeline. Each model has its strengths and weaknesses, and engineering a real-world application often involves solving many problems without a perfect answer. Your imperfect solution will nonetheless create a fun user experience! | ||
|
||
## Project Instructions | ||
|
||
### Instructions | ||
|
||
1. Clone the repository and navigate to the downloaded folder. | ||
``` | ||
git clone https://github.com/udacity/dog-project.git | ||
cd dog-project | ||
``` | ||
|
||
2. Download the [dog dataset](https://s3-us-west-1.amazonaws.com/udacity-aind/dog-project/dogImages.zip). Unzip the folder and place it in the repo, at location `path/to/dog-project/dogImages`. | ||
|
||
3. Download the [human dataset](https://s3-us-west-1.amazonaws.com/udacity-aind/dog-project/lfw.zip). 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](http://www.7-zip.org/) to extract the folder. | ||
|
||
4. Download the [VGG-16 bottleneck features](https://s3-us-west-1.amazonaws.com/udacity-aind/dog-project/DogVGG16Data.npz) for the dog dataset. Place it in the repo, at location `path/to/dog-project/bottleneck_features`. | ||
|
||
5. (Optional) __If you plan to install TensorFlow with GPU support on your local machine__, follow [the guide](https://www.tensorflow.org/install/) to install the necessary NVIDIA software on your system. If you are using an EC2 GPU instance, you can skip this step. | ||
|
||
6. (Optional) **If you are running the project on your local machine (and not using AWS)**, create (and activate) a new environment. | ||
|
||
- __Linux__ (to install with __GPU support__, change `requirements/dog-linux.yml` to `requirements/dog-linux-gpu.yml`): | ||
``` | ||
conda env create -f requirements/dog-linux.yml | ||
source activate dog-project | ||
``` | ||
- __Mac__ (to install with __GPU support__, change `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 | ||
``` | ||
- __Windows__ (to install with __GPU support__, change `requirements/dog-windows.yml` to `requirements/dog-windows-gpu.yml`): | ||
``` | ||
conda env create -f requirements/dog-windows.yml | ||
activate dog-project | ||
``` | ||
|
||
7. (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. | ||
|
||
- __Linux__ or __Mac__ (to install with __GPU support__, change `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 | ||
``` | ||
- __Windows__ (to install with __GPU support__, change `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 | ||
``` | ||
|
||
8. (Optional) **If you are using AWS**, install Tensorflow. | ||
``` | ||
sudo python3 -m pip install -r requirements/requirements-gpu.txt | ||
``` | ||
|
||
9. Switch [Keras backend](https://keras.io/backend/) to TensorFlow. | ||
- __Linux__ or __Mac__: | ||
``` | ||
KERAS_BACKEND=tensorflow python -c "from keras import backend" | ||
``` | ||
- __Windows__: | ||
``` | ||
set KERAS_BACKEND=tensorflow | ||
python -c "from keras import backend" | ||
``` | ||
|
||
10. (Optional) **If you are running the project on your local machine (and not using AWS)**, create an [IPython kernel](http://ipython.readthedocs.io/en/stable/install/kernel_install.html) for the `dog-project` environment. | ||
``` | ||
python -m ipykernel install --user --name dog-project --display-name "dog-project" | ||
``` | ||
|
||
11. Open the notebook. | ||
``` | ||
jupyter notebook dog_app.ipynb | ||
``` | ||
|
||
12. (Optional) **If you are running the project on your local machine (and not using AWS)**, before running code, change the kernel to match the dog-project environment by using the drop-down menu (**Kernel > Change kernel > dog-project**). Then, follow the instructions in the notebook. | ||
|
||
__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.__ | ||
|
||
## Evaluation | ||
|
||
Your project will be reviewed by a Udacity reviewer against the CNN project [rubric](https://review.udacity.com/#!/rubrics/810/view). Review this rubric thoroughly, and self-evaluate your project before submission. All criteria found in the rubric must meet specifications for you to pass. | ||
|
||
## Project Submission | ||
|
||
When you are ready to submit your project, collect the following files and compress them into a single archive for upload: | ||
- The `dog_app.ipynb` file with fully functional code, all code cells executed and displaying output, and all questions answered. | ||
- An HTML or PDF export of the project notebook with the name `report.html` or `report.pdf`. | ||
- Any additional images used for the project that were not supplied to you for the project. __Please do not include the project data sets in the `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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DogVGG16Data.npz |
Oops, something went wrong.