manga-image-translator: OCR, Inpainting and Typesetting in One Pipeline
Translate manga/image 一键翻译各类图片内文字 https://cotrans.touhou.ai/ (no longer working)
At a glance
- What is it?
- A GPL-3.0 Python project that detects text in manga and image-board images, removes it, translates it, and renders it back. It is aimed at hobbyist readers, not at production localization workflows.
- Who is it for?
- Adopt it if you read untranslated Japanese or Chinese comics and want a local, scriptable pipeline, and if you accept that the project describes itself as early-stage with many shortcomings. Do not adopt it if you need a supported service: the homepage is marked as no longer working and the most recent release dates from 2022.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 58 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The problem it targets: untranslated images that will never get a publisher
The README states the goal directly: to translate images that are unlikely to be professionally translated, such as comics and images posted in group chats and image boards. The author frames the motivation personally, writing that the project makes it possible for Japanese novices like him to understand the content. That framing matters, because it sets the quality bar. This is not a tool for a localization house preparing a commercial volume. It is a tool for a reader who has an image in front of them and wants to know what it says.
The declared language coverage is Japanese as the main target, plus Simplified and Traditional Chinese, English, and around twenty minor languages. Beyond translation, the project also claims image repair (text removal) and typesetting. Those three capabilities in one pipeline are the actual selling point. An OCR library gives you text and coordinates. A translation API gives you a string. Neither one puts legible translated text back inside a speech bubble at the right size and angle. That last step is what this repository spends most of its code on.
Pipeline architecture: detector, OCR, translator, inpainter, renderer
The configuration file is organized into sections that map onto the stages: Render Options, Upscale Options, Translator Options, Detector Options, Inpainter Options, Colorizer Options, OCR Options, and Other Options. That list is the clearest available description of the data flow. An image enters, a detector locates text regions, an OCR stage reads the characters inside those regions, a translator converts the strings, an inpainter fills the original glyphs with plausible background, and the renderer draws the translated text back into the masked areas. Upscaling and colorization sit alongside as optional passes.
The detector is swappable, and the README's showcase images annotate which one produced the output. One example is captioned with the flag --detector ctd, another with --translator none, which shows that stages can be disabled individually. Setting the translator to none is useful if you only want the mask, for instance to feed the cleaned image into your own typesetting tool. The repository also exposes a glossary and a replacement dictionary, which are the two mechanisms for forcing specific terminology through the translation stage. A glossary constrains how terms are translated; the replacement dictionary performs string substitution. For manga with recurring character names or honorifics, those two files do more for output quality than swapping models will.
The project is described as v2 of an earlier effort called Qiú wén zhuǎn yì zhì. The README does not detail what changed between the two, so the migration story is not something I can describe from the supplied material.
Installation paths: pip/venv, Docker, and the Rust version
The README lists three installation routes. The recommended one is pip with a virtual environment, under the heading Using Pip/venv. There is a separate section titled Notes for Windows Users, which implies the Windows path needs extra steps that the Linux path does not. Docker is the second route, with sub-sections for running the web server, using an Nvidia GPU, using the tool as a CLI, and building the image locally. A third route is a Rust version, listed in the directory as Rust Version, though the README excerpt does not explain how it relates to the Python codebase.
Usage is split into four modes. Local (Batch) Mode processes files on disk. Web Mode runs a server, and the README distinguishes an Old UI from a New UI. API Mode exposes an HTTP interface with its own API Documentation section. Config-help Mode prints the available configuration, which is the fastest way to find out which keys your installed version actually understands, since the option surface is large and the README notes that the Web Mode options list is missing some basic options and still needs to be added.
The configuration file carries the per-stage settings, and the README separately documents a Language Code Reference, a Translator Reference, and a GPT Configuration Reference. That last one indicates that large language model backends are configurable as translators. Environment Variables Summary is a separate section, so some settings are expected to arrive through the environment rather than the config file. The homepage at cotrans.touhou.ai is explicitly marked as no longer working, so the hosted demo is not an option; installation is the only route.
Where it breaks down: model weight downloads, GPU memory, and the release gap
The most concrete limitation is visible in the metadata rather than the prose. The most recent release is beta-0.3, dated 2022-04-23. The README's own header says it was last updated 2025/05/10, and the repository's last push is 2026-07-20, so development has continued on the main branch without a tagged release for years. Anyone pinning to a release is pinning to something four years old. Anyone tracking main is tracking untagged code. The README acknowledges this state, stating that the project is still in the early stages of development and has many shortcomings.
The second limitation is resource cost. The pipeline runs multiple neural models in sequence, and the Docker instructions include a dedicated Nvidia GPU path, which tells you the intended execution environment. The detector, inpainter, and OCR components each load weights. On a CPU-only machine this is slow, and the README does not offer a lightweight mode. The showcase section also carries a caveat worth quoting in substance: the examples may not be frequently updated and may not represent the effect of the current main branch. In other words, the pictures on the README are not a reliable preview of what you will get.
Quality is the third constraint, and it is inherent to the task. Inpainting has to reconstruct background art behind removed text, and rendering has to fit a translated string into a bubble sized for the original language. Japanese to English typically expands the character count. The README's tips section on improving translation quality exists precisely because the default output is not always acceptable. If your source images have text over detailed artwork, or vertical Japanese that must become horizontal English, expect manual correction afterward.
How it compares with a general OCR plus translation workflow
The obvious alternative is to assemble the stages yourself: run an OCR engine to get text and bounding boxes, send the strings to a translation API, then erase and retype in an image editor or a script. That approach gives you full control over each step and lets you pick the best OCR for a given script. What it does not give you is the inpainting and rendering stages, which are the parts of this project that require trained models. Reconstructing a manga panel's line art and screentone behind removed text is not something a general-purpose image editor does well, and fitting translated text into an irregular bubble is fiddly manual work.
A second alternative is to hand the page to a multimodal model and ask for a translation. That is simpler to set up and often produces more natural prose, because the model sees the whole page. The trade-off runs the other way: you get text, not a typeset image, and you have no mask to inspect or reuse. This repository's --translator none flag is exactly the escape hatch for people who want the mask and the cleaned image but prefer to do the wording themselves. That is arguably its most defensible use case, independent of how good the built-in translators are.
A third comparison point is the earlier project this one replaces, MMDOCR-HighPerformance. The README identifies this repository as v2 of it but does not enumerate the differences, so I cannot say what was gained beyond the version bump.
Licence and the cost of keeping it running
The licence is GPL-3.0. That is a copyleft licence, and the practical consequence is that if you distribute a modified version, or distribute a larger work that incorporates this code, you are expected to release the corresponding source under the same terms. Running it locally for your own reading is a different situation from shipping it inside a product. I am not a lawyer and this is not legal advice; if you plan to redistribute anything built on this repository, read the licence text and get proper advice.
On maintenance cost, the material supports a few observations. The gap between the last tagged release in 2022 and the ongoing commits means you are effectively maintaining a checkout of main rather than tracking releases, and you should expect to resolve dependency drift yourself. The pipeline depends on downloaded model weights, and the README does not describe a versioning scheme for them, so a change in the code can require re-fetching weights. The configuration surface is broad enough that the README itself flags the Web Mode options documentation as incomplete, which means some settings are discoverable only by reading the code or by running config-help mode. Budget time for that, not just for the install.
Who should install this, and what to check first
The fit is narrow and clear. You read untranslated Japanese or Chinese comics and image-board posts, you have a machine with a capable GPU or the patience to wait on CPU, and you are comfortable running Python from a virtual environment or a Docker image. You want the mask and the inpainted image as much as the translated text, because you intend to touch up the result yourself. The glossary and replacement dictionary give you a way to enforce consistent naming, which matters across a multi-page chapter.
The misfit is equally clear. You need a supported online service: the homepage is marked as no longer working, so there is nothing to try without installing. You need release-tagged stability: the newest tag is beta-0.3 from April 2022. You need to embed this in a commercial product without dealing with GPL-3.0 obligations. Or you need accurate output with no manual pass, which the README's own tips section suggests is not the default.
Before you commit, run the config-help mode to enumerate the options your build actually accepts, since the README states the Web Mode option list is incomplete. Then confirm your chosen detector and translator backends load on your hardware, because the Docker documentation separates the Nvidia GPU path for a reason. Check the Language Code Reference against the language of your source images. Finally, read the GPL-3.0 text if distribution is anywhere in your plans, because that condition does not change with how well the pipeline performs.
Editorial conclusion
Adopt it if you read untranslated Japanese or Chinese comics and want a local, scriptable pipeline, and if you accept that the project describes itself as early-stage with many shortcomings. Do not adopt it if you need a supported service: the homepage is marked as no longer working and the most recent release dates from 2022. Before committing, run the config-help mode and confirm which detector, OCR and translator backends your machine can actually load, then check the GPL-3.0 terms against how you intend to distribute anything built on it.
Community notes