January 1, 2025
Manga Text Removal.
AutomationA Python-based image processing tool designed to remove text from manga panels and images using OCR and computer vision techniques.

Description
Manga Text Removal is a Python-based image processing tool that automatically removes text from manga panels and other images using OCR and computer vision techniques. It combines text detection with image reconstruction to clean text regions while preserving the surrounding artwork.
The tool offers multiple removal approaches so you can choose between a fast, clean edit and a more natural-looking restoration depending on the panel and the desired output quality.
Background
Manually erasing text from manga panels for translation, redrawing, or cleanup is slow and repetitive. This project was built to automate the detection-and-erase step so that cleaning a page becomes a scripted workflow instead of a frame-by-frame manual edit.
Goal
- Detect text regions in manga images automatically.
- Remove or reconstruct those regions with minimal manual work.
- Support batch processing across multiple images and formats.
Features
- Automatic text detection using OCR
- White background replacement method for clean panel edits
- Inpainting-based text reconstruction for natural results
- OpenCV image processing workflow
- Support for multiple image formats and batch processing
- Adjustable text detection regions
- Easy customization and extension
Technologies
- Python — core language driving the processing pipeline.
- OpenCV — image loading, masking, and inpainting operations.
- pytesseract — OCR engine wrapper for detecting text regions.
- NumPy — array manipulation for pixel-level processing.
How to Run
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Requires the Tesseract OCR binary installed on your system
python main.py
Technical Decisions
- Used pytesseract for text detection to avoid training a custom model while still locating text reliably.
- Provided two removal strategies — white masking for speed and OpenCV inpainting for quality — so the output can match the use case.
- Kept the architecture lightweight and script-based to make it easy to extend or plug into a larger pipeline.
What I Learned
- Practical OCR region detection and its limitations on stylized manga fonts.
- How OpenCV inpainting reconstructs pixels from surrounding context.
- Structuring a reusable image-processing pipeline in Python.
Notes
Works best on clean panels with clear text bounding regions; complex overlapping art may need manual touch-up. Future ideas include smarter mask refinement and deep-learning-based text detection.

Hey! I’m Fanny, the software engineer tending to this digital garden. You can read more about me, or subscribe by email.