|
41 | 41 | <h1>docling.rs → wasm: scanned PDF / image, full lite profile</h1> |
42 | 42 | <p> |
43 | 43 | Stage 2 of <a href="https://github.com/docling-project/docling.rs/issues/157">#157</a>: |
44 | | - RT-DETR layout detection (int8, ~165 MB — cached after the first load) |
| 44 | + RT-DETR layout detection (~172 MB — cached after the first load) |
45 | 45 | + PP-OCRv3 recognition via ONNX Runtime Web; pdf.js rasterizes PDF pages |
46 | 46 | at the native pipeline's 2 px/point; region refinement, OCR and |
47 | 47 | reading-order assembly run in Rust/wasm — the same code as the native |
@@ -70,8 +70,11 @@ <h1>docling.rs → wasm: scanned PDF / image, full lite profile</h1> |
70 | 70 | pdfjs.GlobalWorkerOptions.workerSrc = |
71 | 71 | "https://cdn.jsdelivr.net/npm/pdfjs-dist/build/pdf.worker.min.mjs"; |
72 | 72 |
|
| 73 | + // The models-v1 release hosts only the fp32 layout export (the int8 |
| 74 | + // variant is produced locally by scripts/install/quantize_models.py and |
| 75 | + // was never uploaded) — fetch what is actually there. |
73 | 76 | const LAYOUT_URL = |
74 | | - "https://github.com/docling-project/docling.rs/releases/download/models-v1/layout_heron_int8.onnx"; |
| 77 | + "https://github.com/docling-project/docling.rs/releases/download/models-v1/layout_heron.onnx"; |
75 | 78 | const SCALE = 2.0; // px per PDF point — the native pipeline's RENDER_SCALE |
76 | 79 |
|
77 | 80 | const meta = document.getElementById("meta"); |
@@ -99,7 +102,7 @@ <h1>docling.rs → wasm: scanned PDF / image, full lite profile</h1> |
99 | 102 | } |
100 | 103 |
|
101 | 104 | // fetch() with a live "x / y MB" status line (falls back to a plain fetch |
102 | | - // when the body can't be streamed) — the 165 MB layout model would |
| 105 | + // when the body can't be streamed) — the 172 MB layout model would |
103 | 106 | // otherwise sit on a static message for minutes on a first visit. |
104 | 107 | async function fetchProgress(url, label) { |
105 | 108 | const resp = await fetch(url, { cache: "force-cache" }); |
|
0 commit comments