FaceBoxes.PyTorch icon indicating copy to clipboard operation
FaceBoxes.PyTorch copied to clipboard

Increase threshold for NMS

Open xsacha opened this issue 6 years ago • 3 comments

The threshold given to NMS (0.3) is far too low and includes many false positives. If someone wanted to see them, they can set the value themselves but I think the default should be slightly more sane. I personally use 0.7 or 0.8.

This also improves some benchmarks. Compared to my last patch: PASCAL: 97.28% -> 97.28% (unchanged) AFW: 98.83% -> 99.01% (would be 99.04% with 0.7)

xsacha avatar Apr 10 '19 01:04 xsacha

@xsacha sorry for the delay and thanks for the update. Yeah I think a higher nms would suppress more false positives especially for dataset with sparse groundtruth boxes. Have you tested on FDDB dataset too? I think it would be better to keep the hyperparameters as similar as the original implementation to avoid confusion. Do you mind opening an issue and consolidate the changes for a better benchmark performance when you have the chance? I could link it up in the readme.

zisianw avatar Apr 21 '19 03:04 zisianw

Yeah I understand you kept the parameters the same as the paper. Honestly some of them don't make much sense though. I use a similar NMS threshold for other models but for this model I found a much higher one makes more sense.

I am using several other modifications which I haven't posted here that significantly improve results but some of them are outside of the scope (a better NMS and better data augmentation).

xsacha avatar Apr 21 '19 04:04 xsacha

@xsacha yeah interesting, my guess would be too many anchors from anchor densification strategy regressing towards the same instance and 0.3 may not be able to suppress the 32x32 and 64x64 well enough. Anyway, very glad that you are sharing your findings! :)

zisianw avatar Apr 21 '19 13:04 zisianw