TL;DR
Researchers have developed a two-stage neural network that erases scene text by focusing specifically on text strokes rather than entire bounding boxes. By training exclusively on a highly realistic, improved synthetic dataset, this model achieves state-of-the-art performance on real-world benchmarks, effectively bypassing the need for expensive, manually cleaned training data.
What Problem Does This Paper Address?
Scene text erasing—the process of removing text from an image and filling the gap with a plausible background—is vital for privacy (e.g., blurring license plates or addresses) and image editing. However, it faces a major "data bottleneck."
Training these models typically requires pairs of images: one with text and one where the text has been perfectly removed. Creating these "clean" ground-truth images manually is incredibly labor-intensive. While synthetic data exists, standard synthetic text often looks "fake" to a neural network, leading to poor performance when the model encounters real-world photos (a problem known as domain shift). Furthermore, many existing methods erase the entire rectangular area around a word, which destroys valuable background information and makes the inpainting task much harder.
Methods
The authors propose a word-level, two-stage pipeline that operates on cropped text images rather than the full scene.
The architecture consists of two primary modules:
- Stroke Mask Prediction Module (SMPM): Instead of erasing a whole box, this module predicts a pixel-level mask of the actual text strokes. By treating only the strokes as "holes" to be filled, the model preserves more of the original background.
- Background Inpainting Module (BIPM): This module fills the stroke-shaped holes. It utilizes Partial Convolutions (PConv), which are designed to ignore the "hole" pixels during the convolution process, and a Global Context (GC) block for self-attention, allowing the network to "borrow" textures from distant parts of the image to ensure a seamless fill.
Crucially, the authors also upgraded the Text Synthesis Engine. Their version adds realistic effects like 3D structures, shadows, Gaussian blur for out-of-focus text, and JPEG compression artifacts to make the synthetic training data nearly indistinguishable from real-world samples to the model.
Datasets
The model was trained on one million images generated by the authors' improved synthetic engine. For evaluation, they used three major benchmarks:
- SCUT-Syn: A synthetic dataset for text removal.
- ICDAR2013: A standard real-world scene text dataset.
- SCUT-EnsText: A large-scale, challenging real-world dataset containing over 3,500 images with diverse fonts and shapes.
Key Insights and Ideas
- Less is More: By predicting stroke-level masks instead of bounding boxes, the inpainting task becomes significantly easier because the "holes" are smaller and surrounded by more original context.
- Synthetic Superiority: The paper proves that a model trained only on high-quality synthetic data can outperform models trained on real-world data. The key is the "quality" of the synthesis—adding shadows and compression artifacts is more important than using real images if those real images lack perfect ground truths.
- Two-Step Controllability: By decoupling detection (finding the box) from erasing (finding the strokes and inpainting), the process becomes more controllable. Users can manually select boxes to erase, or the system can plug into existing high-performance text detectors like EAST or CRAFT.
Key Results
The proposed method significantly outperformed previous state-of-the-art (SOTA) models like EnsNet and EraseNet.
- Quantitative: On the SCUT-EnsText dataset, the model achieved a PSNR of 37.08 and an SSIM of 96.54%, higher than competing methods.
- Erasure Quality: To measure how well text was actually removed, they ran a standard text detector on the erased images. A lower "recall" means the detector couldn't find the text. Their method achieved a recall of 0% on ICDAR2013 when provided with bounding boxes, indicating near-perfect erasure.
Limitations and Future Work
Despite its success, the model has a few hurdles:
- Speed: The two-step pipeline (cropping, processing, and pasting) is slower than one-step end-to-end models.
- Edge Artifacts: Small text instances sometimes suffer from JPEG boundary artifacts, where the model struggles to distinguish between the text edge and the background.
- Complex Geometry: Highly stylized 3D text or text under extreme lighting conditions can still cause the stroke prediction to fail, leaving behind "ghosts" of the original characters.
Future work may involve optimizing the inference speed and further refining the synthetic engine to cover even more exotic text styles and lighting environments.
Summary updated