Search bioRxiv⌕ Search

bioRxiv · 10.64898/2026.06.10.731342

LizardLens: A Two-Stage Deep Learning Pipeline for Detecting and Classifying Similar Species in Visually Complex Environments

Abstract

Community science platforms like iNaturalist generate unprecedented volumes of biodiversity data, but their scientific utility depends critically on accurate species identification--a persistent challenge when contributors often lack taxonomic expertise. We developed "LizardLens", a two-stage machine learning pipeline that decouples object detection from species classification to enable fine-grained identification of morphologically similar organisms in visually complex field photographs. Using 10,000 verified iNaturalist images of five Anolis lizard species in Florida, we trained specialized YOLO-based detection and Swin Transformer classification models and compared performance against state-of-the-art single-stage architectures. Our two-stage pipeline achieved 83.0% Top-1 accuracy and a macro-averaged F1-score of 89.0%, indicating strong precision-recall performance across species and outperforming single-stage YOLOv8 and YOLOv12 models across all evaluation metrics for all species, with relative improvements ranging from 10.5% to 13.2%. Gradient-weighted Class Activation Mapping (Grad-CAM) indicated that the models predictions were consistently associated with regions corresponding to diagnostic morphological (e.g., head shape, feet, and limb lengths) and pattern features (e.g., ocular rings and body patterning), providing evidence that LizardLens leverages biologically relevant visual cues consistent with those used by expert taxonomists. Error analysis identified partial occlusion and multiple proximate individuals as primary sources of missed detections, while spurious detections of lizard-like environmental features (e.g., sticks, bark) represented the dominant false positive error mode. We deployed LizardLens as an accessible web application featuring interactive bounding box correction, ranked species predictions with confidence scores, directly supporting the "Lizards on the Loose" middle school community science initiative. By combining technical advances in fine-grained visual classification with user-centered design, LizardLens demonstrates how machine learning can simultaneously enhance data quality for biodiversity monitoring and provide authentic scientific experiences for student participants. Our approach is generalizable to other small-bodied organisms in complex habitats and provides a framework for translating computer vision advances into practical tools for community science and conservation.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Chia, W. H., Jahanshahi, I., Loh, L. Y., Zheng, A., Verma, N., Mussman, S., Shi, B., Stroud, J. T.. 2026-06-12. LizardLens: A Two-Stage Deep Learning Pipeline for Detecting and Classifying Similar Species in Visually Complex Environments. https://doi.org/10.64898/2026.06.10.731342

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

A leaf-carbon economy model to explain the adaptive value of low vs. high leaf mass per area as a function of habitat productivity

Plant traits interact with environmental conditions to determine plant fitness. In particular, plant species with low leaf mass per area (LMA) are more common in high fertility soils and forest gaps, while plant species with high LMA are more common in low fertility soils and in shaded forest understories. It is not yet known why the adaptive value of LMA changes as a function of environmental productivity. We present a model for plant growth as a function of LMA and productivity. Our model relies on an empirically derived relationship between LMA and leaf lifespan. We are able to explain why species with lower LMA are successful in high productivity environments including environments with high availability of either light or soil nutrients, by showing that the LMA which maximizes growth rate decreases with increasing rate of carbon assimilation. We show that low LMA species are better at taking advantage of the 'high interest' environment of high productivity habitats by reinvesting assimilated carbon in new leaves and earning compound interest, while high LMA species grow more efficiently in the 'low interest' environment of low productivity habitats. This tradeoff sheds light on the adaptive value of LMA as it relates to environmental productivity.

ecology↗

Species differentiate water uptake depths within a narrow vertical zone in temperate grasslands

Whether and under which conditions coexisting species in temperate grasslands differentiate their water uptake within the shallow soil layer they share is central to understanding hydrological niche differentiation in these ecosystems. In this field study, we quantified water uptake depth of 28 coexisting herbaceous species across 74 temperate grassland plots in three regions of Germany using oxygen stable isotopes and soil water content measured at multiple depths. Species consistently differed in water uptake depth across all regions, consistent with hydrological niche differentiation. This differentiation was largely confined to the upper 30 cm of soil and became stronger as overall soil moisture declined, with plants accessing water at greater depths in drier plots. In contrast, the vertical distribution of soil moisture was unrelated to either uptake depth or species differentiation. Despite pronounced species level variation, broad herbaceous functional classifications, including grasses versus forbs and fibrous versus taprooted species, showed substantial overlap in water uptake depth. Together, our results show that hydrological niche differentiation in temperate grasslands is expressed through fine scale differences among species within a shared shallow soil domain, becomes more pronounced under drier conditions, and is poorly captured by broad herbaceous functional classifications.

ecology↗

Fungal-bacterial interactions enhance bacterial but constrain fungal resistance and recovery to extreme heat across soil moisture levels

Soil fungi and bacteria are key drivers of nutrient cycling and plant productivity in terrestrial ecosystems, yet their responses to climate extremes are rarely studied as interacting partners rather than in isolation. Moreover, it remains largely unknown how fungal-bacterial interactions regulate fungal and bacterial stability under climate extremes, particularly resistance (immediate responses to climate extremes) and recovery (responses after climate extremes cease). Here, we conducted a soil microcosm experiment with a bacterial species (Pseudomonas putida KT2440) paired with one of four Trichoderma species (T. hamatum, T. atroviride, T. koningiopsis, and T. harzianum). These fungal-bacterial pairs were then exposed to a 5-day heat event (40 {degrees}C/32 {degrees}C, day/night) followed by a 14-day recovery period (25 {degrees}C/17 {degrees}C, day/night), at two soil moisture levels (30% and 5% gravimetric water content). Our results show that fungal-bacterial interactions asymmetrically affect fungal and bacterial responses to extreme heat. Trichoderma species facilitated the resistance and recovery of P. putida density (CFUs) to extreme heat, whereas P. putida constrained the resistance and recovery of fungal biomass (ergosterol) to extreme heat, regardless of soil moisture conditions. Moreover, faster-growing Trichoderma species were associated with greater facilitation of bacterial resistance and recovery. Bacterial density also covaried positively with fungal biomass during heat stress under both soil moisture conditions, suggesting that net fungal facilitation enhances bacterial persistence under extreme heat. Together, our findings reveal that fungal-bacterial interactions can stabilize one microbial partner while increasing the vulnerability of the other, highlighting the contrasting consequences of biotic interactions under climate extremes.

ecology↗