Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
split: string
image: string
teacher_source: string
width: int64
height: int64
existing_typography_instances: int64
pp_pseudo_instances: int64
pp_boxes: list<item: struct<proposal_bbox: list<item: int64>, tight_mask_bbox: list<item: int64>, score: doubl (... 23 chars omitted)
  child 0, item: struct<proposal_bbox: list<item: int64>, tight_mask_bbox: list<item: int64>, score: double, mask_pix (... 11 chars omitted)
      child 0, proposal_bbox: list<item: int64>
          child 0, item: int64
      child 1, tight_mask_bbox: list<item: int64>
          child 0, item: int64
      child 2, score: double
      child 3, mask_pixels: int64
refinement_policies: struct<replace_with_zenodo: int64, retain_existing_teacher_too_sparse: int64, union_existing_with_te (... 51 chars omitted)
  child 0, replace_with_zenodo: int64
  child 1, retain_existing_teacher_too_sparse: int64
  child 2, union_existing_with_textseg: int64
  child 3, replace_fallback_with_textseg: int64
old_vs_new: struct<reference_pixels: int64, prediction_pixels: int64, intersection_pixels: int64, union_pixels:  (... 54 chars omitted)
  child 0, reference_pixels: int64
  child 1, prediction_pixels: int64
  child 2, intersection_pixels: int64
  child 3, union_pixels: int64
  child 4, iou: double
  child 5, precision: double
  child 6, recall: double
teacher_vs_old: struct<reference_pixels: int64, prediction_pixels: int64, intersection_pixels: int64, union_pixels:  (... 54 chars omitted)
  child 0, reference_pixels: int64
 
...
d: timestamp[s]
  child 4, annotation_policy: string
  child 5, reading_order_policy: string
licenses: list<item: struct<id: int64, name: string, url: string>>
  child 0, item: struct<id: int64, name: string, url: string>
      child 0, id: int64
      child 1, name: string
      child 2, url: string
relations: list<item: struct<type: string, from: int64, to: int64, score: double>>
  child 0, item: struct<type: string, from: int64, to: int64, score: double>
      child 0, type: string
      child 1, from: int64
      child 2, to: int64
      child 3, score: double
categories: list<item: struct<id: int64, name: string, supercategory: string>>
  child 0, item: struct<id: int64, name: string, supercategory: string>
      child 0, id: int64
      child 1, name: string
      child 2, supercategory: string
images: list<item: struct<id: int64, width: int64, height: int64, file_name: string, license: int64, book: s (... 146 chars omitted)
  child 0, item: struct<id: int64, width: int64, height: int64, file_name: string, license: int64, book: string, page (... 134 chars omitted)
      child 0, id: int64
      child 1, width: int64
      child 2, height: int64
      child 3, file_name: string
      child 4, license: int64
      child 5, book: string
      child 6, page_index: int64
      child 7, source_split: string
      child 8, dataset_split: string
      child 9, text_reading_order_hint: list<item: int64>
          child 0, item: int64
      child 10, reading_order_quality: string
to
{'info': {'description': Value('string'), 'version': Value('string'), 'year': Value('int64'), 'date_created': Value('timestamp[s]'), 'annotation_policy': Value('string'), 'reading_order_policy': Value('string')}, 'licenses': List({'id': Value('int64'), 'name': Value('string'), 'url': Value('string')}), 'categories': List({'id': Value('int64'), 'name': Value('string'), 'supercategory': Value('string')}), 'images': List({'id': Value('int64'), 'width': Value('int64'), 'height': Value('int64'), 'file_name': Value('string'), 'license': Value('int64'), 'book': Value('string'), 'page_index': Value('int64'), 'source_split': Value('string'), 'dataset_split': Value('string'), 'text_reading_order_hint': List(Value('int64')), 'reading_order_quality': Value('string')}), 'annotations': List(Json(decode=True)), 'relations': List({'type': Value('string'), 'from': Value('int64'), 'to': Value('int64'), 'score': Value('float64')})}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3052, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2559, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2584, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              split: string
              image: string
              teacher_source: string
              width: int64
              height: int64
              existing_typography_instances: int64
              pp_pseudo_instances: int64
              pp_boxes: list<item: struct<proposal_bbox: list<item: int64>, tight_mask_bbox: list<item: int64>, score: doubl (... 23 chars omitted)
                child 0, item: struct<proposal_bbox: list<item: int64>, tight_mask_bbox: list<item: int64>, score: double, mask_pix (... 11 chars omitted)
                    child 0, proposal_bbox: list<item: int64>
                        child 0, item: int64
                    child 1, tight_mask_bbox: list<item: int64>
                        child 0, item: int64
                    child 2, score: double
                    child 3, mask_pixels: int64
              refinement_policies: struct<replace_with_zenodo: int64, retain_existing_teacher_too_sparse: int64, union_existing_with_te (... 51 chars omitted)
                child 0, replace_with_zenodo: int64
                child 1, retain_existing_teacher_too_sparse: int64
                child 2, union_existing_with_textseg: int64
                child 3, replace_fallback_with_textseg: int64
              old_vs_new: struct<reference_pixels: int64, prediction_pixels: int64, intersection_pixels: int64, union_pixels:  (... 54 chars omitted)
                child 0, reference_pixels: int64
                child 1, prediction_pixels: int64
                child 2, intersection_pixels: int64
                child 3, union_pixels: int64
                child 4, iou: double
                child 5, precision: double
                child 6, recall: double
              teacher_vs_old: struct<reference_pixels: int64, prediction_pixels: int64, intersection_pixels: int64, union_pixels:  (... 54 chars omitted)
                child 0, reference_pixels: int64
               
              ...
              d: timestamp[s]
                child 4, annotation_policy: string
                child 5, reading_order_policy: string
              licenses: list<item: struct<id: int64, name: string, url: string>>
                child 0, item: struct<id: int64, name: string, url: string>
                    child 0, id: int64
                    child 1, name: string
                    child 2, url: string
              relations: list<item: struct<type: string, from: int64, to: int64, score: double>>
                child 0, item: struct<type: string, from: int64, to: int64, score: double>
                    child 0, type: string
                    child 1, from: int64
                    child 2, to: int64
                    child 3, score: double
              categories: list<item: struct<id: int64, name: string, supercategory: string>>
                child 0, item: struct<id: int64, name: string, supercategory: string>
                    child 0, id: int64
                    child 1, name: string
                    child 2, supercategory: string
              images: list<item: struct<id: int64, width: int64, height: int64, file_name: string, license: int64, book: s (... 146 chars omitted)
                child 0, item: struct<id: int64, width: int64, height: int64, file_name: string, license: int64, book: string, page (... 134 chars omitted)
                    child 0, id: int64
                    child 1, width: int64
                    child 2, height: int64
                    child 3, file_name: string
                    child 4, license: int64
                    child 5, book: string
                    child 6, page_index: int64
                    child 7, source_split: string
                    child 8, dataset_split: string
                    child 9, text_reading_order_hint: list<item: int64>
                        child 0, item: int64
                    child 10, reading_order_quality: string
              to
              {'info': {'description': Value('string'), 'version': Value('string'), 'year': Value('int64'), 'date_created': Value('timestamp[s]'), 'annotation_policy': Value('string'), 'reading_order_policy': Value('string')}, 'licenses': List({'id': Value('int64'), 'name': Value('string'), 'url': Value('string')}), 'categories': List({'id': Value('int64'), 'name': Value('string'), 'supercategory': Value('string')}), 'images': List({'id': Value('int64'), 'width': Value('int64'), 'height': Value('int64'), 'file_name': Value('string'), 'license': Value('int64'), 'book': Value('string'), 'page_index': Value('int64'), 'source_split': Value('string'), 'dataset_split': Value('string'), 'text_reading_order_hint': List(Value('int64')), 'reading_order_quality': Value('string')}), 'annotations': List(Json(decode=True)), 'relations': List({'type': Value('string'), 'from': Value('int64'), 'to': Value('int64'), 'score': Value('float64')})}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Manga109 Segmentation

Manga109 Segmentation is an annotation-only dataset for manga layout and instance segmentation. The current release is v3.0.0. It contains COCO RLE masks for text, onomatopoeia, bubble, and panel, plus containment relations, Japanese transcriptions, and the human polygons behind every onomatopoeia.

Manga109 images are not included. Obtain Manga109 separately and follow its terms. Every images[].file_name is relative to the Manga109 images/ directory.

What changed in v3.0.0

v3.0.0 refines v2.0.0. Pages, splits, annotation ids, masks, bubbles, panels, and relations carry over, except where listed here:

  • Human boxes. A text box is its Manga109 v2026 box (158,939 instances), and an onomatopoeia box spans its COO polygons (58,938). v2.0.0 tightened both to the mask, so a stroke the mask missed also shrank the box. A mask reaching outside its human box or polygons is clipped to it (1,060 instances, 2,715 pixels).
  • No filled rectangles. A text or onomatopoeia mask covering at least 95% of its own box is a filled fallback, not ink. 187 are replaced with the MangaSegmentation or Zenodo ink for the same instance. The 61 with no ink behind them keep their box and class, with an empty mask and has_mask: false.
  • No page numbers. 1,930 of v2.0.0's 3,372 PP-DocLayoutV3 pseudo-instances were page numbers, which Manga109 leaves unlabelled on every other page. They are dropped. The 1,442 kept are editorial notes, titles, and credits.
  • No orphan onomatopoeia. 10 onomatopoeia fragments (1–68 pixels) with no COO polygon behind them are dropped.
  • New attributes. Onomatopoeia gain human_polygon, rotated_box, and transcription; text gains manga109_id and transcription. See Boxes and Masks.

v2.0.0 remains available at the immutable v2.0.0 tag.

Dataset summary

The split is book-disjoint and unchanged from v2.0.0.

Split Books Pages Text Onomatopoeia Bubbles Panels All annotations
Train 87 8,128 127,678 45,158 102,088 81,638 356,562
Validation 11 1,001 15,877 7,392 13,784 11,157 48,210
Test 11 969 16,826 6,388 13,835 10,845 47,894
Total 109 10,098 160,381 58,938 129,707 103,640 452,666

The annotations contain 355,807 containment relations.

Package layout

manga109-segmentation/
β”œβ”€β”€ annotations/
β”‚   β”œβ”€β”€ train.coco.json
β”‚   β”œβ”€β”€ validation.coco.json
β”‚   └── test.coco.json
β”œβ”€β”€ review/
β”‚   β”œβ”€β”€ train.jsonl
β”‚   β”œβ”€β”€ train.v3_changes.jsonl
β”‚   β”œβ”€β”€ validation.jsonl
β”‚   β”œβ”€β”€ validation.v3_changes.jsonl
β”‚   β”œβ”€β”€ test.jsonl
β”‚   └── test.v3_changes.jsonl
β”œβ”€β”€ build.json
β”œβ”€β”€ checksums.sha256
└── package_manifest.json

review/{split}.jsonl are v2.0.0's per-page diagnostics, unchanged. review/{split}.v3_changes.jsonl record each instance v3.0.0 dropped or whose rectangle mask it replaced or removed. Neither is a training annotation.

Use the relative image paths with a separately obtained Manga109 release:

import json
from pathlib import Path

dataset_root = Path("manga109-segmentation")
image_root = Path("Manga109_released_2026_05_21/images")

with (dataset_root / "annotations/train.coco.json").open(encoding="utf-8") as f:
    coco = json.load(f)

image_path = image_root / coco["images"][0]["file_name"]

Categories and relations

ID Category
1 text
2 onomatopoeia
3 bubble
4 panel

The top-level relations array records contained_by_bubble and contained_by_panel geometry. Image and bubble reading-order fields are heuristic hints, not human reading-order ground truth.

Boxes

bbox is COCO [x, y, width, height]. attributes.box_source says where it comes from:

box_source Category Box
manga109_v2026 text The Manga109 v2026 box, clipped to the page; manga109_id names it
coo onomatopoeia The extent of its COO polygons, stored in human_polygon
pp_doclayoutv3 text v2.0.0's box, tightened to its TextSeg mask; train only
absent bubble, panel v2.0.0's box, from MangaSegmentation

Human boxes surround the text with the annotator's margin, so a text or onomatopoeia box is usually larger than its mask. An onomatopoeia linked across several COO polygons has one polygon per piece. Its rotated_box is the minimum-area rectangle around all of them, as {"center", "size", "angle", "convention"} from OpenCV's minAreaRect.

Masks

Masks use compressed COCO RLE, area is the mask's pixel count, and every annotation uses iscrowd: 0. A text or onomatopoeia mask always lies inside its human box or polygons.

attributes.has_mask is false on 61 instances: 44 text and 17 onomatopoeia, of which 57 are in train and 4 in test. Their mask is empty and their area is the box area. Skip their mask loss in training, or drop them, since an ordinary COCO loader would teach the model that these instances have no pixels. Drop them from the ground truth when evaluating masks.

attributes.quality_tier gives v2.0.0's mask provenance:

Tier Text Onomatopoeia Bubble Panel
gold_mangaseg: MangaSegmentation mask 129,707 103,640
gold_zenodo_refined: manually painted Zenodo pixels 6,095 2,239
silver_textseg_refined: refined by TextSeg 152,844 56,699
silver_pp_bbox_textseg_mask: PP-DocLayoutV3 box, TextSeg pixels; train only 1,442

Where v3.0.0 replaced a rectangle, attributes.mask_replaced_by names the new pixels' source: mangaseg (186) or zenodo (1).

Page filtering

v3.0.0 keeps v2.0.0's pages. v2.0.0 removed 504 pages whose unlabelled text would have become false-negative background, including 102 000.jpg covers. A page is excluded when it has no target typography but at least 512 teacher foreground pixels, or when it has at least 10,000 teacher pixels and final recall below 0.20. There is deliberately no negative category: ordinary COCO background is the negative signal.

Limitations

  • Most text and onomatopoeia identities and boxes are human-authored, but many final pixel masks are model-assisted.
  • Manga109 labels neither editorial notes nor page numbers, and COO misses some small handwritten onomatopoeia. Outside the train-only pseudo-instances these stay background.
  • PP-DocLayoutV3 can introduce class and box errors in the 1,442 train-only pseudo-instances.
  • Validation and test include teacher-refined pixels, so use independent human or Zenodo evaluation when measuring absolute mask quality.
  • Bubble and panel masks inherit MangaSegmentation's ambiguity and source errors.
  • Relations and reading order are geometric heuristics.
  • Manga109 images and their usage rights are not distributed here.

License and sources

license: other is intentional because the package combines derived annotations from multiple sources. Users must follow every upstream license and attribution requirement. In particular:

The package does not grant access to or a license for Manga109 images. Never upload the Manga109 image files with this repository. Exact source checksums and revisions, policy thresholds, and per-split change counts are in build.json; file integrity is recorded in checksums.sha256 and package_manifest.json.

Downloads last month
262

Models trained or fine-tuned on mayocream/manga109-segmentation