Although visual features have been the cornerstone of insect recognition, morphological traits are often overlooked by modern “scale-invariant” deep learning-based methods. One such trait is absolute body size, which is commonly used by entomologists to describe species. We propose a novel approach that integrates explicit size information into computer vision models. Our method improves predictions of a computer vision model by incorporating the likelihood of an insect belonging to each class based on its size and the size distribution of the training data. We compare the performance of the proposed size-aware approach against a standard ResNet-18 and a feature-fused ResNet-18 model, demonstrating that incorporating explicit dimensional traits, such as body size, can enhance classification accuracy across both balanced and imbalanced dataset scenarios. We also investigated the effectiveness of size inclusion across different model architectures with varying numbers of parameters, including EfficientNet-B0, ResNet-18, ResNet-50, ConvNeXt‑tiny, and a vision transformer (ViT B16) on a balanced dataset. Our results also show that incorporating size reduces classification error, especially in low-data scenarios and for hierarchically coarse, taxonomic misclassifications (e.g., errors at the family level), and is more effective on models with simpler architectures, such as ResNet-18. Despite being readily available and computationally inexpensive to use, size has, to our knowledge, not been used in this context before. We show that explicitly including size is both computationally efficient and practical, as it requires no specialized sensors and can be derived from standard image segmentation. This makes our approach highly scalable for automated monitoring of insects with camera traps. By acknowledging the importance of size, our approach also contributes to more robust and interpretable ecological modeling. This work opens new avenues for biologically informed AI applications in entomology and beyond. • Body size is integrated into image-based insect classification. • Size is extracted from images with no added cost, complexity, or sensors. • Size-aware approach outperforms standard ResNet on balanced and imbalanced datasets. • Classification errors are reduced, especially in low-data scenarios.
Baghooee et al. (Sun,) studied this question.