TL;DR
The Sketch-Aware Interpolation Network (SAIN) is a novel deep learning framework designed to automate the labor-intensive process of 2D animation sketch inbetweening. By integrating multi-level guidance—spanning pixel-level dynamics, stroke-level tracking, and region-level correspondence—within a multi-stream U-Transformer architecture, SAIN synthesizes high-quality intermediate sketch frames that preserve fine details and handle large, non-linear motions.
What Problem Does This Paper Address?
In traditional hand-drawn 2D animation, artists create keyframes to define the core poses of a sequence. The intermediate frames, known as "inbetweens," must then be meticulously drawn to ensure smooth, lifelike motion transitions. This process is incredibly time-consuming and labor-intensive.
While automatic frame interpolation has advanced rapidly for natural videos and full-color animations, it struggles significantly with raw animation sketches due to two main challenges:
- Sparsity and Lack of Texture: Sketches consist of sparse black lines on a plain background. Traditional optical flow algorithms rely heavily on texture and color gradients, which are absent in grayscale sketches, leading to broken strokes or severe blurriness.
- Exaggerated Motion: Animation often features highly non-linear, rapid, and dramatic changes between keyframes, causing standard frame interpolation methods to produce distorted or completely missing features.
Methods
To overcome these limitations, the authors introduce SAIN, which explicitly models the unique structural properties of sketches through a three-pronged, multi-level guidance strategy:
- Pixel-Level Motion Dynamics: A bi-directional optical flow estimator calculates the general pixel-wise motion between keyframes, providing a baseline warped frame that preserves global continuity.
- Stroke-Level Correspondence: To prevent broken lines, the network identifies salient points along the sketch strokes (using SuperPoint) and matches them across keyframes (using SuperGlue). A linear tracking mechanism then estimates the intermediate paths of individual strokes.
- Region-Level Correspondence: Sketches naturally form enclosed areas. SAIN segments these regions using a trapped-ball algorithm, extracts regional CNN features, and aggregates regional optical flows to ensure the boundaries of closed shapes remain coherent.
These three information streams are processed by a Multi-Stream U-Transformer architecture composed of two novel attention blocks:
- Convolution and Self-Attention Blocks (CSB): Captures global frame-level context by treating fused multi-level features equally.
- Convolution and Cross-Attention Blocks (CCB): Uses dual forward and backward streams where stroke-level patterns act as keys and values, while pixel- and region-level dynamics serve as queries. This allows the network to explicitly align structural lines during synthesis.
Finally, a multi-stream fusion module combines the outputs via a series of convolutions, optimized using a combination of $\ell_1$ reconstruction loss and LPIPS perceptual loss.
Datasets
Due to a lack of public benchmarks for raw sketch interpolation, the authors created a new large-scale dataset:
- STD-12K (Sketch Triplet Dataset-12K): Extracted from 30 traditional 2D animation movies, totaling over 25 hours of video across diverse artistic styles. The color frames were processed using contour detection (Sketch Keras) and simplified to remove noise, leaving clean, realistic sketch triplets.
For cross-dataset validation and to test generalization, the authors also evaluated their model on the existing AnimeRun dataset.
Key Insights and Ideas
- Holistic Multi-Scale Alignment: The core "aha moment" is that sketches cannot be treated merely as sparse images or simple vector lines. By combining pixel, stroke, and region data, the network balances global motion continuity with local line preservation.
- Cross-Attention for Structural Integrity: Using stroke coordinates as keys/values in the cross-attention mechanism forces the transformer to focus on where the lines should go, effectively bridging the gap caused by large spatial displacements between keyframes.
- Bypassing Vectorization: Unlike stroke-based methods that require clean vector graphics (which are notoriously difficult to automate reliably from hand-drawn art), SAIN operates directly on bitmap images, making it much easier to integrate into existing digital animation pipelines.
Key Results
SAIN was evaluated against a wide array of state-of-the-art methods, including stroke-based (AnimeInbet), image-based sketch (LDFI), animation-specific (EISAI), and general video interpolation models (RIFE, VFIformer, DQBC).
Quantitative Performance (on STD-12K): * PSNR: Achieved 20.32 dB, outperforming the best video baseline (VFIformer at 19.05 dB) and animation baseline (EISAI at 19.07 dB). * Chamfer Distance (CD): Achieved a remarkably low score of 1.54 (scaled by $1e4$), proving that the generated lines closely match the geometric distribution of the ground truth.
Qualitatively, SAIN consistently generates clean, continuous lines and preserves intricate details (such as facial features and hair outlines) where other methods introduce severe distortion, phantom strokes, or blank spaces.
Limitations and Future Work
Despite its strong performance, SAIN has a few limitations:
- Dependency on Pre-processing: The quality of the interpolation relies heavily on the initial accuracy of the SuperPoint/SuperGlue stroke matching and the region segmentation modules.
- Linear Assumption: The current stroke tracking mechanism assumes a linear path between keyframes, which can lead to inaccuracies for complex, highly curved, or extremely exaggerated motions.
- Freestyle Sketches: The model is trained on relatively clean, simplified lines and may struggle with rough, sketchy, or poorly drawn draft frames.
Future work will focus on developing a fully learnable, non-linear stroke correspondence scheme to better handle extreme animation physics.
Summary updated