PRNet icon indicating copy to clipboard operation
PRNet copied to clipboard

Several concerns about augmenting training dataset

Open marvin521 opened this issue 6 years ago • 4 comments

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.

marvin521 avatar Sep 04 '18 04:09 marvin521

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

wungemach avatar Sep 27 '18 15:09 wungemach

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

mayankuxtc avatar Aug 08 '19 21:08 mayankuxtc

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

marvin521 avatar Aug 09 '19 03:08 marvin521

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

mayankuxtc avatar Aug 09 '19 16:08 mayankuxtc