Datasets:
File size: 6,954 Bytes
d4f09e2 7bbd60d 9e76891 7bbd60d a714f11 7bbd60d a714f11 7bbd60d 9e76891 7bbd60d 098d5f4 7bbd60d 098d5f4 7bbd60d 9e76891 7bbd60d 9e76891 7bbd60d 9e76891 473d0fa 9e76891 473d0fa |
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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
---
task_categories:
- object-detection
language:
- en
tags:
- soccer
- football
- player
- referee
- detection
- ball
- ultralytics
- yolov11
- tracking
pretty_name: Soccana_prb_v1
size_categories:
- 10K<n<100K
---
# ⚽ Soccer Object Detection Dataset (25K Subset from 1M+ Images)
---
## Index
1. [Dataset Overview](#dataset-overview)
2. [Folder Structure](#folder-structure)
3. [Dataset Preparation](#dataset-preparation)
4. [Data Utils](#data-utils)
5. [Samples](#samples)
## Dataset Overview
This dataset is a curated subset (25,000 images) from a larger soccer vision dataset containing over **1 million images** (50+ GB). The data was collected and augmented from multiple **open-source sources**, including the **SoccerNet dataset**, video game renders, and publicly available match footage.
It is optimized for **object detection tasks**, especially focusing on soccer-related entities such as **players**, **referees**, and the **ball**, including various augmentation types like background-only and noisy scenes.
- ✅ 25,000 images (~1.5GB)
- ✅ Annotations for 3 object classes:
- `player`
- `referee`
- `ball`
- ✅ Data format:
- **Ultralytics YOLO format** (default)
- **COCO JSON format** (included in separate folders)
- ✅ Resolution variety:
- `160x160`
- `320x320`
- `640x640`
- `1280x1080` (Full HD)
- The dataset includes frames for various scenarios, such as:
- Occlusions
- Close up shots
- Behind the goalpost scenes
- Camera overlay scenes
- Low and High angle shots
- Low resolution shots
- ### Classes
| Class ID | Label |
| -------- | ------- |
| 0 | Player |
| 1 | Referee |
| 2 | Ball |
In all, the dataset provides a apt starting point for an all rounder football object detection model.
---
## 🗂️ Folder Structure
```
V1/
├── images/
│ ├── train/
│ └── test/
├── labels/ # YOLO TXT labels
│ ├── train/
│ └── test/
├── coco_test_annotations/ # COCO format labels (train.json, val.json)
├── coco_train_annotations/ # COCO format labels (train.json, val.json)
├── data.yaml # Ultralytics YOLOv8-compatible YAML
└── samples/ # Dataset samples
```
---
## Dataset Preparation
### Processing Pipeline Architecture
```
Raw COCO Datasets
↓
SAHI Slicing (160/320/640/1280)
↓
Image Limit and Filtering
↓
Class Name Standardization
↓
COCO to YOLO Conversion
↓
Final Training Dataset
```
### Raw COCO Datasets:
The following datasets were used for the raw images
1. **[Soccer Player Tracker](https://universe.roboflow.com/sac-wjhag/soccer-player-tracker)** (`spt_v2`)
2. **[Football Detection Test](https://universe.roboflow.com/projet-m2/test-fooball-detection-bis)** (`tbd_v2`)
3. **[VA Project](https://universe.roboflow.com/vaa/va_project-mp2xn)** (`v2_temp`)
4. **[Player Detection GKLRL](https://universe.roboflow.com/wisd-ckexz/player-detection-gklrl)** (`v12`)
5. **[Football EITPT](https://universe.roboflow.com/va-sah7v/football-eitpt)** (`v5_temp`)
6. **[Detect Players DGXZ0](https://universe.roboflow.com/nikhil-chapre-xgndf/detect-players-dgxz0)** (`v3`)
7. **[Football Player Detection KUCAB](https://universe.roboflow.com/augmented-startups/football-player-detection-kucab)** (`v7`)
8. **[Football Players Detection 3ZVBC](https://universe.roboflow.com/roboflow-jvuqo/football-players-detection-3zvbc)**
### SAHI slicing
SAHI (Slicing Aided Hyper Inference) is implemented to handle the multi-scale nature of soccer scenes:
**Why SAHI for Soccer?**
- **Crowded Scenes**: Penalty area situations with multiple overlapping players
- **Scale Variation**: Players appear at different sizes based on camera distance
- **Small Object Detection**: Ball detection in wide-angle shots
- **Context Preservation**: Maintains spatial relationships through overlapping
```python
slice_sizes = [160, 320, 640, 1280] # Multiple scale processing
overlap_ratio = 0.2 # 20% overlap between patches
```
- **160x160 patches**: Optimized for small player detection and crowded scenes
- **320x320 patches**: Balanced approach for medium-distance shots
- **640x640 patches**: Preserves context for tactical analysis and large-scale scenes
- **640x640 patches**: For best results in HD context
### Image Limit and Filtering
Due to SAHI, the resulting dataset had 1M+ images, and more than 30GB of data. Image filtering was applied from each dataset
```python
# Per-dataset image limits for balanced training
image_limits = {
"spt_v2": 30, "spt_v2_sahi_160": 30, "spt_v2_sahi_320": 40,
"tbd_v2": -1, "v2_temp": 300, "v2_temp_sahi_160": 300,
"v2_temp_sahi_320": 400, "v3": 500, "v3_sahi_160": 500,
"v3_sahi_320": 1000, "v3_sahi_640": 500, "v5_temp": 500,
"v7": 500, "v7_sahi_160": 500, "v7_sahi_320": 1000,
"v7_sahi_640": 500, "v12": 200, "v12_sahi_160": 300,
"v12_sahi_320": 500, "v12_sahi_640": 300,
}
```
### Class name standardization
Every dataset had different classes, hence three common classes were taken out from each sub dataset
- **Player Variants**: Maps 'Player', 'Team-A', 'Team-H', 'football player', 'goalkeeper', 'Gardien', 'Joueur' → Class 0
- **Ball Variants**: Maps 'ball', 'Ball', 'Ballon', 'football' → Class 1
- **Referee Variants**: Maps 'referee', 'Referee', 'Arbitre' → Class 2
### COCO to YOLO
the final COCO format dataset was converted to YOLO format fro ultralytics pipeline. Both the formats can be found in the zip file.
---
## Data Utils
### **Processing Scripts Location**
All dataset processing utilities are available in the **Data_utils** directory:
**🔗 Repository Link**: [https://github.com/Adit-jain/Soccer_Analysis/tree/main/Data_utils](https://github.com/Adit-jain/Soccer_Analysis/tree/main/Data_utils)
### **Key Utilities**
#### **External_Detections/**
- **`slice_images.py`**: SAHI-based multi-scale slicing
- **`merge_datasets.py`**: Multi-dataset integration with class mapping
- **`coco_to_yolo.py`**: Format conversion with coordinate normalization
- **`create_data_yaml.py`**: YOLO training configuration generation
- **`visualize_coco_dataset.py`**: Quality control and visualization
#### **SoccerNet_Detections/**
- **`get_soccernet_data.py`**: SoccerNet dataset downloading
- **`data_preprocessing.py`**: MOT to YOLO conversion pipeline
---
## Samples
<p align="center">
<img src="samples/Figure_1.png" width="800"/>
<img src="samples/Figure_2.png" width="800"/>
<img src="samples/Figure_3.png" width="800"/>
</p>
<p align="center">
<img src="samples/Figure_4.png" width="800"/>
<img src="samples/Figure_5.png" width="800"/>
<img src="samples/Figure_6.png" width="800"/>
</p>
<p align="center">
<img src="samples/Figure_7.png" width="800"/>
<img src="samples/Figure_8.png" width="800"/>
<img src="samples/Figure_9.png" width="800"/>
</p>
<p align="center">
<img src="samples/Figure_10.png" width="800"/>
</p> |