File size: 4,364 Bytes
e8ab6a5 50a7186 893a0c6 50a7186 e8ab6a5 893a0c6 e8ab6a5 893a0c6 e8ab6a5 50a7186 e8ab6a5 50a7186 e8ab6a5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | ---
license: mit
tags:
- yolov8
- object-detection
- image-classification
- dinov2
- sports
- motogp
- motorcycle-racing
- computer-vision
- pytorch
datasets:
- custom
pipeline_tag: object-detection
library_name: ultralytics
---
<div>
<img src="MotoReID.png" alt="MotoReID" width="900">
A deep learning pipeline for **MotoGP team detection, tracking, and re-identification** from race broadcast footage. This system combines **YOLOv8** for robust object detection with **DINOv3** (Vision Transformer) embeddings for semantic team classification. It addresses specific challenges in high-speed sports computer vision: persistent identity tracking across extreme occlusions, rapid camera cuts, and motion blur. This project is in active development.
[](https://github.com/johnamit/mgp-detect)
</div>
## Model Overview
This repository contains trained model weights for the [MotoReID](https://github.com/johnamit/mgp-detect) project.
### Included Weights
| File | Description | Size |
|------|-------------|------|
| `motogp_yolov8m_detector.pt` | Fine-tuned YOLOv8m for MotoGP prototype (bike) detection | ~50MB |
| `dinov3_team_classifier.pkl` | Logistic Regression classifier trained on DINOv3 embeddings | ~35KB |
## Pipeline Architecture
```
Video Frame → YOLOv8 Detector → Crop → DINOv3 Feature Extraction → Team Classifier → Re-ID Tracking
```
1. **Detection**: YOLOv8m (fine-tuned) localizes motorcycles in each frame
2. **Feature Extraction**: DINOv3 ViT-S/16 extracts dense semantic features from detected regions
3. **Classification**: Logistic Regression head predicts team identity from DINO embeddings
4. **Re-ID & Tracking**: ByteTrack + Cosine Similarity Memory Bank for persistent tracking
## Supported Teams (2025 Season)
| Manufacturer | Teams |
|--------------|-------|
| **Ducati** | Lenovo Team, Gresini Racing, VR46 Racing |
| **Aprilia** | Factory Racing, Trackhouse Racing |
| **KTM** | Factory Racing, Tech3 |
| **Honda** | Repsol HRC, LCR Honda |
| **Yamaha** | Monster Energy, Prima Pramac |
## Usage
### 1. Download Weights
```python
from huggingface_hub import hf_hub_download
# Download YOLOv8 detector
detector_path = hf_hub_download(
repo_id="johnamit/motogp-team-detection",
filename="motogp_yolov8m_detector.pt"
)
# Download team classifier
classifier_path = hf_hub_download(
repo_id="johnamit/motogp-team-detection",
filename="dinov3_team_classifier.pkl"
)
```
### 2. Prerequisites (Base Models)
These weights require the following base models:
#### YOLOv8 (Ultralytics)
```bash
pip install ultralytics
```
[YOLOv8 Documentation](https://docs.ultralytics.com/models/yolov8/)
#### DINOv3 (Meta AI)
Clone the DINOv3 repository for feature extraction:
```bash
git clone https://github.com/facebookresearch/dinov3.git
```
Download the ViT-S/16 pretrained weights from the [DINOv3 repo](https://github.com/facebookresearch/dinov3).
## Training Details
### YOLOv8 Detector
- **Base Model**: YOLOv8m
- **Dataset**: 501 annotated instances (404 motorcycles, 97 null/background)
- **Augmentation**: Rotations, exposure adjustments, noise injection
- **Platform**: [Roboflow](https://app.roboflow.com)
### DINOv3 Team Classifier
- **Backbone**: DINOv3 ViT-S/16 (frozen, pretrained on LVD-142M)
- **Head**: Scikit-learn Logistic Regression
- **Dataset**: ~700 high-quality crops across 11 teams
- **Features**: 384-dimensional embeddings
## Performance
The system is optimized for broadcast footage with:
- High-speed motion blur handling
- Rapid camera cut recovery
- Persistent identity tracking across occlusions
- Label locking after high-confidence agreement
## Citation
If you use these weights in your research, please cite:
```bibtex
@software{motogp_team_detection_2025,
author = {Amit John},
title = {MotoGP Team Detection and Re-Identification},
year = {2025},
publisher = {GitHub},
url = {https://github.com/johnamit/mgp-detect}
}
```
## License
MIT License - See the [GitHub repository](https://github.com/johnamit/mgp-detect) for full details.
## Acknowledgments
- [Ultralytics](https://ultralytics.com/) for YOLOv8
- [Meta AI](https://github.com/facebookresearch/dinov3) for DINOv3
- [Roboflow](https://roboflow.com/) for annotation tools
|