| --- |
| title: ComicPanelsAndTextDetect |
| emoji: π |
| colorFrom: indigo |
| colorTo: red |
| sdk: gradio |
| sdk_version: 6.14.0 |
| python_version: '3.13' |
| app_file: app.py |
| pinned: false |
| short_description: Using YOLO to detect comic panels and text |
| --- |
| |
|
|
| # π ebookcc - AI Comic Panel & Text Detector (Demo) |
|
|
| Welcome to the AI vision core demo for **ebookcc**! This Space hosts a custom-trained **YOLO26n-seg** instance segmentation model, optimized specifically for comics, manga, manhwa, and standard book layouts. |
|
|
| ## π Live Demo Features |
| 1. **Panel Detection**: Automatically identifies the boundaries of comic frames, preparing them for reading-flow re-layout. |
| 2. **Text Bubble Segmentation**: Pinpoints all speech bubbles and on-page text areas precisely, making them ready for seamless AI OCR integration. |
|
|
| ## π οΈ Tech Stack & Background |
| This web demo is part of the [ebookcc.com](https://ebookcc.cptd.workers.dev/) project. |
| - **Backend Model**: Fine-tuned based on Ultralytics YOLO11m-seg. |
| - **Frontend Deployment**: The full Web App runs on the user's browser via TF.js and deeply integrates with Cloudflare Workers to reduce server costs. |
|
|
| ## π How to Use This Model Locally |
| If you want to call this model in your own Python project, please check out our [Hugging Face Model Card](https://huggingface.co/Oliverdsfdsf/ComicPabelsAndTextDetect). |
|
|
| ```python |
| from ultralytics import YOLO |
| |
| # Load the model |
| model = YOLO("comic-panels-and-text-detect.pt") |
| |
| # Predict with optimal manga settings |
| results = model.predict("comic_page.jpg", imgsz=1280, conf=0.25) |
| results[0].show() |
| |
| Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |
| |