Closed wulikai1993 closed 4 years ago
The setup.py in the WiderFace-Evalutation/ folder is used to build the WiderFace-Evaluation package when we run
python setup.py build_ext --inplace
(see "evaluate on widerface" part of the ReadMe)
In general, for more information about setup.py files, you can check the officiel python packaging documentation : https://packaging.python.org/tutorials/packaging-projects/
Sorry for my unclear question. I mean the setup.py in rcnn/cython which is used in Makefile. I think it is related to cpu or gpu devices. But why we write this part of codes? Does not the tf2 handle the devices automatically?
The rcnn module is used to run non maximal suppression (or "nms") on the outputs of the neural network, which is in tf2. Sometimes the neural network will output 2 boxes for 1 face. The nms step is here to find and delete duplicates.
So the setup.py is here to build this component on your machine. it builds a GPU version of nms, and also a CPU version if you dont have a gpu available. In this case you should change the "use_gpu_nms" of the RetinaFace object constructor.
Hope that clears it up !
Thanks in advance!