A collection of machine learning utilities and visualization tools built with Gradio. Designed to streamline common ML/CV workflows, especially for YOLO-based object detection and segmentation tasks.
Author: Krish Bakshi
Visualize your YOLO annotations directly on images.
- Bounding Box Visualizer — Draw detection boxes with class labels
- Segmentation Visualizer — Overlay segmentation masks with customizable transparency
- Supports Semantic, Instance, and Panoptic segmentation types
- Toggle polygon outlines on/off
- Adjustable alpha blending
Apply data augmentations to expand your training dataset.
- Bounding Box Augmentation — Rotate images (90°, 180°, 270°) with automatic label transformation
- Segmentation Augmentation — Same rotation support for segmentation polygon labels
- Option to keep or discard original images
- Download augmented dataset as ZIP
Split your dataset into training, validation, and test sets.
- Configurable split ratios (default: 70/20/10)
- Reproducible splits with random seed
- Preserves image-label pairs
- Copies
classes.txtto all output splits - Download split dataset as ZIP
Train YOLO models using the Ultralytics library.
- Create YAML Config — Auto-generate dataset configuration files
- Train YOLO Models — Full training interface with:
- Basic parameters: epochs, batch size, image size, device
- Advanced hyperparameters: learning rate, momentum, weight decay, warmup, patience
- Auto-detect YAML files in your project
- Real-time training output
- Python 3.12+
- Clone the repository:
git clone https://github.com/KrishBakshi/yolo-ml-utils.git
cd ml-utils- Install dependencies:
# Using pip
pip install -r requirements.txt
# Or using uv (recommended)
uv syncgradio— Web UI frameworkopencv-python— Image processingmatplotlib— Plottingnumpy— Numerical operationsultralytics— YOLO trainingsplit-folders— Dataset splittingpymupdf— PDF handling
python app.pyThe app will open in your browser at http://localhost:7860.
All tools expect data in YOLO format:
dataset/
├── images/
│ ├── image001.jpg
│ ├── image002.jpg
│ └── ...
├── labels/
│ ├── image001.txt
│ ├── image002.txt
│ └── ...
└── classes.txt (optional)
Label format:
- Detection:
class_id x_center y_center width height - Segmentation:
class_id x1 y1 x2 y2 x3 y3 ...
All coordinates are normalized (0-1).
- Navigate to Image Data Plot
- Upload a ZIP file containing
images/andlabels/folders - Click Generate Plots
- Download all visualizations as ZIP
- Navigate to Image Data Transformer
- Upload your dataset (ZIP or directory path)
- Select rotation angles (90°, 180°, 270°)
- Click Generate Augmentations
- Download augmented data
- Navigate to Image Data Train Test Split
- Upload your dataset
- Adjust split ratios (must sum to 1.0)
- Click Create Split
- Download the split dataset
-
Navigate to Model Training → Create YAML File
-
Enter your split folder path
-
Click Auto-detect from classes.txt or manually enter class names
-
Create the YAML file
-
Switch to Train YOLO Model tab
-
Enter model name (e.g.,
yolo11n.pt) -
Set YAML path or auto-detect
-
Configure training parameters
-
Click Start Training
ml-utils/
├── app.py # Main Gradio app
├── config/
│ └── app_registry.yaml # App module registry
├── src/
│ ├── image_data_plot/ # Visualization tools
│ │ ├── app.py
│ │ ├── plot_detection_data.py
│ │ └── plot_segmentation_data.py
│ ├── image_data_transformer/ # Augmentation tools
│ │ ├── app.py
│ │ ├── get_image_bbox_data_aug.py
│ │ └── get_image_seg_data_aug.py
│ ├── image_data_train_test_split/ # Dataset splitting
│ │ ├── app.py
│ │ └── get_train_val_test_split.py
│ └── ultralytics_training/ # YOLO training
│ └── app.py
├── requirements.txt
├── pyproject.toml
└── README.md
This project is open source. See LICENSE file for details.