xinntao / facexlib

FaceXlib aims at providing ready-to-use face-related functions based on current STOA open-source methods.
MIT License
810 stars 143 forks source link

NMS implementation #9

Closed woctezuma closed 2 years ago

woctezuma commented 2 years ago

I see that you use a custom Python implementation for NMS.

https://github.com/xinntao/facexlib/blob/206e0ccf86116bb9808e3f462c64be50ee218053/facexlib/detection/retinaface_utils.py#L38-L66

Moreover, the requirements of this repository include torchvision:

https://github.com/xinntao/facexlib/blob/206e0ccf86116bb9808e3f462c64be50ee218053/requirements.txt#L9

I wonder whether it would be beneficial to use torchvision's implementation of NMS instead. cf. torchvision.ops.nms I had this idea after a quick discussion in another repository: https://github.com/ternaus/retinaface/issues/23#issuecomment-924708220

xinntao commented 2 years ago

@woctezuma Thanks for your suggestion. It is a good improvement. I am busy these days and may improve it later.

It would be great if you can help it and open a PR 😃