Exercise: Building new models
Build a statistical shape/appearance model of the shape of the lips.
Follow the detailed instructions about model building from scratch.
- Create a new directory for the points (eg mouth_points).
Annotating the first image
- Go into the models directory and run am_markup start.
- Load in the first face image.
- Click on "Add Curve" and then click points around the outside of the mouth, starting at one corner.
- Complete the curve by clicking on the first point.
- Add curves defining the inner boundaries of the lips by clicking on one corner point to start,
and completing by clicking on the other corner point.
- When completed, save the points into the mouth_points directory, with a name to match the image name.
- Save the parts to "mouth.parts" in the models directory. (These define the connectivity).
- Close am_markup
Building the first model
- Copy an existing SMD file (in the models directory), calling it "mouth.smd"
- Edit the file, changing the model name, points directory as appropriate. Put the name of the labelled image and
associated points file in the "training_set" section.
- Use am_build_apm mouth to create an initial model (from a single example).
- Copy an AAMProps file to "mouth.aamprops". Edit the model names as appropriate.
- Use am_build_aam mouth to build an AAM.
Annotating further images
- From the models directory, run am_markup mouth
- Use "File->Load Image Set" to load in an SMD file describing all images to annotate(eg tim_face.smd)
- Use the arrow button above the main window to move to the next image (the first image has been annotated.
- Use the "Props->Search Props" menu item to get the search panel up.
- Run the search to match the model to the image.
- Edit the point positions using either the "Move All" mode or the "Move One" mode.
- When happy, press the "Save,Add,Update" button, to save the points and update the training data SMD file automatically.
- Move to the next image.
- Periodically close the program and rebuild the model + AAM. As more examples are added, the model should match to
new images better.
- At any point, use am_view_shape_model to display the shape model
or am_view_apm to display the appearance model.
And there you have it - your own lovely mouth model.