# A Novel Tool for Biodiversity Studies: Earthworm Classification via NGS and Neural Networks
## 2 Materials and Methods  
The earthworms _Eisenia fetida_, _Dendrobaena_ ssp., and _Lumbricus terrestris_ were collected at the Department of Agriculture and Waste Management, University of Rzeszow, Poland, and the Department of Plant Protection, the National Institute of Horticultural Research, Skierniewice, Poland. The samples belonging to both _Eisenia fetida_ and _Lumbricus terrestris_ were from two different locations to avoid the influence of environmental conditions and make the procedure more universal. After being collected in the field, the earthworms were transported to the laboratory for imaging. The earthworms were in compost. Before imaging, earthworms were washed and cleaned. Individuals without any substrate residue on their bodies were used for imaging to enable all external surface features to be visible in the images. The earthworms were recognized in terms of species and genus based on external morphological characteristics by the two qualified experts. The characteristics of the individuals examined were sufficient for experts to recognize them without assessing internal anatomical features or using molecular techniques. Mature individuals with clearly developed species characteristics were selected for the study to reduce the uncertainty of diagnosis. The experiment was performed in thirty repetitions for each earthworm group. The presented correlation matrix (Figure 1) depicts Pearson correlation coefficients between developmental stages of earthworms (J2, Pre-adult, Adult) across three examined species, based on texture-related morphological features. The correlation patterns underscore distinct morphological transitions between successive ontogenetic stages, particularly between early (J2) and intermediate (Pre-adult) phases (r = \(-\)0.981). The plotted data in Figure 2 illustrate distinct ontogenetic trends for two representative texture features. Feature A, which increases with development, exhibits a monotonic rise across developmental stages, indicating a progressive enhancement of this textural property in more mature individuals. In contrast, Feature B, which decreases over time, shows a downward trend, suggesting that this feature is more pronounced during early developmental stages and diminishes as maturation advances. These opposing trajectories highlight the stage-specific expression of texture features and reflect dynamic morphological remodeling occurring throughout ontogeny.  
The workflow depicted in Figure 3 outlines the sequential steps involved in the classification of earthworm specimens based on texture features extracted from color image channels. The process begins with the collection of specimens and their imaging under standardized conditions to ensure consistency. Texture features are then extracted separately from the red, green, and blue channels of the acquired images. This is followed by a feature selection step, aimed at identifying the most informative descriptors, and by supervised model training for classification. The integration of image-based texture analysis  
Figure 1: Correlation coefficients between the texture features of different developmental stages (J2, Pre-adult, and Adult) of three earthworm species. Strong negative correlations suggest distinct texture profiles across stages.  
with machine learning enables objective and reproducible differentiation of developmental stages or species based on quantifiable morphological features.