Bounding Box Merger
Merge your AI predicted Bounding boxes to get a single bounding box for each object.
Example Usage
Merge Boxes
from bbox_merger import merge_boxes
boxes = [[0, 0, 2, 2], [1, 1, 3, 3], [4, 4, 6, 6]]
merged_boxes = merge_boxes(boxes)
print(merged_boxes)
Output: [[0.0, 0.0, 3.0, 3.0], [4.0, 4.0, 6.0, 6.0]]
Calculate IoU
from bbox_merger import calculate_iou
box1 = [0, 0, 2, 2]
box2 = [1, 1, 3, 3]
merged_boxes = calculate_iou(box1, box2)
print(merged_boxes)
Output: 0.14285714285714285
Example
Before Merging Bounding Boxes
After Merging Bounding Boxes
Metadata
Release files for bbox-merger 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bbox_merger-0.0.11.tar.gz | 3.1 kB | Details |
Release files / bbox_merger-0.0.11.tar.gz
| Download URL | bbox_merger-0.0.11.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c40519d3899617c5af6636b47e11f4ab413ad6bb6695e7e10f003809362889b2
|
|
BLAKE2b-256 checksum How to use checksums |
d6f130e4b1fe50dde88cdaf82ffb7c22f243ce3a88fbc0c18f9a9ecaef1ad058
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.17
|