webonnx / wonnx

A WebGPU-accelerated ONNX inference run-time written 100% in Rust, ready for native and the web
Other
1.54k stars 54 forks source link

SessionError #193

Open lhohoz opened 8 months ago

lhohoz commented 8 months ago

Describe the bug I have tried to run inference with an onnx formatted text detection model but was unable to create a session.

import init, { Session } from "@webonnx/wonnx-wasm";
 // Start webonnx
const webonnxWasm = chrome.runtime.getURL("/static/files/wonnx_bg.wasm");
const webonnx = await init(webonnxWasm);
const reply = await fetch(model);
const blob = await reply.arrayBuffer();
const arr = new Uint8Array(blob);
const wonnxSession = await Session.fromBytes(arr); ---> SessionError

model: en_PP-OCRv3_det(onnx formatted) https://github.com/frotms/PaddleOCR2Pytorch/blob/main/doc/doc_en/models_list_en.md


Screenshots image (2) image (1)

Desktop (please complete the following information):