Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -20,13 +20,22 @@ size_categories:
|
|
20 |
|
21 |
# ⚽ Soccer Object Detection Dataset (25K Subset from 1M+ Images)
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
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.
|
24 |
|
25 |
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.
|
26 |
|
27 |
-
---
|
28 |
-
|
29 |
-
## 📁 Dataset Structure
|
30 |
|
31 |
- ✅ 25,000 images (~1.5GB)
|
32 |
- ✅ Annotations for 3 object classes:
|
@@ -37,12 +46,25 @@ It is optimized for **object detection tasks**, especially focusing on soccer-re
|
|
37 |
- **Ultralytics YOLO format** (default)
|
38 |
- **COCO JSON format** (included in separate folders)
|
39 |
- ✅ Resolution variety:
|
40 |
-
- `160x160
|
41 |
-
-
|
42 |
-
-
|
43 |
-
-
|
44 |
-
|
45 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
---
|
48 |
|
@@ -64,30 +86,108 @@ V1/
|
|
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 |
## Samples
|
92 |
<p align="center">
|
93 |
<img src="samples/Figure_1.png" width="800"/>
|
|
|
20 |
|
21 |
# ⚽ Soccer Object Detection Dataset (25K Subset from 1M+ Images)
|
22 |
|
23 |
+
---
|
24 |
+
|
25 |
+
## Index
|
26 |
+
|
27 |
+
1. [Dataset Overview](#dataset-overview)
|
28 |
+
2. [Folder Structure](#folder-structure)
|
29 |
+
3. [Dataset Preparation](#dataset-preparation)
|
30 |
+
4. [Data Utils](#data-utils)
|
31 |
+
5. [Samples](#samples)
|
32 |
+
|
33 |
+
## Dataset Overview
|
34 |
+
|
35 |
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.
|
36 |
|
37 |
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.
|
38 |
|
|
|
|
|
|
|
39 |
|
40 |
- ✅ 25,000 images (~1.5GB)
|
41 |
- ✅ Annotations for 3 object classes:
|
|
|
46 |
- **Ultralytics YOLO format** (default)
|
47 |
- **COCO JSON format** (included in separate folders)
|
48 |
- ✅ Resolution variety:
|
49 |
+
- `160x160`
|
50 |
+
- `320x320`
|
51 |
+
- `640x640`
|
52 |
+
- `1280x1080` (Full HD)
|
53 |
+
- The dataset includes frames for various scenarios, such as:
|
54 |
+
- Occlusions
|
55 |
+
- Close up shots
|
56 |
+
- Behind the goalpost scenes
|
57 |
+
- Camera overlay scenes
|
58 |
+
- Low and High angle shots
|
59 |
+
- Low resolution shots
|
60 |
+
- ### Classes
|
61 |
+
| Class ID | Label |
|
62 |
+
| -------- | ------- |
|
63 |
+
| 0 | Player |
|
64 |
+
| 1 | Referee |
|
65 |
+
| 2 | Ball |
|
66 |
+
|
67 |
+
In all, the dataset provides a apt starting point for an all rounder football object detection model.
|
68 |
|
69 |
---
|
70 |
|
|
|
86 |
|
87 |
---
|
88 |
|
89 |
+
## Dataset Preparation
|
90 |
|
91 |
+
### Processing Pipeline Architecture
|
92 |
+
|
93 |
+
```
|
94 |
+
Raw COCO Datasets
|
95 |
+
↓
|
96 |
+
SAHI Slicing (160/320/640/1280)
|
97 |
+
↓
|
98 |
+
Image Limit and Filtering
|
99 |
+
↓
|
100 |
+
Class Name Standardization
|
101 |
+
↓
|
102 |
+
COCO to YOLO Conversion
|
103 |
+
↓
|
104 |
+
Final Training Dataset
|
105 |
+
```
|
106 |
+
|
107 |
+
### Raw COCO Datasets:
|
108 |
+
The following datasets were used for the raw images
|
109 |
+
1. **[Soccer Player Tracker](https://universe.roboflow.com/sac-wjhag/soccer-player-tracker)** (`spt_v2`)
|
110 |
+
2. **[Football Detection Test](https://universe.roboflow.com/projet-m2/test-fooball-detection-bis)** (`tbd_v2`)
|
111 |
+
3. **[VA Project](https://universe.roboflow.com/vaa/va_project-mp2xn)** (`v2_temp`)
|
112 |
+
4. **[Player Detection GKLRL](https://universe.roboflow.com/wisd-ckexz/player-detection-gklrl)** (`v12`)
|
113 |
+
5. **[Football EITPT](https://universe.roboflow.com/va-sah7v/football-eitpt)** (`v5_temp`)
|
114 |
+
6. **[Detect Players DGXZ0](https://universe.roboflow.com/nikhil-chapre-xgndf/detect-players-dgxz0)** (`v3`)
|
115 |
+
7. **[Football Player Detection KUCAB](https://universe.roboflow.com/augmented-startups/football-player-detection-kucab)** (`v7`)
|
116 |
+
8. **[Football Players Detection 3ZVBC](https://universe.roboflow.com/roboflow-jvuqo/football-players-detection-3zvbc)**
|
117 |
+
|
118 |
+
|
119 |
+
### SAHI slicing
|
120 |
+
SAHI (Slicing Aided Hyper Inference) is implemented to handle the multi-scale nature of soccer scenes:
|
121 |
+
|
122 |
+
**Why SAHI for Soccer?**
|
123 |
+
- **Crowded Scenes**: Penalty area situations with multiple overlapping players
|
124 |
+
- **Scale Variation**: Players appear at different sizes based on camera distance
|
125 |
+
- **Small Object Detection**: Ball detection in wide-angle shots
|
126 |
+
- **Context Preservation**: Maintains spatial relationships through overlapping
|
127 |
+
|
128 |
+
```python
|
129 |
+
slice_sizes = [160, 320, 640, 1280] # Multiple scale processing
|
130 |
+
overlap_ratio = 0.2 # 20% overlap between patches
|
131 |
+
```
|
132 |
+
|
133 |
+
- **160x160 patches**: Optimized for small player detection and crowded scenes
|
134 |
+
- **320x320 patches**: Balanced approach for medium-distance shots
|
135 |
+
- **640x640 patches**: Preserves context for tactical analysis and large-scale scenes
|
136 |
+
- **640x640 patches**: For best results in HD context
|
137 |
+
|
138 |
+
|
139 |
+
### Image Limit and Filtering
|
140 |
+
Due to SAHI, the resulting dataset had 1M+ images, and more than 30GB of data. Image filtering was applied from each dataset
|
141 |
+
```python
|
142 |
+
# Per-dataset image limits for balanced training
|
143 |
+
image_limits = {
|
144 |
+
"spt_v2": 30, "spt_v2_sahi_160": 30, "spt_v2_sahi_320": 40,
|
145 |
+
"tbd_v2": -1, "v2_temp": 300, "v2_temp_sahi_160": 300,
|
146 |
+
"v2_temp_sahi_320": 400, "v3": 500, "v3_sahi_160": 500,
|
147 |
+
"v3_sahi_320": 1000, "v3_sahi_640": 500, "v5_temp": 500,
|
148 |
+
"v7": 500, "v7_sahi_160": 500, "v7_sahi_320": 1000,
|
149 |
+
"v7_sahi_640": 500, "v12": 200, "v12_sahi_160": 300,
|
150 |
+
"v12_sahi_320": 500, "v12_sahi_640": 300,
|
151 |
+
}
|
152 |
+
```
|
153 |
+
|
154 |
+
|
155 |
+
### Class name standardization
|
156 |
+
Every dataset had different classes, hence three common classes were taken out from each sub dataset
|
157 |
+
- **Player Variants**: Maps 'Player', 'Team-A', 'Team-H', 'football player', 'goalkeeper', 'Gardien', 'Joueur' → Class 0
|
158 |
+
- **Ball Variants**: Maps 'ball', 'Ball', 'Ballon', 'football' → Class 1
|
159 |
+
- **Referee Variants**: Maps 'referee', 'Referee', 'Arbitre' → Class 2
|
160 |
+
|
161 |
+
|
162 |
+
### COCO to YOLO
|
163 |
+
the final COCO format dataset was converted to YOLO format fro ultralytics pipeline. Both the formats can be found in the zip file.
|
164 |
|
165 |
---
|
166 |
|
167 |
+
## Data Utils
|
168 |
+
|
169 |
+
### **Processing Scripts Location**
|
170 |
+
|
171 |
+
All dataset processing utilities are available in the **Data_utils** directory:
|
172 |
+
|
173 |
+
**🔗 Repository Link**: [https://github.com/Adit-jain/Soccer_Analysis/tree/main/Data_utils](https://github.com/Adit-jain/Soccer_Analysis/tree/main/Data_utils)
|
174 |
+
|
175 |
+
### **Key Utilities**
|
176 |
+
|
177 |
+
#### **External_Detections/**
|
178 |
+
- **`slice_images.py`**: SAHI-based multi-scale slicing
|
179 |
+
- **`merge_datasets.py`**: Multi-dataset integration with class mapping
|
180 |
+
- **`coco_to_yolo.py`**: Format conversion with coordinate normalization
|
181 |
+
- **`create_data_yaml.py`**: YOLO training configuration generation
|
182 |
+
- **`visualize_coco_dataset.py`**: Quality control and visualization
|
183 |
+
|
184 |
+
#### **SoccerNet_Detections/**
|
185 |
+
- **`get_soccernet_data.py`**: SoccerNet dataset downloading
|
186 |
+
- **`data_preprocessing.py`**: MOT to YOLO conversion pipeline
|
187 |
|
188 |
---
|
189 |
|
190 |
+
|
191 |
## Samples
|
192 |
<p align="center">
|
193 |
<img src="samples/Figure_1.png" width="800"/>
|