Deep Learning Pipeline for Automated Visual Moth Monitoring: Insect Localization and Species Classification

Dimitri Korsch, Paul Bodesheim, Joachim DenzlerarXiv 2023 · DOI

Introduction

Biodiversity is currently facing a global crisis, with significant declines in insect populations reported worldwide. Monitoring these trends is critical for conservation, yet traditional manual methods are labor-intensive, expensive, and difficult to scale. While computer vision has advanced rapidly, its application to entomology remains challenging due to the "fine-grained" nature of insect identification—where different species appear nearly identical—and the fact that insects often occupy only a small portion of high-resolution monitoring images.

This paper presents a robust, automated deep learning pipeline designed to localize and classify moth species captured by automated scanners, significantly improving identification accuracy over standard end-to-end approaches.

The Proposed Pipeline

The researchers developed a modular two-stage system that separates the task of finding an insect from the task of identifying its species.

1. Localization (The Detector)

The first stage employs a Single-Shot MultiBox Detector (SSD) with a VGG16 backbone. This component is trained to identify and draw bounding boxes around any moth present in an image, regardless of its species. By isolating the insect from the background, the detector acts as a "denoiser," allowing the subsequent classification stage to focus on high-resolution crops of the relevant subject.

Example of the moth detector localizing multiple insects within a single frame.

2. Species Classification

The cropped images are processed by an InceptionV3 network. To handle the complexities of fine-grained classification, the authors introduced two key enhancements:

  • Domain-Specific Pre-training: The model uses weights pre-trained on the iNaturalist dataset rather than standard ImageNet weights. This leverages features learned from millions of biological observations, which are more relevant to entomology.
  • Unsupervised Part Estimation: To capture subtle morphological differences, the system identifies informative regions (e.g., wing patterns) using gradient-based saliency maps. These "parts" are extracted and processed through a separate CNN, with their features aggregated into the final classification decision. This process is entirely unsupervised, requiring no manual part annotations.
Overview of the proposed two-stage moth monitoring pipeline, featuring detection, classification, and unsupervised part estimation.

Datasets and Evaluation

The pipeline was evaluated on two datasets:

  • MCC (Moth Classification and Counting): A benchmark of 8 species (2,000 images) from Raspberry Pi-based cameras.
  • EU-Moths: A challenging dataset of 200 Central European moth species (~2,200 images). Despite the high quality of these images, the large number of classes and low image-per-species count (~11) make it a rigorous test for fine-grained identification.

Key Results and Insights

  • Detection Performance: The moth detector achieved a mean Average Precision ([email protected]) of 99.01% on the EU-Moths dataset. Notably, the detector generalized well to species it had never seen during training, maintaining high precision.
  • Classification Accuracy: On single-insect cutouts, the classifier reached 93.13% accuracy across 200 species. The combined pipeline (Detect + Classify) improved identification on raw scanner images from 79.62% to 88.05%.
  • Biological Transfer Learning: Pre-training on iNaturalist provided a significant boost. When training only the final layer, the iNaturalist-based model was 20% more accurate than the ImageNet-based version, proving that biological context is vital for specialized computer vision tasks.

Conclusion

By combining robust localization with fine-grained classification and unsupervised part estimation, this pipeline offers a scalable solution for biodiversity monitoring. The system's ability to generalize to unseen species and its high accuracy across hundreds of classes mark a significant step forward in automated entomology. Future work will focus on expanding dataset sizes to better capture intra-species variation and testing the system in more chaotic, natural environments.

Summary updated

BibTeX
@misc{korsch2023deep,
  author = {Dimitri Korsch and Paul Bodesheim and Joachim Denzler},
  title = {{Deep Learning Pipeline for Automated Visual Moth Monitoring: Insect Localization and Species Classification}},
  year = {2023},
  eprint = {2307.15427},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.15427},
}
Figure