D-X-Y / landmark-detection

Four landmark detection algorithms, implemented in PyTorch.
https://xuanyidong.com/assets/projects/TPAMI-2020-SRT.html
MIT License
925 stars 180 forks source link

Face detection with SAN #64

Open ivanpanshin opened 4 years ago

ivanpanshin commented 4 years ago

Hi!

From the previous issues I understand that it's not a good idea to use some random face detection algorithm to detect a face and then apply SAN, since it was trained on bounding boxes just like in 300W. For instance, I downloaded celeba dataset with its own bounding box coordinates and ran inference with SAN. Since bounding boxes are different (rectangular in nature) it performs poorly.

Okay, I get it. But how to get a bounding box just like in 300W? Yeah, they released the code to generate bounding boxes for their dataset. Also, there are some ground truth boxes. But, say, I have my own image. Where to get a face detector in order to get a bounding box just for my image just like in 300W so that SAN performs like it should?

ivanpanshin commented 4 years ago

Actually, a follow-up question. A found out that SAN was trained with GT bounding boxes from 300-W, not bounding boxes from detector. That said, how is it even possible to inference SAN, since there is no way to compute GT-like BB for new image?

D-X-Y commented 4 years ago

We provide several kinds of bounding box including both GT and DET (obtained from the detector) [https://github.com/D-X-Y/landmark-detection/blob/master/SAN/cache_data/generate_300W.py#L54] A possible way to solve your problem is to extract the bounding box by yourself and re-train SAN.

ivanpanshin commented 4 years ago

I don't understand. How to extract bounding box, if my image is not from 300w?