plotbbox
A package to plot pretty bounding boxes for object detection task
Install
pip install plotbbox
Example Usage
import cv2
from plotbbox import plotBBox
img = cv2.imread("your_img.png")
label_table = {0: "person", 1: "car"}
color_table = {0: [0, 255, 0], 1: [0, 0, 255]} # order: b, g, r
bboxes = your_detection_algorithm(img) # Shape: (N, 5), [:, 0]: class index, [:, 1:]: xmin, ymin, xmax, ymax
for bbox in bboxes:
class_idx = bbox[0]
xmin, ymin, xmax, ymax = bbox[1:]
plotBBox(img,
xmin, ymin, xmax, ymax, color=color_table[class_idx], thickness=1,
label=label_table[class_idx]) # plot bounding box on img
cv2.imwrite("bboxes_plotted_your_img.png", img)
Read docs/example.py and run for more details!
Metadata
Release files for plotbbox 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plotbbox-0.1.3.tar.gz | 151.5 kB | Without provenance | Details for plotbbox-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plotbbox-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for plotbbox-0.1.3-py3-none-any.whl |
Total release size: 302.6 kB
Release files / plotbbox-0.1.3.tar.gz
| Download URL | plotbbox-0.1.3.tar.gz |
|---|---|
| Size | 151.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9954926bf75bf1fcf1a40983c655bee3990841d0ec83dbbcb619e2c17ce3fc11
|
|
BLAKE2b-256 checksum How to use checksums |
dcee3702c50ded7f25568d7247f8dccf81c6cf5c6a11f961933dce90b5913629
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
|
Release files / plotbbox-0.1.3-py3-none-any.whl
| Download URL | plotbbox-0.1.3-py3-none-any.whl |
|---|---|
| Size | 151.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a8d9de365cfe1829caa3e44dba887a79e0555b19d98485ba51c07ed0ef6827c
|
|
BLAKE2b-256 checksum How to use checksums |
7f31cff627ddd9658b8e8a3bdd3bdca9a95bf668fae44ca0d0073661b05f6bb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
|
Security for plotbbox 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.