Image Caption Manager

A Visual Studio Code extension for managing image-caption pairs for AI datasets. Efficiently view and edit captions for images, ideal for machine learning dataset preparation.

Screenshot of the Image Caption Manager VSCode extension

Features

  • Automatic Discovery: Automatically scans your workspace for image-caption pairs
  • Side-by-Side View: Display images and their captions side-by-side for easy editing
  • Advanced Image Viewer: Professional image viewing with zoom, pan, and fit-to-window capabilities
  • Navigation Controls: Navigate between image-caption pairs with next/previous buttons
  • Live Editing: Edit captions directly in the interface with auto-save functionality
  • Manual Refresh: Use the refresh button or keyboard shortcut to rescan for new pairs
  • Keyboard Shortcuts: Use keyboard shortcuts for quick navigation and saving
  • Status Bar Integration: Shows the number of pairs found in the status bar
  • Token Counter: Displays the number of tokens in the caption using GPT tokenization

Image Viewer Features

The enhanced image viewer includes:

  • Zoom Controls: Zoom in/out with buttons, mouse wheel, or keyboard shortcuts
  • Pan Support: Click and drag to pan around zoomed images
  • Fit to Window: Automatically fit image to the available space
  • Actual Size: View image at 100% scale
  • Smart Zoom: Zoom to cursor position when using mouse wheel
  • Toolbar: Professional toolbar with all image controls

Supported Image Formats

.jpg / .jpeg.png.gif.bmp.webp

Usage

  1. Open a folder containing image-caption pairs in VS Code
  2. Use the Command Palette (Ctrl+Shift+P) and search for "Open Image Caption Manager"
  3. Or use the keyboard shortcut Ctrl+Alt+I (or Cmd+Alt+I on Mac)
  4. Or click the "Caption Manager" button in the status bar

File Structure

Your workspace should contain image-caption pairs where each image has a corresponding text file with the same name:

workspace/
├── image1.jpg
├── image1.txt
├── image2.png
├── image2.txt
├── subfolder/
│   ├── image3.jpg
│   └── image3.txt
└── ...

Keyboard Shortcuts

Ctrl+Alt+I (Cmd+Alt+I on Mac)

Open Image Caption Manager

Ctrl+Alt+Right (Cmd+Alt+Right on Mac)

Next image-caption pair

Ctrl+Alt+Left (Cmd+Alt+Left on Mac)

Previous image-caption pair

Ctrl+R (Cmd+R on Mac)

Refresh image-caption pairs

Ctrl+S (Cmd+S on Mac)

Save current caption

+ or =

Zoom in

-

Zoom out

0

Fit to window

1

Actual size (100%)

Technologies

Visual Studio CodeTypeScript

Links