---
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
---

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)
## 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