stutiiiii commited on
Commit
8ee01b2
·
verified ·
1 Parent(s): 03792e0

Create README.md

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