
Datasets:
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: JobManagerCrashedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
image
image |
---|
⚽ Soccer Object Detection Dataset (25K Subset from 1M+ Images)
Index
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
- Soccer Player Tracker (
spt_v2
) - Football Detection Test (
tbd_v2
) - VA Project (
v2_temp
) - Player Detection GKLRL (
v12
) - Football EITPT (
v5_temp
) - Detect Players DGXZ0 (
v3
) - Football Player Detection KUCAB (
v7
) - 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
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
# 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
Key Utilities
External_Detections/
slice_images.py
: SAHI-based multi-scale slicingmerge_datasets.py
: Multi-dataset integration with class mappingcoco_to_yolo.py
: Format conversion with coordinate normalizationcreate_data_yaml.py
: YOLO training configuration generationvisualize_coco_dataset.py
: Quality control and visualization
SoccerNet_Detections/
get_soccernet_data.py
: SoccerNet dataset downloadingdata_preprocessing.py
: MOT to YOLO conversion pipeline
Samples
- Downloads last month
- 163
Models trained or fine-tuned on Adit-jain/Soccana_player_ball_detection_v1
