Skip to content

Classification example using pytorch and keras to distinguish dogs and cats pictures

License

Notifications You must be signed in to change notification settings

JCelento/cats-vs-dogs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cats vs Dogs

Classification examples using pytorch and keras to distinguish dogs and cats pictures

How to run it

You will need to:

  • Download and install Python 3.6.1
  • Download and install Nvidia CUDA Toolkit 9.0
  • Download CuDNN for CUDA 9.0 To install CuDNN, copy the files to Nvidia CUDA toolkit(usually is located on C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0)
    • Copy cudnn\bin\cudnn64_5.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\
    • Copy cudnn\include\cudnn.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include\
    • Copy cudnn\lib\x64\cudnn.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64\
  • Visual C++ Redistributate 2015 x64

Install requirements with pip or conda:

First create a new virtualenv

With Anaconda
conda create -n envname python=3.6 anaconda
Or
python3 -m venv envname

Then activate it

With Anaconda
activate envname
Or (On Windows)
envname\Scripts\activate.bat

Now install the dependencies

With Anaconda
conda install --yes --file requirements.txt
With Pip
pip install -r requirements.txt

To run Keras example

py kerasexp.py

To run PyTorch example

py pytorchexp.py

The result should be something like this

Keras Pytorch
Keras Result Pytorch Result

About

Classification example using pytorch and keras to distinguish dogs and cats pictures

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages