2. Face Alignment

Many forms of face recogniser work better if the facial image patches used for training and querying are aligned to a common view. This alignment allows for the recognition system to concentrate on the appearance of the face without having to explicitly deal with variations in the pose of the face. The FaceAligners take in faces detected by a FaceDetector as input, and output an image with the aligned face rendered within it.

OpenIMAJ contains a number of face alignment options. Currently, these include:

  • org.openimaj.image.processing.face.alignment.AffineAligner: An aligner that can align faces detected by the FKEFaceDetector to a neutral pose by applying an rigid affine transformation estimated from the mapping of facial keypoints in the detected image to the points in a model with neutral pose.

  • org.openimaj.image.processing.face.alignment.CLMAligner: An aligner that warps a face detected by the CLMFaceDetector to a neutral pose. The alignment is non-rigid and warps each corresponding triangle of the detected face to a model with neutral pose.

  • org.openimaj.image.processing.face.alignment.IdentityAligner: The identity aligner does no alignment; it just returns the cropped face image from the detector. This is useful when working with face datasets that contain pre-aligned images.

  • org.openimaj.image.processing.face.alignment.MeshWarpAligner: The mesh warp aligner performs a similar job to the CLMAligner, but for FKEDetectedFaces detected by the FKEFaceDetector. A mesh is constructed over the set of detected facial keypoints and a non-linear warp is applied to project each keypoint to a canonical position within a neutral pose.

  • org.openimaj.image.processing.face.alignment.RotateScaleAligner: The rotate and scale aligner maps faces detected by the FKEFaceDetector to an aligned pose by performing a rotation followed by a scaling.

  • org.openimaj.image.processing.face.alignment.ScalingAligner: The scaling aligner takes any type of DetectedFace and scales the cropped face image in the detection to a fixed size.