Skip to content

models-v1

Choose a tag to compare

@james58899 james58899 released this 19 Oct 17:34
· 37 commits to main since this release
Immutable release. Only release title and notes can be modified.
e38b873
perf(ocr): use an fp16 PP-DocLayoutV3 and pre-shrink layout input

Layout detection on a 1080p frame drops from ~61 ms to ~28 ms on
DirectML (WebGPU ~115 ms to ~70 ms) with the same boxes.

The layout model is now the official Hugging Face ONNX run through
scripts/optimize-doclayout.py: the unused mask outputs are dropped (ORT
still computed and read back 300x200x200 masks), and the rest runs in
fp16. Box decode and the TopK index math stay fp32; in fp16 the flat
index 7499 rounds to query 300, which broke WebGPU with "GatherND
invalid index" and silently mispaired boxes on DirectML.

The model is hosted on this repo's models-v1 release as
pp-doclayoutv3_fp16.onnx, so artifacts now carry a full release URL
instead of a GreatV/oar-ocr tag.

Frames are also shrunk to 800x800 with the area filter before layout
detection (~3 ms vs ~15 ms for oar-ocr's CatmullRom resize) and the
boxes are scaled back.