Giter Site home page Giter Site logo

maxencefaldor / dog-classification Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 895 KB

A dog classifier that predicts the breed provided an image.

Jupyter Notebook 100.00%
image-classification cnn deep-learning convolutional-neural-networks computer-vision

dog-classification's Introduction

Dog classifier

The goal of this project is to create a dog classifier using state-of-the-art models for classification and localization. The pipeline processes real-world, user-supplied images. First, it tries to detect human faces. If supplied an image of a human face, the code will identify the resembling dog breed. Else, the algorithm will identify an estimate of the canine’s breed using a CNN.

Detect Humans

I used OpenCV's implementation of Haar feature-based cascade classifiers to detect human faces in images. OpenCV provides many pre-trained face detectors, stored as XML files. I downloaded one of those and stored it in the haarcascades directory.

Detect Dogs

I downloaded VGG-16 pre-trained model to detect dogs in images. I also explored other pre-trained networks such as Inception-v3 and ResNet-50. In order to check if an image contains a dog with the VGG-16 model, we need to check if the pre-trained model predicts an index between 151 and 268 (categories from 'Chihuahua' to 'Mexican hairless').

Create a CNN to Classify Dog Breeds (from scratch)

I created a CNN that classifies dog breeds from scratch. The neural network has three convolutional layers with max pooling and ReLU activation. I used data augmentation with random horizontal flip and random rotation.

The model achieves 15% accuracy for the classification task of 133 different dog breeds.

Create a CNN to Classify Dog Breeds (using transfer learning)

I used transfer learning to improve the model's performance. The dataset is small and similar to ImageNet (there are a lot of image of dogs in ImageNet) therefore I chose to get the convolutional layers from VGG16 fixed and train my own classifier on top.

The model achieves 72% accuracy for the classification task of 133 different dog breeds.

Data

dog-classification's People

Contributors

maxencefaldor avatar

Stargazers

Nuh Muhammed Pişkin 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.