Code Monkey home page Code Monkey logo

zf5-spp-image_classification's Introduction

ZF5-SPP single/multi-size training for Image Classification in Python

Following paper: While convolutional neural networks (CNNs) require a fixed-size input image, “spatial pyramid pooling” strategy is able to eliminate the above requirement, allow multi-size input and therefore improve the performance of classification.
So, in this repo, I implemented a very basic, simple ZF5 model using and not using SPP as well as multi-size input for performance comparison purpose on image classification problem.

Requirements

  • Python 3
  • Pytorch 2.0
  • Opencv-python

Dataset

ZF5 Model Architecture

  • The model is built restrictly following by two-above papers model_architecture.png

Hyper-parameters

Because of basically experimental purpose, I just use very simple hyper-params that are different from papers' ones

  • NUM_CLASSES = 101
  • NUM_EPOCHS = 30
  • BATCH_SIZE = 128
  • LEARNING_RATE = 0.001
  • WEIGHT_DECAY = 0.001

Result

3 figures below compare the performance of 3 different architectures of ZF5. We can totally show that the model using SPP with Multi-size input training has the best performance and the lowest rate of overfitting.

  • ZF5 Single-size zf5_single_size.png
  • ZF5-SPP Single-size zf5spp_single_size.png
  • ZF5-SPP Multi-size zf5spp_multi_size.png

zf5-spp-image_classification's People

Contributors

hoangpham3003 avatar

Stargazers

 avatar

Watchers

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