Skip to content

About

A small model used to extract speech bubbles from manga and comics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

BubblePop

A lightweight manga, comics speech bubble extraction model.

Highlights:

  • Lightweight, 0.93M parameters, 1.8 MB FP16 weights
  • Quick, ~110ms CPU (~40ms GPU) inference latency on Qualcomm Snapdragon 845
  • Distilled from SAM 3.1

Click here to check online demo.

Web Demo Screenshot

Changelogs

  • 2026-0910 Update to a better checkpoint
  • 2026-0907 First release

Usages

  1. Prepare
git clone https://github.com/letmutex/bubble-pop
cd bubble-pop
uv pip install "torch>=2.6" torchvision numpy opencv-python onnx
  1. PyTorch inference
uv run inference.py web-demo/assets/page-1.jpg --output overlay.jpg
  1. Export
# ONNX FP16
uv run export.py model.pt --format onnx-fp16 --output model_fp16.onnx

# ONNX FP16 for Wasm (float32 I/O)
uv run export.py model.pt --format onnx-fp16-wasm --output web-demo/assets/model.onnx

# TFLite FP16
uv pip install "onnx2tf[tensorflow]==2.6.8"
uv run export.py model.pt --format tflite-fp16 --output model_fp16.tflite

Bindings

Model info

Property Details
Architecture UNet
Backbone MobileNetV3-Small
Parameters 0.93M
Input Grayscale, 768 × 1024
Output 3-channel logits (mask, boundary, confidence)

Training

Pre-training: This model is pre-trained on ~12K Web comics/manga pages; distilled directly from SAM 3.1's outputs.

Fine-tuning: The best pre-trained checkpoint is fine-tuned using ~2.4K synthetic pages of hard-samples.

Limitations

The current version of the model may not perform well in the following cases:

  • Transparent bubble, model may fail to detect them
  • Thin/long bubble tails, model may fail to detect the full tail

Acknowledgements

License

Apache License 2.0

About

A small model used to extract speech bubbles from manga and comics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages