Abstract
We present an algorithm for simultaneous face detection, landmarks localization, pose estimation and gender recognition using deep convolutional neural networks (CNN). The proposed method called, HyperFace, fuses the intermediate layers of a deep CNN using a separate CNN followed by a multi-task learning algorithm that operates on the fused features. It exploits the synergy among the tasks which boosts up their individual performances. Additionally, we propose two variants of HyperFace: (1) HyperFace-ResNet that builds on the ResNet-101 model and achieves significant improvement in performance, and (2) Fast-HyperFace that uses a high recall fast face detector for generating region proposals to improve the speed of the algorithm. Extensive experiments show that the proposed models are able to capture both global and local information in faces and performs significantly better than many competitive algorithms for each of these four tasks.
Introduction
Analyzing human faces in computer vision typically involves a sequential pipeline: detection, landmark localization, pose estimation, and attribute classification (e.g., gender). Traditionally, these tasks are treated as independent problems. However, they are deeply correlated—knowing the location of facial landmarks can significantly aid in pose estimation, while pose information can help refine the bounding box for detection.
HyperFace is a deep multi-task learning framework designed to exploit these synergies. By fusing intermediate layers of a deep CNN into "hyperfeatures," the model captures both low-level spatial details and high-level semantic information. This unified approach is particularly effective for "extreme" faces characterized by severe angles, poor lighting, or low resolution.
Methods
The HyperFace architecture is built on the principle that different layers of a CNN specialize in different types of information. Lower layers capture local details like edges and corners, which are essential for precise landmark localization. Deeper layers capture global, semantic information suitable for classification tasks like gender recognition.
Architecture and Hyperfeatures
The core innovation is the fusion of intermediate layers (specifically max1, conv3, and pool5 from an AlexNet-based backbone) to create a rich feature descriptor. This fusion ensures the network has access to both high-resolution spatial data and abstract semantic features.
The fused features are processed through a "Fusion CNN" and then split into five specialized branches:
- Detection: Determines the probability of a face being present.
- Landmarks: Regresses the coordinates of facial key points.
- Visibility: Estimates whether specific landmarks are visible or occluded.
- Pose: Predicts the roll, pitch, and yaw of the head.
- Gender: Classifies the face as male or female.
Iterative Refinement
HyperFace employs two post-processing techniques to enhance accuracy:
- Iterative Region Proposals (IRP): If an initial face proposal is poorly localized, the network uses its own predicted landmarks to "re-crop" the face and re-run the inference for a more accurate second pass.
- Landmarks-based NMS (L-NMS): Unlike standard Non-Maximum Suppression that relies on bounding box overlap, L-NMS uses predicted landmarks to define face boundaries, leading to superior detection precision.
Results
The model was trained primarily on the AFLW (Annotated Facial Landmarks in the Wild) dataset and evaluated across several benchmarks including FDDB, AFW, PASCAL faces, and CelebA.
Key performance metrics include:
- Detection: Achieved a Mean Average Precision (mAP) of 97.9% on AFW and 92.46% on PASCAL.
- Landmarks: On the challenging IBUG dataset, the HyperFace-ResNet variant achieved a state-of-the-art Normalized Mean Error of 8.18%.
- Gender: Reached 98% accuracy on the CelebA dataset.
- Efficiency: While the ResNet-101 version prioritizes accuracy, the Fast-HyperFace variant (using an SSD-based detector) can process images in approximately 0.15 seconds on a high-end GPU, enabling near real-time performance.
Conclusion
HyperFace demonstrates that multi-task learning provides a powerful regularizer, where correlated tasks boost each other's performance. By "reaching back" into earlier network layers to preserve spatial precision, the model achieves robust performance even on challenging, unconstrained facial images. Future work may involve applying this hyperfeature fusion approach to other domains, such as simultaneous pedestrian detection and body pose estimation.
Summary updated