A web application for translating manga panels and pages automatically. The app uses computer vision and machine learning to detect text in manga images, translate it, and overlay the translations back onto the original image.
- Upload manga panels or pages
- Automatic text detection and extraction
- Automatic translation using DeepL API
- Text segmentation to separate text from background
- Manual editing of translations
- Multiple view modes (original, text-only, translated)
- Download translated images
- Python Flask for RESTful API
- MangaOCR for OCR
- DeepL for translation
- SickZil-Machine for text segmentation
- Pillow for image processing
- React with TypeScript
- Vite for fast development
- Mantine UI component library
- React Router for navigation
- Axios for API communication
manga-translator/
├── backend/
│ ├── app.py # Flask API server
│ ├── simplified_app.py # Simplified version (no SickZil-Machine)
│ ├── main.py # Original manga translation logic
│ ├── ocr.py # OCR functionality
│ ├── typesetting.py # Text overlay functionality
│ ├── image_processing/ # Image processing modules
│ ├── translation/ # Translation modules
│ └── requirements.txt # Python dependencies
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Application pages/views
│ │ ├── services/ # API client services
│ │ └── App.tsx # Main application component
│ ├── package.json # Node dependencies
│ └── vite.config.ts # Vite configuration
└── output/ # Output directory for processed images
- Python 3.8+
- Node.js 16+
- API keys for DeepL and OpenAI (add to a .env file)
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
cd backend pip install -r requirements.txt -
Create a
.envfile in the backend directory with your API keys:DEEPL_KEY=your_deepl_api_key -
Run the backend:
Standard version (requires SickZil-Machine setup):
python app.py
-
Install dependencies:
cd frontend npm install -
Run the development server:
npm run dev -
Open your browser and navigate to
http://localhost:5173
If you encounter errors related to SickZil-Machine:
-
Install the correct TensorFlow version:
pip install tensorflow==1.15.0 -
Check if you have the required model files:
cd backend python fix_models.py -
Alternatively, use the simplified backend:
python simplified_app.py
Use the provided test scripts to check each component:
python test_translation.py # Test translation functionality
python test_core_functions.py # Test all core functions
- Upload a manga image using the home page
- Wait for the processing to complete
- View and edit translations in the editor
- Download the final translated image
MIT