Giter Site home page Giter Site logo

animalimageclassification's Introduction

**Animal Classification with MobileNet.**

This project demonstrates the process of training a deep learning model to classify images of animals using the MobileNet architecture. The model is trained on a dataset of animal images and is capable of predicting the class of a given animal image.

**Dataset Architecture**

Dataset

animals/
    train/
        class1/
            image1.jpg
            image2.jpg
            ...
        class2/
            image1.jpg
            image2.jpg
            ...
        ...
    validation/
        class1/
            image1.jpg
            image2.jpg
            ...
        class2/
            image1.jpg
            image2.jpg
            ...
        ...

**Model Architecture**

The MobileNet model, pre-trained on the ImageNet dataset, is used as the base model. Custom layers are added on top of the MobileNet architecture to adapt it for animal classification. The model consists of a global average pooling layer, followed by a dense layer with 1024 units and ReLU activation. The final dense layer with softmax activation is added to predict the class probabilities of the input image.

**Training**

During training, data augmentation techniques such as rescaling, shearing, zooming, and horizontal flipping are applied to the training images. The images are also normalized by dividing the pixel values by 255. The Adam optimizer is used with categorical cross-entropy loss as the training objective. The model is trained for a specified number of epochs with a given batch size.

**Evaluation**

The model's performance is evaluated using accuracy as the evaluation metric. The validation dataset is used for evaluation, and the accuracy is reported after each epoch.

**Saving the Model**

After training, the trained model is saved as "animal_classification_model.h5". Additionally, the list of class names is saved as "class_names.pkl" using the pickle library for later reference.

animalimageclassification's People

Contributors

cat4eve avatar vahegizhlaryan 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.