shoumikchow/bbox-visualizer

Make drawing and labeling bounding boxes a piece of cake

What it solves

It simplifies the process of drawing bounding boxes and labels on images for object detection tasks, removing the need for manual coordinate calculations when positioning labels.

How it works

The library provides a set of functions that take an image and bounding box coordinates to render boxes and labels. It supports three common bounding box formats—Pascal VOC, COCO, and YOLO—and internally converts them to a standard format for drawing. All functions return a new image rather than modifying the original in-place.

Who it’s for

Developers and researchers working on computer vision projects who need to visualize detection results or label data.

Highlights

  • Multi-format support: Works with Pascal VOC (absolute pixels), COCO (absolute pixels), and YOLO (normalized coordinates).
  • Flexible labeling: Offers various label styles, including labels on top, inside the box, T-shaped labels, and flag-style labels.
  • Batch processing: Includes convenience functions for drawing multiple boxes and labels simultaneously.
  • Non-destructive: Returns new image objects to preserve the original input image.