Seizure Detection in Smart Mouse Cages Using Computer Vision and Machine Learning


Introduction

Accurately monitoring animal behavior during pharmaceutical testing is essential in the life sciences industry, but it is extremely time-consuming. SmartCat partnered with a technology-driven research organization to develop an intelligent seizure detection system that is used in a digital cage platform for lab mice. The goal was to automate the detection of rare but critical events, such as epileptic seizures, using computer vision and machine learning. This reduces the manual labor of researchers significantly and enhances the reliability of experimental data.

The Challenge

The primary challenge was the absence of annotated data. The client had accumulated a large dataset: a year’s worth of continuous video footage from 20+ cages. Although they had a large dataset, they did not have any labeled events. Manual annotation was essentially  impossible given to the duration of the recordings and the rarity of the seizures.

In addition to this, false alarms were a persistent issue. Misinterpreting mouse fights or other abnormal behavior as seizures generated unnecessary alerts, which added to the scientists’ workload instead of reducing it.

Solution

Our team was able to develop a custom solution focused on advanced feature engineering, machine learning, and scalable deployment:

  • Custom Feature Extraction: We made a rich set of engineered features designed to capture atypical movements and behavioral patterns over time, improving the model’s sensitivity to seizure-like activity.
  • Model Training: With the engineered features, our team trained a robust model capable of detecting seizure events with high accuracy. Both YOLO-based computer vision models and random forest classifiers were used.
  • Noise Reduction and Behavior Differentiation: With adding additional logic we helped distinguish between seizure activity and other behaviors like aggression or fighting, which was a common false negative that would occur.

Scalable Deployment: We deployed the model with Kubernetes, ensuring scalable and reliable integration across connected smart cages for the  centralized web platform

Results

The system was successfully integrated into a live research environment. The key impacts include:

  • False positive rate reduction: There was a significant reduction of false positives with some test periods achieving zero false alerts for several consecutive days.
  • Manual review time decrease: A drastic decrease in manual video review time, allowing scientists to focus on higher-value research tasks.

Remote accessibility: Scientists can now monitor and analyze behavioral events off-site using a real-time, web-based dashboard.

Smart Tip

Investing in behavioral feature engineering can be as valuable as large-scale data annotation especially when dealing with rare event detection in unstructured video datasets.

Smart Fact

This project demonstrated that engineered behavioral patterns can enable training of a high-precision seizure detection model without manual annotation, setting a new standard for similar preclinical research.

Technologies Used

  • Data & Modeling: Python, YOLO, Tracking Algorithms, Random Forest Classification
  • Infrastructure: Kubernetes for scalable deployment
  • Platform: Integrated with a web-based smart cage monitoring application

Table of Content

Back to Top
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.