Manga Layout
Segmentation of text, sound effects (onomatopoeia), balloons and panels on classic and modern manga pages, for training layout models and for benchmarking what a manga translator needs: every piece of lettering found, nothing on the art taken for lettering, and masks that remove the lettering without eating the art around it.
Annotations are COCO JSON with RLE masks. Images are not included except
for western, whose licences allow it; see Getting the images.
Subsets
| Subset | Pages | Train | Validation | Test | Images |
|---|---|---|---|---|---|
danbooru |
modern, often colour or translated comics, and illustrations with drawn marks, from Danbooru2024 | 9,059 | 107 | 398 | fetched by post id, checked by md5 (fetch_danbooru.py) |
manga109 |
classic monochrome manga, Manga109 | 8,128 | 1,001 | 969 | from the Manga109 release |
western |
Pepper&Carrot, Golden Age comics, David Revoy's artworks | 1,131 | 107 | β | included |
Splits share no artist (danbooru) or title (manga109). Report each
subset on its own; danbooru is the headline.
What is labelled
Categories: text (1), onomatopoeia (2), bubble (3), panel (4).
textcarries arolewhere it was reviewed: dialogue, narration, aside, title, sign, name_tag, header, page_number or credit.iscrowd: 1is an ignore region: lettering whose class is unsure, a sign or other in-world text, or a class the page doesn't label (thedanboorutest and validation pages label text and onomatopoeia only, and mark balloons and panels as whole-page ignore regions).attributes.has_mask: falsemarks a label with a box and no mask.attributes.quality_tier:gold_reviewedfordanboorutest onomatopoeia whose masks were reviewed one by one;gold_zenodo_refinedformanga109labels backed by the Zenodo hand-painted masks.danbooruimages carrydanbooru_id,md5,rating(g, s, q, e),artistsandkind(comic, lettered, illustration, chibi). Train keeps pages of every rating; validation and test hold general and sensitive pages only.
How the labels were made
danbooru
- Comics (1,398 train pages from about a thousand artists): every text
and onomatopoeia reviewed by hand, with roles. Text masks are its ink;
onomatopoeia masks are strokes from
mayocream/koharu-text-sam-ts-l(Hi-SAM's SAM-TS), model-made and not graded one by one. - Lettered posts (2,874): a layout model's draft corrected by review and by Danbooru's translator notes; anything unsure is an ignore region. Their onomatopoeia take SAM-TS strokes. A lower tier than the comics.
- Illustrations and chibi illustrations (4,787): pages with drawn marks (sweat drops, anger veins, sparkles, motion lines) and no lettering, the negatives a model needs; lettering review found is an ignore region.
- Test (398 pages, 329 artists): every text and onomatopoeia reviewed, plus a pass over every model's detections on art to complete the labels. 840 of its 1,128 onomatopoeia have a reviewed mask: SAM-TS strokes graded OK one by one, some grown over the white outline band around colour lettering and checked again.
manga109 is manga109-segmentation 5.4.0. Over the published v3.0.0 it
trims machine-made masks to their ink, fits onomatopoeia boxes to their
ink, chooses each flagged onomatopoeia's mask by review among candidates
(10,852 instances), reviews validation and test onomatopoeia stroke by stroke
(1,776 labels), and marks 2,825 pieces of lettering COO left unlabelled as
ignore regions after review. Its v3.0.0 numbers are not comparable with
these.
western
- Pepper&Carrot (episodes 1β39 in English, Japanese and Chinese; validation is episodes 14, 24 and 34): rendered from the comic's SVG sources with its fonts, masks from the SVG's own objects, panels ignored.
- Golden Age comics (validation is Fantastic Comics #17): boxes reviewed by hand, with text roles; page numbers ignored.
- Revoy's artworks: negatives; signatures and signs ignored.
Getting the images
danbooru: accept the terms of deepghs/danbooru2024-webp-4Mpixel, runhf auth login, thenpip install cheesechaserandpython fetch_danbooru.py. Images land indanbooru/images/. Posts deleted or replaced since the snapshot are listed indanbooru/unavailable.json, andscore.pyleaves those pages out; say how many when you report.manga109: obtain Manga109 from the Manga109 project under its terms;file_nameis relative to itsimages/folder.western: inwestern/images/.
Benchmark
python score.py danbooru test predictions.json --text <T> --onomatopoeia <T>
Predictions are COCO results (image_id, category_id, bbox, score,
optional RLE segmentation). Give your model's own published thresholds;
never tune them on a test split. It reports:
| Measure | Meaning |
|---|---|
| Page accuracy (PA) | share of pages with no story text or onomatopoeia missed and no false positive |
| Text recall | share of dialogue, narration, aside and title texts at least half covered by kept text or onomatopoeia boxes |
| SFX recall | the same for onomatopoeia |
| False positives per image (FPPI) | kept boxes with under a tenth of their area on the page's labels and ignore regions, summed |
| Full-coverage rate (FCR) | share of reviewed onomatopoeia masks at least 99% covered by the kept masks, grown by 2 px per 1,024 px of the page's long side plus 3 px |
| Residual ink (RI) | share of the reviewed onomatopoeia's ink the grown masks leave uncovered |
| Excess mask ratio (EMR) | grown mask area outside the page's grown lettering, over that lettering's area |
| Box and mask AP | COCO AP50 and AP50β95 per class; labels without a mask are ignore regions for mask AP |
Report parameters and time per image on a named GPU alongside.
Licence and sources
license: other because the subsets carry different terms:
danbooruandwesternannotations: CC BY 4.0. Danbooru images are their artists' and are not included.westernimages: Pepper&Carrot and artworks by David Revoy, www.peppercarrot.com, CC BY 4.0, translations by the Pepper&Carrot translators credited on each episode; Exciting Comics #6, #18, #44, #59 (Nedor) and Fantastic Comics #17 (Fox), public domain, scans from archive.org.manga109annotations derive from manga109-segmentation and follow its upstream terms: Manga109, MangaSegmentation, COO, the Zenodo manga text masks (CC BY 4.0), and the models named in manga109-segmentation's card. The dataset grants no licence for Manga109 images.
build.json records the source versions, counts and checksums.
- Downloads last month
- 83