layout-visualizer

Easily draw layout BBoxes


License
MIT
Install
pip install layout-visualizer==1.0.0

Documentation

layout-visualizer

PyPI version MIT License

Easily draw layout BBoxes

Features

  • Easily draw labeled BBoxes
    • Draw labels without overlap
  • Low dependency
    • Only depends on Pillow and Pydantic

Installation

pip install layout-visualizer

Getting started

See example notebook for more details

from layout_visualizer import draw_label_bboxes

image = ...  # Load PIL Image
label_bboxes = [
    ("Background Color", (0, 0, 1080, 1080)),
    ("BG Color", (0, 0, 1080, 1080)),
    ("Shadow", (0, 0, 1080, 1080)),
    ("Object 1", (138, 426, 942, 870)),
]
draw_label_bboxes(image, label_bboxes, font_size=20, line_width=5)

(Using psd from Author: xvector / Dictionary: Freepik)