Removing subtitles from video is a deceptively complex task. Unlike static image inpainting, video subtitle removal requires handling semi-transparent fonts, motion blur, and temporal consistency—all while attempting to reconstruct the dynamic background hidden behind the text. Traditionally, this has required a cumbersome two-step pipeline: first, an external model detects and masks the text, and second, an inpainting model fills the resulting holes.
A new paper, CLEAR (Context-aware Learning for End-to-end Adaptive subtitle Removal), proposes a paradigm shift. By internalizing the masking logic directly into a diffusion model’s attention mechanism, the authors have created a system that removes subtitles in a single, mask-free forward pass.
The Bottlenecks of Traditional Subtitle Removal
Existing diffusion-based video editing tools face three major hurdles when tackling subtitle removal:
- Annotation Dependency: Most models require dense, frame-by-frame manual mask annotations for training, which are prohibitively expensive and time-consuming to produce.
- Inference Fragility: At runtime, these models typically rely on an external text detector (like OCR) to generate a mask. If the detector misses a frame or jitters, the resulting video suffers from flickering or "ghost" artifacts.
- Static Priors: Current methods often treat the mask as a hard binary (text vs. no-text). This rigid approach fails to adapt to semi-transparent subtitles or complex, shifting background dynamics.
CLEAR addresses these issues by introducing a truly end-to-end system that accepts a subtitled video and outputs a clean one—no external masks attached.
The CLEAR Framework: A Two-Stage Innovation
The CLEAR framework utilizes a clever two-stage design to decouple the process of finding the text from fixing the video.
Stage I: Self-Supervised Prior Learning
To eliminate the need for manual labeling, the authors leveraged pairs of subtitled and clean videos. By calculating the pixel differences between them, they generated "noisy pseudo-labels." The system then employs dual encoders—one for subtitles and one for background content—enforced by orthogonality constraints. This essentially forces the model to learn the fundamental statistical differences that make a subtitle distinct from its background.
Stage II: Adaptive Weighting via LoRA
Rather than fine-tuning a massive 14-billion-parameter video diffusion model (Wan2.1), the researchers utilized LoRA (Low-Rank Adaptation). They introduced a lightweight "occlusion head" (comprising only 2.1M parameters) that predicts adaptive weights instead of a binary mask.
The Breakthrough: During training, these weights instruct the diffusion model on where to focus its generative power. Crucially, during inference, this weighting mechanism is entirely absorbed into the LoRA-augmented attention maps. The model inherently "knows" where the subtitles are based on extracted internal features, completely eliminating the need for an external mask.
Datasets and Zero-Shot Generalization
The model was trained on a massive dataset of over 160,000 pairs of subtitled and clean videos, primarily featuring Chinese fonts of various styles and sizes.
However, because Stage I focuses on abstract "occlusion patterns" rather than specific character recognition, the model is remarkably language-agnostic. In cross-lingual testing, CLEAR successfully removed English, Korean, French, Japanese, Russian, and German subtitles—none of which were seen during training—demonstrating powerful zero-shot generalization.
Key Results and Performance
CLEAR sets a new benchmark for video text removal, particularly in visual fidelity and temporal consistency:
- Quantitative Superiority: On Chinese subtitle benchmarks, CLEAR outperformed the leading baseline (Minimax-Remover) by +6.77 dB PSNR and reduced the Video Frechet Inception Distance (VFID) by 74.7%, indicating vastly superior perceptual quality.
- Temporal Stability: The model achieved a 93.0% reduction in Flow Variance, ensuring that inpainted areas remain stable and flicker-free as the video plays.
- Parameter Efficiency: Remarkably, CLEAR achieves these state-of-the-art results while training only 0.77% of the base model's parameters.
Limitations and Future Work
While CLEAR represents a massive step forward, the authors note a few areas for future refinement:
- Inference Speed: At 4.86 seconds per frame, the model is competitive with other diffusion-based methods but remains far from real-time processing. It is currently best suited for post-production rather than live broadcasting.
- Scope of Application: The current architecture is specialized for text-like occlusions. While the mask-free logic should theoretically apply to logos or watermarks, further adaptation is needed for general video object removal.
Future directions will likely explore real-time optimization and the extension of this adaptive, mask-free framework to a broader range of video editing tasks.
Summary updated