Different ways of visualizing objects given bounding box data
Project description
bbox-visualizer
This is a simple library which has different functions that lets users draw different types of visualizations. Useful for visualizing objects after object detection.
The bounding box points are expected in the format: (xmin, ymin, xmax, ymax)
- Documentation: https://bbox-visualizer.readthedocs.io.
- Free software: MIT license
Installation:
pip install bbox-visualizer
Usage:
import bbox_visualizer as bbv
Photos by Joshua Earle, Jonas Weckschmied and Sherzod Max on Unsplash.
image | function |
---|---|
bbv.draw_rectangle(img, bbox) bbv.add_label(img, label, bbox, top=True) |
|
bbv.draw_rectangle(img, bbox) bbv.add_T_label(img, label, bbox) |
|
bbv.draw_flag_with_label(img, label, bbox) | |
bbv.draw_rectangle(img, bbox) bbv.add_label(img, label, bbox, top=False) |
|
bbv.draw_rectangle(image, bbox, is_opaque=True) bbv.add_label(img, label, bbox, draw_bg=False, top=False) |
|
bbv.draw_multiple_rectangles(img, bboxes) bbv.add_multiple_labels(img, labels, bboxes) |
|
bbv.draw_multiple_flags_with_labels(img, labels, bboxes) | |
bbv.draw_multiple_rectangles(img, bboxes) bbv.add_multiple_T_labels(img, labels, bboxes) |
There are optional functions that can draw multiple bounding boxes and/or write multiple labels on the same image, but it is advisable to use the above functions in a loop in order to have full control over your visualizations.
- bbv.draw_multiple_rectangles(img, bboxes)
- bbv.add_multiple_labels(img, labels, bboxes)
- bbv.add_multiple_T_labels(img, labels, bboxes)
- bbv.draw_multiple_flags_with_labels(img, labels, bboxes)
bboxes
and labels
are lists in the above examples.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage
project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file bbox_visualizer-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: bbox_visualizer-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c238adc3e158488c2ff8afba582ee82de2095bf7cf4cbb24ff7ef2b681d1d204 |
|
MD5 | d567c1821450e4cc9afe97eebceb0446 |
|
BLAKE2b-256 | e2ed3fee03fcc9913a772a802e9407a49dfb026f78bab4f1385e8b91eb544e4a |