LEPY: A Python pipeline for automated trait extraction from standardised Lepidoptera images

Read full text
Authors: Yenny Correa-Carmona, Dennis Böttger, Dimitri Korsch, Kim L. Holzmann, Pedro Alonso‐Alonso, Andrea Pinos, Felipe Yon, Alexander Keller, Ingolf Steffan‐Dewenter, Paul Bodesheim, Marcell K. Peters, Gunnar Brehm
Cited by: 2
References: 63

Abstract

We present LEPY, a free and openly available Python-based pipeline for the automated extraction and analysis of morphological and colour traits, from mounted specimens of Lepidoptera (butterflies and moths). The pipeline uses an automatically detected scale bar for accurate morphological measurements, together with image segmentation that separates the specimen from the background, with users able to pre-select from a set of segmentation models. We designed LEPY to be user-friendly and reproducible, ensuring efficient and consistent analysis of large image datasets. The pipeline also supports the integration of ultraviolet (UV) photographs for improved colour analysis, an innovative feature rarely available in existing trait-analysis tools. LEPY computes morphological traits such as body length, forewing length, and specimen area. It also extracts colour traits including hue, saturation, intensity from the red, green, and blue (RGB) channels, as well as brightness, contrast, chromaticity, and luminance from both RBG and UV channels. The pipeline uses the data to calculate colour diversity with the Shannon index, exports results in a structured, machine-readable format, and it also generates visual summaries of each image pair. We tested LEPY on different moth groups spanning a wide range of body sizes and colouration patterns. As an ecological case study, we applied the pipeline to complete datasets of Sphingidae and Saturniidae collected along an elevational gradient in the Peruvian Andes. The resulting trait data revealed taxon-dependent morphological and colour responses to elevation, thereby demonstrating LEPY's utility for analysing large-scale trait datasets. LEPY provides a robust and fully automated approach for the analysis of morphological and colour traits in Lepidoptera, supporting ecological and evolutionary research. Its scalability and ability to generate standardised, high-resolution trait datasets make it a valuable tool for biodiversity monitoring, macroecological research, and the development of global trait databases. • LEPY pipeline for automated trait extraction from Lepidoptera images. • Trait analysis includes body size, wing length, specimen area, and colour metrics. • Ultraviolet imaging adds novel insight to multispectral colour analysis. • Example dataset on moths sampled along an elevational gradient in Peru. • Large-scale, standardised trait data available for ecological research studies.

Fields of Study & Subjects

Morphological variations and asymmetry Cell Image Analysis Techniques Biomimetic flight and propulsion mechanisms

Publication details

Journal / source
Ecological Informatics
Publisher
Elsevier BV
Volume
95
Pages
103680–103680
Publication date
7 March 2026
Language
EN