Skip to content

hieuung/Improving-Insect-Pest-Recognition-by-EnsemblingMultiple-Convolutional-Neural-Network-basedModels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

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}
}

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages