face-alignment-at-3000fps icon indicating copy to clipboard operation
face-alignment-at-3000fps copied to clipboard

SimilarityTransform returning identity

Open HY1WDW1W opened this issue 9 years ago • 4 comments
trafficstars

Hi,

I see that the calcSimilarityTransform() function always returns identity matrix for rotation and only the scale is computed which is also close to 1 in almost all the cases. Is this a bug in the function or is it how it should be ? (Mean face landmarks are always vertical because of the flipped shapes.)

Because, if you use lfpw/afw/helen datasets, there are many cases where the face is not vertical but tilted up to some degrees. It returns identity rotation in these cases as well.

Could you help me with this problem ? Thanks

HY1WDW1W avatar Jan 12 '16 17:01 HY1WDW1W

  1. scale and rotate can differ very much, and won't always be identity or close to 1 unless your shape is similar to mean shape.
  2. you can calculate the mean_shape before any data augment which will avoid the vertical problem you mentioned.

luoyetx avatar Jan 13 '16 04:01 luoyetx

Actually, I wonder why we need such a function i.e. calcSimilarityTransform(), I don't know why we should get a relative delta_shapes for predicting target. Sorry for my silly question.

I can't understand why we need to get a relative delta_shapes for predicting target. I think we can use absolute delta_shape directly for target. // Get relative delta_shapes for predicting target vector<Mat> getDeltaShapes(vector<Mat> &gt_shapes, vector<Mat> &current_shapes

mariolew avatar Mar 09 '16 12:03 mariolew

@mariolew SimilarityTransform is needed for some reason that other papers are already said.

And for relative delta shapes, it should be relative not absolute. Imagine that you have a face for different size (100x100, 400x400, 600x600 for example). Every face has a shape on it, with extracted features, if delta shape is relative, this three faces will be given the same delta shape which is what we want, but if delta shape is absolute, delta shape can not fit to three different scale unless the feature from these faces are very different which is not what we want to see.

Of course, if you resize all face (training data and test data) to the same size, relative or absolute delta shape doesn't matter I think :)

luoyetx avatar Mar 09 '16 13:03 luoyetx

About the necessity of similarity transform, can you please provide the name of the related papers?

fourk-ty avatar Aug 22 '17 01:08 fourk-ty