AI-powered Chrome extension and web app that automatically translates and redraws comic book speech bubbles into global and African languages.
# ◈ ComicLingo
An AI-powered translation pipeline designed specifically for comic books, webtoons, and manga. ComicLingo automatically detects speech bubbles, extracts text using OCR, translates it into various global and African languages (preserving local slang and emotional tone), intelligently inpaints the background to erase the original text, and renders the translated text back onto the page using authentic comic typography.
## Key Features
* **Advanced Computer Vision:** Utilizes Google Cloud Vision for highly accurate OCR and OpenCV for bounding box detection and dynamic background inpainting.
* **Context-Aware AI Translation:** Powered by OpenAI (GPT-4o-mini), engineered with custom system prompts to preserve emotional intensity, comic brevity, and authentic local slang (e.g., Nigerian Pidgin, Yoruba, Swahili).
* **Seamless Text Rendering:** Uses Pillow (PIL) and dynamic text-wrapping algorithms to perfectly center and draw translated text inside bubbles using the iconic `Bangers` font, complete with readability strokes.
* **Interactive React Workspace:** A premium, dark-mode desktop UI featuring interactive SVG bounding boxes, a side-by-side translation review panel, and a draggable Before/After image comparison slider.
* **Native Chrome Extension:** A deeply integrated browser extension utilizing the Shadow DOM and MutationObservers to instantly translate comic pages on live websites without breaking host CSS.
* **Optimized Architecture:** Features concurrent asynchronous API calls with rate-limit semaphores and MD5 caching to drastically reduce API costs and load times.
## Tech Stack
**Frontend:**
* React.js (Vite)
* CSS Modules
* ResizeObserver API (for scalable SVG overlays)
**Backend:**
* Python & FastAPI
* OpenCV (`cv2.INPAINT_TELEA`, thresholding, contour detection)
* Pillow (PIL) for graphics rendering
* Google Cloud Vision API
* OpenAI API (`gpt-4o-mini`)
* Pydantic
**Chrome Extension:**
* Manifest V3
* Vanilla JavaScript (Content Scrip …