Image-based insect species and gender classification by trained supervised machine learning algorithms

Midori Tuda, Alejandro Isabel Luna-Maldonado

Research output: Contribution to journalArticlepeer-review

11 Citations (Scopus)


Classification of specimens is the important first step to characterize populations and species assemblages. Although species-level classification has been a popular goal, the sex difference and sex ratio are also an important property in ecology and pest control. Here we focus on the images of mixed sex specimens of a stored product pest beetle (Callosobruchus chinensis) and its parasitoids (parasitic wasps; Anisopteromalus and Heterospilus) in various postures and classify them into species and sex, by training supervised machine learning programs: logistic model trees (LMT), random forest, support vector machine (SVM), simple logistic regression, multilayer perceptron and AdaBoost (adaptive boosting). Both object-based features and pixel-based features were extracted from each image. Simple logistic regression, LMT and AdaBoost (employing simple logistic regression as base learner) performed well to classify sexes or species/sexes; average true positive rates (prediction accuracy) of 88.5–98.5% were achieved for within-species sexing of beetles or wasps, 97.3% for two species sexing and 93.3% for three species sexing. For most datasets, the best performed models incorporated both object-based features and pixel-based features. LMT models were identical to simple logistic regression models in most cases. Robust performance and small variation in prediction accuracy of simple logistic regression, irrespective of classification target (sexes or species), was shown, and this is probably because of the efficient feature selection implemented in the algorithm. This study is one of the earliest to classify the gender of insects using machine learning based on still images.

Original languageEnglish
Article number101135
JournalEcological Informatics
Publication statusPublished - Nov 2020

All Science Journal Classification (ASJC) codes

  • Ecology, Evolution, Behavior and Systematics
  • Ecology
  • Modelling and Simulation
  • Ecological Modelling
  • Computer Science Applications
  • Computational Theory and Mathematics
  • Applied Mathematics


Dive into the research topics of 'Image-based insect species and gender classification by trained supervised machine learning algorithms'. Together they form a unique fingerprint.

Cite this