Skip to content

duongnphong/Dog-Cat-Classification-PyTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dog & Cat Classification with PyTorch

Introduction

Personal project to build deep learning model to classification images of Dogs and Cats using PyTorch.

Training Set

The data used for the project was taken from Kaggle, including labelled images of Dogs and Cats (12500 images each), and unlabelled ones.

Depedencies and Installation

  • Enviroments: Python 3.10.6 + CUDA 12.0

  • Required library:

    pip install -r requirements.txt

Data Preparation

Labelled data was used to train the model, 12500 images for each categories was divided 80% as train data and 20% as test data as shown:

$\qquad$ data/
$\qquad$ $\qquad$ train/
$\qquad$ $\qquad$ $\qquad$ | -- cat (10000 images)
$\qquad$ $\qquad$ $\qquad$ | -- dogs (10000 images)
$\qquad$ $\qquad$ test/
$\qquad$ $\qquad$ $\qquad$ | -- cat (2500 images)
$\qquad$ $\qquad$ $\qquad$ | -- dogs (2500 images)

Training

To run, use this command

python train.py

Hyperparameters used for this model are:

  • Epoch = 10
  • Learning rate = 1e-5

Inference

To run, get the URL of the picture, insert it the code and run:

python infer.py
Dog Cat

TODO

  • Further improve the accuracy of the model
  • Try out other pretrained models

About

Deep learning model for classification of dog and cat images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages