Back to Homepage

Fylgja: Mouse Behaviour Analysis Pipeline

Fylgja (Norse: "to accompany") represents an advanced evolution of my thesis research at Sahlgrenska University Hospital. This integrated pipeline orchestrates GPU-accelerated DeepLabCut pose estimation within a bespoke Streamlit environment to deliver the quantifiable analysis of murine social dynamics. By seamlessly combining computer vision with behavioural classification, the system offers a robust, evolving framework for the high-throughput interrogation of complex ethological datasets.

Project II

~1.2M Frames / Hr
0.98 R-Squared
Non-Invasive Protocol
Multi-Agent Tracking
Cloud GPU Inference

Implemented a RunPod-based inference pipeline utilising DeepLabCut with SuperAnimal-TopViewMouse models. The system handles video upload, batch processing on NVIDIA A100 GPUs, and automated result download, enabling efficient processing of large video datasets without local hardware constraints.

Interactive Streamlit Dashboard

Developed a comprehensive visualisation and analysis dashboard that generates per-video and per-individual behaviour summaries, chamber time pie charts, trajectory heatmaps, and stranger/novel object interaction metrics. The dashboard enables researchers to explore DeepLabCut outputs interactively.

Model Fine-Tuning Workflow

Established a workflow to improve tracking accuracy through iterative refinement: extracting high-confidence frames from inference outputs, labelling using DeepLabCut's annotation tools, fine-tuning the SuperAnimal model on domain-specific data, and re-inferring videos with the improved model.

Behavioural Quantification

Implemented algorithms to quantify key behavioural metrics from pose estimation data: chamber occupancy time, nose proximity to stranger cup locations for social interaction scoring, movement patterns including distance travelled and velocity, and detection of exploratory behaviours such as sniffing, grooming, and freezing.

ezTrack Integration

Integrated ezTrack as a complementary motion-based tracking system for rapid position/occupancy analysis and freezing behaviour quantification. This provides validation against DeepLabCut outputs and offers a fast alternative for specific analysis requirements.