yfeng95 / PRNet

Joint 3D Face Reconstruction and Dense Alignment with Position Map Regression Network (ECCV 2018)
http://openaccess.thecvf.com/content_ECCV_2018/papers/Yao_Feng_Joint_3D_Face_ECCV_2018_paper.pdf
MIT License
4.95k stars 947 forks source link

Several concerns about augmenting training dataset #66

Open marvin521 opened 6 years ago

marvin521 commented 6 years ago

I am curious about the number of training samples. The authors said in the paper: We perturb the training set by randomly rotating and translating the target face in 2D image plane. To be specific, the rotation is from -45 to 45 degree angles, translation changes is random from 10 percent of input size, and scale is from 0.9 to 1.2.

I have several concerns:

  1. How many training samples are generated?
  2. The input face is rotated while keeping the 3DMM parameters unchanged ? is this right?

Any reply is appreciated.

wungemach commented 5 years ago

@marvin521 The data augmentation should happen after you have converted the data from 3dmm coordinates to xyz-coordinates. You DO also modify the labels as you augment the input image.

mayankuxtc commented 5 years ago

Thanks @marvin521, @YadiraF and @wungemach. Can you please explain in more detail. I am thinking of augmenting the dataset (expanding the 300 W-LP) dataset. I have already created 256 x 256 position maps for the corresponding 256 x 256 images. Now my dataset has a npy file and jpg files. Are you saying that even if I rotate from -45 to 45 degree angles, translation changes to a random from 10 percent of input size, and scale is from 0.9 to 1.2. , it will not change the position map (npy file) originally created. or Does it?

Can you tell me: What does this statement means You DO also modify the labels as you augment the input image Looking forward to your reply

marvin521 commented 5 years ago

@mayankuxtc you can get the a transformation matrix mapping the input image to the augmented image after you augment the input image. Then apply the transform matrix to the position map.

mayankuxtc commented 5 years ago

Hi @marvin521, @YadiraF, @wungemach Thank you for your kind reply. So my next doubt is:

  1. If I rotate the image by 45 degree, it does not mean, I have to rotate position map also by 45 degree. right?
  2. How can we generate the 3DMM parameters for a new 2D image. Can you suggest some github repo or something by which I can generate the 3DMM parameters. Looking forward to your reply. Thanks Mayank