The MacqD deep-learning-based model for automatic detection of socially housed laboratory macaques
- PMID: 40195447
- PMCID: PMC11977019
- DOI: 10.1038/s41598-025-95180-x
The MacqD deep-learning-based model for automatic detection of socially housed laboratory macaques
Abstract
Despite advancements in video-based behaviour analysis and detection models for various species, existing methods are suboptimal to detect macaques in complex laboratory environments. To address this gap, we present MacqD, a modified Mask R-CNN model incorporating a SWIN transformer backbone for enhanced attention-based feature extraction. MacqD robustly detects macaques in their home-cage under challenging scenarios, including occlusions, glass reflections, and overexposure to light. To evaluate MacqD and compare its performance against pre-existing macaque detection models, we collected and analysed video frames from 20 caged rhesus macaques at Newcastle University, UK. Our results demonstrate MacqD's superiority, achieving a median F1-score of 99% for frames with a single macaque in the focal cage (surpassing the next-best model by 21%) and 90% for frames with two macaques. Generalisation tests on frames from a different set of macaques from the same animal facility yielded median F1-scores of 95% for frames with a single macaque (surpassing the next-best model by 15%) and 81% for frames with two macaques (surpassing the alternative approach by 39% ). Finally, MacqD was applied to videos of paired macaques from another facility and resulted in F1-score of 90%, reflecting its strong generalisation capacity. This study highlights MacqD's effectiveness in accurately detecting macaques across diverse settings.
Keywords: Animal behaviour; Automatic detection; Deep learning; Macaques; Non-human primate; Pair-housed.
© 2025. The Author(s).
Conflict of interest statement
Declarations. Competing interests: The authors declare no competing interests
Figures









Similar articles
-
Interspecies pair housing of macaques in a research facility.Lab Anim. 2012 Apr;46(2):170-2. doi: 10.1258/la.2011.011134. Epub 2012 Jan 25. Lab Anim. 2012. PMID: 22277270
-
Pair housing for female longtailed and rhesus macaques in the laboratory: behavior in protected contact versus full contact.J Appl Anim Welf Sci. 2012;15(2):126-43. doi: 10.1080/10888705.2012.658330. J Appl Anim Welf Sci. 2012. PMID: 22458874 Free PMC article.
-
Alopecia in three macaque species housed in a laboratory environment.Am J Primatol. 2014 Apr;76(4):325-34. doi: 10.1002/ajp.22236. Epub 2013 Nov 14. Am J Primatol. 2014. PMID: 24243351 Free PMC article.
-
Social management of laboratory rhesus macaques housed in large groups using a network approach: A review.Behav Processes. 2018 Nov;156:77-82. doi: 10.1016/j.beproc.2017.11.014. Epub 2017 Dec 7. Behav Processes. 2018. PMID: 29224844 Free PMC article. Review.
-
Laboratory rhesus macaque social housing and social changes: Implications for research.Am J Primatol. 2017 Jan;79(1):1-14. doi: 10.1002/ajp.22528. Epub 2016 Feb 5. Am J Primatol. 2017. PMID: 26848542 Free PMC article. Review.
References
-
- Weary, D., Huzzey, J. & Von Keyserlingk, M. Board-invited review: Using behavior to predict and identify ill health in animals. J. Anim. Sci.87, 770–777 (2009). - PubMed
-
- Perentos, N. et al. Techniques for chronic monitoring of brain activity in freely moving sheep using wireless EEG recording. J. Neurosci. Methods279, 87–100 (2017). - PubMed
-
- Anderson, D. J. & Perona, P. Toward a science of computational ethology. Neuron84, 18–31. 10.1016/j.neuron.2014.09.005 (2014). - PubMed
-
- Mathis, M. W. & Mathis, A. Deep learning tools for the measurement of animal behavior in neuroscience. Curr. Opin. Neurobiol.60, 1–11. 10.1016/j.conb.2019.10.008 (2020). - PubMed
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources
Miscellaneous