SAVRN
Search Contact SAVRN

Open-weight model · Image segmentation

manga109-segmentation-bubble

by Vũ tiến huy huyvux3005/manga109-segmentation-bubble

A high-performance YOLO11n instance segmentation model fine-tuned for detecting and segmenting speech bubbles in manga/comic images.

Parameters
Context
Weights24.0 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads4.9k

Model Card

By Vũ tiến huy, published under apache-2.0, revision f9a4108c4955.

A high-performance YOLO11n instance segmentation model fine-tuned for detecting and segmenting speech bubbles in manga/comic images. Left: Segmentation Loss (Train vs Val) | Right: Mask mAP Metrics over epochs This model was trained on a combined dataset of: 1. MS92/MangaSegmentation - Manga panel and bubble segmentation dataset 2. Manga109 - Large-scale manga dataset with speech bubble annotations If you use this model in your research, please cite: This model is released under the Apache 2.0 License. - Ultralytics for the YOLO framework - MS92/MangaSegmentation dataset - Manga109 dataset

Read Vũ tiến huy's full model card

MangaLens - Manga Speech Bubble Segmentation

![Model](https://img.shields.io/badge/Model-YOLOv11n--seg-blue) ![Task](https://img.shields.io/badge/Task-Instance%20Segmentation-green) ![mAP50](https://img.shields.io/badge/mAP50-99.1%25-brightgreen) ![License](https://img.shields.io/badge/License-Apache%202.0-orange)

A high-performance YOLO11n instance segmentation model fine-tuned for detecting and segmenting speech bubbles in manga/comic images.

� Demo Results

| Detection on Various Manga Styles | |:--:| | ![Demo 1](assets/demo1.jpg) | | *Speech bubble detection on action manga with multiple bubbles* | | ![Demo 2](assets/demo2.jpg) | |:--:| | *Detection on slice-of-life manga style* |

� Model Performance

Final Evaluation Results (Epoch 44)

Metric Box Detection Mask Segmentation
Precision 97.55% 97.66%
Recall 97.03% 97.15%
mAP@50 99.10% 99.13%
mAP@50-95 96.67% 94.69%

Training Curves

![Training Curves](assets/Code_Generated_Image.png) *Left: Segmentation Loss (Train vs Val) | Right: Mask mAP Metrics over epochs*
Loss Type Final Value
Box Loss 0.2499
Segmentation Loss 0.2762
Classification Loss 0.2109
DFL Loss 0.8064

Training Configuration

Parameter Value
Base Model yolo11n-seg.pt
Image Size 1600×1600
Batch Size 8
Epochs 100 (Early stopped at 44)
Optimizer Auto (AdamW)
Learning Rate 0.01
Weight Decay 0.0005
Patience 10
AMP Enabled

Data Augmentation

  • HSV Augmentation: H=0.015, S=0.7, V=0.4
  • Mosaic: 1.0
  • Flip Left-Right: 0.5
  • Scale: 0.5
  • Translate: 0.1

Training Data

This model was trained on a combined dataset of:

  1. MS92/MangaSegmentation - Manga panel and bubble segmentation dataset
  2. Manga109 - Large-scale manga dataset with speech bubble annotations

Quick Start

Installation

pip install ultralytics>=8.0.0

Inference

from ultralytics import YOLO

# Load the model
model = YOLO("best.pt")

# Run inference on an image
results = model("manga_page.jpg")

# Process results
for result in results:
    # Get bounding boxes
    boxes = result.boxes

    # Get segmentation masks
    masks = result.masks

    # Visualize results
    result.show()

    # Save results
    result.save("output.jpg")

Batch Processing

from ultralytics import YOLO
from pathlib import Path

model = YOLO("best.pt")

# Process multiple images
image_folder = Path("manga_pages/")
results = model(list(image_folder.glob("*.jpg")), stream=True)

for i, result in enumerate(results):
    result.save(f"output_{i}.jpg")

Extract Bubble Regions

import cv2
import numpy as np
from ultralytics import YOLO

model = YOLO("best.pt")
image = cv2.imread("manga_page.jpg")
results = model(image)[0]

# Extract each bubble as a separate image
for i, mask in enumerate(results.masks.data):
    mask_np = mask.cpu().numpy()
    mask_resized = cv2.resize(mask_np, (image.shape[1], image.shape[0]))

    # Apply mask
    bubble = image.copy()
    bubble[mask_resized < 0.5] = 0

    # Get bounding box and crop
    coords = np.where(mask_resized >= 0.5)
    if len(coords[0]) > 0:
        y_min, y_max = coords[0].min(), coords[0].max()
        x_min, x_max = coords[1].min(), coords[1].max()
        cropped = bubble[y_min:y_max, x_min:x_max]
        cv2.imwrite(f"bubble_{i}.png", cropped)

Model Files

weights/
├── best.pt      # Best checkpoint (recommended)
└── last.pt      # Last training checkpoint

Use Cases

  • Manga Translation: Automatically detect speech bubbles for text extraction and translation
  • Manga Analysis: Study panel layouts and dialogue distribution
  • Content Moderation: Identify and process text regions in comics
  • Accessibility: Enable text-to-speech for manga readers
  • Dataset Creation: Generate annotations for manga datasets

Technical Details

Model Architecture

  • Backbone: YOLO11n (Nano variant)
  • Task: Instance Segmentation
  • Classes: 1 (Speech Bubble)
  • Input: RGB images (any size, recommended 1600×1600)
  • Output: Bounding boxes + Instance masks

Inference Speed

Device Speed (ms/image)
GPU (T4) ~15-25 ms
GPU (V100) ~8-12 ms
CPU ~200-400 ms

Citation

If you use this model in your research, please cite:

@misc{mangalens2024,
  title={MangaLens: YOLO11n Speech Bubble Segmentation Model},
  author={MangaLens Team},
  year={2024},
  publisher={Hugging Face},
  url={https://huggingface.co/your-username/mangalens-bubble-segmentation}
}

License

This model is released under the Apache 2.0 License.

Acknowledgements


Made with for the manga community

Identity and Version

Repository
huyvux3005/manga109-segmentation-bubble
Publisher
Vũ tiến huy
Task
Image segmentation
Modality
Image
Library
ultralytics
Parameters
Not stated by the source
Languages
en, ja
Revision
f9a4108c4955136a810e5e92207972f3fb3a65fd
First published
2025-12-29
Last updated
2025-12-29

Files and Weights

29 files, 33.5 MB in total. The weights are 2 files totalling 24.0 MB in pt.

Weights2 files · 24.0 MB
Configuration1 file · 1.7 KB
Documentation1 file · 5.8 KB
Other24 files · 9.5 MB
Repository1 file · 2.3 KB
Every file
FileTypeSizeSHA-256
best.ptWeights12.0 MB 4028152940f7
last.ptWeights12.0 MB 9d672ebdd8b6
args.yamlConfiguration1.7 KB
README.mdDocumentation5.8 KB
BoxF1_curve.pngOther95.2 KB
BoxPR_curve.pngOther81.5 KB
BoxP_curve.pngOther83.6 KB
BoxR_curve.pngOther97.5 KB
MaskF1_curve.pngOther96.0 KB
MaskPR_curve.pngOther81.6 KB
MaskP_curve.pngOther83.8 KB
MaskR_curve.pngOther96.9 KB
assets/Code_Generated_Image.pngOther107.7 KB d0f66caa7660
assets/demo1.jpgOther91.2 KB
assets/demo2.jpgOther119.9 KB 02e4d1a18efd
confusion_matrix.pngOther105.2 KB 81975212f0af
confusion_matrix_normalized.pngOther100.1 KB 8bfcc0053095
labels.jpgOther100.4 KB fe561de19d95
results.csvOther7.5 KB
train_batch0.jpgOther813.8 KB 7e1daa1bcefe
train_batch1.jpgOther846.4 KB af90e411e62a
train_batch2.jpgOther804.0 KB 1a00a22623b9
val_batch0_labels.jpgOther864.4 KB 0c0a4af60823
val_batch0_pred.jpgOther880.4 KB 6c2e4758bf8c
val_batch1_labels.jpgOther960.9 KB ed864f159eca
val_batch1_pred.jpgOther966.6 KB 2c9220ff22ea
val_batch2_labels.jpgOther985.5 KB c37d724aa884
val_batch2_pred.jpgOther993.8 KB 8159f8140c23
.gitattributesRepository2.3 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
24.0 MB
Download from Vũ tiến huy

Released by Vũ tiến huy through its official repository on Hugging Face. Read the license.

Built From

  • Trained on (disclosed) MS92/MangaSegmentation
  • Trained on (disclosed) manga109

Memory Requirements

PrecisionWeights in memory
As published24.0 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About manga109-segmentation-bubble

Can I use manga109-segmentation-bubble commercially?

Yes. manga109-segmentation-bubble is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Image segmentation

segformer-b2-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

segformer-b3-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

oneformer_ade20k_swin_large

SHI Labs

OneFormer model trained on the ADE20k dataset (large-sized version, Swin backbone). It was introduced in the paper OneFormer: One Transformer to Rule Universal Image Segmentation by Jain et al. and first released in this repository. OneFormer is the first multi-task universal image segmentation framework. It needs to be trained only once with a single universal architecture, a single model, and on a single dataset, to outperform existing specialized models across semantic, instance, and panoptic segmentation tasks. OneFormer uses a task token to condition the model on the task in focus, making the architecture task-guided for training, and task-dynamic for inference, all with a single…

Open weights mit transformers

Model · Image segmentation

segformer-b1-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

segformer-b0-finetuned-ade-512-512

Joshua

https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512 with ONNX weights to be compatible with Transformers.js. If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Example: Image segmentation with Xenova/segformer-b0-finetuned-ade-512-512. You can visualize the outputs with: Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Open weights transformers.js

Model · Image segmentation

DelineateAnything

Mykola Lavreniuk

Delineate Anything v2 extends Delineate Anything into a globally representative, resolution-agnostic foundation model that scales agricultural field boundary detection to a planetary level from any imagery source. Trained on FBIS-73M, a massive 73-million-instance dataset spanning 61 countries with diverse imagery sources ranging from 0.25m to 10m resolution, built through a resolution-specific curation pipeline that solves the parcel-versus-field mismatch, Delineate Anything v2 sets a new state-of-the-art in global zero-shot delineation. It delivers a +103.3% relative gain in [email protected] over Delineate Anything while maintaining extreme efficiency, mapping all of Ukraine (603,000 km²) in 5.4…

Open weights agpl-3.0 ultralytics