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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bbox_merger-0.0.11.tar.gz
(3.1 kB
view details)
File details
Details for the file bbox_merger-0.0.11.tar.gz.
File metadata
- Download URL: bbox_merger-0.0.11.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c40519d3899617c5af6636b47e11f4ab413ad6bb6695e7e10f003809362889b2
|
|
| MD5 |
5e7f61d34f688d0a88eaa8bcc798b510
|
|
| BLAKE2b-256 |
d6f130e4b1fe50dde88cdaf82ffb7c22f243ce3a88fbc0c18f9a9ecaef1ad058
|