roboflow / roboflow/supervision
[weighted_box_fussion] - an alternative for `box_non_max_suppression`
Open
@hardikdava is already working on this.
Since Aug 7, 2023.
API:detection
enhancement
Q2.2024
- Dominant language
- Python
- Stars
- 50.9k
- Forks
- 4.8k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 85
Description
Search before asking
- I have searched the Supervision issues and found no similar feature requests.
Description
Current object detection models removes overlapping boxes by nms which can reduce accuracy of the final results. It can be avoided by Weighted Box Fusion which can accepts all the prediction whether from a single model or multiple models.
Reference: Weighted Box Fusion
Original Implementation: ensemble-boxes
Use case
import supervision as sv
wbf = sv.WeightedBoxFusion()
res_a = model_a(image)
det_a = sv.Detection(res_a)
res_b = model_b(image)
det_b = sv.Detection(res_b)
wbf_detections = wbf([det_a, det_b])
Additional
class WeightedBoxFusion:
def __init__(self):
pass
def __call__(self, detections: Union[Detections, List[Detections]]) -> Detections:
pass
result_detections = Detections(...)
return result_detections
Are you willing to submit a PR?
- Yes I'd like to help by submitting a PR!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.