Code Monkey home page Code Monkey logo

toannguyen1904 / improving-insect-pest-recognition-by-ensemblingmultiple-convolutional-neural-network-basedmodels Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hieuung/improving-insect-pest-recognition-by-ensemblingmultiple-convolutional-neural-network-basedmodels

0.0 0.0 0.0 133 KB

This repository is used to publish our codes for the paper "An Efficient Insect Pest Classification Using Multiple Convolutional Neural Network Based Models"

Python 100.00%

improving-insect-pest-recognition-by-ensemblingmultiple-convolutional-neural-network-basedmodels's Introduction

An Efficient Insect Pest Classification Using Multiple Convolutional Neural Network Based Models

Introduction

In this project, we implement many convolutional neural network-based models on insect pests recognition task. Including: attention, feature pyramid network residual attention networks, and fine-grained models (MMAL-networks). We using an ensemble technique to combine our models to obtain the robust model. We test our proposed methods on 2 published datasets including IP102: A Large-Scale Benchmark Dataset for Insect Pest Recognition and D0. The experimental results show that combining these convolutional neural network-based models can better perform than the state-of-the-art methods on these two datasets. For instance, the highest accuracy we obtained on IP102 and D0 is 74.13% and 99.78%, respectively_

Our paper can be found at https://arxiv.org/abs/2107.12189 and under the submission to the journal Applied Intelligence.

Requirement

  • python 3.7.10
  • torch 1.7.1
  • numpy 1.19.5
  • matplotlib 3.2.2
  • TensorboardX 2.0
  • sklearn 0.22.2
  • skimage 0.16.2
  • imblearn 0.4.3
  • barbar

Dataset

In this work, we using two published datasets:

Usage

To preproduct the result:

  • Download all requirement packages.
  • Main working directory must be "...\Improving-Insect-Pest-Recognition-by-EnsemblingMultiple-Convolutional-Neural-Network-basedModels\code".
  • Download dataset
  • Prepare the training data using command:
py data_prepare.py -data IP102 -root ...\\ip102_v1.1-002

Note: Downloaded IP102's root folder directory must contained the archived .tar flie and .txt files of listing samples for training, validating,and testing. Created root folder for training will be placed in the same directory with this code.

py data_prepare.py -data D0 -root ...\\d0

Note: Downloaded D0's root folder must contained 40 archived .zip files. Created root folder for training will be placed in the same directory with this code.

  • Training phase:
    • Training and Testing ResNet50
      python Trainmain.py -data IP102(or D0) -optim Adam -sch expdecay -l2 0.00001 -do 0.3 -predt True -mn resnet -lr 0.0001 -ep 100 -bz 64 -dv cuda
    • Training and Testing RAN
      python Trainmain.py -data IP102(or D0) -optim SGD -sch myScheduler -l2 0.0000 -do 0.0 -predt False -mn residual-attention -lr 0.1 -ep 100 -bz 32 -dv cuda
    • Training and Testing FPN
      python Trainmain.py -data IP102(or D0) -optim Adam -sch expdecay -l2 0.00001 -do 0.0 -predt True -mn fpn -lr 0.0001 -ep 100 -bz 32 -dv cuda
    • Training MMAL-Net
      python train.py -data IP102(or D0) -dv cuda
    • Testing MMAL-Net
      python test.py -data IP102(or D0) -dv cuda
  • Ensemble all models with soft voting
    python implement_ensemble.py -data IP102(or D0) -dv cuda

Contact

References

 @misc{ung2021efficient,
      title={An Efficient Insect Pest Classification Using Multiple Convolutional Neural Network Based Models}, 
      author={Hieu T. Ung and Huy Q. Ung and Binh T. Nguyen},
      year={2021},
      eprint={2107.12189},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

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.