Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key points extration model #13

Open
royaljava opened this issue Apr 15, 2019 · 6 comments
Open

Key points extration model #13

royaljava opened this issue Apr 15, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@royaljava
Copy link

I can not get the permit of 3DFAW data, so I can not run the face rotation model with other data than the data of demo, too. Would you please offer me the pretrained keypoins extraction model or some more data to test the face rotation model.
Thanks!

@seungtaekoh
Copy link

ME TOO !!! PLEASE .....

@SinaHonari
Copy link
Collaborator

Hi there, you can follow the steps mentioned here to use the Recombinator Networks to get the keypoint predictions: https://github.com/SinaHonari/RCN/tree/master/trained_model/RCN_300W

There is a pre-trained keypoint prediction model you can use. This model was used to extract the keypoints for the DepthNet experiments. Note that the Recombinator Network repo is in Theano.

@y-x-c
Copy link

y-x-c commented Oct 28, 2020

thanks @SinaHonari . The question is that RCN extracts 68 points instead of 66 points used in DepthNet; is there a way to convert from 68 to 66 pts?

@christopher-beckham
Copy link
Collaborator

@y-x-c there is this method in the utils.py file:

def convert_keypts_66_to_68(arr):
kps_68 = np.zeros((68, 2))
kps_68[0:60] = arr[0:60] # kpts 1 to 60 is kypts 1 to 60
kps_68[60] = (arr[60-1]+arr[50-1]) / 2. # kpt 61 is the avg of kpts 60 and 50
kps_68[61] = arr[60] # kpt 62 is keypt 61
kps_68[62] = arr[61] # kpt 63 is keypt 62
kps_68[63] = arr[62] # kpt 64 is keypt 63
kps_68[64] = (arr[54-1] + arr[56-1]) / 2. # kpt 65 is the avg of kpts 54 and 56
kps_68[65] = arr[63] # kpt 66 is keypt 64
kps_68[66] = arr[64] # kpt 67 is keypt 65
kps_68[67] = arr[65] # kpt 68 is keypt 66
return kps_68

That converts from 66 to 68, but you could just use that to infer going from 68 to 66 (removing zero-indexed indices 60 and 64)

@christopher-beckham christopher-beckham added the enhancement New feature or request label Oct 28, 2020
@y-x-c
Copy link

y-x-c commented Oct 28, 2020

thanks! I will try.

@christopher-beckham
Copy link
Collaborator

@royaljava @seungtaekoh @y-x-c sorry for a rather late addressal of the issue. I have labeled it 'enhancement request'. While we used @SinaHonari's RCN network to extract face keypoints, unfortunately it is in Theano and perhaps not a lot of people use it anymore (or will bother to remember how to set it up). If you are able to use an off-the-shelf keypoint detector that extracts either 68 or 66 keypoints, that would be faster. Or, worst case scenario, you may have to train one yourself, but this shouldn't take too long if you're working with a modest resolution. An example of one of these repos can be found here: https://github.com/soheil-mpg/Facial-Keypoint-Detection (it includes data in the repo)

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants