Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>SwiftBox: YOLO Bounding Box EditorNew to Visual Studio Code? Get it now.
SwiftBox: YOLO Bounding Box Editor

SwiftBox: YOLO Bounding Box Editor

abdulrahman_alabed

|
54 installs
| (0) | Free
Annotate image datasets inside VS Code. YOLO detection and segmentation or COCO, click-to-segment with a local SAM model (no upload, no cold start), crop/rotate, class management, and COCO import/export.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SwiftBox: YOLO Bounding Box Editor

Open an image inside VS Code, drag/resize the green box right on the lesion (or any object), add a second box for multi-object images, swipe through a folder, and save — coordinates are written straight to YOLO .txt, YOLO segmentation, or SwiftBox JSON. No GPU, no server, no upload.

Try it without installing anything

alabed.site/swiftbox runs the same editor in your browser — Chrome, Edge, Brave, Opera, Firefox and Safari. Open a folder of images (or import from Google Drive), annotate, and take the labels away as .txt files, one labels.json, or a zip. The images never leave your machine: everything is decoded and drawn locally, and only labels are ever written anywhere.

Where they go is your choice:

This computer Save counts the images you have changed and writes them when you press it — straight into your folder in Chrome, Edge, Brave and Opera; as a download everywhere else.
Google Drive Every image is saved as you finish it. Nothing to count, no button to press.

The extension is the same editor with the whole disk available to it, and the two share classes.txt, labels.json and .swiftbox/config.json, so a project moves between them.

Demo

SwiftBox Demo

Features

  • View any image with its YOLO box drawn in green.
  • Drag inside to move, drag a corner to resize.
  • Draw bounding boxes (W), polygons (P), or paint masks (B). Tools stay armed, so you can draw shape after shape — V or Esc to go back to select.
  • Magic-click segmentation with SAM2/SAM3 (M) — bring your own endpoint. Hidden when no endpoint is configured.
  • Change class with the number keys (names read from classes.txt; a digit only works for a class that exists). With nothing selected, the digit arms the class for the next shape you draw.
  • Add classes from the editor sidebar — written straight to classes.txt.
  • Swipe prev/next image (A / D) — auto-saves before moving.
  • Crop (C) and rotate (R) images in-place.
  • Undo/redo (Ctrl+Z / Ctrl+Y) with full history.
  • Remappable keyboard shortcuts (?).

Output formats

SwiftBox auto-detects the annotation format from your existing project files. In a brand-new project, the editor itself asks you to pick one before you start — no VS Code dialogs:

Format Files Supports
YOLO Detection labels/*.txt — cls cx cy w h Bounding boxes
YOLO Segmentation labels/*.txt — cls x1 y1 x2 y2 … Polygons + boxes
SwiftBox JSON labels.json Boxes + polygons + tags

The choice is saved to .swiftbox/config.json and remembered for the project. Delete that file to be asked again.

Expected layout

dataset/
  classes.txt          # one class name per line
  images/
    img001.jpg
    img002.jpg
  labels/
    img001.txt         # YOLO: "cls cx cy w h" (one line per box)
    img002.txt

classes.txt is found by walking up parent folders (within the workspace), so per-class subfolders work too.

Usage

  1. Open the folder of images in VS Code.
  2. Right-click an image → Reopen Editor With… → SwiftBox Editor (or set priority to default in package.json to open on click).
  3. Edit the box, press Ctrl+S or Enter.

Shortcuts

key action
drag inside move box
drag corner resize box
W draw box
P draw polygon
B brush (paint mask → polygon)
M magic select (SAM)
V move / select
Q delete selected
Del / Backspace delete selected
Tab cycle selected box
0–9 set class of selected
A / D previous / next image (auto-saves)
C crop
R rotate 90°
E focus / dim
Ctrl+S / Enter save
Ctrl+Z / Ctrl+Y undo / redo
? keyboard shortcuts overlay

All shortcuts are remappable via the ? overlay.

License

MIT


Built by Abdulrahman Alabed · alabed.site

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft