# What Shape Is Optimal for Masks in Text Removal?

arXiv: https://arxiv.org/abs/2511.22499 · HTML: https://mlsanity.com/paper/2511.22499/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 23 of its 48 references that are in the map.
- First posted on arXiv 27 Nov 2025.

## Builds on (most cited first, 23 of 23)

- [Optuna: A Next-generation Hyperparameter Optimization Framework](https://mlsanity.com/paper/1907.10902/) (2019)
- [RePaint: Inpainting using Denoising Diffusion Probabilistic Models](https://mlsanity.com/paper/2201.09865/) (2022)
- [Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data](https://mlsanity.com/paper/2107.10833/) (2021)
- [Generative Image Inpainting with Contextual Attention](https://mlsanity.com/paper/1801.07892/) (2018)
- [Image Inpainting for Irregular Holes Using Partial Convolutions](https://mlsanity.com/paper/1804.07723/) (2018)
- [Rethinking FID: Towards a Better Evaluation Metric for Image Generation](https://mlsanity.com/paper/2401.09603/) (2023)
- [BrushNet: A Plug-and-Play Image Inpainting Model with Decomposed Dual-Branch Diffusion](https://mlsanity.com/paper/2403.06976/) (2024)
- [OCRBench v2: An Improved Benchmark for Evaluating Large Multimodal Models on Visual Text Localization and Reasoning](https://mlsanity.com/paper/2501.00321/) (2024)
- [Image inpainting: A review](https://mlsanity.com/paper/1909.06399/) (2019)
- [Review of Large Vision Models and Visual Prompt Engineering](https://mlsanity.com/paper/2307.00855/) (2023)
- [Recent Advances in Bayesian Optimization](https://mlsanity.com/paper/2206.03301/) (2022)
- [Visual Prompting in Multimodal Large Language Models: A Survey](https://mlsanity.com/paper/2409.15310/) (2024)
- [MTRNet: A Generic Scene Text Eraser](https://mlsanity.com/paper/1903.04092/) (2019)
- [EnsNet: Ensconce Text in the Wild](https://mlsanity.com/paper/1812.00723/) (2018)
- [Scene Text Eraser](https://mlsanity.com/paper/1705.02772/) (2017)
- [MTRNet++: One-stage Mask-based Scene Text Eraser](https://mlsanity.com/paper/1912.07183/) (2019)
- [Stroke-Based Scene Text Erasing Using Synthetic Data for Training](https://mlsanity.com/paper/2104.11493/) (2021)
- [Scene text removal via cascaded text stroke detection and erasing](https://mlsanity.com/paper/2011.09768/) (2020)
- [Don't Forget Me: Accurate Background Recovery for Text Removal via Modeling Local-Global Context](https://mlsanity.com/paper/2207.10273/) (2022)
- [FETNet: Feature Erasing and Transferring Network for Scene Text Removal](https://mlsanity.com/paper/2306.09593/) (2023)
- [syftr: Pareto-Optimal Generative AI](https://mlsanity.com/paper/2505.20266/) (2025)
- [DiffSTR: Controlled Diffusion Models for Scene Text Removal](https://mlsanity.com/paper/2410.21721/) (2024)
- [Robustness of Structured Data Extraction from Perspectively Distorted Documents](https://mlsanity.com/paper/2511.17607/) (2025)

## Abstract (arXiv)

The advent of generative models has dramatically improved the accuracy of image inpainting. In particular, by removing specific text from document images, reconstructing original images is extremely important for industrial applications. However, most existing methods of text removal focus on deleting simple scene text which appears in images captured by a camera in an outdoor environment. There is little research dedicated to complex and practical images with dense text. Therefore, we created benchmark data for text removal from images including a large amount of text. From the data, we found that text-removal performance becomes vulnerable against mask profile perturbation. Thus, for practical text-removal tasks, precise tuning of the mask shape is essential. This study developed a method to model highly flexible mask profiles and learn their parameters using Bayesian optimization. The resulting profiles were found to be character-wise masks. It was also found that the minimum cover of a text region is not optimal. Our research is expected to pave the way for a user-friendly guideline for manual masking.
