Easily draw layout BBoxes
- Easily draw labeled BBoxes
- Draw labels without overlap
- Low dependency
- Only depends on
Pillow
andPydantic
- Only depends on
pip install layout-visualizer
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)