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_box(img, bbox) img = bbv.add_label(img, label, bbox, top=True) |
|
| img = bbv.draw_box(img, bbox) img = bbv.add_T_label(img, label, bbox) |
|
| img = bbv.draw_flag_with_label(img, label, bbox) | |
| img = bbv.draw_box(img, bbox) img = bbv.add_label(img, label, bbox, top=False) |
|
| img = bbv.draw_box(image, bbox, is_opaque=True) img = bbv.add_label(img, label, bbox, draw_bg=False, top=False) |
|
| img = bbv.draw_multiple_boxes(img, bboxes) img = bbv.add_multiple_labels(img, labels, bboxes) |
|
| img = bbv.draw_multiple_flags_with_labels(img, labels, bboxes) | |
| img = bbv.draw_multiple_boxes(img, bboxes) img = bbv.add_multiple_T_labels(img, labels, bboxes) |
Note: The functions
draw_rectangleanddraw_multiple_rectanglesare also available as aliases fordraw_boxanddraw_multiple_boxesrespectively. Both naming conventions work identically.
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_boxes(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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bbox_visualizer-0.3.0.tar.gz.
File metadata
- Download URL: bbox_visualizer-0.3.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc124756ac37bd3a87960437d4f21123ba1015c2d845e2ef8d59812946a2f95c
|
|
| MD5 |
c8ca18e700ea09d87db191034565eee2
|
|
| BLAKE2b-256 |
71559f2b0ff08b476998ca905e6a14da9e9b8d149e2bd3caf6f95542f86ccaee
|
Provenance
The following attestation bundles were made for bbox_visualizer-0.3.0.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.3.0.tar.gz -
Subject digest:
dc124756ac37bd3a87960437d4f21123ba1015c2d845e2ef8d59812946a2f95c - Sigstore transparency entry: 869381667
- Sigstore integration time:
-
Permalink:
shoumikchow/bbox-visualizer@e751d04f75d3c08f8a1514cb1df2c6c23f6d72ef -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/shoumikchow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e751d04f75d3c08f8a1514cb1df2c6c23f6d72ef -
Trigger Event:
release
-
Statement type:
File details
Details for the file bbox_visualizer-0.3.0-py3-none-any.whl.
File metadata
- Download URL: bbox_visualizer-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da8a035c3b082ac453132d69c1531d348b078082505ba4426f48d1e15808f9d5
|
|
| MD5 |
a49e55ccf9be511e1298b531d5107893
|
|
| BLAKE2b-256 |
c56a47e50f1f36f6c208574624369c4c9453ca15dcd3e85d026c53d6bd880b11
|
Provenance
The following attestation bundles were made for bbox_visualizer-0.3.0-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.3.0-py3-none-any.whl -
Subject digest:
da8a035c3b082ac453132d69c1531d348b078082505ba4426f48d1e15808f9d5 - Sigstore transparency entry: 869381680
- Sigstore integration time:
-
Permalink:
shoumikchow/bbox-visualizer@e751d04f75d3c08f8a1514cb1df2c6c23f6d72ef -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/shoumikchow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e751d04f75d3c08f8a1514cb1df2c6c23f6d72ef -
Trigger Event:
release
-
Statement type: