[Paper Review] Fast Deep Matting for Portrait Animation on Mobile Phone
This paper proposes a real-time, automatic deep matting method for mobile portrait animation using a lightweight fully convolutional network with dense connections and dilated convolutions to generate a coarse binary mask, followed by a learnable feathering block that applies an edge-preserving, matting-adaptive guided filter to produce high-quality alpha mattes. The system achieves 15 fps on mobile devices with performance comparable to state-of-the-art methods, enabling real-time portrait animation without user interaction.
Image matting plays an important role in image and video editing. However, the formulation of image matting is inherently ill-posed. Traditional methods usually employ interaction to deal with the image matting problem with trimaps and strokes, and cannot run on the mobile phone in real-time. In this paper, we propose a real-time automatic deep matting approach for mobile devices. By leveraging the densely connected blocks and the dilated convolution, a light full convolutional network is designed to predict a coarse binary mask for portrait images. And a feathering block, which is edge-preserving and matting adaptive, is further developed to learn the guided filter and transform the binary mask into alpha matte. Finally, an automatic portrait animation system based on fast deep matting is built on mobile devices, which does not need any interaction and can realize real-time matting with 15 fps. The experiments show that the proposed approach achieves comparable results with the state-of-the-art matting solvers.
Motivation & Objective
- To enable real-time image and video matting on mobile devices without user interaction.
- To overcome the limitations of interactive matting methods that require trimaps or strokes and are too slow for mobile deployment.
- To develop a lightweight, end-to-end deep learning framework suitable for mobile inference with high speed and accuracy.
- To achieve precise matting of complex regions like hair and neck, which are challenging for existing methods.
- To build a fully automatic portrait animation system that runs in real time on mobile hardware.
Proposed method
- A light full convolutional network with densely connected blocks and dilated convolutions is used to predict a coarse binary mask from portrait images.
- The network is trained end-to-end to segment foreground and background, with downsampling to reduce computational load.
- A novel feathering block is introduced that learns a guided filter with matting-adaptive weights to refine the binary mask into a smooth, edge-preserving alpha matte.
- The feathering block performs a linear transformation of the coarse mask using filter weights learned during training, enabling fast inference.
- The entire framework is optimized for mobile deployment using GPU and CPU inference, with additional speedup via render script optimization on Android.
- The system is integrated into a real-time portrait animation application for mobile phones, processing images at 15 fps.
Experimental results
Research questions
- RQ1Can a fully automatic deep learning method achieve real-time matting on mobile devices without user interaction?
- RQ2Can a lightweight network with dense connections and dilated convolutions produce accurate coarse segmentation for portrait images?
- RQ3Can a learnable, edge-preserving guided filter effectively refine a binary mask into a high-quality alpha matte?
- RQ4How does the proposed method compare in speed and accuracy to existing state-of-the-art matting solvers on mobile hardware?
- RQ5Can the method handle complex regions like hair and neck with higher precision than existing automatic matting techniques?
Key findings
- The proposed method achieves 15 fps on mobile devices, enabling real-time portrait animation without user interaction.
- The system runs in 62ms on GPU and 140ms on CPU using a Qualcomm Snapdragon 820, demonstrating strong mobile efficiency.
- The method reduces inference time by 587ms on GPU and 5962ms on CPU compared to the baseline automatic matting method from Shen et al. (2016b).
- The method achieves a gradient error increase of only 4.37×10⁻³ compared to the state-of-the-art baseline, indicating comparable matting quality.
- The system outperforms the real-time app Fabby in handling complex cases, such as similar background colors and fine details like collars and shoulders.
- The feathering block demonstrates matting-adaptive behavior, enabling precise separation of head and neck regions, which is rare in other methods.
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.