This repository contains the implementation of a horse pose estimation project using the YOLOv8n-pose model. The project focuses on fine-tuning the model for horse keypoint detection using the Horse-10 dataset. It includes data preprocessing, model training, evaluation, and real-time inference on video data.
π₯Presented by:
π§βπ» Iheb Alimi
π¨βπ» Riadh Ibrahim
- Python 3.9+ π
- Ultralytics YOLOv8 π€
- PyTorch 2.6.0+ (with CUDA support recommended) π₯
- NumPy, Pandas, Matplotlib, Seaborn, WordCloud, OpenCV π
- GPU: Tesla T4 or equivalent π₯οΈ (Google Colab is a highly recommended environment)
- Dataset: Horse-10 π΄
- Total Images: 8,114 πΈ
- Subdirectories: 30 (e.g.,
ChestnutHorseLight,BrownHorseInShadow) π - Keypoints: 22 body parts (e.g., Nose, Eye, Shoulder, Hip) π
- Annotation Completeness: Most images have 10β22 valid keypoints, peaking at ~3,000 images with 20 keypoints π
- Source: Horse-10 GitHub Repo π
Main notebook: fine-tuning of YOLOv8-pose for APE(1).ipynb π
Includes:
- Cloning Horse-10 dataset π₯
- Installing dependencies (Ultralytics, Seaborn, WordCloud) π οΈ
- Importing libraries (Pandas, Matplotlib, OpenCV) π
- Displaying sample inference via GIF ποΈ
- Environment: Python 3.9.19, PyTorch 2.6.0+cu124, GPU support π
The YOLOv8n-pose model was evaluated on a validation set of 200 images:
- Box mAP@50: 0.984
- Box mAP@50β95: 0.921 (Precision: 1.0, Recall: 0.939) β
- Pose mAP@50: 0.988
- Pose mAP@50β95: 0.844 (Precision: 1.0, Recall: 0.957) π
- Inference Speed: 3.3ms per image on Tesla T4 GPU β‘
- Hardware: CUDA:0 (Tesla T4, 15095MiB) π₯οΈ
The model performs excellently in bounding box detection and shows good keypoint estimation, with some loss in precision at stricter thresholds due to occlusion or uneven distribution. π
Sample inference is shown via horse.gif, demonstrating real-time keypoint detection on horse video footage. ποΈ


