Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/watson28/cnn-dog-project
Convolutional Neural Network used to classify canines breed
https://github.com/watson28/cnn-dog-project
deep-learning keras neural-network python
Last synced: 3 days ago
JSON representation
Convolutional Neural Network used to classify canines breed
- Host: GitHub
- URL: https://github.com/watson28/cnn-dog-project
- Owner: watson28
- Created: 2017-12-30T16:01:24.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-04T00:55:50.000Z (almost 7 years ago)
- Last Synced: 2023-12-12T03:22:08.750Z (11 months ago)
- Topics: deep-learning, keras, neural-network, python
- Language: Jupyter Notebook
- Homepage:
- Size: 56.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
[//]: # (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
Convolutional Neural Network used to classify canine’s breed. This CNN model uses transfer learning (from ResNet-50) to reduce the traning time and improve accuracy.
## Project Instructions
### Instructions
1. Clone the repository and navigate to the downloaded folder.
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. Donwload 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
```
- __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
```
- __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.__