New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behavior of weighted_boxes_fusion #9
Comments
Coordinates for boxes expected to be normalized e.g in range [0; 1]. Order: x1, y1, x2, y2. I will add warning on such cases. |
@ZFTurbo no, it doesnt help! wbf_boxes, wbf_scores, wbf_labels = ensemble_boxes.ensemble_boxes_wbf.weighted_boxes_fusion(
(np.array(boxes)/511).tolist(),
scores,
labels,
weights=None,
iou_thr=0.43,
skip_box_thr=0.44
)
wbf_boxes.shape
>>> (16, 4) |
x1 must be lower than x2 and y1 must be lower than y2. I will fix it next release. |
@ZFTurbo thank you! I will try it. I am looking forward to the new release :) |
@ZFTurbo thank you! it works for me, I have used temporary "hardcode" (maybe it helps anyone): def prepare_boxes(boxes):
result_boxes = boxes.copy()
result_boxes[:,0] = np.min(boxes[:, [0,2]], axis=1)
result_boxes[:,2] = np.max(boxes[:, [0,2]], axis=1)
result_boxes[:,1] = np.min(boxes[:, [1,3]], axis=1)
result_boxes[:,3] = np.max(boxes[:, [1,3]], axis=1)
return result_boxes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ZFTurbo
I think we see excess wbf_boxes, it is very strange. Picture with demonstration:
Python 3.7.6
numpy==1.18.1
ensemble_boxes==1.0.1
The text was updated successfully, but these errors were encountered: