ZFTurbo / Weighted-Boxes-Fusion

Set of methods to ensemble boxes from different object detection models, including implementation of "Weighted boxes fusion (WBF)" method.
MIT License
1.7k stars 237 forks source link

Incorrect conf_type='max' mode #39

Closed Sergey-Zlobin closed 2 years ago

Sergey-Zlobin commented 2 years ago

Example:

from ensemble_boxes import *

boxes_list = [[
    [0.1, 0.1, 0.2, 0.2],
], [
    [0.1, 0.1, 0.2, 0.2],
]]
scores_list = [[1], [1]]
labels_list = [[0], [0]]
weights = [1, 3]

iou_thr = 0.5
skip_box_thr = 0.0001

boxes, scores, labels = weighted_boxes_fusion(boxes_list, scores_list, labels_list, weights=weights, iou_thr=iou_thr,
                                              skip_box_thr=skip_box_thr, allows_overflow=True, conf_type='max'
                                              )
print(scores)

Actual result: [1.5] Expected result: [1]

ZFTurbo commented 2 years ago

Fixed here: https://github.com/ZFTurbo/Weighted-Boxes-Fusion/pull/42