Hossein Shirali, A. Ascenzi, Lorenz Wührl, Nils Beyer, Noemi Di Lorenzo, Emanuele Vaccarella, Nathalie Klug, Rudolf Meier, Pierfilippo Cerretti, Christian Pylatiuk
Accurate measurement of insect morphometric traits is essential for functional ecology and biodiversity monitoring. Yet traditional manual methods are labor-intensive, invasive, destructive, and difficult to scale within high-throughput biodiversity pipelines. InsectMorphoAI is an open-source, dual-module framework that automates specimen-level trait extraction from standard 2D images using deep learning. A hardware-agnostic Oriented Bounding Box (OBB) module provides rotation-invariant linear length estimation across diverse insect taxa, achieving a mean absolute error of 0.211 mm (≈2.3% of mean specimen length) in an independent validation dataset of bristle flies (Diptera: Tachinidae). A complementary instance segmentation module enables high-precision, taxon-specific trait extraction by delineating the head, thorax, and abdomen to derive curvilinear lengths and approximate 3D body volume using stacked frustums. Implemented and validated here using bristle flies as a proof-of-concept system, segmentation-derived volume explained more variation in body-only biomass than linear length within the validation dataset (R 2 = 0.823 for body-only dry weight and R 2 = 0.880 for wet weight after leg removal, compared to R 2 = 0.610–0.627 for length-based estimates). As a non-destructive approach, the framework preserves specimens for downstream molecular analyses such as DNA barcoding. The modular architecture provides a practical pathway for extending high-precision volumetric estimation through the development of taxon-specific models. Distributed via Docker with a graphical interface and command-line tool, InsectMorphoAI enables reproducible morphometric data acquisition for applications in functional trait ecology, biomass monitoring, and conservation assessments.