Active Appearance Model, Re-implementation based on OpenCV 3

Active Appearance Model is typically a statistical model which describes the shape and the texture of something we train and it tolerates some deformation or lighting changes to some degree. It has a wide range of applications including facial tracking, expression detection, etc.
IMG

Why re-implementation?

Indeed, there are plenty of handy AAM implementations in C++ as libraries. However those available libraries are based on older generation of OpenCV (version 2.xx or even older). OpenCV 3 is my version of choice and it is taking huge effort to migrate the library from OpenCV 2 to 3 since there are lots of big architectural changes.
Then I decided to start a fresh new implementation from group up. I am enthusiastic to take this opportunity for learning how the model works, how it is built and what the mathematical concept behind it is.

Tools for implementation

Resources for references

There are plenty of references for Active Appearance Model. Following are some selected ones.
In case you cannot afford some time to read the whole, here I pinpoint some notable reads for sufficient background knowledge.

Implementation

I design the hierarchy of the classes as follows:
Fundamental elements :
Base models :
Computational modules :
Training set:

WIP

The status of the project is work in progress. The following functionalities are achieved.

What's the next ideas?

The stability issue is outstanding yet the accurate computation is still on the way of the development. The training process is not very tolerant as some coordinates of the shape lying outside of ROI can simply break the program. These improvements are on my TODO list and has to be addressed before putting the project to a DONE stage.

Contributions are welcome

Feel free to clone or fork the project on Github and play around with it. Any form of contributions to the project is very welcome.