Koharu Layout HighRes (ONNX)

Koharu Layout HighRes (RF-DETR Seg 2XL, 1920 px) converted to ONNX, for running with ONNX Runtime without Python. It finds four kinds of region on a manga page, with a box and a mask for each: text, onomatopoeia, speech bubbles and panels.

Changes from the original

This is a modified version of the original model, as the Apache License 2.0 requires us to state:

  • The weights are those of mayocream/koharu-layout-highres at revision 68077eb, unchanged, converted from safetensors to ONNX (opset 17) with rfdetr 1.7.0.
  • The backbone's self-attention is exported 1,024 query rows at a time. Each row's softmax is independent, so the result is the same, but the full score matrix is never held at once: peak memory on the CPU falls from about 20 GB to about 2.8 GB per image.
  • Checked against the original PyTorch model on a random input: boxes and class logits within 4e-3; masks agree on 99.998% of pixels.

Inputs and outputs

Name Shape Meaning
input [1, 3, 1920, 1920] RGB, normalised with ImageNet mean and std
dets [1, 300, 4] Boxes as centre x, centre y, width, height, from 0 to 1
labels [1, 300, 5] Class logits: text, onomatopoeia, bubble, panel; the fifth slot is unused
masks [1, 300, 480, 480] Mask logits over the whole input; a pixel is inside where the logit is > 0

The checkpoint was trained on letterboxed pages: scale the page so its long side is 1920, place it at the top left of a white 1920×1920 square, then normalise. Outputs cover that square, so map them back by the one scale and cut off what lies outside the page.

Post-processing follows RF-DETR: apply a sigmoid to the logits, take the top 160 query/class pairs, then the original model's recommended thresholds: text 0.25, onomatopoeia 0.3, bubble 0.5, panel 0.4.

Files

  • model.onnx: SHA-256 b2f8807dfd00adc82233f4456e79a32fdc32d658ddb2a7a0182c523c638e52ea, 174,648,069 bytes.
  • LICENSE: Apache License 2.0.
  • NOTICE: the original model's notice, kept as the licence requires.

Licence

Apache License 2.0, as the original. Koharu Layout HighRes is Copyright © 2026 Mayo Takanashi and is fine-tuned from RF-DETR Seg 2XL, Copyright © 2025 Roboflow. Manga109's images were used for training, are not distributed here, and remain under Manga109's terms.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for erdeneetemp/koharu-layout-highres-onnx

Quantized
(1)
this model

Dataset used to train erdeneetemp/koharu-layout-highres-onnx