cleardusk / 3DDFA_V2

The official PyTorch implementation of Towards Fast, Accurate and Stable 3D Dense Face Alignment, ECCV 2020.
MIT License
2.9k stars 514 forks source link

Question about the function `parse_roi_box_from_bbox` #6

Closed FunkyKoki closed 4 years ago

FunkyKoki commented 4 years ago

Thanks for your great work! When I read your released code at this place: https://github.com/cleardusk/3DDFA_V2/blob/48002b4f10c5dc6377d505f2f775d8d08c81bd76/utils/functions.py#L85

I could not understand your operation purpose. Of course, the face image should be a square.

But I guess this is done because the face detector tends to detect the upper part of the face, so you move down the bounding box , is it right? By the way, are the hyper-parameters in this function like 0.14, 1.58 chosen empirically?

Looking forward to your reply!

cleardusk commented 4 years ago

Right, 0.14, 1.58 are just chosen empirically, specifically, following here.

FunkyKoki commented 4 years ago

So, can I assert that when using FaceBoxes to detect faces when the faces are used to do 3D face alignment, this is a common operation and should be used as a must?

cleardusk commented 4 years ago

Not a must, it is just a cropping policy. The best way: the cropping policy in training is consistent with the evaluation.

FunkyKoki commented 4 years ago

OK, thank you so much! Best regards.