🚀 Socket Launch Week 🚀 Day 3: Socket Acquires Coana.Learn More

layout-visualizer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

layout-visualizer

Easily draw layout BBoxes

1.0.1
Maintainers
1

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)

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts