Introduction
Neural Style Transfer (NST) has achieved remarkable success in transforming static images into artistic masterpieces. However, extending these techniques to video remains a significant challenge. When NST is applied independently to each frame of a video, the resulting sequence often suffers from "temporal incoherence"—a distracting, high-frequency flickering effect where the artistic style shifts inconsistently between frames.
To mitigate this, the prevailing approach has been the use of Optical Flow-Based (OFB) loss. This method involves tracking the movement of every pixel across consecutive frames and penalizing the model if the stylized pixels do not follow the same motion trajectories. While effective, OFB loss introduces substantial computational overhead, requiring days of GPU-intensive preprocessing to estimate flow for large datasets. Furthermore, optical flow estimation is notoriously fragile in the presence of fast motion, occlusions, or lighting changes.
The Frame Difference-Based (FDB) Approach
This paper proposes a simpler, more efficient alternative: Frame Difference-Based (FDB) loss. The core insight is that explicit motion vectors are not strictly necessary to maintain temporal stability. Instead, the model can simply ensure that the change between two consecutive stylized frames matches the change between the corresponding original frames.
By forcing the stylized video to mirror the frame-to-frame differences of the source content, the artistic style naturally "sticks" to the moving objects without the need for complex pixel-tracking. This approach eliminates the need for optical flow preprocessing entirely, reducing setup time from days to zero.
Methodology
The authors explore three variants of the FDB loss to balance stability with artistic expression:
- Pixel-FDB (P-FDB): This variant measures differences directly in the raw pixel space. While it provides high stability, it can be overly restrictive, sometimes "washing out" the painterly textures of the style to match the original pixels too closely.
- Feature-FDB (F-FDB): By measuring differences in the feature space of a pretrained VGG network, this loss allows for more artistic flexibility. It constrains the high-level semantic changes rather than exact pixel values.
- Combined-FDB (C-FDB): A weighted combination of both pixel and feature differences. The authors identify this as the optimal "sweet spot," providing a robust balance between temporal coherence and style quality.
Additionally, the paper introduces Interpolation Padding for convolutional layers. Standard padding techniques often cause flickering artifacts at the borders of generated videos; this novel padding method ensures smoother transitions at the edges of the frame.
Evaluation and Results
The proposed method was trained on the DAVIS (Densely Annotated Video Segmentation) dataset and tested against both DAVIS and Sintel sequences using four iconic artistic styles. To evaluate the results, the authors conducted a large-scale human behavior study involving 62 subjects and over 25,000 individual votes using a Two-Alternative Forced Choice (2AFC) paradigm.
The results demonstrate that the C-FDB loss is not just a faster alternative, but a superior one in many contexts. In tests using a Recurrent Neural Network (RNN) architecture, C-FDB outperformed standard optical flow loss, with 60.4% of users preferring its stability. On standard feedforward networks, the quality of stylization was found to be comparable to OFB methods, while significantly exceeding the performance of the more rigid Pixel-FDB baseline.
One surprising finding was the model's long-term consistency. Despite lacking an explicit long-term memory mechanism, FDB-trained models maintained consistent styling even when objects were temporarily occluded and then reappeared.
Conclusion
The Frame Difference-Based loss represents a paradigm shift in video stylization, moving away from computationally expensive motion estimation toward a more streamlined, difference-oriented approach. By achieving state-of-the-art stability and quality without the need for optical flow, this method makes high-quality video stylization accessible for real-time applications and resource-constrained environments. Future work may see this "loss of differences" applied to broader video processing tasks such as color grading and tonal stabilization.
Summary updated