[简体中文](README.md) | English | [Русский](README_RU.md) | [日本語](README_JA.md)
[简体中文](README.md) | English | [Русский](README_RU.md) | [日本語](README_JA.md) | [Indonesia](README_ID.md)
Yet another computer-aided comic/manga translation tool powered by deep learning.
@@ -17,15 +17,14 @@ preview
- Improved manga->English, English->Chinese typesetting (based on the extraction of balloon regions.).
* Image editing
Support mask editing & inpainting (something like spot healing brush tool in PS)
- Support mask editing & inpainting (something like spot healing brush tool in PS)
- Adapted to images with extreme aspect ratio such as webtoons
* Text editing
- Support rich text formatting and text style presets, translated texts can be edited interactively.
- Support search & replace
- Support export/import to/from word documents
* Adapted to images with extreme aspect ratio such as webtoons
# Usage
Windows users can download Ballonstranslator-x.x.x-core.7z from [MEGA](https://mega.nz/folder/gmhmACoD#dkVlZ2nphOkU5-2ACb5dKw) or [Google Drive](https://drive.google.com/drive/folders/1uElIYRLNakJj-YS0Kd3r3HE-wzeEvrWd?usp=sharing)(note: you also need to download latest Ballonstranslator-1.3.xx from GitHub release and extract it to overwrite **Ballontranslator-1.3.0-core** or older installation to get the app updated.)
@@ -33,8 +32,6 @@ Windows users can download Ballonstranslator-x.x.x-core.7z from [MEGA](https://m
## Run the source code
```bash
# First, you need to have Python(<=3.9 ) installed on your system.
Download the **data** folder from [MEGA](https://mega.nz/folder/gmhmACoD#dkVlZ2nphOkU5-2ACb5dKw) or [Google Drive](https://drive.google.com/drive/folders/1uElIYRLNakJj-YS0Kd3r3HE-wzeEvrWd?usp=sharing) and move it into BallonsTranslator/ballontranslator, finally run
```bash
# For Linux or MacOS users, see [this script](https://github.com/dmMaze/BallonsTranslator/blob/master/ballontranslator/scripts/download_models.sh) and run to download ALL models
python ballontranslator
```
### Apple Silicon Mac native build .app application
# The packaged `BallonsTranslator.app` is in the `dist` folder
# Note that the app is not functional yet, you need to go to [MEGA](https://mega.nz/folder/gmhmACoD#dkVlZ2nphOkU5-2ACb5dKw) or [Google Drive](https://drive.google.com/drive/folders/1uElIYRLNakJj-YS0Kd3r3HE-wzeEvrWd?usp=sharing), download `data` and overwrite it to `BallonsTranslator.app/Contents/Resources/data`.
# When overwriting select "``Merge``, after the overwrite is done, the application is finally packaged and complete, out of the box, just drag the application to the macOS application folder, no need to configure the Python environment again.
# Or see [this script](https://github.com/dmMaze/BallonsTranslator/blob/master/ballontranslator/scripts/download_models.sh)
```
To use Sugoi translator(Japanese-English only), download [offline model](https://drive.google.com/drive/folders/1KnDlfUM9zbnYFTo6iCbnBaBKabXfnVJm), move "sugoi_translator" into the BallonsTranslator/ballontranslator/data/models.
@@ -61,7 +84,7 @@ To use Sugoi translator(Japanese-English only), download [offline model](https:/
**It is recommended to run the program in a terminal in case it crashed and left no information, see the following gif.**, Please select the desired translator and set the source and target languages the first time you run the application. Open a folder containing images that need translation, click the "Run" button and wait for the process to complete.
<imgsrc="doc/src/run.gif">
The font formats such as font size, color are determined by the program automatically in this process, you can predetermine those formats by change corresponding options from "decide by program" to "use global setting" in the config panel->Lettering.(global settings are those formats shown by the right font format panel when you are not editing any textblock in the scene)
The font formats such as font size and color are determined by the program automatically in this process, you can predetermine those formats by change corresponding options from "decide by program" to "use global setting" in the config panel->Lettering.(global settings are those formats shown by the right font format panel when you are not editing any textblock in the scene)
## Image editing
@@ -98,8 +121,9 @@ ocr & translate selected area
## Shortcuts
*```A```/```D``` or ```pageUp```/```Down``` to turn the page
*```Ctrl+Z```, ```Ctrl+Y``` to undo/redo most operations, note the undo stack will be cleared after you turn the page.
*```T``` to text-editting mode, (or the "T" button on the bottom toolbar) press W to activate text block creating mode, then drag the mouse on the canvas with the right button clicked to add a new text block. (see the text editing gif)
*```Ctrl+Z```, ```Ctrl+Shift+Z``` to undo/redo most operations. (note the undo stack will be cleared after you turn the page)
*```T``` to text-editting mode (or the "T" button on the bottom toolbar).
*```W``` to activate text block creating mode, then drag the mouse on the canvas with the right button clicked to add a new text block. (see the text editing gif)
*```P``` to image-editting mode.
* In the image editing mode, use the slider on the right bottom to control the original image transparency.
* The "OCR" and "A" button in the bottom toolbar controls whether to enable OCR and translation, if you disable them, the program will only do the text detection and removal.
@@ -124,19 +148,19 @@ Support English and Japanese text detection, training code and more details can
## OCR
* mit_32px text recognition model is from manga-image-translator, support English and Japanese recognition and text color extraction.
* mit_48px text recognition model is from manga-image-translator, support English, Japanese and Korean recognition and text color extraction.
*[manga_ocr](https://github.com/kha-white/manga-ocr) is from [kha-white](https://github.com/kha-white),
*[manga_ocr](https://github.com/kha-white/manga-ocr) is from [kha-white](https://github.com/kha-white), text recognition for Japanese, with the main focus being Japanese manga.
## Inpainting
* AOT is from manga-image-translator
*patchmatch is a non-dl algrithom from [PyPatchMatch](https://github.com/vacancy/PyPatchMatch), this program use a [modified version](https://github.com/dmMaze/PyPatchMatchInpaint) by me.
* AOT is from manga-image-translator.
*PatchMatch is an algorithm from [PyPatchMatch](https://github.com/vacancy/PyPatchMatch), this program use a [modified version](https://github.com/dmMaze/PyPatchMatchInpaint) by me. (Adobe uses this algorithm)
## Translators
*<s> Please change the goolge translator url from *.cn to *.com if you are not blocked by GFW. </s> Google shuts down translate service in China, please set corresponding 'url' in config panel to *.com.
* Caiyun translator need to require a [token](https://dashboard.caiyunapp.com/)
To add a new translator, please reference [how_to_add_new_translator](doc/how_to_add_new_translator.md), it is simple as subclass a BaseClass and implementing two interfaces, then you can use it in the application, you are welcome to contribute to the project.
[简体中文](README.md) | [English](README_EN.md) | [Русский](README_RU.md) | [日本語](README_JA.md) | Indonesia
Sebuah aplikasi penerjemahan komik/manga yang dibantu oleh deep learning.
<imgsrc="doc/src/ui0.jpg"divalign=center>
<palign=center>
pratinjau
</p>
# Fitur
* Terjemahan otomatis
- Mendukung pendeteksian, pengenalan, penghapusan, dan penerjemahan teks secara otomatis, performa keseluruhan bergantung pada modul-modul ini.
- Peletakkan kata-kata berdasarkan perkiraan letak teks aslinya.
- Mendukung format manga dan komik.
- Typesetting optimal untuk manga->bahasa Inggris, bahasa Inggris->Mandarin (berdasarkan ekstraksi daerah balon.).
* Pengeditan gambar
- Mendukung pengeditan mask & inpainting (seperti alat content aware fill di PS)
- Mendukung gambar dengan rasio aspek ekstrim seperti webtoon
* Pengeditan teks
- Mendukung format rich text dan style teks, teks yang diterjemahkan dapat diedit secara langsung.
- Mendukung pencarian & penggantian kata
- Mendukung ekspor/impor ke/dari dokumen word
# Usage
Pengguna Windows dapat unduh Ballonstranslator-x.x.x-core.7z di [MEGA](https://mega.nz/folder/gmhmACoD#dkVlZ2nphOkU5-2ACb5dKw) atau [Google Drive](https://drive.google.com/drive/folders/1uElIYRLNakJj-YS0Kd3r3HE-wzeEvrWd?usp=sharing)(catatan: Anda juga perlu mengunduh Ballonstranslator-1.3.xx terbaru di rilis GitHub mengekstraknya untuk menimpa **Ballontranslator-1.3.0-core** atau instalasi yang lebih lama agar aplikasi dapat diperbarui.)
Unduhlah folder **data** dari [MEGA](https://mega.nz/folder/gmhmACoD#dkVlZ2nphOkU5-2ACb5dKw) atau [Google Drive](https://drive.google.com/drive/folders/1uElIYRLNakJj-YS0Kd3r3HE-wzeEvrWd?usp=sharing) dan pindahkan ke dalam BallonsTranslator/ballontranslator, akhirnya jalankan
```bash
# Untuk pengguna Linux atau MacOS, lihat [skrip ini] (https://github.com/dmMaze/BallonsTranslator/blob/master/ballontranslator/scripts/download_models.sh) dan jalankan untuk mengunduh SEMUA model
python ballontranslator
```
Untuk menggunakan Sugoi translator (hanya bahasa Jepang-Inggris), unduh [offline model](https://drive.google.com/drive/folders/1KnDlfUM9zbnYFTo6iCbnBaBKabXfnVJm), pindahkan "sugoi_translator" ke dalam BallonsTranslator/ballontranslator/data/models.
## Penerjemahan sepenuhnya otomatis
**Disarankan untuk menjalankan program di terminal jika program ini mendadak berhenti dan tidak meninggalkan informasi, lihat gif berikut ini**, Pilih penerjemah yang diinginkan dan atur bahasa sumber dan target saat pertama kali menjalankan aplikasi. Buka folder yang berisi gambar-gambar yang mau diterjemahkan, klik tombol "Run" dan tunggu hingga proses selesai.
<imgsrc="doc/src/run.gif">
Format font seperti ukuran font dan warna ditentukan oleh program secara otomatis dalam proses ini, Anda dapat menentukan format tersebut sebelum memulai proses dengan mengubah opsi yang sesuai dari "decide by program" menjadi "use global setting" di panel konfigurasi->Lettering. (pengaturan global adalah format yang ditampilkan oleh panel format font yang tepat ketika Anda tidak mengedit blok teks apa pun di adegan)
## Image editing
### inpaint tool
<imgsrc="doc/src/imgedit_inpaint.gif">
<palign = "center">
Mode pengeditan gambar, alat inpainting
</p>
### rect tool
<imgsrc="doc/src/rect_tool.gif">
<palign = "center">
Alat rect
</p>
Untuk 'menghapus' hasil inpainting yang tidak diinginkan, gunakan alat inpainting atau alat rect dengan menekan **tombol kanan**.
Hasilnya tergantung pada seberapa akurat algoritme ("metode 1" dan "metode 2" dalam gif) mengekstrak mask dari teks. Ini berjalan lebih buruk pada teks & latar belakang yang kompleks.
pemformatan kumpulan tata letak teks secara otomatis
</p>
<imgsrc="doc/src/ocrselected.gif"divalign=center>
<palign=center>
pengenalan kata & menerjemahkan area yang dipilih
</p>
## Shortcuts
*```A```/```D``` atau ```pageUp```/```Down``` untuk pindah halaman.
*```Ctrl+Z```, ```Ctrl+Shift+Z``` untuk undo/redo.(catatan: sejarah undo akan dihapus setelah pindah halaman)
*```T``` untuk masuk mode text-editting (atau tombol "T" di toolbar bagian bawah).
*```W``` untuk masuk mode pembuatan text block, lalu seret mouse dengan diklik tombol kanan pada kanvas untuk menambahkan blok teks baru. (lihat gif pengeditan teks)
*```P``` untuk mode edit gambar.
* Di mode edit gambar, gunakan penggeser di bagian kanan bawah untuk mengontrol transparansi gambar asli.
* Tombol "OCR" dan "A" di toolbar bagian bawah dapat mengaktifkan OCR dan penerjemahan, jika Anda menonaktifkannya, program hanya akan melakukan deteksi dan penghapusan teks.
* Mengatur parameter modul otomatis di panel konfigurasi.
*```Ctrl++```/```Ctrl+-``` untuk mengubah ukuran gambar
*```Ctrl+G```/```Ctrl+F``` untuk mencari secara global/dalam halaman saat ini.
<imgsrc="doc/src/configpanel.png">
# Modul otomasi
Proyek ini sangat bergantung pada [manga-image-translator](https://github.com/zyddnys/manga-image-translator), layanan online dan pelatihan model tidaklah murah, mohon pertimbangkan untuk menyumbangkan proyek ini:
- Ko-fi: <https://ko-fi.com/voilelabs>
- Patreon: <https://www.patreon.com/voilelabs>
- 爱发电: <https://afdian.net/@voilelabs>
Sugoi translator dibuat oleh [mingshiba](https://www.patreon.com/mingshiba).
## Deteksi teks
Deteksi teks bahasa Inggris dan Jepang, kode pelatihan, dan rincian lebih lanjut dapat ditemukan di [comic-text-detector](https://github.com/dmMaze/comic-text-detector)
## OCR
* Model pengenalan teks mit_32px berasal dari manga-image-translator, mendukung pengenalan teks bahasa Inggris dan Jepang dan warna teks.
* Model pengenalan teks mit_48px berasal dari manga-image-translator, mendukung pengenalan teks bahasa Inggris, Jepang, dan Korea serta warna teks.
* [manga_ocr] (https://github.com/kha-white/manga-ocr) berasal dari [kha-white] (https://github.com/kha-white), pengenalan untuk teks bahasa Jepang, dengan fokus utama manga Jepang.
## Inpainting
* AOT berasal dari manga-image-translator.
* patchmatch adalah sebuah algoritma dari [PyPatchMatch](https://github.com/vacancy/PyPatchMatch), program ini menggunakan [versi dimodifikasi](https://github.com/dmMaze/PyPatchMatchInpaint) dari saya.
## Penerjemah
*<s> Harap ubah url penerjemah goolge dari *.cn ke *.com jika Anda tidak diblokir oleh GFW. </s> Google mematikan layanan terjemahan di Cina, harap setel 'url' yang sesuai di panel konfigurasi ke *.com.
* Penerjemah Caiyun perlu memerlukan [token] (https://dashboard.caiyunapp.com/).
Untuk menambahkan penerjemah baru, silakan lihat [how_to_add_new_translator](doc/how_to_add_new_translator.md), caranya mudah, cukup dengan membuat subclass dari BaseClass dan mengimplementasikan dua interface, kemudian Anda bisa menggunakannya di dalam aplikasi, Anda dipersilakan untuk berkontribusi pada proyek ini.
## Hal lain
* Jika komputer Anda memiliki GPU Nvidia, program ini akan mengaktifkan akselerasi cuda untuk semua model secara default dan membutuhkan sekitar 6G memori GPU, Anda dapat menurunkan inpaint_size pada panel konfigurasi untuk menghindari OOM.
* Terima kasih kepada [bropines] (https://github.com/bropines) untuk lokalisasi bahasa Rusia.
* Menambahkan [saladict](https://saladict.crimx.com)(*Kamus pop-up dan penerjemah halaman profesional lengkap*) di menu mini ketika pilih teks. [Panduan instalasi](doc/saladict.md)