Giter Club home page Giter Club logo

classification-dogvscat-using-pytorch-from-scratch's Introduction

Classification-DogvsCat-using-PyTorch-from-Scratch

๐Ÿ”ฐ This is a project that uses PyTorch to classify dogs and cats. I built it from scratch and compared multiple models to see which one worked better

๐Ÿ“Ž I do this project to practice what I learned from this course PyTorch for Deep Learning & Machine Learning โ€“ Full Course with 30 hours - freecodecamp.org

โšก Notebook - Train models

Open with Open In Colab

๐Ÿ–ฑ๏ธ If you don't want to train on Colab, well, just run this statement below:

User> pip install -r requirements.txt
User> python3 train_resnet_model.py

๐Ÿ“‰ Evaluating Train and Testing Processing

  • We can see that the results from the ResNet50 model are much better than the TinyVGG model, however, in the ResNet50 model, we can see that the model is overfitting. To solve this problem, we can reduce the number of layers in the ResNet50 model, in addition, we can experiment with some other optimizer types such as SGD or Adam to see the efficiency.

    TinyVGG model ResNet50 model

๐Ÿ˜พ Predict with TinyVGG model

Dog with TinyVGG model Cat with TinyVGG model

๐Ÿ˜พ Predict with ResNet50 model

Cat with ResNet50 model Dog with ResNet50 model

Evaluating models and deploy them

โšก Notebook - Evaluating models and deploy them

Open with Open In Colab

๐Ÿ“ File Structure

deploy/
โ””โ”€โ”€ dogvscat_mini/
    โ”œโ”€โ”€ ResNet.pth
    โ”œโ”€โ”€ app.py
    โ”œโ”€โ”€ examples/
    โ”‚   โ”œโ”€โ”€ example_1.jpg
    โ”‚   โ”œโ”€โ”€ example_2.jpg
    โ”‚   โ””โ”€โ”€ example_3.jpg
    โ”œโ”€โ”€ model.py
    โ””โ”€โ”€ requirements.txt

Using git tokens to push on huggingface space

classification-dogvscat-using-pytorch-from-scratch's People

Contributors

hoducvu avatar

Stargazers

Dawood M.Shoaib avatar  avatar  avatar

Watchers

 avatar

Forkers

genkikuro

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.