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

SimilarityTransform returning identity #4

Open
HY1WDW1W opened this issue Jan 12, 2016 · 4 comments
Open

SimilarityTransform returning identity #4

HY1WDW1W opened this issue Jan 12, 2016 · 4 comments

Comments

@HY1WDW1W
Copy link

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

@luoyetx
Copy link
Owner

luoyetx commented Jan 13, 2016

  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.

@mariolew
Copy link

mariolew commented Mar 9, 2016

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 getDeltaShapes(vector &gt_shapes, vector &current_shapes

@luoyetx
Copy link
Owner

luoyetx commented Mar 9, 2016

@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 :)

@fourk-ty
Copy link

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

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

No branches or pull requests

4 participants