This project builds an end-to-end computer vision pipeline for animal pose estimation from video frames. Using the DigiDogs dataset, the workflow covers frame preprocessing, keypoint annotation parsing, deep learning model training, quantitative evaluation, and pose visualization.
The full training pipeline was developed and executed on Kaggle GPU notebooks. This repository is a portfolio version designed for recruiters and technical interviewers: it highlights methodology, experiment design, measurable results, and reproducibility without shipping large datasets or model weights.
33-keypoint pose visualization on a DigiDogs frame (numbered skeleton overlay):
- Video frame processing: TIFF/PNG ingestion, frame indexing, and annotation alignment
- Animal keypoint detection: 33-keypoint regression from dog images
- Dataset preprocessing: parsing
2DCoordinates.log, invalid-point filtering, train/val split - Deep learning training: PyTorch-based CNN baseline with GPU acceleration
- Evaluation: PCK, MAE, RMSE, loss curves, per-keypoint error analysis
- Visualization: keypoint overlays, prediction-vs-ground-truth plots, demo video frames
- Multi-scenario experiments: motion augmentation, background change, scene diversity
| Category | Tools |
|---|---|
| Language | Python 3.10+ |
| Deep Learning | PyTorch |
| Computer Vision | OpenCV |
| Data | NumPy, Pandas |
| Visualization | Matplotlib |
| Runtime | Kaggle Notebook (GPU) |
DigiDogs Dataset — dog video sequences with per-frame 2D keypoint annotations (2DCoordinates.log).
| Subset | Batch | Sequences | Samples | Purpose |
|---|---|---|---|---|
| Main training | 08_30_2022 | 00003–00006 | 1,600 | Primary model training |
| Motion augmentation | 08_31_2022 | 00007–00009 | 600 | Fast-motion robustness |
| Background change | 09_01_2022 | 00011–00013 | 600 | Complex-background stress test |
| Scene diversity | 09_21–09_26 | 5 sequences | 745 | Cross-date generalization |
Keypoint setup:
- 33 valid keypoints used for training and evaluation
- Raw log contains 41 fields (including invalid placeholders / auxiliary points)
The dataset is not included in this repository due to size and licensing constraints. See KAGGLE_NOTEBOOK.md for how to reproduce on Kaggle.
- Frame extraction & conversion — TIFF images converted to PNG for stable GPU training
- Annotation parsing —
2DCoordinates.logparsed into structured JSON per frame - Coordinate normalization — images resized to 128×128; keypoints mapped to model input space
- Model —
SimplePoseCNN, a lightweight convolutional baseline for coordinate regression - Loss — MSE between predicted and ground-truth keypoint coordinates
- Metrics — PCK@τ (percentage of correct keypoints), MAE, RMSE
- Post-processing — EMA temporal smoothing for trajectory stability (optional)
DigiDogs frames + annotations
→ Parse & filter keypoints (33 valid)
→ Train/val split (80/20)
→ SimplePoseCNN training (30 epochs, Adam, MSE)
→ Evaluate (PCK, MAE, RMSE)
→ Visualize predictions & export metrics
See docs/workflow.md for a detailed workflow diagram.
Main training set (08_30_2022, 1,600 samples, 30 epochs):
| Metric | Value |
|---|---|
| Val Loss | 0.000186 |
| MAE | 14.84 px |
| RMSE | 19.84 px |
| PCK@20 | 0.758 |
| PCK@50 | 0.972 |
Multi-scenario comparison (same model architecture):
| Subset | Samples | Val Loss | MAE (px) | PCK@20 |
|---|---|---|---|---|
| Main (08_30) | 1,600 | 0.000186 | 14.84 | 0.758 |
| Motion (08_31) | 600 | 0.000276 | 17.04 | 0.754 |
| Background (09_01) | 600 | 0.000510 | 24.56 | 0.603 |
| Scene diversity | 745 | 0.000281 | 17.97 | 0.716 |
Exported metric files are in results/.
Model weights are not included due to file size limits.
| File | Description |
|---|---|
| screenshots/dataset-sample.png | Dataset sequence statistics |
| screenshots/training-loss.png | Train/validation loss curve |
| screenshots/validation-metrics.png | PCK over training epochs |
| screenshots/pose-visualization.png | Keypoint overlay on dog frame |
| screenshots/prediction-demo.png | Prediction vs ground truth |
| screenshots/kaggle-notebook-output.png | Kaggle notebook output summary |
Kaggle notebook output — metrics and exported figures from the main training run:
See screenshots/README.md for the full list.
- Upload a DigiDogs subset as a Kaggle Dataset (TIFF/PNG frames +
2DCoordinates.log) - Open one of the training notebooks (links in KAGGLE_NOTEBOOK.md)
- Enable GPU accelerator (Settings → Accelerator → GPU)
- Run all cells — outputs are saved under
/kaggle/working/paper_results/ - Download figures and metrics from the notebook output panel
For local development, install dependencies from requirements.txt and adapt paths in scripts/.
- Curated and organized DigiDogs subsets for four experimental scenarios
- Built the data preprocessing pipeline (TIFF→PNG, log parsing, JSON export)
- Implemented the PyTorch training and evaluation pipeline on Kaggle GPU
- Designed experiments: main training, motion, background, and scene diversity
- Produced quantitative metrics (PCK, MAE, RMSE) and visualization assets
- Documented the end-to-end workflow for reproducibility
- Replace the CNN baseline with stronger architectures (HRNet, RTMPose, Transformer)
- Add heatmap-based pose estimation for finer spatial localization
- Integrate temporal models (TCN, Kalman filter, temporal Transformer) for video consistency
- Expand evaluation with real-world dog videos beyond synthetic DigiDogs frames
- Package inference as a lightweight API for demo deployment
This project is released under the MIT License.

