Different ways of visualizing objects given bounding box data
Project description
bbox-visualizer
This package helps users draw bounding boxes around objects, without doing the clumsy math that you'd need to do for positioning the labels. It also has a few different types of visualizations you can use for labeling objects after identifying them.
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 |
---|---|
img = bbv.draw_rectangle(img, bbox) img = bbv.add_label(img, label, bbox, top=True) |
|
img = bbv.draw_rectangle(img, bbox) img = bbv.add_T_label(img, label, bbox) |
|
img = bbv.draw_flag_with_label(img, label, bbox) | |
img = bbv.draw_rectangle(img, bbox) img = bbv.add_label(img, label, bbox, top=False) |
|
img = bbv.draw_rectangle(image, bbox, is_opaque=True) img = bbv.add_label(img, label, bbox, draw_bg=False, top=False) |
|
img = bbv.draw_multiple_rectangles(img, bboxes) img = bbv.add_multiple_labels(img, labels, bboxes) |
|
img = bbv.draw_multiple_flags_with_labels(img, labels, bboxes) | |
img = bbv.draw_multiple_rectangles(img, bboxes) img = 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bbox_visualizer-0.2.2.tar.gz
.
File metadata
- Download URL: bbox_visualizer-0.2.2.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
864a8d7ed6fa9aac0284bf584ce3964cdd6da5a2f83b73ee8b27480869fc774f
|
|
MD5 |
bfb36b7252542850915504996cd3063b
|
|
BLAKE2b-256 |
4f99ff86ac54483b72a6d8acfc5435858a0ab927167c5582c0f19f529097e3ec
|
Provenance
The following attestation bundles were made for bbox_visualizer-0.2.2.tar.gz
:
Publisher:
publish.yml
on shoumikchow/bbox-visualizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
bbox_visualizer-0.2.2.tar.gz
-
Subject digest:
864a8d7ed6fa9aac0284bf584ce3964cdd6da5a2f83b73ee8b27480869fc774f
- Sigstore transparency entry: 227004914
- Sigstore integration time:
-
Permalink:
shoumikchow/bbox-visualizer@dffb38d348fa63998933ab93ddb0d366f10d2978
-
Branch / Tag:
refs/tags/v0.2.2
- Owner: https://github.com/shoumikchow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@dffb38d348fa63998933ab93ddb0d366f10d2978
-
Trigger Event:
release
-
Statement type:
File details
Details for the file bbox_visualizer-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: bbox_visualizer-0.2.2-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
61c2be8ce540d8ed0cff016ba9c0c662b25c8657a86f20736f44f23e152ad65d
|
|
MD5 |
478d1b411080847b451cfa6bb5608fd0
|
|
BLAKE2b-256 |
d60b0d37b93893d1fa959d059c7f5af8527bfc9a34887678ebec48045ece2d1d
|
Provenance
The following attestation bundles were made for bbox_visualizer-0.2.2-py3-none-any.whl
:
Publisher:
publish.yml
on shoumikchow/bbox-visualizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
bbox_visualizer-0.2.2-py3-none-any.whl
-
Subject digest:
61c2be8ce540d8ed0cff016ba9c0c662b25c8657a86f20736f44f23e152ad65d
- Sigstore transparency entry: 227004915
- Sigstore integration time:
-
Permalink:
shoumikchow/bbox-visualizer@dffb38d348fa63998933ab93ddb0d366f10d2978
-
Branch / Tag:
refs/tags/v0.2.2
- Owner: https://github.com/shoumikchow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@dffb38d348fa63998933ab93ddb0d366f10d2978
-
Trigger Event:
release
-
Statement type: