Abstract
Traditional Neural Style Transfer (NST) methods apply artistic styles globally, often distorting critical background information and compromising text legibility. This paper introduces "Selective Style Transfer," a method designed to stylize text within an image while keeping the surrounding scene intact. By employing two distinct architectures—a modular two-stage pipeline and an end-to-end distillation model—the authors demonstrate that this technique can serve as a powerful data augmentation tool, yielding a 2-4% performance boost in state-of-the-art scene text detectors.
Introduction
Neural Style Transfer has revolutionized image editing, but its application to text-heavy scenes remains challenging. Standard NST lacks spatial control, leading to two primary issues: global distortion of non-text elements and the loss of text legibility. For text, "content" is synonymous with transcription; if a style transfer makes a word unreadable, it fails. The authors propose a selective approach to isolate and stylize text regions independently, which is particularly valuable for augmenting scarce annotated datasets for scene text detection.
Proposed Architectures
Two-Stage Modular Pipeline
The first approach is a modular pipeline that separates text detection from stylization. A standard NST network stylizes the entire image, while a pre-trained text detector (TextFCN) generates a probability mask for text regions. The final output is created by blending the stylized text back into the original background using this mask.
End-to-End Distillation
The second, more novel architecture uses knowledge distillation to learn spatial control implicitly. A "Teacher" network (a pre-trained style transfer model) provides stylization targets, while a "Student" network is trained to match these targets only within ground-truth text regions. By using a weighted Mean Squared Error (MSE) loss that prioritizes text pixels, the Student model learns to apply style selectively without requiring a detector at inference time.
Experimental Results
The models were evaluated on diverse datasets, including COCO-Text, ICDAR 2013/2015, and the IAM handwriting dataset. The primary metric was the impact on scene text detection using the EAST detector.
- Performance Gains: Integrating style-transferred augmentations consistently improved F-scores by 2% to 4%.
- ICDAR 2015: The F-score increased from 78.74% to 81.83% when the training set was augmented with four stylized versions of each image.
- Cross-Domain Transfer: The system successfully transferred complex real-world styles (e.g., weathered signs) onto clean, machine-printed text, effectively bridging the domain gap between synthetic and real-world data.
Discussion and Conclusion
While effective for printed text, the method faces challenges with the fine-grained strokes of handwriting, which can lead to blurriness. Additionally, extreme styles can occasionally compromise legibility. Despite these limitations, selective style transfer offers a robust path for data augmentation and potential real-time applications in Augmented Reality, where signs could be translated and restyled to match their original environment.
Summary updated