[Paper Review] Lightweight Real-time Makeup Try-on in Mobile Browsers with Tiny CNN Models for Facial Tracking
This paper proposes a lightweight, two-stage CNN architecture for real-time facial landmark detection in mobile web browsers, using coarse-to-fine heatmap regression with region-of-interest (RoI) processing to achieve high accuracy with minimal computational cost. The method achieves 3.21 normalized mean squared error on its custom dataset and enables real-time makeup try-on on smartphones via client-side inference with a 607KB model.
Recent works on convolutional neural networks (CNNs) for facial alignment have demonstrated unprecedented accuracy on a variety of large, publicly available datasets. However, the developed models are often both cumbersome and computationally expensive, and are not adapted to applications on resource restricted devices. In this work, we look into developing and training compact facial alignment models that feature fast inference speed and small deployment size, making them suitable for applications on the aforementioned category of devices. Our main contribution lies in designing such small models while maintaining high accuracy of facial alignment. The models we propose make use of light CNN architectures adapted to the facial alignment problem for accurate two-stage prediction of facial landmark coordinates from low-resolution output heatmaps. We further combine the developed facial tracker with a rendering method, and build a real-time makeup try-on demo that runs client-side in smartphone Web browsers. More results and demo are in our project page: http://research.modiface.com/makeup-try-on-cvprw2019/
Motivation & Objective
- Develop a compact facial alignment model suitable for real-time inference on resource-constrained mobile and web platforms.
- Address the challenge of balancing high landmark detection accuracy with low model size and fast inference speed for client-side web applications.
- Optimize model efficiency by using a two-stage coarse-to-fine prediction with RoI-based feature processing and lightweight CNN architecture.
- Enable real-time, browser-based makeup try-on without server-side computation, ensuring low latency and fast loading.
- Maintain high accuracy on frontal and near-frontal faces, which are common in virtual try-on applications.
Proposed method
- Design a two-stage CNN: the first stage generates low-resolution heatmaps for coarse landmark prediction, and the second stage refines coordinates using RoIs extracted from shared convolutional features.
- Use lightweight MobileNetV2-inspired inverted residual blocks with depthwise separable convolutions to minimize parameters and multiply-add operations.
- Apply heatmap regression with sigmoid cross-entropy loss and an $L_2$ distance loss with spatial weighting to improve boundary landmark accuracy.
- Employ RoI align for precise feature extraction from regions of interest, reducing computation while maintaining spatial accuracy.
- Optimize inference by downscaling input resolution and reducing network channels (e.g., $α=0.5$) without significant accuracy drop.
- Integrate the trained landmark detector into a client-side rendering pipeline for real-time makeup application in web browsers.
Experimental results
Research questions
- RQ1Can a compact CNN architecture achieve high facial landmark detection accuracy while maintaining sub-20ms inference time on mobile devices?
- RQ2How effective is the two-stage coarse-to-fine heatmap regression with RoI processing in reducing computational load without sacrificing accuracy?
- RQ3To what extent can model size be reduced (e.g., via channel scaling or input resolution reduction) while preserving performance on frontal face poses?
- RQ4How does the proposed method compare to state-of-the-art models like Look at Boundary (LAB) in terms of accuracy and efficiency on standard benchmarks?
- RQ5Can a fully client-side, browser-based makeup try-on system be built with low latency and fast loading using a 600KB model?
Key findings
- The full model achieves a normalized mean squared error of 3.21 on the custom dataset with 65 landmarks, demonstrating high accuracy for real-time use.
- The ablation study confirms that all components—heatmap loss, $L_2$ loss, and the second processing stage—are essential, as removing any degrades performance by 0.3–1.2 points.
- The model with $α=0.5$ (half channels) maintains 3.43 error on the 300W Common subset, showing robustness to model compression.
- The model size is reduced to 607KB with 173.69M MAdd and 90.75M FLOPs, enabling 20ms inference on iPhone XR.
- On the 300W dataset, the model matches LAB (4-stack) performance on the Common subset (3.42 vs. 3.42) but shows a slight drop on the Fullset (4.42 vs. 4.12), indicating better alignment on unoccluded frontal faces.
- Reducing input resolution and model size further (e.g., to 607KB) causes minimal accuracy degradation, confirming suitability for mobile and web deployment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.