Skip to content

andaoai/yolo-label-vs

Repository files navigation

YOLO Label Tool Icon YOLO Labeling

Publish to VS Code Marketplace VS Marketplace Version VS Marketplace Installs VS Marketplace Rating License: MIT GitHub Stars GitHub Issues GitHub Pull Requests VS Code Engine Node.js Version Sponsor Ask DeepWiki

A VS Code extension for quickly browsing and editing YOLO dataset annotations. This extension allows you to efficiently view and modify YOLO-formatted labels through YAML configuration files, making it easy to manage your computer vision datasets directly within VS Code.

Demo

YOLO Label VS 演示

Dataset Statistics Dashboard

Visualize comprehensive dataset analytics with interactive charts powered by Chart.js:

  • Class Distribution: Pie chart and bar chart showing label distribution
  • Train/Val/Test Comparison: Side-by-side class distribution across subsets
  • Box Statistics: Size histogram, aspect ratio analysis, and center position heatmaps
  • Labels Per Image: Histogram showing label count distribution
  • Folder Distribution: Breakdown of images across subdirectories

Dataset Statistics Dashboard

Theme Support

Our extension seamlessly integrates with all VS Code themes for a consistent experience:

White Theme Black Theme Blue Theme
Green Theme Red Theme Brown Theme

Documentation

Key Features

  • AI-Powered Inference: Load ONNX models to automatically detect objects in images with configurable confidence and IoU thresholds
  • Dataset Explorer TreeView: Browse your datasets directly in the VS Code sidebar - organized by YAML config, train/val/test subsets, and individual images
  • Dataset Statistics Dashboard: Comprehensive visualization of label distribution, class counts, box statistics, and Train/Val/Test comparison charts
  • Quick Dataset Browsing: Instantly view YOLO-labeled images through YAML configuration files
  • Efficient Label Management: Easily modify existing labels without leaving VS Code
  • Redesigned Sidebar UI: Collapsible Class selector with search and interactive Labels list with type indicators (BOX/SEG/POSE)
  • Intuitive Preview: Real-time visualization of bounding boxes and labels
  • Streamlined Navigation: Quick movement between images using keyboard shortcuts
  • YAML Integration: Direct support for YAML configuration files
  • Batch Processing: Browse and edit multiple images in sequence
  • Copy/Paste Labels: Quickly duplicate labels with Ctrl+C/Ctrl+V shortcuts
  • Multi-Folder Subset Support: Visualize datasets with multiple folder sources organized by subdirectory

Supported YOLO Models

Currently supported YOLO inference models:

Model Task Status
YOLOv8 Detection (det) ✅ Supported
YOLOv8 Segmentation (seg) ✅ Supported
YOLOv11 Detection (det) ✅ Supported
YOLOv11 Segmentation (seg) ✅ Supported

Note: Only ONNX format models are supported. Export your PyTorch models to ONNX using Ultralytics before loading.

Supported Data Formats

Category Format Status Description
Detection COCO8 ✅ Supported A small dataset with 8 COCO images (4 train, 4 val) for object detection
COCO128 ✅ Supported First 128 images of COCO train2017 dataset for object detection testing
Segmentation COCO8-seg ✅ Supported 8 COCO images with instance segmentation annotations
Pose COCO8-pose ✅ Supported 8 COCO images with keypoints annotations for pose estimation
Tiger-pose ✅ Supported 263 tiger images with 12 keypoints per tiger
OBB DOTA8 ✅ Supported Small subset of 8 aerial images with oriented bounding boxes (uses segmentation mode)
Classification MNIST160 ❌ Not Planned First 8 images of each MNIST category (160 images total)
ImageNet-10 ❌ Not Planned Smaller subset of ImageNet with 10 categories
Multi-Object Tracking VisDrone ❌ Not Planned Drone imagery for tracking multiple objects across frames

🌟 Explore More Dataset Formats 🌟

Ultralytics supports a comprehensive range of datasets
Detection · Segmentation · Pose · Classification · Tracking

Explore Datasets

COCO · VOC · ImageNet · DOTA · and many more

Why This Extension?

  • Simplified Workflow: No need to switch between different tools - view and edit YOLO datasets directly in VS Code
  • Developer-Friendly: Perfect for ML engineers who want to quickly verify or adjust their YOLO datasets
  • Lightweight: Fast and responsive, designed for handling large datasets
  • Integrated Experience: Seamlessly fits into your development environment

Requirements

  • Visual Studio Code 1.85.0 or higher
  • Image files in your workspace
  • YAML configuration files for YOLO annotations

Installation

  1. Open VS Code
  2. Press Ctrl+P to open the Quick Open dialog
  3. Type ext install andaoai.yolo-labeling-vs
  4. Press Enter to install

Or you can install it directly from the VS Code Marketplace.

Usage

Dataset Explorer TreeView

  1. Open your YOLO dataset folder in VS Code
  2. The extension automatically scans for YAML configuration files
  3. Find the "YOLO Datasets" panel in the VS Code sidebar
  4. Expand datasets to browse Train/Val/Test subsets and individual images
  5. Click any dataset, subset, or image to open the labeling panel directly
  6. Use the refresh button to rescan for dataset changes

Statistics Dashboard

  1. Right-click a YAML file or use the dataset TreeView
  2. Select "View Statistics" to open the analytics dashboard
  3. Visualize:
    • Overview: Total images, labeled/unlabeled counts, average labels per image
    • Class Distribution: Pie chart and bar chart showing label distribution
    • Train/Val/Test Comparison: Side-by-side class distribution across subsets
    • Box Statistics: Size histogram, aspect ratio, and center position heatmaps
    • Labels Per Image: Histogram showing label count distribution
    • Folder Distribution: Breakdown of images across subdirectories

Labeling Panel

  1. Open a folder containing your YAML configuration files and corresponding images
  2. Right-click on a YAML file in the explorer
  3. Select "Open YOLO Labeling Panel"
  4. Browse through your labeled images and make adjustments as needed

Interface Controls

  • Sidebar: Collapsible sections for Class selection (with search) and Labels list (with type indicators)
  • Previous/Next Image: Navigate through images in the dataset
  • Mode Selector: Switch between Box, Segmentation, and Pose labeling modes
  • Show Labels: Toggle visibility of labels on the image
  • Save Labels: Save current annotations to disk
  • Search Box: Search for specific images in the dataset
  • Model Panel: Load ONNX models and run AI inference for automatic object detection
    • Load/Change Model: Select .onnx model file
    • Confidence Threshold: Adjust detection confidence (0.05-0.95)
    • IoU Threshold: Adjust Non-Maximum Suppression overlap (0.1-0.9)
    • Run Inference: Detect objects in current image
    • Accept/Reject: Add or discard detected objects as labels

Keyboard Shortcuts

Global Shortcuts

  • Ctrl+Y: Open YOLO Labeling Panel

In Labeling Panel

  • Tab: Switch to next label class
  • Shift+Tab: Switch to previous label class
  • Space: Reset image zoom and position
  • Ctrl + Mouse Hover: Highlight box, segmentation, or pose annotations
  • Ctrl + Mouse Drag: Move highlighted annotation
  • D: Go to next image
  • A: Go to previous image
  • Ctrl+S: Save labels
  • Ctrl+Z: Undo the last labeling action
  • Ctrl+Y: Redo the last undone action
  • Ctrl+C: Copy hovered label
  • Ctrl+V: Paste copied label
  • Ctrl+Wheel: Zoom in/out at mouse position
  • Alt+Drag: Pan the image when zoomed in
  • Wheel: Scroll vertically when zoomed in
  • Shift+Wheel: Scroll horizontally when zoomed in
  • Esc: Cancel current drawing operation (in segmentation or pose mode)

Mode-Specific Shortcuts

  • Segmentation Mode:

    • Left Mouse Click: Add polygon point
    • Right Mouse Click: Cancel polygon drawing
  • Pose Mode:

    • Left Mouse Click: Annotate fully visible keypoint (visibility=1)
    • Right Mouse Click: Annotate occluded keypoint (visibility=2)
    • Esc: Cancel current pose annotation

Search Functionality

  • Arrow Down: Move down through search results
  • Arrow Up: Move up through search results
  • Enter: Select the highlighted search result
  • Escape: Close search results panel

Extension Settings

This extension contributes the following commands:

  • yolo-labeling-vs.openLabelingPanel: Open YOLO Labeling Panel
  • yolo-labeling-vs.openDatasetStats: Open Dataset Statistics Dashboard
  • yolo-labeling-vs.refreshDatasets: Refresh Dataset TreeView

Known Issues

Please report issues on our GitHub repository.

Release Notes

For detailed release notes and version history, please see the CHANGELOG.md file.

Contributing

We welcome contributions! Please feel free to submit a Pull Request.

Sponsorship

If you find this extension helpful, consider supporting its development:

WeChat Pay Alipay
WeChat Pay Alipay

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any problems, please file an issue at our issue tracker.