Weighted Boxes Fusion (WBF) constructs a consensus bounding box from overlapping predictions generated by different models in an ensemble. Unlike Non-Maximum Suppression (NMS), which eliminates lower-confidence boxes, WBF retains all proposed regions and fuses them. The fused box coordinates are calculated as a weighted average of the original boxes, where the weights are typically derived from each model's confidence score, ensuring that more certain predictions exert greater influence on the final localization.
Glossary
Weighted Boxes Fusion (WBF)

What is Weighted Boxes Fusion (WBF)?
Weighted Boxes Fusion (WBF) is an ensembling algorithm that merges bounding box predictions from multiple object detection models by averaging their coordinates and confidence scores, rather than discarding redundant detections, to produce a more accurate final localization.
This technique is particularly valuable in medical imaging tasks like lesion localization, where a single model may produce slightly offset bounding boxes for the same pathology. By averaging these spatial hypotheses, WBF reduces the variance of the ensemble and often yields a higher Intersection over Union (IoU) with the ground truth annotation than any individual model. The method directly addresses the instability of hard-NMS selection, improving the robustness and accuracy of computer-aided detection (CADe) systems.
WBF vs. Non-Maximum Suppression (NMS)
A feature-level comparison of Weighted Boxes Fusion and Non-Maximum Suppression for merging bounding box predictions in object detection pipelines.
| Feature | Weighted Boxes Fusion (WBF) | Non-Maximum Suppression (NMS) | Soft-NMS |
|---|---|---|---|
Core mechanism | Averages coordinates and confidence scores from multiple models | Selects the highest-confidence box and discards overlapping ones | Decays confidence scores of overlapping boxes instead of discarding |
Input source | Predictions from multiple different models (ensemble) | Predictions from a single model | Predictions from a single model |
Handles redundant boxes | |||
Preserves all model contributions | |||
Output box count | 1 fused box per object | 1 box per object | 1 box per object |
Confidence score handling | Weighted average of all contributing boxes | Keeps only the maximum score | Reduces scores based on IoU overlap |
Risk of missing true positives | Low | High | Medium |
Typical mAP improvement over NMS | 0.3-0.5% | 0.1-0.2% |
Key Characteristics of WBF
Weighted Boxes Fusion (WBF) is a post-processing algorithm that merges bounding boxes from multiple object detection models by averaging their coordinates and confidence scores, rather than simply selecting one prediction. This approach leverages the collective spatial intelligence of an ensemble to produce more accurate and robust localizations.
Coordinate Averaging, Not Elimination
Unlike Non-Maximum Suppression (NMS), which discards overlapping boxes, WBF constructs a fused box by averaging the coordinates of all proposed boxes from every model in the ensemble.
- The fused box's coordinates are a weighted sum based on each model's confidence score.
- This retains information from multiple models, even if one model's box is slightly offset.
- Example: If Model A predicts a lesion at (10,10,50,50) with 0.9 confidence and Model B predicts (12,8,48,52) with 0.8 confidence, WBF merges them into a single, averaged box rather than choosing one.
Confidence Score Recalculation
WBF generates a new, fused confidence score for the averaged bounding box based on the collective agreement of the ensemble.
- The final confidence is calculated as the average of the individual model confidences, weighted by the number of models that predicted the box.
- This penalizes detections made by only a single model and rewards consensus.
- Formula:
C = (Σ confidence_i * w_i) / NwhereNis the total number of models andw_iis a per-model weight factor.
IoU Threshold for Box Matching
WBF uses an Intersection over Union (IoU) threshold to determine which boxes from different models refer to the same object before fusing them.
- Boxes with an IoU above the threshold are matched into a cluster and fused together.
- Boxes below the threshold are treated as separate detections.
- This parameter directly controls the algorithm's sensitivity to distinguishing adjacent objects, such as two closely located nodules.
Superior to NMS for Ensemble Fusion
WBF consistently outperforms standard NMS and Soft-NMS when fusing predictions from an ensemble of diverse detection architectures.
- NMS selects a single best box, discarding potentially valuable localization information from other models.
- WBF is particularly effective when models have different strengths (e.g., one model is better at scale, another at localization).
- Benchmark: In medical imaging challenges, WBF has been shown to improve mAP (mean Average Precision) by 1-3% over traditional NMS-based ensembling.
Model Weighting Strategy
WBF allows for the assignment of different weights to each model in the ensemble, reflecting their individual reliability.
- A more accurate model can be given a higher weight, causing its coordinates to dominate the fused box.
- Weights can be derived from validation set performance or domain-specific heuristics.
- Example: A Faster R-CNN model trained specifically on small lesions might be weighted higher than a general YOLO model when fusing predictions for micro-calcification detection.
Application in Diagnostic Imaging
WBF is a critical tool for clinical AI pipelines where minimizing false negatives and maximizing localization precision is paramount.
- It is used to ensemble models trained on different data folds, augmentations, or architectures for robust lesion localization.
- By averaging predictions, WBF reduces the variance of the ensemble, leading to more stable and trustworthy bounding boxes for radiologist review.
- It integrates seamlessly with Test Time Augmentation (TTA) workflows, fusing predictions from multiple augmented versions of the same image.
Frequently Asked Questions
Explore the technical details of Weighted Boxes Fusion (WBF), an advanced ensembling method that merges bounding box predictions from multiple object detection models to improve localization accuracy and diagnostic reliability in radiological imaging.
Weighted Boxes Fusion (WBF) is an ensembling algorithm that merges bounding box predictions from multiple object detection models by averaging their coordinates and confidence scores, rather than simply selecting one box or eliminating others. Unlike Non-Maximum Suppression (NMS), which discards overlapping boxes, WBF uses all proposed boxes to construct a fused, consensus box. The algorithm works by iteratively clustering boxes based on their Intersection over Union (IoU) overlap, then computing a weighted average of the coordinates and confidence scores for each cluster. The weights are typically derived from each model's individual confidence score, allowing higher-confidence predictions to exert greater influence on the final fused box. This approach is particularly valuable in medical imaging, where subtle lesions may be detected by one model but missed by another, and averaging their predictions can reduce both false positives and localization variance.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Weighted Boxes Fusion sits at the intersection of model ensembling and post-processing. Master these related concepts to build a complete understanding of the detection pipeline.
Non-Maximum Suppression (NMS)
The standard post-processing algorithm that WBF often replaces. NMS operates by selecting the highest-confidence box and suppressing all other boxes with an IoU above a threshold.
- Greedy algorithm: Iteratively selects and removes
- Weakness: Discards potentially useful information from overlapping predictions
- Soft-NMS variant: Decays scores instead of hard removal, but still doesn't fuse boxes
WBF improves on NMS by averaging all predictions rather than discarding them, preserving the collective intelligence of multiple models.
Intersection over Union (IoU)
The foundational metric that determines which boxes get fused in WBF. IoU measures the overlap ratio between two bounding boxes, calculated as area of intersection divided by area of union.
- IoU Threshold: WBF uses this to determine which boxes belong to the same object cluster
- Typical value: 0.55 for WBF clustering, lower than standard NMS thresholds
- Fusion weight: Boxes with higher IoU to the cluster mean receive proportionally greater weight
Without precise IoU calculation, WBF cannot correctly group predictions from different models.
Test Time Augmentation (TTA)
A complementary ensembling strategy that pairs powerfully with WBF. TTA applies multiple augmentations (flips, rotations, scales) to a single test image and runs detection on each variant.
- Workflow: Image → Augmentations → Model → WBF fusion of all variants
- Benefit: Produces diverse predictions from a single model
- Synergy: WBF merges TTA predictions more effectively than NMS by averaging coordinates across augmented views
Combining TTA with multi-model WBF creates a two-tier ensembling strategy that maximizes robustness.
Confidence Score Calibration
The reliability of WBF's weighted averaging depends directly on well-calibrated confidence scores. If a model's confidence estimates are poorly calibrated, its predictions will distort the fused result.
- Calibration methods: Platt scaling, isotonic regression, temperature scaling
- Impact on WBF: Overconfident models dominate the weighted average incorrectly
- Best practice: Calibrate each model independently before ensembling with WBF
A model outputting 0.99 confidence for a false positive will pull the fused box toward an incorrect location if its weight isn't properly calibrated.
mAP (mean Average Precision)
The standard evaluation metric used to quantify WBF's improvement over baseline methods. mAP computes the area under the precision-recall curve averaged across all classes and IoU thresholds.
- COCO mAP: Evaluates at IoU thresholds from 0.50 to 0.95 in 0.05 increments
- WBF impact: Typically improves mAP by 0.5-2.0 points over single-model NMS baselines
- Trade-off: WBF may slightly reduce precision at very high IoU thresholds while boosting recall
Always evaluate WBF against both NMS and Soft-NMS baselines using the same mAP protocol to quantify the true improvement.
Model Diversity for Ensembling
WBF yields the greatest gains when the ensembled models make different types of errors. Homogeneous models produce correlated predictions that don't benefit from fusion.
- Architecture diversity: Combine YOLO, Faster R-CNN, and DETR
- Training diversity: Different backbones, input resolutions, or data augmentations
- Checkpoint diversity: Fuse predictions from different training epochs
- Scale diversity: Models trained on different input scales detect different object sizes
A WBF ensemble of three identical models trained with the same seed provides negligible improvement over a single model.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us