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

Active Template Models #469

Merged
merged 12 commits into from Oct 15, 2014

Conversation

Projects
None yet
3 participants
@nontas
Member

nontas commented Oct 9, 2014

This PR introduces Active Template Models, i.e. Lucas-Kanade with a PCA shape model. It defines ATMBuilder, ATM, PatchBasedATMBuilder, PatchBasedATM and LucasKanadeATMFitter classes which are similar to their equivalent AAM classes and also adds tests. The only difference is that the build method takes as input shapes and template and the fitter algorithm comes from menpo.fit.lucaskanade.image (i.e. ImageInverseCompositional, ImageForwardAdditive, ImageForwardCompositional).

Finally, the PR introduces an AMMultilevelFittingResult class with AAMMultilevelFittingResult and ATMMultilevelFittingResult being its subclasses.

@jabooth jabooth added the in progress label Oct 9, 2014

@nontas nontas self-assigned this Oct 9, 2014

@nontas nontas added the enhancement label Oct 9, 2014

@@ -476,7 +476,7 @@ class PatchBasedAAMBuilder(AAMBuilder):
``pyramid_on_features`` is enabled so ``features`` must be a
`string` or a `function` or a list containing one of those
"""
def __init__(self, features='hog', patch_shape=(16, 16),
def __init__(self, features=hog, patch_shape=(16, 16),

This comment has been minimized.

@jalabort

jalabort Oct 14, 2014

Member

default feature is now hog ?

Well looking at the diff it has been for some time I guess... Is this expected?

This comment has been minimized.

@nontas

nontas Oct 14, 2014

Member

It is in the PatchBasedAAMBuilder. This change actually fixes the bug of hog being defined as an str instead of function. The default of AAMBuilder is still igo.

This comment has been minimized.

@jalabort

jalabort Oct 14, 2014

Member

Should it be though? A patch AAM is very similar to an AAM in menpo, so whatever the reason prevented hog to be the defaults choice in AAMs (mainly speed) should also hold here...

This comment has been minimized.

@nontas

nontas Oct 14, 2014

Member

Well, even if we had sparse_hog there, we would still extract a patch_shape * 36 vector because we first compute features and then we extract patches. So if we want a faster patch-based AAM, then we can put igo, but I'm not sure how good it performs. Is igo what you have in mind?

This comment has been minimized.

@jalabort

jalabort Oct 14, 2014

Member

This patch-based AAM is essentially an AAM. There's virtually no difference between the two...

I would say the default should be whatever the default is for AAMs. I am saying this because if you were to use two default models, a pach-based AAM would be much much slower than an AAM and would perform a lot better. These differences would be solely caused by the choice of default parameters (I think...) and not because the model is much slower and more accurate than an AAM.

I know this wasn't introduced here... but maybe we want to quickly change. If you agree with me. Apart from that, this looks very good.

This comment has been minimized.

@nontas

nontas Oct 14, 2014

Member

OK I agree. I'll change it now!

@jalabort

This comment has been minimized.

Member

jalabort commented Oct 14, 2014

+1

@jabooth

This comment has been minimized.

Member

jabooth commented Oct 15, 2014

+1 once merge conflict is resolved

nontas added some commits Oct 15, 2014

Merge remote-tracking branch 'upstream/master' into lk_fitter
Conflicts:
	menpo/fitmultilevel/fittingresult.py
	menpo/fitmultilevel/test/aam_fitter_test.py

nontas added a commit that referenced this pull request Oct 15, 2014

Merge pull request #469 from nontas/lk_fitter
Active Template Models

@nontas nontas merged commit df6eb40 into menpo:master Oct 15, 2014

1 of 2 checks passed

continuous-integration/appveyor Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci The Travis CI build passed
Details

@jabooth jabooth removed the in progress label Oct 15, 2014

@nontas nontas deleted the nontas:lk_fitter branch Oct 15, 2014

@nontas nontas referenced this pull request Oct 15, 2014

Closed

LK Fitting Is Broken #232

2 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment