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
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
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
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
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
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 489, 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 2818, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, 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 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, 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 343, 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 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, 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
              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
              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
              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
              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
              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 v2.0.0. It contains COCO RLE masks for text, onomatopoeia, bubble, and panel, plus containment relations and Japanese transcriptions where available.

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 v2.0.0

This is a breaking supervision update intended for standard RF-DETR-style instance-segmentation training:

  • Text masks on 449 pages use the manually painted Zenodo Manga109 text-mask dataset as the highest-priority pixel source.
  • The remaining pages use mayocream/koharu-text-sam-ts-l to refine text/COO pixels inside authoritative human geometry.
  • Good existing text masks are unioned with clipped teacher ink. Filled box/polygon fallbacks are replaced when the teacher has sufficient support.
  • PP-DocLayoutV3 is used only for bounding-box proposals. For the 3,372 accepted train-only pseudo instances, the mask is always TextSeg ink clipped to the proposal; the stored box is tightened to the resulting mask.
  • 504 pages with materially incomplete positive labels were removed so their unlabeled text cannot become false-negative COCO background. This includes 102 000.jpg cover pages.
  • All 454,606 published annotations have iscrowd: 0. No custom dense head, ignore-region encoding, or synthetic negative-mask class is required.

The previous release remains available at the immutable v1.1.0 tag.

Dataset summary

The split remains book-disjoint. Filtering removes pages, not books.

Split Books Pages Text COO Bubbles Panels All annotations
Train 87 8,128 129,608 45,165 102,088 81,638 358,499
Validation 11 1,001 15,877 7,395 13,784 11,157 48,213
Test 11 969 16,826 6,388 13,835 10,845 47,894
Total 109 10,098 162,311 58,948 129,707 103,640 454,606

The annotations contain 355,817 geometric containment relations. The three review/*.jsonl files contain sanitized per-page diagnostics for all 10,602 candidate pages, including the 504 excluded pages; they are not training annotations.

Package layout

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

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"]

Masks use compressed COCO RLE. bbox is COCO [x, y, width, height], area is the mask-pixel count, and every annotation uses iscrowd: 0.

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.

Mask provenance

attributes.quality_tier gives the direct training provenance:

  • gold_mangaseg: retained MangaSegmentation bubble/panel mask.
  • gold_zenodo_refined: human-geometry instance refined with manually painted Zenodo text-mask pixels.
  • silver_textseg_refined: human-geometry instance refined with TextSeg.
  • silver_pp_bbox_textseg_mask: PP-DocLayoutV3 proposal whose pixels come from TextSeg; used only in train.

Counts by split are recorded in build.json. Detailed page-level agreement, teacher coverage, proposal boxes, exclusion reasons, and visual-review flags are in review/*.jsonl without local filesystem paths.

Page filtering and negative supervision

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. The two tests may overlap.

Seven retained pages have no typography instances and a near-empty teacher mask (at most 382 pixels). They provide safe implicit background supervision. There is deliberately no negative segmentation category: ordinary COCO background is the negative signal, while incomplete pages are omitted.

Limitations

  • Most text/COO instance identities and envelopes are human-authored, but many final pixel masks are model-assisted.
  • PP-DocLayoutV3 can introduce class/proposal errors in the 3,372 train-only pseudo instances, even though TextSeg supplies their pixels.
  • Validation and test include teacher-refined pixels, so use independent human or Zenodo evaluation when measuring absolute mask quality.
  • Bubble/panel masks inherit MangaSegmentation 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 revisions, policy thresholds, split counts, and quality-tier counts are in build.json; file integrity is recorded in checksums.sha256.

Downloads last month
59

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