TLDR: A new research paper introduces a real-time identification (ID) algorithm for continuous, automated monitoring of laboratory mice in home cages. The system, which uses custom ear tags, consists of three main components: MouseTracks for object tracking, Mouseformer for ear tag-based ID classification, and MouseMap for assigning final IDs to tracklets. This pipeline operates 24/7 at 30 frames per second, significantly improving tracking efficiency and reducing ID switches compared to existing methods, achieving 95.28% ID accuracy. The technology aims to provide more accurate data for behavioral and physiological studies, enhancing animal welfare and research outcomes.
Monitoring the behavior and physiology of laboratory mice in their home cages around the clock offers significant advantages for scientific research. It allows for more precise data collection, enhances animal welfare by providing real-time insights, and enables a more dynamic understanding of disease progression and the effects of treatments. However, a major challenge in this field is accurately tracking and identifying individual mice, especially when they are housed in groups, look very similar, move frequently, and interact with each other.
To address these complexities, a new real-time identification (ID) algorithm has been developed. This system is designed to accurately assign unique identities to mice wearing custom ear tags within digital home cages equipped with cameras. The entire process operates at 30 frames per second, providing continuous 24/7 coverage of the cages.
The core of this innovative system is a three-part pipeline:
MouseTracks: The Custom Tracker
First, a custom multiple object tracker, named MouseTracks, is employed. This component is responsible for linking individual detections of mice into coherent paths, known as tracklets. It achieves this by combining both appearance cues (how a mouse looks) and motion cues (how a mouse moves). For instance, it uses information from a detection model called mHydra to predict a mouse’s future location based on its past movements and applies a method to determine how much new detections overlap with existing tracklets. It also considers the confidence of detections, allowing the system to rely more on its predictions if a detection is unclear, or more on the current observation if it’s very clear.
Mouseformer: The ID Classifier
The second part is Mouseformer, a specialized AI model designed for identifying mice based on their custom ear tags. Assigning an ID to a mouse’s image can be tricky because all mice look very similar, with the only distinguishing feature being a tiny ear tag. Furthermore, ear tags might not always be visible or could even fall off. Mouseformer tackles this by performing a fine-grained image classification, focusing on subtle differences in the ear tag patterns. It uses an advanced AI architecture called CoAtNet, which combines different techniques to accurately classify the ear tags, even when environmental factors in the cage vary.
Also Read:
- New Event Autoencoder Boosts High-Speed Vision for Edge Devices
- Assessing Video AI Models for Broad Scientific Applications
MouseMap: Combining Tracks and IDs
Finally, MouseMap takes the tracklets (the paths of mice) and their corresponding ear tag predictions and assigns a definitive ID to each tracklet. This is achieved using a sophisticated constraint programming algorithm, which can be thought of as solving an optimization puzzle. It aims to find the best possible assignment of tracklets to the limited number of mouse identities in the cage, maximizing the confidence of the ear tag predictions. This step also includes a mechanism to handle situations where too many potential tracklets are detected, ensuring that only the most probable ones are considered and merged if necessary.
The researchers conducted an extensive evaluation of their system using a large dataset of mouse images and videos. The Mouseformer model was trained on over 86,000 mouse images, captured under various environmental conditions and using different camera hardware. For validation, 100 minutes of video featuring three mice in diverse settings (different mouse strains, bedding types, enrichment, and lighting conditions) were meticulously labeled with ground truth ID and tracking information.
The results demonstrate that this new pipeline, combining mHydra for detection with the Envision tracker (which includes MouseTracks, Mouseformer, and MouseMap), significantly outperforms existing state-of-the-art methods like SLEAP and DeepLabCut. The system achieved an impressive overall ID accuracy of 95.28% and drastically reduced the number of ID switches, meaning it maintained consistent identification of individual mice for longer periods. This highlights the substantial benefits of using a custom detection model and a dedicated identification model that leverages appearance cues from the ear tags.
This animal identification and tracking pipeline represents a significant step forward in enabling continuous, 24-hour monitoring of laboratory mice in their home cages. By integrating video monitoring with custom physical ear tags, it provides state-of-the-art multi-object mouse tracking and identification. The system is designed to deliver individual animal biomarkers, which are crucial for downstream scientific experiments. Future work aims to expand the system’s capabilities to track more mice (e.g., five mice) and explore alternative identification methods that do not require custom ear tags, such as tail tattoos or shaving patterns. For more details, you can refer to the full research paper here.


