How arnavdhole/kennedy-mouse-pipeline works
This repository provides stage-one geometric preprocessing for mouse-pose datasets. The user workflow is to load Parquet data, apply dataset-specific keypoint choices and filtering, establish a scale and canonical reference, then scale, center, and rotate each frame into normalized poses for downstream models. Diagnostics include alignment plots and evaluation metrics saved as JSON. Dataset configs and notebooks support lab-specific variations. The README describes a later autoencoder stage, but its implementation is outside this repository; notebook internals were not sampled.
Main entry points: notebooks Run notebooks · pipeline.py Frame pipeline · preprocessing.py Scale and center · reference_pose.py Reference pose
Components 15
Dataset setup
- Dataset configs
configs - Run notebooks
notebooks - Parquet loader
pipeline/data_loader.py - Dataset filtering
notebooks
Pose geometry
- Scale and center
pipeline/preprocessing.py - Reference pose
pipeline/reference_pose.py - Frame pipeline
pipeline/pipeline.py - Pose rotation
pipeline/rotation.py - Array conversion
pipeline/pipeline.py
Quality outputs
- Alignment diagnostics
pipeline/validation.py - Quality metrics
pipeline/evaluation.py - Metric JSON files
results
Other components
- Analyst
- Downstream models
- Stage-two autoencoder
Connections 19
- Analyst → Run notebooks: runs
README.md - Run notebooks → Dataset configs: loads settings
README.md - Run notebooks → Parquet loader: loads data
README.md - Run notebooks → Dataset filtering: filters frames
README.md - Parquet loader → Dataset filtering: provides rows
README.md - Run notebooks → Scale and center: computes scale
README.md - Run notebooks → Reference pose: builds reference
README.md - Run notebooks → Frame pipeline: runs frames
README.md - Frame pipeline → Scale and center: scales and centers
pipeline/pipeline.py - Frame pipeline → Pose rotation: chooses rotation
pipeline/pipeline.py - Reference pose → Scale and center: scales and centers
pipeline/reference_pose.py - Reference pose → Pose rotation: bootstraps pose
pipeline/reference_pose.py - Frame pipeline → Array conversion: converts frames
pipeline/pipeline.py - Run notebooks → Alignment diagnostics: checks alignment
README.md - Alignment diagnostics → Scale and center: recenters frames
pipeline/validation.py - Alignment diagnostics → Pose rotation: measures residuals
pipeline/validation.py - Quality metrics → Metric JSON files: saves metrics
pipeline/evaluation.py - Array conversion → Downstream models: feeds poses
README.md - Downstream models → Stage-two autoencoder: includes stage two
README.md