Skip to main content
LEPY: A Python-Based Pipeline for Automated Morphological Trait Analysis of Lepidoptera Images

LEPY: A Python-Based Pipeline for Automated Morphological Trait Analysis of Lepidoptera Images

This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.

Add a Comment

You must log in to post a comment.


Comments

There are no comments or no comments have been made public for this article.

Downloads

Download Preprint

Supplementary Files

Authors

Yenny Correa Carmona, Dennis Böttger, Dimitri Korsch, Kim Lea Holzmann, Pedro Alonso-Alonso, Andrea Pinos, Felipe Yon, Alexander Keller, Ingolf Steffan-Dewenter, Marcell K. Peters, Gunnar Brehm

Abstract

1. We present LEPY, a Python-based pipeline for automating the extraction and analysis of morphological traits, including structural and colour properties, from mounted Lepidoptera specimens. It uses a U-Net neural network for image segmentation and a scale bar for precise measurements. LEPY is designed to be easy and reproducible, ensuring efficient and consistent analysis of large Lepidoptera image datasets. It also supports the integration of UV photographs for enhanced colour analysis.

2. LEPY computes structural traits, including body and wing length and area, and colour characteristics such as hue, saturation, and intensity, which are stored in a structured format (CSV) for easy evaluation. It also provides distribution metrics that describe the brightness and dynamic range/contrast, chromaticity, and luminance for four colour channels (R, G, B, and UV). Data from all channels are integrated to calculate colour diversity using the Shannon index. A visual summary of each image pair, including false colour images, is also provided.

3. We validated LEPY using data from Sphingidae and Saturniidae moths, known for their contrasting traits, which were sampled along a complete elevational gradient in the Peruvian Andes. In both families, forewing length increased with elevation. As expected, Sphingidae had smaller wing areas than Saturniidae despite their longer forewings. The brightness of colours decreased with elevation in both families, and Sphingidae were generally darker than Saturniidae. The dynamic range/contrast varied among species but was uncorrelated to elevation.

4. LEPY is a powerful tool for studying key Lepidoptera traits. It integrates advanced computer vision and neural network methods with automated measurements, supporting ecological and evolutionary research. It also offers new possibilities for analysing Lepidoptera traits along gradients and responses to environmental changes.

DOI

https://doi.org/10.32942/X2WS78

Subjects

Life Sciences

Keywords

computer vision, Deep learning, lepidoptera, Multispectral Colour Analysis, Structural Traits, python, Photography, UV Photography

Dates

Published: 2025-03-26 21:27

Last Updated: 2025-03-26 21:27

License

No Creative Commons license

Additional Metadata

Conflict of interest statement:
The authors have no conflict of interest

Data and Code Availability Statement:
Code used for this study are available from the GitHub repository at https://github.com/tzlr-de/LEPY

Language:
English