Files changed (1) hide show
  1. README.md +151 -0
README.md ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - object-detection
5
+ tags:
6
+ - yolo
7
+ - aerial
8
+ - drone
9
+ - master-reservoir
10
+ size_categories:
11
+ - 10K<n<100K
12
+ ---
13
+
14
+ # Master Reservoir
15
+
16
+ **A merged, standardized aerial object-detection dataset combining DetFly and AOD4 into a single YOLO-format collection with a unified class mapping.**
17
+
18
+ ## Motivation
19
+
20
+ **Master Reservoir is a unified aerial object detection dataset created by merging multiple public datasets into a common YOLO annotation format.**
21
+ **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.**
22
+
23
+ ## Dataset Summary
24
+
25
+ | | |
26
+ |---|---|
27
+ | **Total images** | 40,291 |
28
+ | **Total label files** | 40,291 |
29
+ | **Total annotated instances** | 44,868 |
30
+ | **Number of classes** | 4 |
31
+ | **Format** | YOLO (`class x_center y_center width height`, normalized 0–1) |
32
+ | **Source datasets** | DetFly, AOD4 |
33
+ | **Archive size** | 28.0 GB |
34
+ | **Version** | v1 |
35
+
36
+ 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.
37
+
38
+ ## Dataset Structure
39
+
40
+ This is currently a **single unsplit collection** — there is no train/val/test division yet, all images live in one `images/` folder.
41
+
42
+ ```
43
+ master_reservoir/
44
+ ├── images/ (40,291 files)
45
+ │ ├── aod4_test_20190925_101846_1_1_000_jpg.rf.497f3eb572bec39e6856f75fc88b3d1b.jpg
46
+ │ ├── aod4_test_20190925_101846_1_1_004_jpg.rf.0c12b3a3cad8a8cac2e429c602904551.jpg
47
+ │ └── ...
48
+ ├── labels/ (40,291 files)
49
+ │ ├── aod4_test_20190925_101846_1_1_000_jpg.rf.497f3eb572bec39e6856f75fc88b3d1b.txt
50
+ │ ├── aod4_test_20190925_101846_1_1_004_jpg.rf.0c12b3a3cad8a8cac2e429c602904551.txt
51
+ │ └── ...
52
+ ├── metadata/
53
+ │ └── stats.json
54
+ └── version_logs/
55
+ └── v1.txt.txt
56
+ ```
57
+
58
+ ## Class Distribution
59
+
60
+ | Class ID | Instances | Images containing class | % of instances |
61
+ |---|---|---|---|
62
+ | `class_0`(Drone) | 21,168 | 20,694 | 47.2% |
63
+ | `class_1`(Bird) | 7,900 | 3,213 | 17.6% |
64
+ | `class_2`(Helicopter) | 7,900 | 5,764 | 17.6% |
65
+ | `class_3`(Airplane) | 7,900 | 5,555 | 17.6% |
66
+
67
+
68
+ `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`.
69
+
70
+ ## Merge & Standardization Pipeline
71
+
72
+ ```mermaid
73
+ flowchart LR
74
+ A[DetFly raw] --> C[Class-mapping unification]
75
+ B[AOD4 raw] --> C
76
+ C --> D[YOLO label conversion]
77
+ D --> E[Image / label validation<br/>0 missing pairs]
78
+ E --> F[(Master Reservoir) v1]
79
+ ```
80
+
81
+ ## Download
82
+
83
+ ```python
84
+ from huggingface_hub import snapshot_download
85
+
86
+ snapshot_download(
87
+ repo_id="<your-username>/master-reservoir",
88
+ repo_type="dataset",
89
+ local_dir="./master-reservoir"
90
+ )
91
+ ```
92
+
93
+ ```bash
94
+ huggingface-cli download <your-username>/master-reservoir --repo-type dataset --local-dir ./master-reservoir
95
+ ```
96
+
97
+ ## Usage
98
+
99
+ The dataset is currently unsplit, so create your own train/val/test split before training. Example with a simple random split:
100
+
101
+ ```python
102
+ import os, random, shutil
103
+
104
+ random.seed(42)
105
+ images = os.listdir("master-reservoir/images")
106
+ random.shuffle(images)
107
+
108
+ n = len(images)
109
+ splits = {
110
+ "train": images[:int(0.8 * n)],
111
+ "val": images[int(0.8 * n):int(0.9 * n)],
112
+ "test": images[int(0.9 * n):],
113
+ }
114
+
115
+ for split, files in splits.items():
116
+ os.makedirs(f"master-reservoir/{split}/images", exist_ok=True)
117
+ os.makedirs(f"master-reservoir/{split}/labels", exist_ok=True)
118
+ for f in files:
119
+ stem = os.path.splitext(f)[0]
120
+ shutil.copy(f"master-reservoir/images/{f}", f"master-reservoir/{split}/images/{f}")
121
+ shutil.copy(f"master-reservoir/labels/{stem}.txt", f"master-reservoir/{split}/labels/{stem}.txt")
122
+ ```
123
+
124
+ Then point Ultralytics YOLO at it:
125
+
126
+ ```yaml
127
+ # data.yaml
128
+ path: ./master-reservoir
129
+ train: train/images
130
+ val: val/images
131
+ test: test/images
132
+ names:
133
+ 0: class_0
134
+ 1: class_1
135
+ 2: class_2
136
+ 3: class_3
137
+ ```
138
+
139
+ ```python
140
+ from ultralytics import YOLO
141
+
142
+ model = YOLO("yolo11n.pt")
143
+ model.train(data="data.yaml", epochs=100, imgsz=640)
144
+ ```
145
+
146
+ ## Data Quality Notes
147
+
148
+ - Image/label pairing validated — 0 missing images, 0 missing labels.
149
+ - 5,101 label files (~12.7%) are empty (no annotated instances) — these are background images, not errors.
150
+ - Class mapping was unified across DetFly and AOD4 prior to merge; the mapping table itself isn't included in the archive yet (see below).
151
+