Submitted:
01 July 2026
Posted:
03 July 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction
- 1)
- A dual-stream Stage 2 network that fuses a frozen CLIP ViT-B/16 [6] encoder, adapted by a lightweight trainable projection (Stream A), with a fine-tuned ViT-Base/16 [7] carrying L2-norm part attention (Stream B), trained jointly under ArcFace [8] through a single BNNeck [9] embedding, preceded by a YOLOv8 [10] soft-crop Stage 1.
- 2)
- A multi-seed ablation on a combined cat+dog open-set benchmark (173 test identities) that reports sample mean and standard deviation over three seeds for every ViT-based row, complemented by an open-set verification protocol (TAR at FAR and ) on both the body benchmark and the -identity PetFace dog test split [11].
- 3)
- A background-bias bracket that bounds the residual background reliance of the embedding between a coarse bounding-box mask (a reliable lower bound) and a pixel-level silhouette mask obtained by prompting SAM ViT-B [12] with a specialised dog/cat YOLOv8 detector; a manual audit of the silhouette operator then motivates retaining the reliable soft crop — which never discards the subject — as the Stage 1 front-end for a recall-critical task.
- 4)
- A query-time robustness audit covering nine controlled corruptions (four positional occluders, motion blur, additive Gaussian noise, brightness reduction, JPEG-quality 20, down/up-sampling) applied to the query split with the gallery held fixed, providing a deployment-relevant complement to throughput-oriented audits of prior work [13].
- 5)
- A hardened negative result for a Descriptor Vector Exchange (DVE) [5,14] extension: under full backbone backpropagation it is Pareto-dominated by the base model at seed 42 and at the three-seed mean, and a hyperparameter sweep over descriptor-block depth, loss weight and seed finds no Pareto-superior point. We attribute the outcome to the coarse feature-map resolution of the ViT backbone and to architectural redundancy, not to the data.
2. Related Work
3. Method
3.1. System Overview
3.2. Stream A: Frozen CLIP Semantic Prior
3.3. Stream B: ViT-Base with L2-Norm Part Attention
3.4. Fusion, BNNeck and Loss
3.5. Optional DVE Extension
3.6. Training Protocol
4. Experiments
4.1. Datasets and Protocols
4.2. Multi-Seed Ablation on Body Re-ID
4.3. DVE: A Hardened Negative Result
4.4. Open-Set Verification
4.5. Open-Set Generalisation at Scale and the Few-Shot Regime
4.6. Background-Bias and the Stage-1 Choice
4.7. Query-Time Robustness Audit
4.8. Loss-Function Comparison
4.9. Comparison with the Literature
4.10. Implementation and Reproducibility
5. Discussion
6. Conclusion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Use of Artificial Intelligence
References
- Weiss, E.; Slater, M.; Lord, L. Frequency of lost dogs and cats in the united states and the methods used to locate them. Animals 2012, vol. 2(no. 2), 301–315. Available online: https://www.mdpi.com/2076-2615/2/2/301. [CrossRef]
- Lord, L. K.; Wittum, T. E.; Ferketich, A. K.; Funk, J. A.; Rajala-Schultz, P. J. Search methods that people use to find owners of lost pets. J. Am. Vet. Med. Assoc. 2007, vol. 230(no. 12), 1835–1840. Available online: https://avmajournals.avma.org/view/journals/javma/230/12/javma.230.12.1835.xml. [CrossRef]
- Lord, L. K.; Ingwersen, W.; Gray, J. L.; Wintz, D. J. Characterization of animals with microchips entering animal shelters. J. Am. Vet. Med. Assoc. 2009, vol. 235(no. 2), 160–167. Available online: https://avmajournals.avma.org/view/journals/javma/235/2/javma.235.2.160.xml. [CrossRef]
- Clarke, T. “Animal microchipping: loophole revelations in finding lost pets,” Veterinary Times. February 2015, also features contributions from Sam Moore and Kara-Jayne Gould. Available online: https://www.vettimes.co.uk/article/animal-microchipping-loophole-revelations-in-finding-lost-pets/.
- Yu, Y.; Vidit, V.; Davydov, A.; Engilberge, M.; Fua, P. Addressing the elephant in the room: Robust animal re-identification with unsupervised part-based feature alignment. 2024. Available online: https://arxiv.org/abs/2405.13781.
- Radford, A.; Kim, J. W.; Hallacy, C.; Ramesh, A.; Goh, G.; Agarwal, S.; Sastry, G.; Askell, A.; Mishkin, P.; Clark, J.; et al. Learning transferable visual models from natural language supervision. International Conference on Machine Learning (ICML). PMLR, 2021; pp. 8748–8763. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; Uszkoreit, J.; Houlsby, N. An image is worth 16x16 words: Transformers for image recognition at scale. 2021. Available online: https://arxiv.org/abs/2010.11929.
- Deng, J.; Guo, J.; Yang, J.; Xue, N.; Kotsia, I.; Zafeiriou, S. Arcface: Additive angular margin loss for deep face recognition. IEEE Trans. Pattern Anal. Mach. Intell. Available. 2022, vol. 44(no. 10), 5962–5979. [Google Scholar] [CrossRef] [PubMed]
- Luo, H.; Gu, Y.; Liao, X.; Lai, S.; Jiang, W. Bag of tricks and a strong baseline for deep person re-identification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 2019. [Google Scholar]
- Jocher, G.; Chaurasia, A.; Qiu, J. Ultralytics yolov8. 2023. Available online: https://github.com/ultralytics/ultralytics gitHub.
- Shinoda, R.; Shiohara, K. Petface: A large-scale dataset and benchmark for animal identification. 2024. Available online: https://arxiv.org/abs/2407.13555.
- Kirillov, A.; Mintun, E.; Ravi, N.; Mao, H.; Rolland, C.; Gustafson, L.; Xiao, T.; Whitehead, S.; Berg, A. C.; Lo, W.-Y.; Dollár, P.; Girshick, R. Segment anything. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2023; pp. 4015–4026. [Google Scholar]
- Zábó, A.; Nagy, M.; Ahmad, A. Rapid: Real-time animal pattern re-identification on edge devices. bioRxiv. 2025. Available online: https://api.semanticscholar.org/CorpusID:280006001.
- Thewlis, J.; Albanie, S.; Bilen, H.; Vedaldi, A. Unsupervised learning of landmarks by descriptor vector exchange. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2019; pp. 6361–6371. [Google Scholar]
- Li, S.; Li, J.; Tang, H.; Qian, R.; Lin, W. Atrw: A benchmark for amur tiger re-identification in the wild. In Proceedings of the 28th ACM International Conference on Multimedia (MM ’20), 2020; ACM. Available online: https://arxiv.org/abs/1906.05586.
- Stennett, M.; Rubenstein, D. I.; Burghardt, T. Towards individual grevy’s zebra identification via deep 3d fitting and metric learning. 2022. Available online: https://arxiv.org/abs/2206.02261.
- Nepovinnykh, E.; Chelak, I.; Eerola, T.; Immonen, V.; Kälviäinen, H.; Kholiavchenko, M.; Stewart, C. V. Species-agnostic patterned animal re-identification by aggregating deep local features. International Journal of Computer Vision. April 2024. Available online: https://link.springer.com/article/10.1007/s11263-024-02071-1.
- Schneider, S.; Taylor, G. W.; Kremer, S. C. Similarity learning networks for animal individual re-identification - beyond the capabilities of a human observer. 2020 IEEE Winter Applications of Computer Vision Workshops (WACVW), 2020; pp. 44–52. [Google Scholar]
- Adam, L.; Čermák, V.; Papafitsoros, K.; Picek, L. Wildlifereid-10k: Wildlife re-identification dataset with 10k individual animals. 2025 IEEE/CVF Conf. Comput. Vis. Pattern Recognit. Work. (CVPRW) 2025, 2090–2100. [Google Scholar]
- Voinea, A.; Kock, R.; Dhali, M. A. Lostpaw: Finding lost pets using a contrastive learning-based transformer with visual input. arXiv 2025, arXiv:2304.14765. [Google Scholar]
- Hou, S.; Huang, P.; Wang, Z.; Liu, Y.; Li, Z.; Zhang, M.; Huang, Y. Openanimals: Revisiting person re-identification for animals towards better generalization. 2024. Available online: https://arxiv.org/abs/2410.00204.
- Zhou, K.; Yang, J.; Loy, C. C.; Liu, Z. Learning to prompt for vision-language models. Int. J. Comput. Vis. (IJCV) 2022, arXiv:2109.01134vol. 130(no. 9), 2337–2348 coOp. [Google Scholar] [CrossRef]
- —, Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2022; pp. 16 816–16 825.
- Wu, Y.; Zhao, D.; Zhang, J.; Koh, Y. S. An individual identity-driven framework for animal re-identification. 2024. Available online: https://arxiv.org/abs/2410.22927.
- Hermans, A.; Beyer, L.; Leibe, B. In defense of the triplet loss for person re-identification. arXiv 2017, arXiv:1703.07737. [Google Scholar]
- Sun, Y.; Cheng, C.; Zhang, Y.; Zhang, C.; Zheng, L.; Wang, Z.; Wei, Y. Circle loss: A unified perspective of pair similarity optimization. 2020. Available online: https://arxiv.org/abs/2002.10857.
- Wang, X.; Han, X.; Huang, W.; Dong, D.; Scott, M. R. Multi-similarity loss with general pair weighting for deep metric learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019; pp. 5022–5030. [Google Scholar]
- Lin, T.-Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C. L. “Microsoft COCO: Common objects in context,” in Computer Vision – ECCV 2014; Springer International Publishing, 2014; pp. 740–755. [Google Scholar]
- Chen, T.; Xu, B.; Zhang, C.; Guestrin, C. Training deep nets with sublinear memory cost. arXiv 2016, arXiv:1604.06174. [Google Scholar]
- Zhong, Z.; Zheng, L.; Cao, D.; Li, S. Re-ranking person re-identification with k-reciprocal encoding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017; pp. 1318–1327. [Google Scholar]
- Sani, D.; Khurana, M.; Anand, S. Active learning for animal re-identification with ambiguity-aware sampling. arXiv 2025, arXiv:2511.06658. [Google Scholar]



| Dataset | IDs train | Imgs train | IDs test | Use |
|---|---|---|---|---|
| CatIndividuals | 354 | 9,192 | 77 | Body train + val/test |
| MultiposeDog | 95 | 921 | 96 | Body train + val/test |
| Body merged | 449 | 10,113 | 173 | |
| PetFace-Dog (≥5) | 3,040 | 16,335 | 14,716 | Face Re-ID |
| PetFace-Dog (≥2) | 11,471 | 41,073 | 14,716 | Few-shot real |
| Model | Rank-1 () | Rank-5 () | mAP () |
|---|---|---|---|
| A: ResNet-50 + BNNeck + ArcFace | 0.8508 (seed 42) | 0.9448 | 0.6714 |
| B: ViT-Base + BNNeck + ArcFace | |||
| (seed 42) | 0.9337 | 0.9669 | 0.8240 |
| C: CLIP+ViT (proposed) | |||
| (seed 42) | 0.9834 | 0.9834 | 0.8731 |
| D: CLIP+ViT + DVE (full backprop) | |||
| (seed 42) | 0.9669 | 0.9724 | 0.8523 |
| Configuration | AUC | EER | TAR@FAR= | TAR@FAR= |
|---|---|---|---|---|
| Body Re-ID (combined cat+dog; 96 dog + 77 cat = 173 identities) | ||||
| B: ViT-only (3 seeds) | ||||
| C: CLIP+ViT (3 seeds) | ||||
| D: CLIP+ViT+DVE (3 seeds) | ||||
| Face Re-ID (PetFace dog test, 14,716 identities, single seed) | ||||
| face baseline | ||||
| Training regime | Test orig. | Test bbox | Test SAM silhouette | ( / mAP) |
|---|---|---|---|---|
| base (raw) | 0.9834 / 0.8731 | 0.9669 / 0.8251 | 0.7845 / 0.5851 | / |
| soft-crop (Stage 1) | 0.9779 / 0.8737 | 0.9337 / 0.8255 | 0.7956 / 0.5968 | / |
| silhouette (cautionary) | 0.9669 / 0.8344 | 0.9448 / 0.8007 | 0.8177 / 0.6547 | / |
| Perturbation | (pp) | (pp) | |
|---|---|---|---|
| none (baseline) | — | — | |
| top25 occluder | |||
| bot25 occluder | |||
| left25 occluder | |||
| cen25 occluder | |||
| motion blur (15px) | |||
| Gaussian noise () | |||
| low light () | |||
| low resolution () | |||
| JPEG-q20 |
| Loss | Config | ||||
|---|---|---|---|---|---|
| ArcFace (ref.) | , | 0.9834 | 0.9834 | — | — |
| Circle Loss | , | 0.9613 | 0.9779 | ||
| Multi-Similarity | , | 0.9061 | 0.9558 | ||
| Triplet (b-hard) | , cosine | 0.9724 | 0.9945 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).