Skip to content
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

Bbox is 'Nan' when weights have 0 #44

Open
Yangr116 opened this issue Oct 11, 2021 · 4 comments
Open

Bbox is 'Nan' when weights have 0 #44

Yangr116 opened this issue Oct 11, 2021 · 4 comments

Comments

@Yangr116
Copy link

Hello, thanks for your nice work!

Recently, I used your method in my own project, and the mAP is improved indeed. However, When I check the JSON format result, most of the bounding boxes are Nan.

The below are the parameters:
iou_thr=0.5, skip_box_thr=0.01, weights=[1, 0]

when weights have 0, there will be warnings:
RuntimeWarning: invalid value encountered in true_divide box[4:] /= conf
But there are also 0 in the benchmark you have given.

Could you give me some suggestions?
Looking forward to your reply, Thanks!

@ZFTurbo
Copy link
Owner

ZFTurbo commented Oct 11, 2021

The easiest solution is to remove predictions from ensemble you don't need to use (e. g. weight = 0).

@Yangr116
Copy link
Author

Yeah, that's right.
Weights [1, 0] made the ensembled model improve 0.03 mAP than the single model, 0.51 to 0.54 mAP ,but weights [1, 1] only obtained 0.002 mAP.
Maybe more models show the ability of the ensemble method better?

@ZFTurbo
Copy link
Owner

ZFTurbo commented Oct 11, 2021

I meant you can remove second set of boxes and set weights to weights=[1], then WBF will be applied to first set of boxes only. It's the equiualent to weights=[1, 0]. Looks like you have some of boxes intersected in the predictions of same model, so they fuse in process.

@Yangr116
Copy link
Author

Yangr116 commented Oct 11, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants