A Flutter application that automatically processes and translates Korean webtoon/manga content by extracting images from web pages, performing OCR text recognition, and translating the text using AI services.
The Scan Generator is designed to automate the process of translating Korean webtoons and manga by:
- Web Scraping: Extracting image URLs from Korean webtoon platforms (Naver, Toomics)
- Image Processing: Downloading and processing comic page images
- Text Recognition: Using Google ML Kit to detect and extract Korean text from speech bubbles
- AI Translation: Translating Korean text to English using ChatGPT and DeepL APIs
- Image Reconstruction: Replacing original Korean text with English translations while maintaining visual quality
- Batch Processing: Automatically handling multiple pages and chapters
- Automatic Image Detection: Finds and downloads images from supported webtoon platforms
- Split Bubble Detection: Intelligently detects and handles split speech bubbles across page boundaries
- Image Optimization: Converts and optimizes images for processing
- Korean OCR: Uses Google ML Kit for accurate Korean text recognition
- Speech Bubble Detection: Automatically identifies and processes text within speech bubbles
- Text Merging: Intelligently combines split text blocks for better translation context
- Dual Translation Services:
- ChatGPT: Context-aware translations with conversation understanding
- DeepL: High-quality direct translations as fallback
- Context Preservation: Maintains story context across multiple pages
- Smart Caching: Caches translations to avoid redundant API calls
- Bubble Recreation: Automatically creates new speech bubbles for translated text
- Font Management: Supports multiple custom fonts for different text styles
- Layout Preservation: Maintains original comic layout and visual flow
- Ticket-Based Processing: Queue-based system for handling multiple translation jobs
- Batch Operations: Processes multiple pages efficiently
- Progress Tracking: Real-time progress monitoring and logging
ImageService: Handles image processing, OCR, and translationScanService: Manages translation tickets and batch processingHttpService: Handles API communications and file downloadsCacheService: Manages translation caching and file storage
- Naver Webtoon:
image-comic.pstatic.net - Toomics:
toon.toomics.com
- OpenAI ChatGPT: Primary translation service with context awareness
- DeepL API: Secondary translation service for direct translations
- Flutter SDK (>=2.18.4)
- Android Studio / Xcode for mobile development
- API keys for ChatGPT and DeepL services
- Clone the repository
- Install dependencies:
flutter pub get
- Configure API keys in the service files
- Run the application:
flutter run
Update the following with your API keys:
- ChatGPT API Key: In
ImageService._translateWithChatGpt() - DeepL API Key: In
ImageService._translateWithDeepL()
- Android: Full functionality with native performance
- iOS: Full functionality with native performance
- Web: Limited functionality (webview restrictions)
- Desktop: Windows, macOS, Linux support
google_ml_kit: Text recognition and OCRflutter_inappwebview: Web content renderingimage: Image processing and manipulationhttp: API communicationsflutter_bloc: State managementpath_provider: File system accessflutter_cache_manager: Caching system
- Google ML Kit: Korean text recognition
- OpenAI API: Context-aware translation
- DeepL API: High-quality translation
- Custom Backend: Ticket management and batch processing
- Ticket Retrieval: App requests a new translation job from backend
- Web Scraping: Loads the target webtoon page in webview
- Image Extraction: Finds and downloads all comic images
- Image Processing: Splits pages if needed and optimizes for OCR
- Text Recognition: Extracts Korean text from speech bubbles
- Translation: Translates text using AI services with context
- Image Reconstruction: Replaces Korean text with English translations
- Upload: Sends processed images back to backend
- Repeat: Continues with next ticket
The app supports multiple custom fonts located in the assets/ directory:
- Augie
- Another Danger
- BD Cartoon
- CC Astro City
- Zud Juice
Customize translation behavior by modifying the ChatGPT prompt in ImageService._translateWithChatGpt().
- API Rate Limits: Be mindful of API usage limits for translation services
- Copyright: Ensure you have rights to translate and process the content
- Performance: Large batches may take significant time to process
- Network: Requires stable internet connection for API calls
- API keys are currently hardcoded (consider using environment variables for production)
- All processing is done locally except for translation API calls
- No user data is stored permanently
- Support for additional webtoon platforms
- More language pairs for translation
- Improved text bubble detection algorithms
- Batch processing optimization
- User interface improvements
- Translation quality feedback system
This appears to be a personal project for automated webtoon translation. If you're interested in contributing or have suggestions, please feel free to reach out.
This project is for personal use. Please respect copyright laws and terms of service of the platforms you're processing content from.