This is modified to be used in ImageTrans.
Installation:
- Install Python (version >= 3.8)
- Download the project: https://github.com/xulihang/manga-image-translator/archive/refs/heads/main.zip
- Install dependencies:
pip install -r requirements.txt
- Download the model files into the project's folder: detect.ckpt , ocr.ckpt, inpainting.ckpt
- Download and unzip the OCR CTC model into the same folder: ocr-ctc.zip. This OCR model supports Korean while the OCR model in the previous step only supports English, Chinese and Japanese. Its speed is also higher.
- Download the OCR 48px model and its dictionary into the same folder. This OCR model has a higher accuracy but requires GPU.
- Run the server:
python server.py
Test pages:
To use GPU for inference, you need to do the following:
- Install a Pytorch version with GPU support according to this.
- Create a new file named
use_cuda
in the root of the project to enable CUDA oruse_mps
to enable the GPU for Mac.
You can find the additional guide here: https://github.com/xulihang/ImageTrans_plugins/tree/master/mangaTranslatorOCR