Master-Reservoir / README.md
stutiiiii's picture
Create README.md
5e46c5e verified
|
Raw
History Blame
4.67 kB
metadata
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_1class_3 are ~2.7x rarer per instance and even rarer per image for class_1.

Merge & Standardization Pipeline

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

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="<your-username>/master-reservoir",
    repo_type="dataset",
    local_dir="./master-reservoir"
)
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:

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:

# 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
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).