ApexID: Hierarchical Learning for Multi-Species Animal Re-Identification
Organizations: Made In Alexandria AI Team (M.I.A Robotics) · Alamein International University · Alexandria University · hyper3labs ·
Abstract
Animal re-identification (Re-ID) must distinguish individuals across species and capture conditions. We introduce ApexID, a hierarchical SphereFace2-based loss that integrates global identity discrimination with balanced animal-category supervision. Using 132,533 images curated from 19 public datasets, we evaluate three model families and four objectives on four external datasets with observation-aware retrieval protocols. ApexID achieves a dataset-averaged Rank-1 accuracy of 64.89% with ConvNeXt-Small and an mAP of 32.54% with MIEW-ID, outperforming their pretrained reference models. On elephants, a category absent from animal Re-ID training, our ConvNeXt-Small variant achieves the highest retrieval performance among the fourteen evaluated configurations. Scores vary by backbone and dataset, and open-set evaluation reveals remaining discovery challenges. These findings support hierarchical category-identity learning to improve transfer to unseen datasets and species.
Figures & tables
| Partition | Images | Identities |
|---|---|---|
| Training | 90,921 | 11,677 |
| Known-identity validation | 28,070 | 10,768 |
| Held-out-identity validation | 13,542 | 1,671 |
| Total (unique) | 132,533 | 13,348 |
| Dataset | Species | IDs | Images | Obs. |
|---|---|---|---|---|
| ELPephants [ 27 ] | African forest elephant | 272 | 2,049 | 2,028 |
| GCN-ID [ 35 ] | Great crested newt | 207 | 1,232 | 1,152 |
| Bristol Gorillas [ 11 , 10 ] | Western lowland gorilla | 7 | 5,324 | 4,215 |
| Private jaguar data | Jaguar | 51 | 1,029 | 672 |
| Total | – | 537 | 9,634 | 8,067 |
| Loss | R-1 | mAP | mINP | ID-bal. mAP | ID-bal. R-1 |
|---|---|---|---|---|---|
| ConvNeXt-Small | |||||
| ArcFace | 62.24 | 29.54 | 14.57 | 30.08 | 59.36 |
| Dynamic ArcFace | 61.75 | 29.23 | 14.51 | 29.62 | 58.72 |
| SphereFace2 | 63.60 | 30.24 | 15.31 | 30.83 | 60.78 |
| ApexID Hierarchical | 64.89 | 30.84 | 15.71 | 31.72 | 62.13 |
| MIEW-ID v3 | |||||
| Loss | ARI | B 3 F1 | Pair F1 | Nov. ARI | BAKS | NormAcc |
|---|---|---|---|---|---|---|
| ConvNeXt-S | ||||||
| ArcFace | 0.424 | 0.596 | 0.447 | 0.392 | 0.098 | 0.207 |
| Dynamic ArcFace | 0.436 | 0.597 | 0.460 | 0.397 | 0.305 | 0.338 |
| SphereFace2 | 0.441 | 0.588 | 0.463 | 0.404 | 0.305 | 0.338 |
| ApexID Hierarchical | 0.432 | 0.591 | 0.457 | 0.403 | 0.319 | 0.322 |
| MIEW-ID v3 | ||||||
| Objective | R-1 | mAP | mINP | ID-bal. mAP | ID-bal. R-1 |
|---|---|---|---|---|---|
| SphereFace2 (no category term) | 63.603 | 30.244 | 15.310 | 30.825 | 60.779 |
| 64.257 | 30.499 | 15.334 | 31.113 | 61.260 | |
| 64.262 | 30.586 | 15.375 | 31.334 | 61.382 | |
| 64.193 | 30.542 | 15.383 | 31.114 | 61.047 | |
| 64.602 | 30.662 | 15.531 | 31.235 | 61.409 | |
| 64.478 | 30.546 | 15.333 | 31.257 | 61.730 |
| Dataset | Animal Category | Train IDs | Images | Observations | Train images | Val. images |
|---|---|---|---|---|---|---|
| AmvrakikosTurtles [ 2 ] | Sea turtle | 41 | 141 | 100 | 59 | 82 |
| BalearicLizard [ 6 ] | Lizard | 656 | 4,359 | 4,330 | 2,859 | 1,500 |
| CTai [ 21 ] | Chimpanzee | 57 | 3,609 | 3,608 | 2,443 | 1,166 |
| CzechLynx [ 34 ] | Lynx | 279 | 37,829 | 10,971 | 28,792 | 9,037 |
| GiraffeZebraID [ 33 ] | Giraffe; zebra | 876 | 4,333 | 1,455 | 3,569 | 764 |
| Giraffes [ 29 ] | Giraffe | 136 | 892 | 323 | 651 | 241 |
| Model | Backbone parameters (M) |
|---|---|
| ConvNeXt-S (ApexID) | 49.45 |
| MIEW-ID v3 | 51.08 |
| MegaDescriptor-L | 195.20 |
| Bristol | Elephants | GCN-ID | Private jaguar data | ||||||||||
| Backbone | Loss | mAP | R-1 | mINP | mAP | R-1 | mINP | mAP | R-1 | mINP | mAP | R-1 | mINP |
| ConvNeXt-S | ArcFace | 26.44 | 91.27 | 15.05 | 5.89 | 15.39 | 1.31 | 60.50 | 84.41 | 33.45 | 25.33 | 57.90 | 8.50 |
| ConvNeXt-S | Dynamic ArcFace | 25.84 | 90.67 | 15.03 | 5.32 | 14.54 | 1.07 | 60.35 | 82.76 | 33.53 | 25.41 | 59.01 | 8.38 |
| ConvNeXt-S | SphereFace2 | 26.06 | 91.18 | 15.02 | 5.72 | 15.38 | 1.18 | 62.96 | 86.60 | 36.37 | 26.23 | 61.25 | 8.67 |
| ConvNeXt-S | ApexID Hierarchical Loss | 26.30 | 91.91 | 15.01 | 6.63 | 17.69 | 1.49 | 63.96 | 86.86 | 37.16 | 26.46 | 63.10 | 9.20 |
| MIEW-ID v3 | ArcFace | 26.95 | 89.65 | 14.99 | 4.74 | 14.21 | 0.80 | 73.85 | 93.66 | 48.06 | 22.81 | 57.07 | 6.98 |
| Backbone | vs. | Dataset | mAP | R-1 | mINP |
|---|---|---|---|---|---|
| ConvNeXt-S | ArcFace | Bristol | [ , ] | [ , ] | [ , ] |
| Elephants | [ , ] | [ , ] | [ , ] | ||
| GCN-ID | [ , ] | [ , ] | [ , ] | ||
| Private jaguar data | [ , ] | [ , ] | [ , ] | ||
| Dynamic ArcFace | Bristol | [ , ] | [ , ] | [ , ] | |
| Elephants | [ , ] | [ , ] | [ , ] |
| AUROC | Silhouette | Fisher ratio | Effective rank | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Backbone | Dataset | SphereFace2 | Ours | SphereFace2 | Ours | SphereFace2 | Ours | SphereFace2 | Ours |
| ConvNeXt-S | Bristol | ||||||||
| Elephants | |||||||||
| GCN-ID | |||||||||
| Private jaguar data | |||||||||
| MIEW-ID v3 | Bristol | ||||||||
| Bristol | Elephants | GCN-ID | Private jaguar data | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Backbone | Loss | AUC | EER | T@1 | [email protected] | AUC | EER | T@1 | [email protected] | AUC | EER | T@1 | [email protected] | AUC | EER | T@1 | [email protected] |
| ConvNeXt-S | ArcFace | 60.81 | 41.80 | 5.40 | 1.12 | 63.10 | 40.90 | 5.69 | 1.66 | 91.05 | 15.66 | 61.11 | 44.19 | 75.15 | 31.56 | 19.59 | 5.67 |
| ConvNeXt-S | Dynamic ArcFace | 60.19 | 42.56 | 4.96 | 1.21 | 62.08 | 41.18 | 5.09 | 1.35 | 91.12 | 15.79 | 60.82 | 44.69 | 75.17 | 32.22 | 17.88 | 5.77 |
| ConvNeXt-S | SphereFace2 | 60.09 | 42.88 | 4.82 | 1.29 | 62.29 | 41.84 | 6.02 | 1.81 | 91.88 | 14.34 | 62.23 | 46.50 | 75.49 | 32.71 | 21.64 | 4.73 |
| ConvNeXt-S | ApexID Hierarchical Loss | 59.92 | 43.25 | 4.69 | 1.25 | 63.69 | 40.73 | 6.89 | 2.32 | 91.68 | 14.78 | 62.52 | 47.90 | 75.92 | 32.20 | 21.00 | 6.30 |
| MIEW-ID v3 | ArcFace | 61.70 | 41.60 | 7.54 | 3.35 | 60.41 | 42.99 | 4.76 | 1.46 | 93.04 | 13.04 | 74.78 | 61.35 | 72.55 | 33.90 | 18.47 | 5.88 |
| Bristol | Elephants | GCN-ID | Private jaguar data | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Backbone | Better | Tie | Worse | Better | Tie | Worse | Better | Tie | Worse | Better | Tie | Worse |
| ConvNeXt-S | 3 | 0 | 4 | 182 | 0 | 90 | 105 | 30 | 72 | 31 | 1 | 19 |
| MIEW-ID v3 | 4 | 0 | 3 | 156 | 0 | 116 | 95 | 52 | 60 | 35 | 1 | 15 |
| MegaDescriptor-L | 6 | 0 | 1 | 179 | 0 | 93 | 157 | 7 | 43 | 31 | 0 | 20 |
| Embedding | Dataset | ARI | AMI | V | B 3 F1 | Pair F1 | Nov. ARI | Nov. B 3 | BAKS | NormAcc | Known att. | BAUS |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ConvNeXt-S ArcFace | Bristol | 0.174 | 0.462 | 0.483 | 0.348 | 0.251 | 0.000 | 0.192 | 0.000 | 0.000 | 0.000 | 1.000 |
| Elephants | 0.242 | 0.393 | 0.890 | 0.600 | 0.244 | 0.233 | 0.447 | 0.007 | 0.087 | 0.005 | 0.999 | |
| GCN-ID | 0.938 | 0.969 | 0.993 | 0.978 | 0.939 | 0.943 | 0.971 | 0.287 | 0.536 | 0.333 | 1.000 | |
| Jaguar | 0.342 | 0.652 | 0.780 | 0.458 | 0.356 | 0.342 | 0.458 | — | — | — | 1.000 | |
| ConvNeXt-S Dynamic ArcFace | Bristol | 0.167 | 0.444 | 0.466 | 0.344 | 0.247 | 0.000 | 0.194 | 0.000 | 0.000 | 0.000 | 1.000 |
| Elephants | 0.250 | 0.382 | 0.886 | 0.591 | 0.252 | 0.247 | 0.449 | 0.005 | 0.071 | 0.003 | 1.000 |
Animal Re-Identification
Animal re-identification matches observations of the same individual across time, cameras, viewpoints, and changing conditions.
See all 37 papers