Package bbx
Simple operations over bounding boxes.
The package provides a class Boxes encapsulating a set of bounding boxes. Internally, the boxes are represented in an Nx4 matrix with x1,y1,x2,y2 coordinates. Instances of Boxes support arbitraty user-defined fields which can hold other properties of boxes like e.g. score.
import bbx
B = bbx.Boxes([0,0,10,10]) # New instance
B.set_field("score", [1]) # Set the field
B.width() # [10]
C = bbx.resize(B, 2) # Resize and make new instance
C.get() # [[-5,-5,15,15]]
C.get_field("score") # [1]
C.area() # [400]
But why?
... for the glory of s... But seriously, I use bounding boxes in every other project and there is no decent small package for this. Yes I can use TF obj detection api (and I did for a while, this pkg have similar interface to it) or structures from imgaug or others. I did not find anything that suits my needs (if you know about something just let me know). You either install a big non-standard package with tons of functionality you do not need or you implement it by yourself. So I decided to make a very small package that does precisely what I need and nothing more, is portable (just numpy needed, and you already have it!).
Yes, I just implemented a non-standard package, so I so not need to use other non-standard packages... yes, I know...
Installation
The package is in PyPI so just use pip
pip install bbx
Contribute
Feelin' brave? Contribute with code! You can also submit an issue if something is broken.
License
This code is published under MIT License
Metadata
Release files for bbx 1.1.2
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 |
|---|---|---|---|---|
| bbx-1.1.2.tar.gz | 6.4 kB | Without provenance | Details for bbx-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bbx-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for bbx-1.1.2-py3-none-any.whl |
Total release size: 14.5 kB
Release files / bbx-1.1.2.tar.gz
| Download URL | bbx-1.1.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31b2409e2d3dcb5c0dbf5479a370f8857105765b4de1a44cf4a6f2e2b1261c16
|
|
BLAKE2b-256 checksum How to use checksums |
701a39a9250280ac50f31ec4bb8f22364b3fd3f203c03293ac3bda2a3a5c4b8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
|
Release files / bbx-1.1.2-py3-none-any.whl
| Download URL | bbx-1.1.2-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1928a3fd7020b3c497a14e2587afa4220492f547e8fbaa3bd71280b9629c5f71
|
|
BLAKE2b-256 checksum How to use checksums |
3248136fcc10838056728611eb408a1ce5f0dbce9736ebf03f23975af21e6e79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
|
Security for bbx 1.1.2
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.