Skip to content

Latest commit

ย 

History

47 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ YDS โ€” YOLO Dataset Studio

Automatically build YOLO datasets from Twitch streams and videos

๐Ÿ‡บ๐Ÿ‡ธ English | ๐Ÿ‡ท๐Ÿ‡บ ะ ัƒััะบะธะน

Python Windows License

๐ŸŽฏ What This Does

YDS downloads Twitch VODs or captures your screen, extracts frames, and uses an existing YOLO model to automatically generate bounding box labels. The result is a ready-to-use YOLO dataset (images + labels) for training.

Why? Creating YOLO datasets by hand is slow and repetitive. YDS automates most of this process while keeping you in control.


๐Ÿš€ TL;DR โ€” Quick Start

1. ๐Ÿ“ฅ Capture screen or download Twitch VOD
2. ๐Ÿค– Auto-label frames with YOLO model
3. ๐Ÿท๏ธ Manually verify & correct labels (add/remove/fix classes)
4. ๐Ÿ“ฆ Split into train/val/test
5. โš™๏ธ Train YOLO model built-in

Note: Label verification is a manual step where you can add, remove, or fix bounding boxes and classes on every image.


๐ŸŽฎ Core Features

Feature What It Does
๐Ÿ“น StreamCut Download Twitch VODs, auto-extract & label frames (fully automated)
๐ŸŽฎ Screen Capture Record gameplay + auto-label with YOLO (semi-automatic)
๐Ÿ–Œ๏ธ Label Verification Manual annotation tool โ€” add/edit classes on screenshots
๐Ÿ“ฆ Dataset Split Auto partition train/val/test with custom ratios
โš™๏ธ Training Built-in YOLO training interface
๐Ÿ“Š ONNX Benchmark Test model inference speed & accuracy

๐Ÿ› ๏ธ System Requirements

Component Requirement
OS Windows 10/11 (primary), Linux (manual setup)
Python 3.12+
GPU Recommended for real-time capture/inference
CUDA Tested with 11.8 & 12.8 (newer versions compatible)

๐Ÿ“ฅ Installation & Run

Platform Install Run
Windows setup.bat run.bat
Linux ./setup.sh ./run.sh

๐Ÿ”„ Workflows

1๏ธโƒฃ Screen Data Collection

  1. Go to Dataset Tab โ†’ Click Start Data Collection
  2. Configure: detection model, threshold, crop size, save interval
  3. Frames & labels auto-saved to output_folder (see config.json)

Dataset Collection


2๏ธโƒฃ Label Verification โ€” Manual Correction

Review and correct AI-generated labels, or add new bounding boxes with assigned classes.

  1. Go to Dataset Tab โ†’ Click Label Verification
  2. Opens interactive OpenCV window
  3. View auto-labeled frames (or unlabeled screenshots)
  4. Add new bounding boxes with class assignment
  5. Edit or delete existing boxes
  6. Save annotations in YOLO format
โŒจ๏ธ Keyboard Controls (click to expand)
Control Action
๐Ÿ–ฑ๏ธ Right-Click Add bounding box (current class)
๐Ÿ–ฑ๏ธ Left-Click Remove box under cursor
๐Ÿ–ฑ๏ธ Drag Corner Resize box
Dropdown Change class
Spacebar Toggle label visibility
N / P Next / Previous image
D Delete image
S Save changes
Q Quit

3๏ธโƒฃ Split Dataset

Automatically splits your dataset into train / val / test folders using standard YOLO directory structure.

  1. Go to Tools โ†’ Split Dataset
  2. Select folder with images/ and labels/
  3. Click Split โ†’ Uses fixed ratios: 70% train / 15% val / 15% test

Output:

dataset_split/
โ”œโ”€โ”€ train/  (70%)
โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ””โ”€โ”€ labels/
โ”œโ”€โ”€ val/    (15%)
โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ””โ”€โ”€ labels/
โ””โ”€โ”€ test/   (15%)
    โ”œโ”€โ”€ images/
    โ””โ”€โ”€ labels/

4๏ธโƒฃ Training

  1. Go to Training Tab
  2. Select data.yaml
  3. Set basic parameters: epochs, image size, batch size
  4. (Optional) Expand Advanced Options for augmentation & performance tuning
  5. Click Start Training

Training Tab

โšก Advanced Options (click to expand)

Augmentation Settings:

{
  "mosaic": 1.0,        // Multi-scale training
  "mixup": 0.1,         // Image mixing
  "fliplr": 0.5,        // Horizontal flip
  "flipud": 0.0,        // Vertical flip
  "scale": 0.5,         // Random scaling
  "hsv_h": 0.015,       // Hue shift
  "hsv_s": 0.7,         // Saturation
  "hsv_v": 0.4          // Brightness
}

Regularization & Performance:

{
  "amp": true,          // Automatic Mixed Precision (faster training)
  "patience": 20,       // Early stopping threshold
  "save_period": 10,    // Save checkpoint every N epochs
  "weight_decay": 0.0005
}

Training Output Structure:

runs/valorant/exp1/
โ”œโ”€โ”€ weights/
โ”‚   โ”œโ”€โ”€ best.pt          # Best model (highest mAP)
โ”‚   โ””โ”€โ”€ last.pt          # Last epoch
โ”œโ”€โ”€ results.csv          # All metrics
โ””โ”€โ”€ plots/
    โ”œโ”€โ”€ confusion_matrix.png
    โ”œโ”€โ”€ F1_curve.png
    โ”œโ”€โ”€ PR_curve.png
    โ””โ”€โ”€ results.png

5๏ธโƒฃ StreamCut & Auto-Labeling

What it does: Download Twitch VODs, automatically extract frames, run YOLO inference, save labeled dataset.

  1. Go to Tools โ†’ Open StreamCut
  2. Add Twitch VOD URLs
  3. Choose: download quality, YOLO model, detection threshold, worker threads
  4. Downloads to stream/raw_streams, outputs labeled frames to stream/dataset

How it works:

  • You provide a pre-trained YOLO model
  • Tool downloads VOD and splits into segments
  • Runs inference on every N frames
  • Saves detections as YOLO-format labels
  • Result: fully labeled dataset ready for training
  • Button "Sync" ะพั‚ะผะตั‡ะฐะตั‚ ัƒะถะต ัะบะฐั‡ะฐะฝะฝั‹ะต ัั‚ั€ะธะผั‹

Key: Better input model = better auto-labeled dataset

StreamCut Interface: StreamCut Processing


๐Ÿค– ONNX Model Benchmarking

What it does: Run inference on multiple ONNX models to compare detection results and model outputs.

  1. Go to Tools โ†’ Benchmark ONNX Models
  2. Select folder with .onnx model files
  3. Click Run Benchmark โ†’ Runs inference on each model with test images
  4. Results show per-model comparison table:
Model                                    Shape        nCls  #   Classes      Conf1 
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
1.5kR6.onnx                              [8400, 6]    1     45  0            0.92
CS2 by Kwnema.onnx                       [8400, 7]    3     12  0,2,3        0.85
ABI_v3.onnx                              [8400, 84]   80    28  5,16,24      0.78

Why use it: Compare how different model architectures and quantizations detect objects in your test images.


๐Ÿ“ฅ Model Manager

What it does: One-click download of official YOLO weights for quick experimentation.

  1. Go to Tools โ†’ YOLO Model Download
  2. Select model size: N (nano) / S (small) / M (medium) / L (large) / X (xlarge)
  3. Select version: v8 / v10 / v11 / v12
  4. Click Download โ†’ Saves to models/ folder

Why use it: Start training without hunting for model files. Pre-trained weights ready to use immediately.

Tools and configure


โš™๏ธ Configuration

  • configs/config.json โ€” GUI defaults, dataset collection, label verification settings
  • configs/configStreamCut.json โ€” StreamCut settings (download workers, thresholds, etc.)

Full reference: docs/HELP.md


๐Ÿ“ Project Structure

YolovTrainGui/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ GUI.py                          # Main application
โ”œโ”€โ”€ ๐Ÿ“„ setup.bat / run.bat             # Windows scripts
โ”œโ”€โ”€ ๐Ÿ“„ setup.sh / run.sh               # Linux scripts
โ”œโ”€โ”€ ๐Ÿ“‹ requirements.txt                # Python dependencies
โ”œโ”€โ”€ ๐Ÿ“– README.md                       # English guide (you are here)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ docs/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“– README_ru.md                # Russian guide
โ”‚   โ”œโ”€โ”€ ๐Ÿ“– HELP.md                     # Configuration reference (English)
โ”‚   โ””โ”€โ”€ ๐Ÿ“– HELP_ru.md                  # Configuration reference (Russian)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ Core/                           # Core modules
โ”‚   โ”œโ”€โ”€ ๐Ÿš€ train.py                    # YOLO training pipeline
โ”‚   โ”œโ”€โ”€ ๐ŸŽฌ StreamCut.py                # VOD processor
โ”‚   โ”œโ”€โ”€ ๐ŸŽฎ semiauto_dataset_collector.py  # Screen capture
โ”‚   โ”œโ”€โ”€ ๐Ÿ–Œ๏ธ labelConfig.py              # Label verification tool
โ”‚   โ””โ”€โ”€ โœ‚๏ธ splitDatasetFiles.py        # Dataset splitter
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ configs/                        # Configuration files
โ”‚   โ”œโ”€โ”€ โš™๏ธ config.json                 # Main settings
โ”‚   โ””โ”€โ”€ ๐ŸŽฌ configStreamCut.json        # StreamCut settings
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ benchmark/                      # Performance testing
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š benchmark.py                # ONNX benchmarking
โ”‚   โ”œโ”€โ”€ infer_function.py
โ”‚   โ””โ”€โ”€ ๐Ÿ“ models/                     # ONNX models
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ models/                         # YOLO weights (.pt files)
โ”œโ”€โ”€ ๐Ÿ“‚ datasets/                       # Training datasets
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ stream/                         # StreamCut output
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ raw_streams/                # Downloaded VODs
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ chunks/                     # Split segments
โ”‚   โ””โ”€โ”€ ๐Ÿ“ dataset/                    # Labeled output
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ runs/                           # Training results
โ”‚   โ””โ”€โ”€ ๐Ÿ“ detect/train*/              # Model checkpoints & metrics
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ docs/
โ”‚   โ””โ”€โ”€ ๐Ÿ“ images/                     # Screenshots & diagrams
โ”‚
โ””โ”€โ”€ ๐Ÿ“‚ utils/                          # Utilities
    โ””โ”€โ”€ ๐Ÿ“ ffmpeg/                     # FFmpeg binaries

โ“ FAQ

Q: Can I use my own YOLO model?
A: Yes, provide any .pt model file.

Q: Does it work without GPU?
A: Yes, but screen capture and VOD processing will be much slower.

Q: Can I combine datasets later?
A: Yes, all datasets are in standard YOLO format.

Q: What if I don't have a YOLO model yet?
A: Use Model Manager to download v8/v12 presets, or train a basic one first.

Q: I stopped StreamCut midโ€‘process. What should I do?
A: Delete stream/resume.json and ะถะตะปะฐั‚ะตะปัŒะฝะพ ะพั‡ะธัั‚ะธั‚ัŒ stream/dataset/ if you plan to reโ€‘run.
Resume file tracks completed chunks; if you interrupted, it may mark them as finished.


๐Ÿ‘ฅ Who This Is For

YDS is a complete GUI solution for building YOLO datasets without CLI scripts.

Use YDS if you:

  • โœ… Want to build YOLO datasets without manual labeling
  • โœ… Work with Twitch streams or gameplay videos
  • โœ… Need fast iteration on object detection models
  • โœ… Want all tools in one place (capture, label, split, train) instead of gluing CLI scripts together
  • โœ… Prefer GUI over command line for dataset management

๐Ÿ›ฃ๏ธ Roadmap (Ideas)

  • YouTube support for StreamCut
  • Custom dataset merge tools
  • Linux GUI improvements
  • Multi-monitor capture

๐Ÿ”— Quick Links

Resource Description
๐Ÿ“– Configuration Reference Detailed config.json & StreamCut settings
๐Ÿ“– Russian Guide ๐Ÿ‡ท๐Ÿ‡บ ะŸะพะปะฝะพะต ั€ัƒะบะพะฒะพะดัั‚ะฒะพ ะฝะฐ ั€ัƒััะบะพะผ
โš™๏ธ Main Config GUI defaults & dataset settings
๐ŸŽฌ StreamCut Config VOD download & processing settings
๐Ÿ“„ License MIT License

Made with โค๏ธ for the computer vision community

โญ Star on GitHub | ๐Ÿ› Report Issue

Happy detecting! ๐Ÿš€

About

No description, website, or topics provided.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages