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

How to find the optimal hyper-parameters in the ensembling process #45

Closed 123dddd closed 2 years ago

123dddd commented 2 years ago

Hello, I would like to ask how to find the best parameters combination, such as the model importances, IOU threshold when performing the ensemble process? Now I got prediction results from different models and try to ensemble these predictions, but I cannot know how to find the optimal parameters. Any suggestions will be helpful! Thank you in advance.

ZFTurbo commented 2 years ago

I used grid search.

123dddd commented 2 years ago

Thank you for your quick reply! Did you use the function/module from sklearn library or write the function from scratch to implement the grid search? Please give me a hint. Thank you!

ZFTurbo commented 2 years ago

I just made set of cycles.

123dddd commented 2 years ago

Hello, sorry to trouble you again. Are the weights of the different models determined by the grid search or set according to the experience? For example, when ensembling the detections of two models with the NMS method, the optimal IOU threshold can be determined by the grid search, but how the optimal weights of these two models can be determined?

ZFTurbo commented 2 years ago

Weights also can be found using grid search. But in my experience - the better metric for model the more weight for it must be set in ensemble.

123dddd commented 2 years ago

wow, thanks for the fast response! I understood : )