Crates to be able to run neural networks / CV in wasm (browser)

Hello, I want to run a neural network (or maybe just cv will be enough) for a simple detection of objects on jpeg in the browser. Which crates examples can you suggest? Ideally, it should make use of WebGPU.

I'm asking for both neural networks stuff and computer vision. Not sure if opencv can be used here? For neural networks, training can be done on usual stuff, only detection should be done in the browser (I would spawn a worker for that).

burn is a suitable candidate. It’s purely written in Rust (in case that’s important to you), and can use different backends (webgpu being one of them). The learning curve is steep and is still very young, though.

1 Like

RTen (disclaimer: my own project) can run ONNX models in the browser. There is an image classification example for the web and some object detection demos among the examples. It currently supports WASM SIMD but not WebGPU.