Spaces:
Configuration error
Configuration error
File size: 2,106 Bytes
06f13d3 b352566 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
tags:
- ml-intern
---
# Comic Character Extractor
## Overview
This space automatically extracts **all characters** from a comic page image and re-renders each with a **neutral reference prompt** (plain background, no emotion, no pose, no action).
Built by cloning the [prithivMLmods/Qwen-Image-Edit-2511-LoRAs-Fast](https://huggingface.co/spaces/prithivMLmods/Qwen-Image-Edit-2511-LoRAs-Fast) studio UI and adding an automatic multi-character workflow.
## How It Works
1. **Character Detection** β Grounding DINO (tiny) detects all people/characters in the comic page.
2. **Segmentation** β Segment Anything Model (SAM, vit-base) segments each detected character.
3. **Extraction** β Each character is cropped onto a plain white background.
4. **Neutral Re-render** β Qwen Image Edit 2511 renders each character with a neutral prompt:
> `white_background clean flat neutral character portrait, front_view face forward standing_pose neutral_expression, no_emotion no_action no_gesture`
## Features
- **Auto-detects all characters** β No need to specify how many characters are on the page.
- **Neutral reference output** β Plain background, no emotions, no poses, no actions.
- **Studio UI** β Dark-themed interface with canvas view, filmstrip, and inspector panel.
- **Keyboard shortcuts** β `Ctrl+Enter` to auto-extract, `Escape` to close zoom.
## Usage
1. Upload a comic page image (PNG/JPG).
2. Click **"Auto-Extract Characters"** or press `Ctrl+Enter`.
3. Each character appears as a separate image in the filmstrip.
4. Click any character in the filmstrip to view it on the canvas.
5. Use the Download button to save individual character images.
## Models Used
| Component | Model |
|-----------|-------|
| Character Detector | `facebook/grounding-dino-tiny` |
| Segmenter | `facebook/sam-vit-base` |
| Image Editor | `Qwen/Qwen-Image-Edit-2511` |
## Citation
This project uses:
- [Grounding DINO](https://arxiv.org/abs/2301.12092)
- [Segment Anything Model (SAM)](https://arxiv.org/abs/2304.02675)
- [Qwen-Image-Edit](https://huggingface.co/Qwen)
## License
MIT
|