File size: 4,651 Bytes
a5c4214 | 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 | ---
license: cc-by-4.0
task_categories:
- object-detection
tags:
- yolo
- aerial
- drone
- master-reservoir
size_categories:
- 10K<n<100K
---
# Master Reservoir
**A merged, standardized aerial object-detection dataset combining DetFly and AOD4 into a single YOLO-format collection with a unified class mapping.**
## Motivation
**Master Reservoir is a unified aerial object detection dataset created by merging multiple public datasets into a common YOLO annotation format.**
The objective is to provide a single, standardized dataset for training and evaluating drone detection models while reducing inconsistencies in annotation formats, class naming, and directory structure.
## Dataset Summary
| **Total images** | 40,291 |
| **Total label files** | 40,291 |
| **Total annotated instances** | 44,868 |
| **Number of classes** | 4 |
| **Format** | YOLO (`class x_center y_center width height`, normalized 0–1) |
| **Source datasets** | DetFly, AOD4 |
| **Archive size** | 28.0 GB |
| **Version** | v1 |
Every image has a matching label file (0 missing pairs). Of the 40,291 label files, **5,101 (~12.7%) are empty** — images with no annotated objects, i.e. background/negative samples.
## Dataset Structure
This is currently a **single unsplit collection** — there is no train/val/test division yet, all images live in one `images/` folder.
```
master_reservoir/
├── images/ (40,291 files)
│ ├── aod4_test_20190925_101846_1_1_000_jpg.rf.497f3eb572bec39e6856f75fc88b3d1b.jpg
│ ├── aod4_test_20190925_101846_1_1_004_jpg.rf.0c12b3a3cad8a8cac2e429c602904551.jpg
│ └── ...
├── labels/ (40,291 files)
│ ├── aod4_test_20190925_101846_1_1_000_jpg.rf.497f3eb572bec39e6856f75fc88b3d1b.txt
│ ├── aod4_test_20190925_101846_1_1_004_jpg.rf.0c12b3a3cad8a8cac2e429c602904551.txt
│ └── ...
├── metadata/
│ └── stats.json
└── version_logs/
└── v1.txt.txt
```
## Class Distribution
| Class ID | Instances | Images containing class | % of instances |
|---|---|---|---|
| `class_0`(Drone) | 21,168 | 20,694 | 47.2% |
| `class_1`(Bird) | 7,900 | 3,213 | 17.6% |
| `class_2`(Helicopter) | 7,900 | 5,764 | 17.6% |
| `class_3`(Airplane) | 7,900 | 5,555 | 17.6% |
`class_0` accounts for nearly half of all annotated instances — worth keeping in mind for training (e.g. class-balanced sampling or loss weighting), since `class_1`–`class_3` are ~2.7x rarer per instance and even rarer per image for `class_1`.
## Merge & Standardization Pipeline
```mermaid
flowchart LR
A[DetFly raw] --> C[Class-mapping unification]
B[AOD4 raw] --> C
C --> D[YOLO label conversion]
D --> E[Image / label validation<br/>0 missing pairs]
E --> F[(Master Reservoir) v1]
```
## Download
```python
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="<your-username>/master-reservoir",
repo_type="dataset",
local_dir="./master-reservoir"
)
```
```bash
huggingface-cli download <your-username>/master-reservoir --repo-type dataset --local-dir ./master-reservoir
```
## Usage
The dataset is currently unsplit, so create your own train/val/test split before training. Example with a simple random split:
```python
import os, random, shutil
random.seed(42)
images = os.listdir("master-reservoir/images")
random.shuffle(images)
n = len(images)
splits = {
"train": images[:int(0.8 * n)],
"val": images[int(0.8 * n):int(0.9 * n)],
"test": images[int(0.9 * n):],
}
for split, files in splits.items():
os.makedirs(f"master-reservoir/{split}/images", exist_ok=True)
os.makedirs(f"master-reservoir/{split}/labels", exist_ok=True)
for f in files:
stem = os.path.splitext(f)[0]
shutil.copy(f"master-reservoir/images/{f}", f"master-reservoir/{split}/images/{f}")
shutil.copy(f"master-reservoir/labels/{stem}.txt", f"master-reservoir/{split}/labels/{stem}.txt")
```
Then point Ultralytics YOLO at it:
```yaml
# data.yaml
path: ./master-reservoir
train: train/images
val: val/images
test: test/images
names:
0: class_0
1: class_1
2: class_2
3: class_3
```
```python
from ultralytics import YOLO
model = YOLO("yolo11n.pt")
model.train(data="data.yaml", epochs=100, imgsz=640)
```
## Data Quality Notes
- Image/label pairing validated — 0 missing images, 0 missing labels.
- 5,101 label files (~12.7%) are empty (no annotated instances) — these are background images, not errors.
- Class mapping was unified across DetFly and AOD4 prior to merge; the mapping table itself isn't included in the archive yet (see below). |