betaFeedback

WorksComputer Science

Accurate automated photo-identification of Near Eastern and European fire salamanders

Abstract

Photo-identification underpins non-invasive capture-recapture monitoring of amphibians, but manual identification becomes slow and error-prone as reference libraries grow. Focusing on the Near Eastern fire salamander (Salamandra infraimmaculata), we developed a pipeline based on zero-shot local-feature matching (SuperPoint and LightGlue) without species-specific training and evaluated it on 2,4402{,}440 field photographs from Haifa and Tel Dan in northern Israel. We isolated the yellow spot pattern, scored image similarity by the number of high-confidence keypoint matches, which reduced a confound whereby many-spotted individuals accumulate spurious matches, and assigned identities across the database by two-tier clustering. Pipeline-assisted expert review corrected misidentifications, reducing the number of identities by almost a quarter. On held-out individuals, the pipeline ranked the correct individual first for 95.2%95.2\% of queries and recovered identities with an ARI of 0.9580.958. Without modification, it reached 95.1%95.1\% and 91.7%91.7\% top-1 accuracy on two datasets of the European fire salamander (Salamandra salamandra) and recognised 93.7%93.7\% of recaptures in one of them, compared with 3838-77%77\% for five established programs and 93.9%93.9\% for visual inspection. Zero-shot local-feature matching thus offers amphibian monitoring a re-identification tool that needs no training data, transfers between related species, scales to databases of over a thousand individuals, and can audit existing databases before capture-recapture analysis.

Introduction

Amphibians are the most threatened class of vertebrates [40]. The Near Eastern fire salamander, S. infraimmaculata, reaches the southernmost limit of its genus in Israel [17], where it is considered endangered [27], although it is listed globally as Least Concern, previously Near Threatened [21]. Adults are terrestrial and breed in ephemeral pools and permanent springs [36], where introduced mosquitofish harm their larvae [37], and several populations persist in fragmented and urban habitats [5, 11]. Each individual carries a unique pattern of discrete yellow spots on its back, which allows it to be recognized from photographs without physical marking [11]. In the congeneric S. salamandra, this pattern is widely used for identification, but some adults show minor changes, such as the shrinking or splitting of a spot, possibly linked to growth [4].

Dorsal spot patterns have been used to recognize individuals of this species for decades. On Mount Carmel, an isolated population was followed by its dorsal patterns for 18 years [42], and individually recognized salamanders were followed for up to 21 years, over which most growth occurred in the first 9–10 years of life [43]. Capture–recapture studies also identified individuals by eye from their dorsal patterns [36], and movement studies revealed long-distance dispersal with implications for habitat fragmentation [5]. In a first test of automated identification in this species, the AmphIdent software missed 47% of the recaptures that a trained observer had found in the photographs of Segev et al. (2010), which were taken at varying angles, but matched recaptures reliably in photographs taken perpendicular to the back under a standardized protocol at Tel Dan [17]. Most recently, a multi-year citizen-science program in two urban wadis of Haifa recorded 212 individuals over 89 surveys and estimated population size, survival and growth, revealing a prolonged period of vulnerability before individuals reach full size and smaller populations where breeding ponds contain introduced fish [11]. In that program, recaptures were recognized by a single observer comparing photographs by eye, and the authors noted that automated identification tools would make this step robust and repeatable [11].

Photo-identification is now widely used for non-invasive capture–recapture studies [26], and for many amphibians it is the basis of long-term monitoring of survival, movement and population size [6, 15, 35, 44]. However, manual matching becomes time-consuming and error-prone as the reference library grows over multiple surveys [7]. Most such errors are splitting errors, in which a recaptured individual is registered as new, and they bias capture–recapture estimates of population size upward [39, 22, 24]; in a critically endangered skink, supplementing human matching with software revealed such errors and lowered abundance estimates [23]. Computer-assisted systems based on hand-crafted features were developed to reduce this burden, including for salamanders [16, 7, 10, 15]. In a large capture–recapture study of newts, genetic fingerprinting confirmed that one such program, AmphIdent, identified individuals highly efficiently [15], but in adult European fire salamanders photographed in the field, five such programs recognised only 38–77% of recaptures [35].

Automated re-identification is increasingly used in wildlife monitoring [12], and recent deep-learning approaches broadly fall into two families: global-feature embedding models, which represent each image by a single vector, such as MegaDescriptor and MiewID [47, 31] (Adam, Čermák, Papafitsoros and Picek 2025), and deep local-feature matching pipelines, which detect learned keypoints and match them between images [14, 46, 25] and have been applied to individual re-identification on their own [44] or combined with global embeddings [30, 9]. In the AnimalCLEF 2025 challenge, which included European fire salamanders, most top-ranked systems included local-feature matching [2]; the 2026 edition changed the task to clustering images into individuals, evaluated by the adjusted Rand index [3]. In amphibians, deep networks trained on the target species have identified individual Japanese giant salamanders, Andrias japonicus, and yellow-spotted mountain newts [41, 33], but such classifiers recognise only the individuals in their training images, whereas wild populations continually gain new individuals.

In our previous study, zero-shot local-feature matching, a pretrained keypoint detector and matcher with candidates ranked by the number of matches, identified the critically endangered Hula painted frog (Latonia nigriventer; IUCN SSC Amphibian Specialist Group 2021) from its ventral pattern with 99.8% top-1 accuracy (1,232 images of 191 individuals), without species-specific training, whereas a fine-tuned global-embedding model was far less accurate [44]. Two questions remain open: whether the approach transfers to an amphibian with a different body plan and pattern, which may require adapting the preprocessing; and how to assign identities automatically across a whole database and evaluate the result, which the frog study did not address in depth.

Here we apply zero-shot local-feature matching to a photo-identification database of 2,440 images of S. infraimmaculata from four sites in northern Israel, taken by hand at close range, with identities assigned by field researchers through visual comparison against a growing reference library. We (1) use an early version of the pipeline to audit these labels, which reduced the number of identities from 1,431 to 1,094; and, on the verified labels, (2) adapt the preprocessing to the target species and score image pairwise similarity by keypoint matching confidence, which reduces a confound between the number of spots and the similarity score; (3) add a two-tier clustering that assigns identities across the database, with all choices tuned on a validation set and evaluated on held-out individuals; and (4) apply the pipeline, unchanged, to two datasets of European fire salamanders and compare it with five established photo-identification programs.

Methods

Datasets: Near Eastern fire salamander

This study draws on several datasets of labelled images of the Near Eastern fire salamander (S. infraimmaculata), collected during nocturnal field surveys at three sites in the Haifa area and one at Tel Dan Nature Reserve, northern Israel. The Haifa datasets are labelled AH, from the Wadi Ahuza site, and HFA, from two sites, Wadi Lotem and Haifa Educational Zoo, as individual movement between the two sites has been observed. These datasets were collected during surveys across four winters between December 2021 and December 2025 by a long-term citizen science monitoring project [11]. The Tel Dan datasets (NTD 2021–22 and NTD 2022–23) were collected during surveys conducted over two bounded winter seasons by Israel Nature and Parks Authority (INPA).

Photos were taken using flash phone cameras at a distance of 40–60 cm with the animal in dorsal view to capture yellow spot patterns and saved as colour JPG images (Figure 1a,Figure 1b). Some photos contained partial occlusion from mud or vegetation. In total, the datasets include 2,440 images of 1,431 putative individuals, with identity labels assigned by field researchers through visual comparison of each new image against a reference library of previously identified individuals. Following an identity audit (see Results), labels were reassigned to 1,094 verified individuals (Table 1).

DatasetSiteIDsImagesSingletonsSurvey nights
Near Eastern fire salamander
HFAWadi Lotem & Haifa Educational Zoo371341117
AHHaifa: Wadi Ahuza1823769725
NTD 2021–22Tel Dan Nature Reserve3225901798
NTD 2022–23Tel Dan Nature Reserve5531,34029811
TotalIsrael1,0942,44058561
European fire salamander
Adam et al.Czechia498784338189
Schulte et al.Kruppwald forest, Essen, Germany313376267not reported

Table 1. Fire salamander datasets used in this study. Singletons: number of individuals with a single image in the database, excluded as queries in accuracy evaluation. Number of individuals in HFA, AH, and NTD is after identity audit.

Fire salamander dorsal-view photos

Figure 1. Fire salamander dorsal-view photos. Each panel shows 3-4 individuals from one of the datasets of the two species: Near Eastern fire salamander (S. infraimmaculata) from Haifa (a) and Tel Dan Nature Reserve (b). European fire salamander (S. salamandra) from the Czech Republic (c) and Germany (d). Note the visual difference between species: S. infraimmaculata displays discrete yellow spots, while S. salamandra displays variable markings ranging from discrete spots to elongated stripes.

The Haifa 2020-2022 surveys were conducted under the INPA permits 42648 and 42905. The Tel Dan surveys were conducted by INPA staff and required no permit.

Dataset split. The combined Near Eastern fire salamander dataset (merge of HFA, AH, NTD) was used for pipeline development, hyper-parameter tuning, and evaluation. To prevent leakage between hyper-parameter tuning and evaluation, the combined dataset was partitioned at the individual level into a validation set (984 individuals, 2,182 images) and a held-out test set (110 individuals, 258 images). The test set was drawn only from the Haifa datasets (AH and HFA): when the split was defined, the Tel Dan labels were suspected to contain errors, and the identity audit confirmed that nearly all label errors were there (see Results: Identity audit). As a result, the test-set labels are nearly independent of the pipeline-assisted audit, which changed only a single Haifa label. All scoring and threshold decisions were made on the validation set; the test set was used only once, after all pipeline decisions were fixed, to confirm generalisation. Final performance metrics are reported on the full dataset (1,094 individuals, 2,440 images), evaluated with the optimized pipeline. This partition is consistent with the split used for head-orientation classifier training (see Head-orientation classifier training), ensuring no individual appears in both the parameter-tuning set and the held-out test set.

Datasets: European fire salamander

To evaluate the generalisation of our pipeline beyond the study populations and species, we applied it without modification to two independent datasets of the European fire salamander (S. salamandra).

Czech dataset. Images of European fire salamander (S. salamandra) from the Czech Republic were released as part of the AnimalCLEF 2025 benchmark [2]. Images were collected during nocturnal field surveys under rainy conditions between 2017 and 2024 (per date field in the dataset metadata), with individuals photographed and immediately released without marking (Figure 1c). We only used dorsal view images, with 784 images of 498 individuals.

German dataset. A second dataset of European fire salamander S. salamandra was collected between 2018 and 2020 in the Kruppwald forest, Essen, Germany [35] (Figure 1d). Images were taken opportunistically in the field under non-standardised conditions with varying backgrounds, and were provided with the head oriented upward. Identity labels were also provided by the authors of the original study. In their count, one image was duplicated and three recaptures were counted twice; after correcting these, the dataset comprises 376 images of 313 individuals with 63 recaptures.

Pipeline overview

The re-identification pipeline segments each image, resolves head orientation, extracts the yellow spot pattern, matches keypoints between images to score pairwise image similarity, and uses the similarities to cluster images to individual identities (all described below). Head orientation is resolved by a CNN classifier trained on heuristic orientation labels with manual corrections (see Head-orientation classifier training). This classifier did not yet exist when the identity audit was run (see Results: Identity audit): the audit used the experimental pipeline, a preliminary version that resolved orientation with a geometric heuristic instead, and used untuned defaults for keypoint extraction and match scoring. We refer to the experimental pipeline below only where it differs from the optimized pipeline, the final version described here, in ways that matter for the results that follow.

Image preprocessing

Segmentation. All images were segmented using SAM 3 ([8]) with the text prompt “salamander”. The resulting mask was used to fill background pixels with black, and the image was cropped to the minimal bounding box around the mask.

Head orientation. Consistent head orientation is required for reliable keypoint matching. We aligned all images so the head faces the left side, using two steps. First, PCA is applied to the SAM 3 mask to align the body’s long axis to the horizontal axis, placing the head on either the left or right side of the image. Second, the left–right ambiguity is resolved by the custom CNN classifier (see below). Then, images classified as right-facing are automatically rotated 180°.

The experimental pipeline, used to run the identity audit before the CNN classifier was developed, resolved this ambiguity with a geometric heuristic instead: the rotated mask was divided into left and right halves along the body axis, and the longest unbroken vertical run of mask pixels in the single central column of each half was measured. The side with the taller run was assumed to be the head, because a head cross-section is taller than the tapering tail. Images were then rotated 180° if the head was determined to be on the right side (ties were left unchanged).

Head-orientation: classifier training. We trained a convolutional neural network (CNN) classifier to predict head side, left vs. right, from the PCA-aligned, masked image. We used ResNet-18 (He et al., 2016) pretrained on ImageNet-1K [13] as the backbone with a linear classifier head. Training labels were the orientations assigned by the geometric heuristic, corrected manually in two passes rather than through a single systematic audit: during pipeline development, every query or top-ranked gallery image implicated in a top-1 identification error was inspected and rotated 180° if mis-oriented; additional errors were corrected opportunistically when noticed during the identity audit (see Results), but this second pass was not exhaustive. Each image, after correction, was treated as a head-left example (label 1); a 180∘180^\circ rotation of the same image served as the head-right example (label 0), doubling the effective training set. The validation set (see Dataset split) was further divided at the individual level into a training subset (875 individuals, 1,930 images) and a model-selection subset (109 individuals, 252 images); the held-out test set (110 individuals, 258 images) was used only to report final accuracy.

Input images were padded to a square aspect ratio, preserving the salamander’s elongated proportions, before resizing to 224×224224 \times224 px per ResNet-18 specifications. During training, images were augmented with random rotation in the range of ±10∘\pm10^\circ, colour jitter (brightness and contrast scaled by a factor in [0.7,1.3][0.7, 1.3]), and Gaussian blur (kernel standard deviation σ∈[0.1,1.0]\sigma\in[0.1, 1.0]), each applied to every training image; vertical flip was additionally applied with probability 0.5. Horizontal flip was not used, as it would invert the head-direction label. The model was trained with binary cross-entropy loss and the AdamW optimiser (initial learning rate 1×10−41 \times10^{-4}), with learning rate halved after three epochs without improvement in model-selection loss, for 25 epochs. The checkpoint with the lowest model-selection loss was kept and used for inference, reaching 99.6% accuracy on the held-out test set (514/516 correct; each image in both orientations). The checkpoint is available on Hugging Face at https://huggingface.co/yoavram-lab/salamandra-head-orientation.

Yellow spot extraction. After orientation, the salamander’s yellow spot pattern was isolated using LAB colour-space thresholding. The image was converted from RGB to LAB, and the b∗b^* channel (blue–yellow axis) was thresholded to retain yellow pixels. The threshold was determined per image using Otsu’s method [32], applied only to b∗b^* values sampled from an eroded version of the animal mask to exclude the body outline from threshold estimation. The resulting binary mask was cleaned with morphological opening to remove speckle noise, followed by closing and hole-filling to consolidate each spot into a solid region.

Local-feature matching

We use local-feature matching, which outperformed global embedding models in our recent study of Latonia nigriventer, the Hula painted frog [44]. Local-feature matching represents each image by a set of keypoints (points of interest) and their descriptors (vectors summarising the image appearance around each keypoint), and then matches keypoints between pairs of images. It thus has two steps: descriptor extraction, applied to each image, and descriptor matching, applied to each pair of images. We applied the extractor and matcher without additional training or fine-tuning on species-specific or any other wildlife data. Keypoint extraction and matching ran on a single NVIDIA

RTX A4000 GPU (16 GB).

Descriptor extraction. For each image we detect keypoints and compute a descriptor for each one. We use SuperPoint, a fully convolutional neural network (1.3M parameters) that jointly detects keypoints and computes fixed-length keypoint descriptors in a single forward pass, outputting a set of keypoints ({xx,yy} positions in the input image) and their descriptor vectors [14]. SuperPoint uses a shared encoder (VGG-style CNN) that feeds into two decoder heads: one for keypoint detection and one for descriptor extraction, producing 256-dimensional descriptors. SuperPoint is trained in three stages: a base detector is first trained on a synthetic dataset of simple geometric shapes with unambiguous corner locations; this detector is then applied to many randomly homography-warped copies of unlabelled real images (MS-COCO), and the detector response maps are warped back to the original image coordinates and averaged to produce pseudo-ground-truth keypoints (homographic adaptation); finally, the detector and descriptor heads are trained jointly on image pairs related by known random homographies, using the pseudo-ground-truth keypoints for detection and the homography-induced correspondences for the descriptor loss [14]. We used up to k=400k = 400 keypoints per image and SuperPoint’s default detection threshold (0.0005); the experimental pipeline used k=800k = 800.

Descriptor matching. The extracted keypoints are matched across image pairs using LightGlue, a transformer-based local-feature matcher (11.9M parameters) [25]. We used the publicly released SuperPoint-specific LightGlue weights, which were pre-trained on synthetic homographies generated from the Oxford–Paris 1M distractors dataset and then fine-tuned on MegaDepth, a dataset of crowd-sourced landmark photographs; no species-specific or even wildlife training was performed: the model was trained on landmarks. LightGlue jointly processes the two keypoint sets with interleaved self- and cross-attention layers, and then predicts a soft partial match-confidence matrix from pairwise descriptor similarity and per-keypoint matchability. Keypoint pairs that are mutual best matches with a confidence score above a threshold are retained as matches, and their confidence scores serve as the basis for the downstream pairwise image similarity score.

Clustering

To assign all images to individual identities, both for automated identity assignment in field monitoring and for evaluating whole-database identity recovery, we first convert the LightGlue matches of each image pair into a pairwise image similarity score and then cluster the images by this score in two steps.

Confidence-filtered similarity score. We observed that individuals with many spots tend to yield more keypoints, and that images of many-spotted individuals often produce high keypoint match counts regardless of true identity. This creates two problems. First, a global match-count threshold for open-set binary decisions (same vs. different) is not meaningful, as the threshold would need to vary with the number of spots on each individual. Second, in closed-set top-kk evaluation, a many-spotted gallery individual can accumulate a higher match count (and therefore a higher similarity score) against a query image than the true match does, if the latter has fewer spots, causing ranking errors. This motivated a similarity score that is robust to the number of spots, i.e., comparable across images of individuals with different numbers of spots.

Denote by M(i,j)\mathcal{M}(i,j) the set of keypoint matches predicted by SuperPoint-LightGlue for image pair (i,j)(i,j), and let 0≤pm≤10 \leq p_m \leq1 denote the confidence score of keypoint match mm. The confidence-filtered match count at threshold cc is

score⁡c(i,j)=∣{m∈M(i,j):pm≥c}∣(1)\operatorname{score}_{c}(i,j)=\left|\{m \in\mathcal{M}(i,j):p_m \geq c\}\right| \tag*{(1)}

By default, LightGlue retains only matches with pm≥0.10p_m \geq0.10, so score⁡0.10(i,j)=∣M(i,j)∣\operatorname{score}_{0.10}(i,j)=|\mathcal{M}(i,j)| is the image similarity score used by the experimental pipeline. The optimized pipeline uses score⁡0.65\operatorname{score}_{0.65}. Among the alternative similarity scores we considered are the match fraction, frac⁡c(i,j)=score⁡c(i,j)/∣M(i,j)∣\operatorname{frac}_{c}(i,j)=\operatorname{score}_{c}(i,j)/|\mathcal{M}(i,j)|, and the mean confidence, mean-confidence⁡(i,j)=∑m∈M(i,j)pm/∣M(i,j)∣\operatorname{mean\text{-}confidence}(i,j)=\sum_{m\in\mathcal{M}(i,j)}p_m/|\mathcal{M}(i,j)|.

Two-tier clustering. Our clustering approach uses two thresholds on the similarity score, τ1\tau_1 and τ2\tau_2 (because score⁡c\operatorname{score}_{c} is a count, both are numbers of confident keypoint matches). In the first (must-link) step, any pair of images with high enough similarity, score⁡c≥τ1\operatorname{score}_{c} \geq\tau_1, is merged into the same identity via union-find, without requiring agreement from other cluster members. In the second step, hierarchical clustering starts from the must-link groups and the remaining single images as initial clusters, so must-link groups are never split but can still be merged with each other and with other images; clusters are compared by average linkage, i.e., the mean pairwise scorec_c across all image pairs between two clusters. Clusters are merged while the mean scorec_c between them exceeds τ2\tau_2; the process stops when no remaining pair of clusters exceeds this threshold.

Screening candidate similarity scores. We assembled a curated pair dataset from the validation set: all same-identity pairs (3,069 pairs) and an equal number of hard negatives, defined as each query’s highest-scoring different-identity candidate according to the experimental pipeline (i.e. by match count with the default confidence threshold, score0.10_{0.10}). We screened 12 candidate similarity scores by average precision (AP; see Evaluation), covering confidence statistics, confidence-filtered counts and fractions, keypoint-count normalisation, and geometric verification (Table S1). The two best-performing score families were carried forward for full-gallery validation: confidence-filtered counts and fractions (scorec_c and fracc_c) and confidence statistics (represented by mean-confidence); for fracc_c, cc was fixed at 0.65, the value that maximised its AP over c=0.10c = 0.10 to 0.95 (steps of 0.05), although AP varied by less than 0.001 between c=0.55c = 0.55 and 0.80.

Similarity scoreDefinitionAPAUC
num_matches (raw match count)∣M(i,j)∣|\mathcal{M}(i,j)| — all matches, LightGlue’s own confidence floor (≥0.10\ge0.10), the experimental pipeline’s score0.8820.822
mean_confidencemean of pmp_m over all matches0.9570.936
median_confidencemedian of pmp_m over all matches0.9540.932
p70_confidence70th-percentile pmp_m0.9560.935
p90_confidence90th-percentile pmp_m0.9550.936
mean_top50pct_confidencemean pmp_m over the more-confident half of matches (those ≥\ge the pair’s own median)0.9570.937
count_ge_0.7∣{m:pm≥0.7}∣|\{m:p_m\ge0.7\}| — count_ge_0.7 at one fixed cutoff0.9510.926
frac_ge_0.7count_ge_0.7 ÷\div num_matches0.9570.938
match_ratio_minnum_matches ÷min⁡(na,nb)\div\min(n_a,n_b)0.8720.817
match_ratio_meannum_matches ÷mean⁡(na,nb)\div\operatorname{mean}(n_a,n_b)0.8790.820
geo_inlier_ratioRANSAC affine-fit inlier count ÷\div num_matches — spatial (not confidence) consistency0.7860.780
geo_inlier_countraw RANSAC affine-fit inlier count0.8850.854

Table S1. Table S1: Average precision (AP) and ROC-AUC for 12 candidate similarity scores on the curated pair sample from the validation set (no held-out test images): all same-identity pairs (n=3,069n=3{,}069) balanced against an equal number of hardest negatives (each query’s highest-scoring different-identity candidate under the experimental pipeline). Confidence-filtered counts and fractions are shown at a fixed screening cutoff, c=0.7c=0.7. na,nbn_a,n_b is the number of SuperPoint keypoints detected in images a,ba,b. AP is used for consistency with every other screening stage in this work; AUC is reported as a secondary reference, since this sample is balanced by construction and so is not itself subject to the class imbalance AP was adopted to address. Confidence-based scores (rows 2–8) are consistently strongest; keypoint-count normalization and geometric verification (rows 9–12), both designed specifically to counter the busy-spot confound, score no better than the raw baseline (AP 0.786–0.885 vs. 0.882). Boldface marks the three-way tie for best AP (0.957).

Full-gallery validation. A curated balanced sample of hard negatives cannot expose failure modes that only appear against a realistically imbalanced gallery. We therefore evaluated the carried-forward candidates, together with default match count as a baseline, on all within-site pairs in the validation set (∼1.09M\sim1.09\mathrm{M} pairs, of which 0.28% are same-identity pairs). Candidates were compared by top-1 accuracy and ARI (see Evaluation). Top-1 accuracy was computed by querying each image against all other images from the same site. To estimate its variability, individuals were divided into five disjoint groups, top-1 accuracy was computed with each group’s images as queries (the gallery always being the full set), and we report the mean ±\pm SD over the five groups; no parameter was fitted on these groups. Because clustering assigns identities jointly across the whole gallery, ARI cannot be meaningfully computed per group, and we report it once over the full validation set. To compare the candidate scores under the same procedure, each was paired with average linkage clustering, i.e., only the second step of the final clustering procedure, and we report the highest ARI over a fixed grid of τ2\tau_2 values (Table 2). The must-link step was omitted because it requires a threshold at which must-link pairs reach 99% precision (see Parameter selection), and no such threshold exists for frac0.65_{0.65}.

Similarity scoretop-1 (%)top-1 std. dev.ARI∗^{*}
score0.10\mathrm{score}_{0.10} (default)95.590.920.904
mean-confidence91.391.970.879
frac0.65\mathrm{frac}_{0.65}88.042.730.842
score0.65\mathrm{score}_{0.65} (selected)97.730.520.944

Table 2. Validation of candidate similarity scores on the validation set. fracc\mathrm{frac}_{c} and mean-confidence collapse under realistic class imbalance despite competitive performance on the balanced sampled pairs. * Highest ARI over a fixed threshold grid with average linkage alone.

Parameter selection. For score⁡c\operatorname{score}_c, the confidence threshold cc was selected first, by running the two-tier clustering at six candidate thresholds, c=0.60c = 0.60 to 0.850.85 in steps of 0.050.05, and taking the value that maximised ARI rather than retrieval accuracy alone. For each candidate cc, τ1\tau_1 was set by the precision rule below and τ2\tau_2 by maximising ARI over a coarse grid (steps of 10).

The clustering thresholds were then set for the selected similarity score, score⁡0.65\operatorname{score}_{0.65}, on the full validation set. τ1\tau_1 was set to the lowest threshold at which must-link pairs reached at least 99% precision (τ1=55\tau_1 = 55; precision 99.0%, recall 78.3%). τ2\tau_2 was then set to the value that maximised ARI in a fine sweep (steps of 2) with the must-link step applied (τ2=29\tau_2 = 29, ARI = 0.957; the coarser step-10 grid used for selecting cc peaks at τ2=30\tau_2 = 30, ARI = 0.956). Because these ARI values were maximised on the validation set, they are useful for comparing alternatives, but not for estimating the performance of the optimized pipeline, whose thresholds were fixed and then applied unchanged to the held-out test set and the full dataset.

We chose average linkage over complete linkage because it depends less on the must-link step (see Results). Single linkage was not considered: at threshold τ\tau it merges the connected components of pairs with similarity score ≥τ\ge\tau, which is exactly what the must-link step does, so combining the two would amount to a single must-link step at the lower threshold.

Evaluation

Near Eastern fire salamander. We evaluated re-identification accuracy on the Near Eastern fire salamander datasets in a closed-set setting. Each image with at least one other image of the same individual in the gallery served in turn as a query, with only the query image itself excluded from the gallery. On the validation set and the full dataset, the gallery comprised all other images from the same site; on the held-out test set, it comprised the other test images from the same site, and in a second evaluation also the remaining images of those sites as distractors. Same-date images of the same individual were retained in the gallery, as visual inspection confirmed that such pairs can differ in background and posture, and represent realistic field conditions in which the same individual may be encountered multiple times within a single survey night. Because same-night pairs may be easier, we also report accuracy with same-night images of the query’s individual excluded from the gallery (Table S2).

Sitenimgn_{\mathrm{img}}nidsn_{\mathrm{ids}}nevaln_{\mathrm{eval}}top-1top-5mAP@Rnevaln_{\mathrm{eval}}top-1top-5mAP@R
AH37618227994.6294.980.86527994.6294.980.865
HFA1343712399.1999.190.96112199.1799.170.960
NTD 2021–2259032241197.8198.300.93840397.7798.260.937
NTD 2022–231340553104297.8998.750.902103497.5898.550.901
Overall24401094185597.4798.110.908183797.2897.990.907

Table S2. Identification accuracy of the optimized pipeline per site on the full dataset. All: the gallery is every other image from the same site. Same date excluded: images of the query’s own individual taken on the same date are also removed from the gallery; images of other individuals from that date remain. nevaln_{\mathrm{eval}}: query images with at least one other image of the same individual remaining in the gallery.

Gallery images were aggregated per identity by their maximum similarity score, and top-kk accuracy is the proportion of queries whose true identity is among the kk highest-ranked identities (top-1 is the same whether images or identities are ranked). Ties in similarity score were broken in the query’s favour, since both tied candidates would be presented to the observer; on the full dataset, ties decided the top-1 outcome of 3 of the 1,855 queries (0.16 percentage points). We also report mAP@R, the mean over queries of the average precision over the RR highest-ranked gallery images, where RR is the number of other images of the query’s individual in the gallery [29]; it rewards ranking all images of the true individual near the top, not only the first. Per-site accuracy is reported in Table S2.

To summarise how well the similarity score separates same- from different-identity pairs across a whole gallery, we use average precision (AP): all within-site pairs are ranked by score, and at each same-identity pair we compute the fraction of pairs ranked at or above it that are also same-identity pairs; AP is the mean of these fractions over all same-identity pairs. We used AP rather than ROC-AUC because, with only about 0.3% of pairs being same-identity pairs, ROC-AUC is dominated by the many different-identity pairs with low scores and is insensitive to false links among the high scores [34].

Top-kk accuracy and mAP@R evaluate a ranked list from which an observer confirms each match. Capture–recapture analysis, however, requires a partition of all images into individuals, and assigning this partition automatically removes the observer from the loop. We therefore also evaluated the clusters themselves, using the Adjusted Rand Index [19], which compares two partitions by counting the image pairs on which they agree, placed together or apart, corrected for chance (ARI = 1: perfect agreement; ARI = 0: chance level). Because each pair of images placed together is in effect a recapture link, ARI penalises both splitting errors, which create spurious individuals and lose recaptures, and merging errors, which create false recaptures. ARI is also the evaluation metric of the AnimalCLEF 2026 clustering task [3]. Clustering was performed separately for each site, and ARI was computed once over the combined clusters of all sites in an evaluation set. Unlike in the top-kk evaluation, individuals photographed only once were included.

European fire salamander. To evaluate the generalisation of the pipeline beyond the study population and species, we applied it without modification, including all hyper-parameters, to two European fire salamander datasets from the Czech Republic (Adam, Papafitsoros, Kovář, Čermák and Picek, 2025) and Germany [35]. Top-1 and top-5 accuracy, mAP@R and ARI were computed as for the Near Eastern datasets, with each image that has at least one other image of the same individual serving as a query against all other images of its dataset; the two datasets, collected in different countries, formed separate galleries. For the German dataset, we additionally computed the two metrics reported by Schulte et al. [35]: the recognition rate (RR) and the false rejection rate at rank 1 (FRR1_{1}). RR is the number of recaptures (images other than the first of each individual) correctly identified, divided by the number of recaptures (63), where a recapture was counted as correctly identified if its top-ranked candidate was the same individual. Schulte et al. [35] did not state their criterion for a correct identification (e.g., how many top-ranked candidates were inspected); our top-1 criterion is the strictest possible, so the comparison is conservative. Each recapture was matched only against the images preceding it in the dataset, as in a field study in which each new capture is compared with the existing library; because capture dates were not available, the order of images in the dataset was used as the capture order. FRR1_{1} is the proportion of query images (images with at least one other image of the same individual) whose top-ranked candidate was not the same individual, i.e. 1− top-1 accuracy [7, 26]. Schulte et al. [35] did not state their denominator, but each of their reported values is a whole number of images out of their 377 images: the failures were divided by all images, including images with no other image of the same individual, which cannot be misidentified. For comparison with their results, we computed FRR1∗^{*}_{1} in the same way, dividing the failed queries by all 376 images.

Results

Identity audit with the experimental pipeline

During the development of our re-identification pipeline, we observed a consistent gap between top-1 and top-2 identity accuracy (81.7% and 91.3% respectively on the full dataset). We hypothesised that in many of these cases, both top-2 candidates were correct matches split to two different identity labels, such that the pipeline was surfacing labelling errors. This motivated a systematic audit of the identity labels.

Initial expert review. We identified all queries whose labelled identity appeared at rank 2 or 3 in the pipeline ranking and, for each, took every higher-ranked candidate identity. Pairs that arose in both directions were counted once, yielding 51 unique query–candidate identity pairs for expert review; only identities with at least two images can be flagged this way. For each query, we presented the query image alongside all higher-ranked candidates (rank 1 only if the label appeared at rank 2; ranks 1 and 2 if the label appeared at rank 3), and asked expert ecologists (Rybak, Goldstein) to judge, for each candidate, whether it depicted the same individual as the query. The experts confirmed 31 of the 51 pairs as depicting the same individual; these corresponded to 26 individuals whose labels were merged, removing 29 redundant labels (splitting errors). The review also revealed 4 labels that combined images of more than one individual; these were split (merging errors), and in two of them the separated images belonged to an individual that already had a label and were merged into it. The remaining 20 pairs were not confirmed as matches.

Stage 1: Intra-identity verification. To identify false merges, where a single label was assigned to images of more than one identity, we computed the minimum pairwise similarity score among all image pairs within each identity. A low minimum similarity indicates that at least two images within the label are dissimilar, suggesting the label may contain more than one identity. The distribution of minimum similarities showed a small cluster of low-scoring labels separated from the main distribution by a local minimum; we set the threshold at the local minimum of a kernel density estimate of these similarity scores, T=63T = 63 (Figure S1), flagging 61 identities for expert review. Of these, three were confirmed as containing distinct identities and were split to separate identities.

Stage 2: Cross-identity verification. To identify false splits, where multiple labels were assigned to images of the same identity, we retrieved the top-3 highest-similarity cross-identity matches for each identity. A human annotator screened all retrieved pairs and judged whether the two labels depicted the same individual; pairs judged to be the same individual were then reviewed by expert ecologists (Rybak, Goldstein) for confirmation. This stage yielded 316 identity merges. During Stage 2 expert review, three additional intra-identity splits were identified; these had minimum intra-identity similarity scores above the Stage 1 threshold and were therefore not flagged in Stage 1, but were detected incidentally during expert inspection of the label gallery. The curated dataset comprises 2,440 images of 1,094 verified individuals, used for all subsequent development and evaluation. Nearly all corrections were made in the NTD datasets. The audit reduced the number of identities from 832 putative individuals to 553 verified individuals in NTD 2022–23, the larger dataset, and from 379 to 322 in NTD 2021–22, whereas in the Haifa datasets it changed only a single label.

Following label correction, the experimental pipeline achieved top-1 and top-2 accuracies of 96.3% and 97.3% on the full dataset, reducing the gap between them from 9.6 to 1.0 percentage points.

Pipeline optimization on the validation set

All scoring and parameter decisions (choice of similarity score, match confidence threshold cc, keypoint budget kk and clustering thresholds τ1\tau_1, τ2\tau_2) were made using the validation set (984 individuals, 2,182 images, see Methods). Results in this section are therefore reported on the validation set only. Because each configuration was selected as the best among several candidates, these values support the decisions but may overestimate performance on held-out individuals. The optimized pipeline is therefore evaluated on the held-out test set and the full dataset in the next section.

Confidence filtering reduces the spot-density confound. Inspecting the top-ranked candidates of the experimental pipeline, we observed that false candidates were often many-spotted individuals: such individuals yield more keypoints, so pairs of them can accumulate many matches regardless of identity. In the example of Figure 3 (400 keypoints), a busy false candidate collects 161 matches against the query and outranks the true match (141), yet only 21 of its matches reach confidence 0.65, compared to 72 for the true match. Confidence filtering can therefore remove precisely the matches that inflate false candidates. On the validation set, increasing the LightGlue confidence threshold from the default c=0.1c = 0.1 to c=0.65c = 0.65 increased top-1 accuracy from 95.59% to 97.73%, halving the error rate, and reduced its variability across query groups (standard deviation dropped from 0.92 to 0.52; Table 2).

Example of the many-spot confound and its correction by confidence filtering

Figure 3. Example of the many-spot confound and its correction by confidence filtering. Both panels show the same query (individual 349 from NTD 2021–22, on top) matched against two candidates from the same dataset. Grey lines mark keypoint matches with confidence ∈[0.10,0.65)\in[0.10, 0.65), which contribute to score0.10\mathrm{score}_{0.10} but are excluded by score0.65\mathrm{score}_{0.65}; green lines mark matches with confidence ≥0.65\ge0.65, counted by score0.65\mathrm{score}_{0.65}. (a) Top-1 candidate by score0.10\mathrm{score}_{0.10}: a busy false candidate (individual 307, bottom), with score0.10=161\mathrm{score}_{0.10} = 161 but score0.65=21\mathrm{score}_{0.65} = 21; most keypoint matches are low-confidence. (b) True match from a different survey night, ranked second (top-2) by score0.10=141\mathrm{score}_{0.10} = 141 but first by score0.65=72\mathrm{score}_{0.65} = 72. Using LightGlue’s default confidence threshold c=0.1c = 0.1 incorrectly ranks (a) above (b); score0.65\mathrm{score}_{0.65} correctly recovers the true identity.

Confidence filtering also improves clustering. With average-linkage clustering alone, the increased confidence threshold (c=0.65c = 0.65) raised ARI from 0.904 (with c=0.1c = 0.1) to 0.944 (Table 2). Adding the must-link step raised it further to 0.957, whereas for c=0.1c = 0.1 the must-link step slightly lowered ARI (0.900). The must-link step merges any pair above a high similarity score without consulting other images, so it helps only when high similarity scores are reliable evidence of identity. This is consistent with the spot-density confound: a high similarity score with a low match confidence threshold (c=0.1c = 0.1) can also arise between two many-spotted individuals, whereas a high score with a high threshold rarely does. Among the six confidence thresholds tested (c=0.60c = 0.60–0.850.85), c=0.65c = 0.65 gave the highest ARI and tied for the best top-1 accuracy, but both varied little across the sweep (ARI 0.94–0.96, top-1 97.2–97.7%), so the results are insensitive to the exact choice of threshold cc.

Clustering is stable around the selected thresholds. With the must-link step applied, ARI remained between 0.951 and 0.957 for 23≤τ2≤3523 \le\tau_2 \le35 (steps of 2), so the choice of τ2=29\tau_2 = 29 is insensitive to small perturbations. Complete linkage reached an ARI of 0.956 once the must-link step was applied, equivalent to that of average linkage, but depended on it far more: without must-link, its ARI was only 0.848 (a gain of +0.108 from must-link), compared with 0.944 for average linkage (+0.013). Average linkage is therefore the more robust choice on the validation set.

Similarity scores that ignore the number of keypoint matches collapse under realistic class imbalance. On the curated pair sample, several alternative similarity scores reached slightly higher average precision than the confidence-filtered count (AP = 0.954–0.957 vs. 0.951; Table S1). On the

full validation set, where only 0.28% of pairs are same-identity pairs, the two alternative similarity scores carried forward both fell below score0.10\mathrm{score}_{0.10} in top-1 accuracy (mean-confidence: 91.39%; frac0.65_{0.65}: 88.04%; Table 2). Both scores ignore how many matches a pair has, so a pair with a few confident matches can rank above a same-identity pair with many matches at moderate confidence. Such pairs are rare among the hardest negatives of the curated sample, one per query, but common among the ∼\sim1.09M pairs of the full gallery. Screening on a curated sample is cheap and highlights the hard negatives, but it can be misleading unless it is followed by validation against a realistically imbalanced gallery.

Evaluation of the optimized pipeline

With all choices fixed, the optimized pipeline was evaluated on two partitions (Table 3). The held-out test set (110 individuals, 258 images; AH: 193, HFA: 65) was used once, to test whether these choices generalise to individuals that were not used for tuning. The full dataset (1,094 individuals, 2,440 images) reflects the realistic setting, in which each query is matched against all other images from the same site, and allows a direct comparison with the experimental pipeline. Because the full dataset includes the validation set, its results may be optimistic.

Evaluation setPipelineQueriesTime (s)top-1 (%)top-5 (%)mAP@RARI
Held-out testOptimized206-95.1595.630.8840.958
Full datasetExperimental1,85534,50996.3398.220.8680.892
Full datasetOptimized1,85535,10897.4798.110.9080.958

Table 3. Performance of the optimized pipeline. Held-out test: 206 queries (test images with at least one other image of the same individual in the test set), each matched against the other test images. Full dataset: 2,440 images of 1,094 individuals, including the validation set; 1,855 queries, each matched against all other images from the same site. Time: keypoint extraction and matching on a single GPU, excluding preprocessing. ARI: two-tier clustering; thresholds were fixed on the validation set for the optimized pipeline and calibrated on the experimental pipeline’s own similarity scores for the experimental pipeline.

The optimized pipeline maintained high accuracy on held-out individuals. In the held-out test set, 206 of the 258 images have at least one other image of the same individual within the test set; these served as queries against the other test images. The optimized pipeline reached 95.15% top-1 and 95.63% top-5 accuracy (mAP@R=0.884\mathrm{mAP}@R = 0.884). Adding the other 252 AH and HFA images to the gallery as distractors left top-1 and top-5 unchanged and lowered mAP@R\mathrm{mAP}@R to 0.881.

On the same images and keypoints, using the match count at the default confidence threshold (score0.10\mathrm{score}_{0.10}) as the similarity score yielded 96.12% top-1 and 97.09% top-5 accuracy (mAP@R=0.877\mathrm{mAP}@R = 0.877), two and three more correct queries out of 206 than score0.65\mathrm{score}_{0.65}. However, mAP@R\mathrm{mAP}@R, which accounts for the ranks of all true references, favoured score0.65\mathrm{score}_{0.65}. The test set contains only AH and HFA individuals, whose per-site galleries are small (193 and 65 images). The spot-density confound requires a query to compete with many many-spotted candidates, which is more likely in large galleries such as NTD 2022–23 (1,340 images), so the benefit of confidence filtering may be concentrated at the NTD sites, which the test set does not include.

Most same-identity pairs can be linked automatically with high precision. Of the 1,150,296 within-site pairs in the full dataset, only 3,453 (0.3%) are same-identity pairs (Figure 4). Ranked by

Density distributions of similarity scores for same-identity and different-identity pairs

Figure 4. Same-identity pairs have higher similarity scores than different-identity pairs. Distribution of pairwise similarity scores (score0.65_{0.65}) for the optimized pipeline on the full dataset (2,440 images of 1,094 individuals). Each within-site image pair contributes one score; pairs are never formed across sites. Same-identity pairs (orange, n=3,453n = 3{,}453) and different-identity pairs (grey, n=1,146,843n = 1{,}146{,}843) overlap at low scores but not at high scores. Density is plotted on a logarithmic axis. Dashed lines mark the two clustering thresholds, the average-linkage cut (29) and the must-link threshold (55), both fixed in advance on the validation set. The must-link threshold admits 77.4% of same-identity pairs while excluding all but 0.0021% of different-identity pairs.

score0.65score_{0.65}, these pairs reached AP = 0.890 (AP = 1 means every same-identity pair outranks every different-identity pair); with score0.10score_{0.10}, AP was 0.829, because more different-identity pairs outranked same-identity pairs. The two pairwise similarity score distributions do not overlap at high similarity scores: at the must-link threshold (τ1=55\tau_{1} = 55), 77.4% of same-identity pairs were linked, whereas only 0.0021% of different-identity pairs were linked (about 24 pairs), a precision of 99.1%. The remaining same-identity pairs score within the range of different-identity pairs; they can be grouped only by links to other images of the same individual, which is the role of the average-linkage step.

Automatic clustering recovers individual identities. The two-tier clustering combines both kinds of evidence: it first merges the high-precision must-link pairs and then groups the remaining images by average linkage. With thresholds fixed on the validation set, where they were tuned to maximise ARI (0.957), it achieved ARI = 0.958 on both the held-out test set and the full dataset, compared to 0.892 for the experimental pipeline on the full dataset. Clustering and retrieval nonetheless answer different questions: on the validation set, assigning each query the majority identity of its cluster gave 96.0% top-1 accuracy, below the 97.73% of similarity-based ranking. A cluster-based decision depends on all pairs in the cluster, whereas a ranking-based decision depends only on the highest-ranking reference. We therefore use ranking to identify single queries and clustering to reconstruct the identities of the whole database, as required for downstream capture–recapture analysis.

Generalization to the European fire salamander

Applied without any modification to the two S. salamandra datasets, the optimized pipeline achieved high top-kk accuracy, mAP@R and ARI (Table 4), despite the more variable markings of this related species (Figure 1c,d). On the Czech dataset, the pipeline achieved top-1 95.07%, top-5 97.09% and mAP@R = 0.918.

The pipeline outperformed five established photo-identification tools. On the German dataset (376 images, 63 recaptures), the pipeline achieved top-1 accuracy of 91.7% and RR = 93.7%, outperforming all five photo-identification tools tested by Schulte et al. [35], whose RR ranged from 37.9% to 77.3%. Unlike four of these tools, which required manual image preprocessing (cropping, placing reference points or coding pattern characters), our pipeline preprocesses images automatically. Its recognition rate was close to that of visual inspection by two observers (93.9%). Computed as in their study (FRR*1_1; see Methods), our false rejection rate at rank 1 was 2.4%, compared with 9.8–15.1% for the five tools. Schulte et al. [35] counted 66 recaptures, whereas we evaluated 63 after removing one duplicate image and three double-counted recaptures. This difference does not affect the comparison: counting the three removed recaptures as misses would give RR = 89.4%, still well above the best tool from Schulte et al. [35].

Ranking transferred better than clustering thresholds. Comparing the held-out Near Eastern fire salamander dataset and the two European fire salamander datasets, we find that retrieval metrics (top-kk accuracy, mAP@R) remain broadly comparable across datasets, whereas our clustering metric (ARI) is lower on the Czech dataset (0.885) and substantially lower on the German dataset (0.768). relative to Near Eastern salamander (0.958), see Table 3 and Table 4. Accuracy and mAP@R depend on similarity score rankings, whereas ARI also depends on the absolute thresholds (τ1\tau_1, τ2\tau_2) tuned on our validation set. Differences in similarity distributions across datasets may therefore explain the larger decline in ARI, suggesting that recalibrating these thresholds on a small labelled sample could improve clustering performance.

Datasettop-1 (%)top-5 (%)mAP@RARIRR (%)FRR1∗_1^{*} (%)
Czech dataset95.0797.090.9180.885––
German dataset91.7495.410.8610.76893.652.4

Table 4. Generalization to the European fire salamander datasets. RR and FRR1∗_1^{*} are reported only for the German dataset. FRR1∗_1^{*} was computed as by Schulte et al. [35], dividing rank-1 failures by all images, for comparison with their results; under the common definition (1−1- top-1 accuracy), FRR1_1 = 8.3%.

Discussion

Our pipeline re-identified Near Eastern fire salamanders accurately across four datasets and four sites, with 1,094 individuals. We only adapted the preprocessing (segmentation, orientation and spot extraction), the similarity score (confidence threshold cc) and the clustering (thresholds τ1\tau_1 and τ2\tau_2) to the Near Eastern fire salamander, tuning them on our Israeli validation set only, and made no adaptations for the European fire salamander. The local-feature matching model was used without adaptation to animal re-identification, and its original training used generic internet photographs for homography pretraining and landmark photographs for subsequent finetuning. Our pipeline ranked the correct individual first for 95.2% of held-out queries (97.5% on the full dataset) and clustered identities with ARI = 0.958 on both. Two choices contributed most: filtering low-confidence keypoint matches, which reduced a confound between spot density and match count and improved clustering and mAP@R, although on the small held-out galleries the unfiltered match count was slightly more accurate at rank 1 (two of 206 queries); and a two-tier clustering that turns pairwise similarity scores into identities for the whole dataset. Without any modification, our pipeline re-identified held-out European fire salamanders in datasets from Czechia and Germany. In the latter, our pipeline substantially outperformed five established photo-identification tools.

The pipeline also proved useful for auditing the datasets: many of its apparent errors were mistakes in the labels (human annotations), even though the matcher had no species-specific training. The audit reduced the number of identities by almost a quarter, and nearly all corrections were splitting errors, as in photo-identification studies of other species [39, 22 Jordan] et al., 2025), and nearly all were made at Tel Dan Nature Reserve, where hundreds of individuals were recorded in each season. In a critically endangered skink, software-assisted matching likewise showed that experienced observers had registered 42 recaptured individuals as new, with no false merges, errors the authors attributed to the difficulty of comparing images against a large catalogue [23]. Similarly, human observers misclassified 12.5% of queries in a study of captive snow leopards (Panthera uncia; [22]). Because splitting errors add spurious individuals and remove recaptures, they bias capture–recapture estimates of population size upward [39, 22, 24]. Thus, photo-identification databases should be validated manually before being used for population monitoring, or capture–recapture methods should account for these ‘ghost’ individuals. For example, identities with a single capture (image) can be discarded, thereby reducing bias but increasing variance of the estimated population size [28].

Our results can be placed in the context of three generations of re-identification methods. The first generation, which includes the programs used in previous studies of salamanders and newts, relies on hand-crafted features: SIFT keypoints in Wild-ID and I3S [7], HotSpotter in Amphibian & Reptile Wildbook [10], the number of matching pixels between manually outlined and straightened patterns in AmphIdent [15], and manually coded pattern characters in ManderMatcher [38]. These programs can be highly accurate when photographs are standardized: in great crested newts photographed flat in a transparent box, AmphIdent missed only 2% of recaptures [15]. But all except Wildbook require manual preprocessing, and their accuracy falls with less standardized photographs [26]: two of them recognised nearly all recaptures of European fire salamander larvae photographed in the laboratory, but the five recognised only 38–77% of recaptures of adults photographed in the field, whose bodies were often bent or stretched [35]. On the same adult images, our pipeline recognised 93.7% of recaptures without manual preprocessing, close to visual inspection by two observers (93.9%). The second generation represents the whole image by a single vector computed by a deep network trained on the target species. A convolutional network fine-tuned on head spots identified 11 captive Japanese giant salamanders (A. japonicus) photographed on two consecutive days [41], and similar networks were trained for yellow-spotted mountain newts [33]. Such classifiers recognise only the individuals they were trained on, so each new individual requires labeled images and retraining. Embedding models pretrained on many species [47, 31] avoid retraining but transfer poorly to amphibians: for the Hula painted frog, the best such model ranked the correct individual first for 10.5% of queries, and for 62.1% after fine-tuning on labeled images of the species [44]; because the two species present a similar problem, a pattern of spots on smooth skin, we did not repeat this comparison here. The third generation, to which our pipeline belongs, learns keypoints, descriptors and matches from generic photographs [46, 25] and applies them to animals without training on the target species [30, 44], which addresses the call for one tool applicable across species rather than species-specific programs [15]; each match comes with a confidence, on which our scoring is built. The AnimalCLEF 2025 challenge, which included S. salamandra, points the same way: nearly all top-ranked systems combined global embeddings with local-feature matching, and the winning system used global embeddings only to rank candidates, which it then re-ranked by local matches [2].

The same principle identified Hula painted frogs (L. nigriventer) from their ventral patterns with 99.8% top-1 accuracy [44]. The salamander data were harder: galleries held up to 553 individuals per site, compared to 191 in the frog dataset, and individuals were photographed less often (2.2 vs. 6.5 images per individual). The different body plan required adapting the preprocessing, in particular extracting the yellow spot pattern before keypoint detection (Figure 2c,Figure 2f), which restricts the keypoint detector to the identifying pattern rather than skin texture, reflections or mud.

Image preprocessing applied to two examples

Figure 2. Image preprocessing applied to two examples. Each row shows one individual. (a, d) Segmentation of body. (b, e) Head orientation: in (a)→(b) only a subtle axis alignment is applied; in (d)→(e) the classifier identifies head-on-right-side and the image is rotated 180°. (c, f) Yellow spot extraction. (a,b,c) is individual 349 image 416; (d,e,f) is individual 307 image 228.

We tested transfer of our pipeline from the Near Eastern to the European fire salamander, with different marking pattern ranging from discrete spots to elongated stripes. Identity ranking transferred well: top-1 accuracy was 95.1% and 91.7%. Clustering transferred less well: ARI fell from 0.958 to 0.885 and 0.768 on the Czech and German datasets. The ranking depends only on the ranking of scores, whereas the clustering thresholds were set on S. infraimmaculata and may not separate same- and different-identity pairs equally well for another pattern type. Thus, before clustering is used to build capture histories for a new species, its thresholds may need to be validated on a small labeled images dataset of the target species.

The approach works best when the image given to the keypoint detector is dense in identifying information. In fire salamanders, isolating the yellow spot pattern (Figure 2c,Figure 2f) yields such an image: most of what remains is the identifier itself. We expect the approach to be less reliable for species whose identifying marks are sparse, for example when individuals differ only in the position of a few small spots. Isolating such marks leaves too little to match, whereas keeping the whole individual leaves an image dominated by anatomical features shared by all individuals, such as the body outline, eyes and limbs; in both cases, same- and different-identity pairs would separate poorly. The same applies when marks are often hidden by posture or occlusion, or when the database mixes viewpoints, such as close-ups of the head alongside dorsal views, a difficulty we encountered in the AnimalCLEF 2026 fire salamander data [45].

Some limitations should be noted. The audit was pipeline-assisted: experts confirmed every change, but errors that the pipeline could not detect would remain, so accuracy measured against the verified labels may be slightly optimistic. The held-out test set came only from the AH and HFA sites, whose galleries are small, and contains no Tel Dan individuals. Same-night images were retained in the gallery, whereas the Hula painted frog study discarded same-date pairs [44]; this reflects field use but may make some matches easier.

Zero-shot local-feature matching thus offers amphibian monitoring programs an identification tool that needs no training data, transfers between species, and scales to databases of more than a thousand individuals. In our data, the limiting step was not the photographs, which sufficed for experts to confirm every correction, but matching them by eye as the database grew. We therefore recommend checking photo-identification databases by automated clustering followed by expert review before they are used for capture–recapture analysis. Applying the pipeline to link individuals across seasons would extend this work to estimates of survival and population trends.

Acknowledgements

We thank Oren Kolodny and Eli Geffen for discussions and comments and Sagi Potash for help with auditing. We thank all volunteers who participated in the salamander project in Haifa. We thank Laura Schulte and Barbara Caspers for sharing the identity labels of the German dataset. We thank Lukáš Adam and Lukáš Picek for sharing the identity labels of the AnimalCLEF salamander test set. We thank Eitan Nissim, manager of Tel Dan Nature Reserve, and the reserve’s rangers for conducting surveys and photographing the salamanders.

This work was supported in part by Safra Center for Bioinformatics and the Center for AI & Data Science, Tel Aviv University (YR), and by Minerva Center for the Study of Population Fragmentation.

Declarations

The authors declare no conflict of interest.

ChatGPT and Claude were used to write source code and text, under supervision, validation, and editing by the first and last author.

Supplementary Material

Figure S1. Distribution of minimum pairwise image similarity scores across all identities with two or more images (n=414n = 414). The solid line shows a KDE of the score distribution, revealing a small cluster of low-scoring identities separated from the main distribution by a local minimum, indicative of possible label errors. The dashed line marks the expert review threshold, set at the local minimum of the KDE (T=63T = 63).

References

  1. [2]Adam, L., Papafitsoros, K., Kovář, R., Čermák, V. and Picek, L. (2025), ‘Overview of animalclef 2025: recognizing individual animals in images’, Working Notes of CLEF.
  2. [3]Adam, L., Papafitsoros, K., Williams, D. A., Biffi, D. and Picek, L. (2026), Overview of AnimalCLEF 2026: Discovery and re-identification of individual animals, in ‘Working Notes of CLEF 2026 – Conference and Labs of the Evaluation Forum’, CEUR Workshop Proceedings, Jena, Germany.
  3. [4]Balogová, M., Kyselová, M. and Uhrin, M. (2016), ‘Changes in dorsal spot pattern in adult Salamandra salamandra (Linnaeus, 1758)’, Herpetozoa 28(3/4), 167–170.
  4. [5]Bar-David, S., Segev, O., Peleg, N., Hill, N., Templeton, A. R., Schultz, C. B. and Blaustein, L. (2007), ‘Long-distance movements by fire salamanders (Salamandra infraimmaculata) and implications for habitat fragmentation’, Israel Journal of Ecology and Evolution 53(2), 143–159.DOI
  5. [6]Bendik, N. F., Morrison, T. A., Gluesenkamp, A. G., Sanders, M. S. and O’Donnell, L. J. (2013), ‘Computer-assisted photo identification outperforms visible implant elastomers in an endangered salamander, eurycea tonkawae’, PloS one 8(3), e59424.DOI
  6. [7]Bolger, D. T., Morrison, T. A., Vance, B., Lee, D. and Farid, H. (2012), ‘A computer-assisted system for photographic mark–recapture analysis’, Methods in Ecology and Evolution 3(5), 813–822.DOI
  7. [8]Carion, N., Gustafson, L., Hu, Y.-T., Debnath, S., Hu, R., Suris, D., Ryali, C., Alwala, K. V., Khedr, H., Huang, A., Lei, J., Ma, T., Guo, B., Kalla, A., Marks, M., Greer, J., Wang, M., Sun, P., Rädle, R., Afouras, T., Mavroudi, E., Xu, K., Wu, T.-H., Zhou, Y., Momeni, L., Hazra, R., Ding, S., Vaze, S., Porcher, F., Li, F., Li, S., Kamath, A., Cheng, H. K., Dollár, P., Ravi, N., Saenko, K., Zhang, P. and Feichtenhofer, C. (2025), ‘Sam 3: Segment anything with concepts’. URL: https://arxiv.org/abs/2511.16719
  8. [9]Čermák, V., Picek, L., Adam, L., Neumann, L. and Matas, J. (2025), WildFusion: Individual animal identification with calibrated similarity fusion, in ‘European Conference on Computer Vision (ECCV)’, Springer, pp. 18–36.
  9. [10]Crall, J. P., Stewart, C. V., Berger-Wolf, T. Y., Rubenstein, D. I. and Sundaresan, S. R. (2013), HotSpotter – patterned species instance recognition, in ‘2013 IEEE Workshop on Applications of Computer Vision (WACV)’, pp. 230–237.DOI
  10. [11]Darel, O., Rybak, O., Ben-Levy, A., Kolodny, G., Kis-Papo, T., Lavie-Alon, N., Vidan, R. and Kolodny, O. (2025), ‘Effective citizen science implementation reveals ecological and conservation insights for two amphibian species’, Journal of Zoology .DOI
  11. [12]de Lorm, T. A., Horswill, C., Rabaiotti, D. et al. (2023), ‘Optimizing the automated recognition of individual animals to support population monitoring’, Ecology and Evolution 13(7), e10260.DOI
  12. [13]Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K. and Fei-Fei, L. (2009), Imagenet: A large-scale hierarchical image database, in ‘2009 IEEE Conference on Computer Vision and Pattern Recognition’, pp. 248–255.
  13. [14]DeTone, D., Malisiewicz, T. and Rabinovich, A. (2018), Superpoint: Self-supervised interest point detection and description, in ‘Proceedings of the IEEE conference on computer vision and pattern recognition workshops’, pp. 224–236.
  14. [15]Drechsler, A., Helling, T. and Steinfartz, S. (2015), ‘Genetic fingerprinting proves cross-correlated automatic photo-identification of individuals as highly efficient in large capture–mark–recapture studies’, Ecology and Evolution 5(1), 141–151.DOI
  15. [16]Gamble, L., Ravela, S. and McGarigal, K. (2008), ‘Multi-scale features for identifying individuals in large biological databases: an application of pattern recognition technology to the marbled salamander Ambystoma opacum’, Journal of Applied Ecology 45, 170–180.
  16. [17]Goedbloed, D., Segev, O., Küpfer, E., Pietzsch, N., Matthe, M. and Steinfartz, S. (2017), ‘Evaluation of a new AmphIdent module and sources of automated photo identification errors using data from Salamandra infraimmaculata’, Salamandra 53(2), 314–318.
  17. [19]Hubert, L. and Arabie, P. (1985), ‘Comparing partitions’, Journal of classification 2(1), 193–218.
  18. [21]IUCN SSC Amphibian Specialist Group (2022), ‘Salamandra infraimmaculata. the iucn red list of threatened species 2022: e.t59466a175607822’, https://www.iucnredlist.org/species/59466/175607822. Accessed 19 October 2026.
  19. [22]Johansson, Ö., Samelius, G., Wikberg, E., Chapron, G., Mishra, C. and Low, M. (2020), ‘Identification errors in camera-trap studies result in systematic population overestimation’, Scientific Reports 10, 6393.DOI
  20. [23]Jordan, E. A., Ewen, J., Hitchmough, R., Moran, L. R., Murrell, D. J., Rowcliffe, J. M. and Adams, L. K. (2025), ‘Supplementing human observation with artificial intelligence impacts demographic estimates for a critically endangered lizard’, Ecological Solutions and Evidence 6(1), e70018.
  21. [24]Kodi, A. R., Howard, J., Borchers, D. L., Worthington, H., Alexander, J. S., Lkhagvajav, P., Bayan-donoi, G., Ochirjav, M., Erdenebaatar, S., Byambasuren, C., Battulga, N., Johansson, Ö. and Sharma, K. (2024), ‘Ghostbusting—reducing bias due to identification errors in spatial capture-recapture histories’, Methods in Ecology and Evolution 15(6), 1060–1070.
  22. [25]Lindenberger, P., Sarlin, P.-E. and Pollefeys, M. (2023), Lightglue: Local feature matching at light speed, in ‘Proceedings of the IEEE/CVF international conference on computer vision’, pp. 17627–17638.arxiv.org/abs/2306.13643
  23. [26]Matthé, M., Sannolo, M., Winiarski, K., Spitzen-van der Sluijs, A., Goedbloed, D., Steinfartz, S. and Stachow, U. (2017), ‘Comparison of photo-matching algorithms commonly used for photographic capture–recapture studies’, Ecology and Evolution 7(15), 5861–5872.
  24. [27]Meiri, S., Belmaker, A., Berkowic, D., Kazes, K., Maza, E., Bar-Oz, G. and Dor, R. (2019), ‘A checklist of Israeli land vertebrates’, Israel Journal of Ecology & Evolution 65(1–2), 43–70.DOI
  25. [28]Morrison, T. A., Yoshizaki, J., Nichols, J. D. and Bolger, D. T. (2011), ‘Estimating survival in photographic capture–recapture studies: overcoming misidentification error’, Methods in Ecology and Evolution 2(5), 454–463. URL: https://besjournals.onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2011.00106.xDOI
  26. [29]Musgrave, K., Belongie, S. and Lim, S.-N. (2020), ‘A Metric Learning Reality Check’. URL: http://arxiv.org/abs/2003.08505
  27. [30]Nepovinnykh, E., Chelak, I., Eerola, T. et al. (2024), ‘Species-agnostic patterned animal re-identification by aggregating deep local features’, International Journal of Computer Vision 132(9), 4003–4018.DOI
  28. [31]Otarashvili, L., Subramanian, T., Holmberg, J., Levenson, J. J. and Stewart, C. V. (2024), ‘Multispecies animal re-id using a large community-curated dataset’. arXiv:2412.05602.arxiv.org/abs/2412.05602
  29. [32]Otsu, N. (1979), ‘A threshold selection method from gray-level histograms’, IEEE Transactions on Systems, Man, and Cybernetics 9(1), 62–66.DOI
  30. [33]Rahmdel, Z., Vaissi, S., Faramarzi, P., Dowlatshahi, P., Mohammadyan, M.-S. and Taheri-Khas, Z. (2026), ‘Deep learning based individual identification and population estimation of the yellow spotted mountain newt (neurgergus derjugini)’, Scientific Reports 16(1), 6475.DOI
  31. [34]Saito, T. and Rehmsmeier, M. (2015), ‘The precision-recall plot is more informative than the roc plot when evaluating binary classifiers on imbalanced datasets’, PloS one 10(3), e0118432.DOI
  32. [35]Schulte, L., Faul, C., Oswald, P., Preißler, K., Steinfartz, S., Veith, M. and Caspers, B. A. (2024), ‘Performance of different automatic photographic identification software for larvae and adults of the european fire salamander’, Plos one 19(4), e0298285.DOI
  33. [36]Segev, O., Hill, N., Templeton, A. R. and Blaustein, L. (2010), ‘Population size, structure and phenology of an endangered salamander at temporary and permanent breeding sites’, Journal for Nature Conservation 18(3), 189–195.DOI
  34. [37]Segev, O., Mangel, M. and Blaustein, L. (2009), ‘Deleterious effects by mosquitofish (Gambusia affinis) on the endangered fire salamander (Salamandra infraimmaculata)’, Animal Conservation 12(1), 29–37.DOI
  35. [38]Speybroeck, J. and Steenhoudt, K. (2017), ‘A pattern-based tool for long-term, large-sample capture-mark-recapture studies of fire salamanders Salamandra species (Amphibia: Urodela: Salamandridae)’, Acta Herpetologica 12(1), 55–63.DOI
  36. [39]Stevick, P. T., Palsbøll, P. J., Smith, T. D., Bravington, M. V. and Hammond, P. S. (2001), ‘Errors in identification using natural markings: rates, sources, and effects on capture–recapture estimates of abundance’, Canadian Journal of Fisheries and Aquatic Sciences 58(9), 1861–1870.
  37. [40]Stuart, S. N., Chanson, J. S., Cox, N. A., Young, B. E., Rodrigues, A. S. L., Fischman, D. L. and Waller, R. W. (2004), ‘Status and trends of amphibian declines and extinctions worldwide’, Science 306(5702), 1783–1786.
  38. [41]Takaya, K., Taguchi, Y. and Ise, T. (2023), ‘Individual identification of endangered amphibians using deep learning and smartphone images: case study of the Japanese giant salamander (Andrias japonicus)’, Scientific Reports 13, 16212.DOI
  39. [42]Warburg, M. R. (1994), ‘Population ecology, breeding activity, longevity, and reproduction strategies of Salamandra salamandra: an 18 year long study of an isolated population on Mt. Carmel Israel’, Mertensiella 4, 399–421.
  40. [43]Warburg, M. R. (2008), ‘Growth-rate in free-roaming salamanders Salamandra infraimmaculata: a long-term study’, Current Herpetology 27(2), 61–69.DOI
  41. [44]Yesharim, M., Perl, R. G. B., Roll, U., Gafny, S., Geffen, E. and Ram, Y. (2026), ‘Near-perfect photo-ID of the Hula painted frog with zero-shot deep local-feature matching’. Version Number: 1. URL: https://arxiv.org/abs/2601.08798
  42. [45]Yesharim, M. and Ram, Y. (2026), Global embeddings, local feature matching, and adaptive validation overfitting in animal re-identification, in ‘CLEF 2026 Working Notes’, Jena, Germany. Working note for the AnimalCLEF 2026 task at LifeCLEF, hosted at CVPR & CLEF.
  43. [46]Zhao, X., Wu, X., Chen, W., Chen, P. C. Y., Xu, Q. and Li, Z. (2023), ‘ALIKED: A lighter keypoint and descriptor extraction network via deformable transformation’, IEEE Transactions on Instrumentation and Measurement 72, 1–16.arxiv.org/abs/2304.03608
  44. [47]Čermák, V., Picek, L., Adam, L. and Papafitsoros, K. (2024), WildlifeDatasets: An open-source toolkit for animal re-identification, in ‘2024 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)’, IEEE, pp. 5941–5951.

Paper details

vlnc:W_4f6usgca
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY-SA 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

ChatGPT, Claude

View statement
Looking for related papers…
Contents