Then a mean shape is aligned with the estimated location as a rough estimate of the face shape. In the final step, a 3D boundary detector is used to move each landmark to the optimal position and a non-rigid deformation of the mean shape is made towards the optimal face shape.