This project implements a quick-and-dirty UI for manually annotating a series of images with bounding boxes for use with YOLO. As an alternative, consider Yolo_mark from the YOLO maintainer.
Invoking DrawBox is as simple as:
python3 DrawBox.py images/*.jpg
For a given image a.jpg
, DrawBox creates an output file a.txt
which describes the boxes in YOLO's format, [class] [center x] [center y] [width] [height]
. [class]
is always 0. The other values are given as fractions of the overall image width and height.
Boxes can be drawn by simply clicking and dragging. A single box can be selected by clicking or using the Tab key; this reveals controls for resizing an existing box. Delete a selected box with ⌫. Cycle between images with the ← and → keys. Q exits the program.