Back

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

Chia, W. H.; Jahanshahi, I.; Loh, L. Y.; Zheng, A.; Verma, N.; Mussman, S.; Shi, B.; Stroud, J. T.

2026-06-12 ecology
10.64898/2026.06.10.731342 bioRxiv
Show 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.

Matching journals

The top 6 journals account for 50% of the predicted probability mass.

1
Methods in Ecology and Evolution
176 papers in training set
Top 0.1%
18.7%
2
Remote Sensing in Ecology and Conservation
14 papers in training set
Top 0.1%
10.7%
3
Nature Methods
385 papers in training set
Top 1%
7.3%
4
Nature Communications
5641 papers in training set
Top 22%
7.3%
5
Scientific Reports
3612 papers in training set
Top 18%
5.2%
6
PLOS ONE
5266 papers in training set
Top 32%
4.4%
50% of probability mass above
7
Ecology and Evolution
267 papers in training set
Top 2%
4.1%
8
Patterns
78 papers in training set
Top 0.5%
3.3%
9
eLife
5828 papers in training set
Top 37%
2.8%
10
PLOS Computational Biology
1863 papers in training set
Top 11%
2.8%
11
Proceedings of the National Academy of Sciences
2444 papers in training set
Top 23%
2.1%
12
New Phytologist
346 papers in training set
Top 3%
2.1%
13
GigaScience
212 papers in training set
Top 2%
1.7%
14
Ecology Letters
135 papers in training set
Top 1%
1.7%
15
PLOS Biology
486 papers in training set
Top 5%
1.7%
16
Molecular Ecology Resources
171 papers in training set
Top 1%
1.4%
17
Nature
645 papers in training set
Top 7%
1.4%
18
Communications Biology
993 papers in training set
Top 21%
1.1%
19
Scientific Data
209 papers in training set
Top 2%
1.1%
20
Ecological Informatics
33 papers in training set
Top 0.5%
1.1%
21
Science Advances
1243 papers in training set
Top 24%
1.1%
22
Journal of Animal Ecology
75 papers in training set
Top 1%
1.1%
23
Ecological Applications
34 papers in training set
Top 0.7%
1.0%
24
Ecology
85 papers in training set
Top 1%
0.9%
25
Journal of Applied Ecology
39 papers in training set
Top 1%
0.9%
26
Advanced Intelligent Systems
11 papers in training set
Top 0.4%
0.6%
27
Communications Earth & Environment
14 papers in training set
Top 0.4%
0.6%
28
iScience
1154 papers in training set
Top 39%
0.6%
29
Limnology and Oceanography: Methods
11 papers in training set
Top 0.3%
0.6%
30
Cell
431 papers in training set
Top 11%
0.6%