joelmoniz / DepthNets

Code for "Unsupervised Depth Estimation, 3D Face Rotation and Replacement", NeurIPS 2018
MIT License
127 stars 31 forks source link

Key points extration model #13

Open royaljava opened 5 years ago

royaljava commented 5 years ago

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 commented 5 years ago

ME TOO !!! PLEASE .....

SinaHonari commented 5 years ago

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 commented 3 years ago

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 commented 3 years ago

@y-x-c there is this method in the utils.py file: https://github.com/joelmoniz/DepthNets/blob/2faca1a12836d27b8e773ce4ca51d3e8ff86d83d/depthnet-pytorch/util.py#L137-L148

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)

y-x-c commented 3 years ago

thanks! I will try.

christopher-beckham commented 3 years ago

@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.