← Back to Home

DeepLabCut: Rat Behavior Analysis

Deep learning pipeline using DeepLabCut to track rat body parts and detect rearing behavior from video data, achieving high accuracy after 350,000+ training iterations.

View on GitHub
DeepLabCut: Rat Behavior Analysis

Training Progress

Watch how the model improves from 25,000 to 350,000 training iterations. The pose estimation becomes dramatically more accurate with additional training.

25K Iterations
25K Iterations

Overview

A comprehensive deep learning pipeline for analyzing rat rearing behavior using DeepLabCut pose estimation. The project trains a ResNet-50 neural network to track five body parts (nosetip, ears, top back, tail base) and uses spatial relationships between these points to automatically detect rearing events. The model dramatically improves accuracy from 25,000 to 350,000 training iterations, demonstrating the importance of extensive training for pose estimation tasks.

Technologies

PythonDeepLabCutTensorFlowResNet-50Computer VisionPose EstimationGoogle ColabPandas

Key Features

  • Custom pose estimation model training with 350,000+ iterations
  • Automated body part tracking (nosetip, ears, back, tail)
  • Rearing behavior detection algorithm based on spatial relationships
  • Interactive threshold calibration using staircase method
  • Labeled video output with tracked body part overlays
  • CSV export of frame-by-frame behavior classification

Challenges

Training deep neural networks for accurate pose estimation required extensive GPU compute time and careful hyperparameter tuning. Developing a robust rearing detection algorithm that works across different lighting conditions and camera angles was particularly challenging.

Results

Successfully trained a high-accuracy pose estimation model that dramatically improves from 25K to 350K iterations. The system can automatically detect rearing behavior in hours of video footage, replacing manual annotation that would take days.

Download Resume

© 2025 Maxwell Vaglica. All rights reserved.