Giter Club home page Giter Club logo

cats-dogs-classifier-cnn's Introduction

CATS-DOGS-CLASSIFIER-CNN

Cats & Dogs Classifier using Conventional Neural Network in Keras. You can get the dataset from here.

Getting Started

Following should be the directory structure. I've uploaded few images in the dataset folder so that you can understand more better the structure and file naming scheme.

project   
│
└───dataset
│   │
│   └───single_prediction
│   │   │   cat_or_dog1.jpg
│   │   │   cat_or_dog2.jpg
│   │
│   │
│   └───test_set
│   │   │
│   │   └───cats
│   │   │   cat.1.jpg
│   │   │   cat.2.jpg
│   │   │   ...
│   │   │
│   │   └───dogs
│   │       dog.1.jpg
│   │       dog.2.jpg
│   │       ...
│   │  
│   └───training_set
│       │
│       └───cats
│       │   cat.1.jpg
│       │   cat.2.jpg
│       │   ...
│       │
│       └───dogs
│           dog.1.jpg
│           dog.2.jpg
│           ...
│     
└───CATS_DOGS_CLASSIFIER.ipynb

Built With

  • Python 3.6
  • Keras 2.1.3
  • Numpy
  • Jupyter Notebook

Dependencies

You'll need (Keras)[https://keras.io/] installed to run the script. It can be installed using pip

pip install keras

We will also need numpy. It can also be installed using pip

pip install numpy

Installation

Download or Clone the repo and download the dataset from here and store it in the dataset folder using the structure showed above. After that, run either python script or the jupyter notebook. This CNN is trained using CPU only. If you are using GPU, feel free to add more layers or increase number of neurons.

Usage

Once the model is trained, you can use any image of dog or cat stored in single_prediction folder to predict either it is a dog or cat in the image.

Contributing

  1. Fork it
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Authors

Muhammad Ali Zia

License

This project is licensed under the MIT License - see the LICENSE.md file for details

cats-dogs-classifier-cnn's People

Contributors

the-javapocalypse avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.