Koharu is a desktop application for manga and comic translation, built with a Rust backend (Tauri) and a React/TypeScript frontend. It orchestrates a multi-stage ML pipeline: page import, layout detection (YOLO, RT-DETR), speech bubble segmentation, OCR (PP-OCR, Manga OCR), translation (local LLMs via llama.cpp or cloud APIs), and inpainting (LaMa, FLUX.2, AOT-GAN). The system includes a custom deep learning framework (`koharu-torch`) with inference-only ports of common vision models, a scene graph for versioned project state, and a WebGPU/WASM canvas for interactive editing. The application supports multiple hardware backends (CUDA, ROCm, Vulkan, Metal) and can run entirely offline. Architecturally, the project is a monorepo with over 30 Rust crates and two JavaScript packages. The backend is organized around clearly separated concerns: model inference (`koharu-ml`), pipeline orchestration (`koharu-pipeline`), project state (`koharu-scene`), persistent storage (`koharu-storage`), and rendering (`koharu-renderer`/`koharu-rasterizer`). The frontend provides an editor with panels for page management, canvas, inspection, and an AI agent panel that uses OpenAI's Codex protocol for tool-driven project editing. The translation subsystem abstracts over local and remote providers with a common prompt and schema interface. While the primary purpose is an application, the ML model implementations are notable for their fidelity to upstream Python references, including exact preprocessing (LetterBox padding, pixel normalization) and postprocessing (NMS, mask decoding). This makes the repository valuable as a reference for Rust ports of computer vision models. However, the codebase is tightly coupled to specific model architectures and pinned revisions, limiting direct reuse without significant adaptation. The UI component library (`packages/ui`) and several backend abstractions (e.g., configuration, storage format, runtime dependency graph) are designed for reusability and could be extracted with minimal effort.
This repository is a legacy Python desktop application for real-time screen and image (manga) translation built with PyQt5. It captures screen regions or loads images, performs OCR using online/offline/Baidu/PaddleOCR engines, translates text via multiple APIs (Youdao, Baidu, Tencent, Caiyun, ChatGPT, etc.), and displays results. The architecture is monolithic with heavy use of threading for background tasks, custom PyQt5 widgets (switches, progress bars), and SQLite for translation history. The codebase is Windows-centric, relies on external APIs and Selenium drivers, and is no longer actively maintained after a Go rewrite (v4.5.8+).