Skip to content

Dataset Manager and Synthetic Engine

github-actions[bot] edited this page Nov 30, 2026 · 2 revisions

Dataset Manager and Synthetic Engine

Once annotations are verified in AutoSegmentor Studio, DatasetManager/ takes over as a decoupled downstream toolchain to produce YOLOv8 / YOLOv11 training datasets.

flowchart LR
    A["Annotate & Verify\n(AutoSegmentor Studio)"] --> B["Ctrl+E / ExportDialog\nYOLO Dataset Manager"]
    B --> C["train / valid / test\n+ data.yaml\n(Detect + Seg + Pose)"]
    C -.->|"Optional scale-up"| D["Synthetic Engine\n(Copy-Paste + Occlusion)"]
    D -.-> E["Multiplied YOLO Dataset"]
Loading

1. YOLO Dataset Manager (Ctrl+E)

Triggered inside the studio via Ctrl+E (ExportDialog) or run standalone via DatasetManager/YolovDatasetManager/DatasetCreator.py:

  • Input: Verified images and color-mapped masks from workspace/working_dir/<video>/verified/ (or render/).
  • 3-in-1 Simultaneous Export:
    • Object Detection: Normalized YOLO bounding boxes.
    • Instance Segmentation: Mask-to-polygon contour extraction.
    • Pose Estimation: Keypoint (x, y, visibility) tuples.
  • Auto-Balanced Splits: Interactive Train / Validation / Test percentage spinners that automatically balance to 100%, plus an option to keep Validation and Test splits completely unaugmented.
  • Built-In Albumentations: Configurable Color Jitter (brightness/contrast), Gaussian Blur, Average Blur, Gaussian Noise, and Salt & Pepper Noise, with configurable augmentation multiplier (1–50x).
  • Ultralytics-Ready Output: Multithreaded export writing train/, valid/, test/ folders and data.yaml.

See DatasetManager/YolovDatasetManager/README.md for standalone CLI options.


2. Synthetic Engine (Offline Data Multiplication)

A separate, offline augmentation tool (DatasetManager/SyntheticEngine/) for multiplying a small set of verified frames into a large, visually diverse training set:

  • Copy-Paste Compositing: Extracts segmented objects from your verified SAM2 masks and composites them onto new backgrounds with alpha edge softening and histogram lighting matching.
  • Synchronized Geometric & Photometric Transforms: Rotation, scaling, horizontal/vertical flip, shear, perspective warp, brightness/contrast, hue/saturation, blur, noise, and JPEG artifacts applied identically across RGB images, masks, and pose keypoints so nothing drifts out of alignment.
  • Environmental Lighting & Inversion: Configurable shadow multiplication, glare addition, and object/full-image inversion modes.
  • Visibility-Aware Occlusion Simulation: Randomly places occluder patches over objects and automatically updates affected keypoint visibility flags to match.

Running Synthetic Engine

  1. Edit DatasetManager/SyntheticEngine/config/default_config.yaml (uses portable relative paths under ./workspace/... and ./DatasetManager/SyntheticEngine/...).
  2. Run using the same project virtual environment (no extra install required):
python DatasetManager/SyntheticEngine/run.py

For full YAML field documentation, see DatasetManager/SyntheticEngine/README.md.