Skip to content

A deep learning project for horse pose estimation using the YOLOv8n-pose model, fine-tuned on the Horse-10 dataset. The repository includes data preprocessing, model training, evaluation, and real-time video inference.

Notifications You must be signed in to change notification settings

alimiheb/HorsePose-YOLOv8

Repository files navigation

🐎 HorsePose-YOLOv8 🐎

πŸ“‹ Overview

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


πŸ› οΈ Requirements

  • 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

  • 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 πŸ”—

πŸ’» Code Structure

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 🐍

πŸ“ˆ Model Evaluation

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. πŸ“‰

πŸ“Š Evaluation Metrics

Model Results Confusion Metrics


🎨 Visualizations

Sample inference is shown via horse.gif, demonstrating real-time keypoint detection on horse video footage. 🎞️

Horses

About

A deep learning project for horse pose estimation using the YOLOv8n-pose model, fine-tuned on the Horse-10 dataset. The repository includes data preprocessing, model training, evaluation, and real-time video inference.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published