explaingit

dmmaze/ballonstranslator

4,784PythonAudience · generalComplexity · 3/5Setup · moderate

TLDR

A desktop app that automatically detects, erases, translates, and reinserts text in manga and comic pages, supporting multiple translation engines with manual editing tools for touch-ups.

Mindmap

mindmap
  root((BallonTranslator))
    What it does
      Manga translation
      Auto text detection
      Text erasure
      Text reinsertion
    Translation engines
      DeepL
      Sugoi offline
      Google Translate
      Caiyun Papago
    Manual tools
      Canvas paint mode
      Inpainting brush
      Text editor
      Find and replace
    Setup
      Windows installer
      Python source
      GPU recommended
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Automatically translate a folder of Japanese manga pages to English with a single button click.

USE CASE 2

Use the offline Sugoi engine to translate manga without an internet connection or API key.

USE CASE 3

Manually fix imperfect text erasure in a translated page using the built-in inpainting brush.

USE CASE 4

Export translated comic pages to Word documents for further editing or proofreading.

Tech stack

Python

Getting it running

Difficulty · moderate Time to first run · 30min

GPU with at least 4-6 GB VRAM recommended for acceptable speed, a pre-built Windows release is available.

In plain English

BallonTranslator is a desktop application for translating manga and comics. Given a folder of comic pages, it can automatically detect speech bubbles and text boxes, read the text, erase it from the image, run the translation, and then place the translated text back in the appropriate position. The whole process can be triggered with a single button click after you configure the source and target languages. The tool supports both Japanese manga and Western-style comics. The translation pipeline is made up of four independent steps: text detection, character recognition (OCR), background inpainting to cleanly remove the original text, and machine translation. Each step uses a separate model, and the end result tries to match the formatting of the original text, preserving things like font color, size, angle, and alignment. When translating into English or Chinese, layout adjustments are applied to help the translated text fit the bubble naturally. Several translation engines are supported, including DeepL, Sugoi (which works offline for Japanese-to-English), Caiyun, Papago, and Google Translate. Switching between engines is done through the settings panel. The tool also has manual editing modes: a canvas mode for painting over areas and an inpainting brush for fixing imperfect erasures, plus a text editor with basic formatting controls and find-and-replace across the whole document. Files can be imported and exported as Word documents. For Windows users, a pre-built release is available for download. Running from source requires Python and pip. GPU acceleration is supported if an Nvidia card is present, which the README recommends for acceptable processing speed. The GPU setup requires about 6 GB of video memory by default, with a setting to reduce that for cards with 4 GB. The project is primarily documented in Chinese, with README files in Russian, Japanese, and Indonesian also available. It builds heavily on a companion project called manga-image-translator, which provides several of the underlying detection, OCR, and inpainting models.

Copy-paste prompts

Prompt 1
How do I set up BallonTranslator on Windows to auto-translate a folder of manga pages from Japanese to English?
Prompt 2
How do I configure BallonTranslator to use the Sugoi offline translation engine instead of DeepL?
Prompt 3
What GPU VRAM is required to run BallonTranslator and how do I reduce memory usage for a 4 GB card?
Prompt 4
How do I use BallonTranslator's inpainting brush to manually fix poorly erased text on a translated manga page?
Open on GitHub → Explain another repo

← dmmaze on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.