-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Web] Yolov8 object detection on webGPU #22176
Comments
Some more info that I just found out; when I export with |
Usually the latest opset is recommended. The problem of Softmax is unexpected and should be fixed. Will let you know when the fix is merged. |
I'm currently working on this. Stay tuned. |
In current implementation, axis in softmax has to be the last, which is an obvious limitation. This PR removes this limitation and will fix issues microsoft#20710 and microsoft#22176.
This should be fixed in latest dev version. @reinhrst could you please help to verify if it works now? |
Confirmed, the yolo v8 export (opset 17) work on dev version! |
In current implementation, axis in softmax has to be the last, which is an obvious limitation. This PR removes this limitation and will fix issues microsoft#20710 and microsoft#22176.
Describe the issue
I would like to get clarification if YoloV8 object detection is expected to run on webGPU. When I try it I get:
[WebGPU]: Error: softmax only supports last axis for now.
In Netron visualisation I can see a Softmax on axis 1 (which I guess accounts for the error). I understand from #20710 (comment) that Softmax on WebGPU EP on arbitrary axis is somewhere planning (which would be great :)).
However looking at #19779, it suggests that Yolov8 nano should just work on WebGPU (unfortunately the link to download the model is broken, so I cannot check how that model looks).
To reproduce
Get a yolov8 nano model in onnx format (install ultralytics, then run
yolo export model=yolov8n format=onnx
).Use this model in an onnx WebGPU EP, and it gives above error.
Using WASM the model works just fine.
Urgency
Rewriting my browser-based inferrer from tensorflowjs to onnx, and would love to finish, but no strict deadlines.
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.19.2.tgz
Execution Provider
'webgpu' (WebGPU)
The text was updated successfully, but these errors were encountered: