deepinx / enhanced-ssh-mxnet

The MXNet Implementation of Enhanced SSH (ESSH) for Face Detection and Alignment
55 stars 28 forks source link

multiple bounding box #3

Open robby258312 opened 5 years ago

robby258312 commented 5 years ago

Thanks for your sharing. I have a question about bounding box. When I run test.py, there are not only one bounding box on a face. How to set the threshold for detector.detect that the output like yours? or there are any other parameters I should set?

deepinx commented 5 years ago

In line 36 of essh_detector.py, I empirically set nms_threshold to 0.3. If you have multiple bounding boxes on one face, you can try adjusting this parameter.

robby258312 commented 5 years ago

Thank you for your reply!

w11m commented 5 years ago

i use the same image in the sample-images but i got multi bounding box on single person, what make this happened?

deepinx commented 5 years ago

Through my experience, it is the setting of nms_threshold parameter, you can try adjusting it in line 36 of essh_detector.py to see if this problem can be solved.

WIll-Xu35 commented 5 years ago

The original test.py detects 43 faces. After setting the nms_threshold to 0.01, it still returns 41 faces. Seems like the nms function is somehow not working properly.

And one more question, for the network itself, it generate all the bounding box, landmarks. After all the neural network inference is done, nms is applied to eliminate some of the overlapping faces? If this is true, seems that it does a lot useless landmark regression (since they are dropped during nms) that may slow down the detection?

weiyichang commented 5 years ago

Hi, I encounter the same problem of multiple boxes on one face. Then, I replace gpu_nms_wrapper with cpu_nms_wrapper, it works for me ~

deepinx commented 5 years ago

@weiyichang Thanks for your advice. I have not encountered such a problem on my computer, so I can't test it. I think this problem is related to the configuration of the gpu, but using cpu_nms_wrapper or py_nms_wrapper is also a solution, although the efficiency is slightly lower.