Skip to content

Here is pytorch implementation of VGG16 from scratch. It was trained on animal dataset for animal classification. It is a pratical project for basic skills in computer vision.

Notifications You must be signed in to change notification settings

jibby2803/VGG16-pytorch-implementation

Repository files navigation

VGG16-pytorch-implementation

Introduction

Here is pytorch implementation of VGG16 from scratch. It was trained on animal dataset for animal classification. It is a pratical project for basic skills in computer vision. You can down load dataset from here

Result

Due to hardware limitations, I only trained the model for approximately 28 epochs, with the highest recorded accuracy reaching 88.71%.


Figure_1


Figure_2

How to use

You can use my code as a learning material for computer vision when getting started with computer vision and wanting to code a model from scratch. Run the following command to install modules needed

pip install -r requirements.txt

The code was organized:

  • Transform needed for image pre-processing: transforms.py
  • Dataset was implemented in: dataset.py
  • Model architecture was implemented in: vgg16_model.py
  • Script to train model: train.py
  • Test the model with new image: test.py
  • In the notebook directory, you can also use animals_classification.ipynb and adjust some things accordingly your conditions to train on notebook or Google colab.

About

Here is pytorch implementation of VGG16 from scratch. It was trained on animal dataset for animal classification. It is a pratical project for basic skills in computer vision.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published