Skip to main content

Easily draw layout BBoxes

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

layout_visualizer-1.0.0.tar.gz (3.3 MB view hashes)

Uploaded Source

Built Distribution

layout_visualizer-1.0.0-py3-none-any.whl (3.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page