Abstract
Identifying insect species from crowdsourced photographs is a challenging task due to minute visual differences between species, distracting backgrounds, and highly imbalanced datasets. This research addresses these issues by augmenting a standard convolutional neural network (CNN) with two distinct forms of prior knowledge: a geo-spatiotemporal prior (incorporating the location and date of the observation) and a shape-based segmentation mask to isolate the subject from background noise. Experimental results on a large-scale dataset of over 1,000 species demonstrate that this combined approach significantly improves classification accuracy, especially for rare species, providing a robust framework for biodiversity monitoring.
Introduction
Monitoring insect populations is vital for assessing ecosystem health and the impacts of climate change. However, the sheer scale of data required exceeds the capacity of professional entomologists. While citizen science platforms generate millions of photos, the manual identification of species remains a significant bottleneck.
This task represents a "fine-grained classification" problem. Visual differences between distinct species are often subtle, while intra-species variance—caused by lighting, pose, or environmental context—can be substantial. Furthermore, crowdsourced data is inherently imbalanced; common species are overrepresented, while rare species may have only a few examples. This paper proposes a computer vision pipeline designed to leverage auxiliary metadata and morphological focus to overcome these challenges.
Methodology
The proposed architecture enhances a standard ResNet-based CNN by integrating two primary innovations designed to inject domain-specific prior knowledge into the system:
1. Geo-Spatiotemporal Prior
Species distribution is often constrained by geography and seasonality. Visually similar species may occupy different regions or emerge at different times of the year. To capture this, the authors trained a lightweight neural network to predict species probability based on latitude, longitude, and capture date. These inputs are transformed using periodic functions (sine/cosine) to account for the Earth's spherical geometry and the annual calendar cycle.
As shown in Figure 1, the CNN and the Spatiotemporal Encoder are trained independently. At test time, the final prediction is proportional to the product of the image-based probability and the spatiotemporal probability. This acts as a Bayesian prior, allowing the model to disambiguate visually identical species based on their likely location.
2. Shape-Based Prior (Segmentation)
Background elements like foliage can introduce bias, leading models to associate specific environments with certain species rather than learning the insect's morphology. To mitigate this, a pre-trained U-Net generates segmentation masks that act as a visual attention mechanism, forcing the network to focus on the shape and features of the insect and ignore the background.
3. Addressing Class Imbalance
Given the extreme imbalance in wildlife datasets, the authors utilized supervised hard sample mining. This ensures the model focuses on difficult, underrepresented classes during training, which is more effective for fine-grained tasks than generative methods like SMOTE that might distort critical morphological details.
Experimental Results
The methodology was evaluated using a dataset of over 500,000 observations (100,000 expert-labeled) spanning 1,000 species, provided by the City of Montréal and a North American crowdsourcing platform.
Impact of Spatiotemporal Metadata
The inclusion of geographic and temporal data provided a substantial performance boost, particularly in "Macro" accuracy, which weights all classes equally regardless of frequency.
As detailed in Figure 4, the baseline image-only model achieved a Top-1 Macro accuracy of 59.87%. Integrating latitude and longitude increased this to 64.47%. The full model, incorporating latitude, longitude, and date, reached 65.31% Top-1 Macro accuracy—a ~6% absolute improvement. This confirms that context is a powerful discriminative signal for rare species that lack sufficient visual training data.
Impact of Segmentation
The shape-based segmentation module also yielded positive results. When integrated into the imbalanced-augmented CNN, Top-1 accuracy improved from 79.54% to 80.95%, demonstrating the value of explicit morphological focus.
Discussion and Conclusion
The results highlight that for fine-grained tasks, visual data alone is often insufficient. Contextual metadata (where and when) and structural priors (segmentation) are essential for disambiguating visually similar species.
Future work aims to further refine these priors by incorporating satellite imagery to model specific habitats and exploring cross-species correlations (e.g., using bird population data to predict butterfly presence). Additionally, the authors suggest "reverse segmentation"—classifying the background plants—to gain insights into pollination patterns and ecological relationships. Despite these advancements, extreme class imbalance remains a hurdle, but the integration of domain-specific prior knowledge offers a promising path forward for automated biodiversity monitoring.
Summary updated