Abstract
Selfie video stabilization presents unique challenges due to large foreground occlusions, independent motion between the subject and background, and human sensitivity to facial distortions. We present an unsupervised deep learning approach that achieves real-time stabilization at 26 fps. Our system utilizes a two-branch 1D convolutional neural network to independently process background and foreground motion, predicting Moving Least Squares (MLS) warps. By maintaining linearity in the network and employing a grid-based MLS approximation, the method provides smooth, high-quality stabilization without the "jello effect" or facial warping common in existing real-time solutions.
Introduction
Stabilizing "selfie" videos is significantly more complex than landscape stabilization. The primary difficulties stem from the subject's head occupying a large portion of the frame, which occludes background features necessary for traditional camera motion tracking. Furthermore, the foreground and background often exhibit independent motion; stabilizing for one frequently results in violent shaking of the other.
Finally, the "uncanny valley" effect makes humans highly sensitive to even minor facial distortions (wobble) introduced by stabilization algorithms. While high-quality offline methods exist, they are too slow for mobile applications, and current real-time methods often fail to handle complex local motions like rolling shutter artifacts.
Methodology
The proposed pipeline treats the foreground and background as distinct entities to balance their respective stability requirements.
- Motion Detection: The system employs a segmentation network to isolate the subject and a 3D face-fitting model (3DDFA) to track face vertices. Simultaneously, sparse background feature points are tracked using KLT tracking.
- Two-Branch Stabilization Network: A 1D CNN with two branches processes background and face motion separately. A key architectural finding was that removing activation layers (maintaining linearity) improved performance, as stabilization is inherently a linear geometric relationship where corrective displacement should scale directly with input shake.
- Rigid Moving Least Squares (MLS) Warping: To deform the image while maintaining local rigidity—crucial for facial integrity—the system uses MLS.
- Real-Time Optimization: To achieve 26 fps, the authors implemented a grid approximation for MLS, calculating warps for a sparse 20x20 grid and using bilinear interpolation to fill the remaining pixels. This reduced processing time from 1 second to 4 milliseconds per frame.
- User Control: A parameter ($\lambda$) allows for adjustable weighting between face and background stabilization.
Datasets and Evaluation
The research introduced a new Selfie Video Dataset containing 1,005 video clips with per-frame foreground masks, a significant expansion over previous datasets. Evaluation was conducted on 25 "wild" selfie videos featuring challenging conditions such as low light, multiple faces, and accessories like sunglasses.
Key Results
The system operates at 26 fps on a desktop GPU (NVIDIA 2080Ti), outperforming previous optimization-based methods by orders of magnitude. Quantitative evaluations using Cropping, Distortion, and Stability metrics show that this method surpasses industry standards like MeshFlow and Bundled Paths. Qualitatively, the approach avoids the "jello effect" and maintains a larger frame size with higher stability scores than competitors like Steadiface.
Conclusion and Future Work
This unsupervised approach demonstrates that real-time, high-quality selfie stabilization is achievable by separating foreground and background motion processing. While the system currently relies on 2D tracking, future improvements could include integrating gyroscope data to enhance robustness in feature-poor environments (e.g., low light or plain backgrounds). Additionally, optimizing kernels for mobile hardware will be essential for direct on-device smartphone implementation.
Summary updated