6

I would like to know what are the options I have to run an object detection model in the browser, until now I have found the next options:

  1. Streamlit: is very simple but requires the server resources to run, including its own camera. Besides, I believe is not possible to be implemented as a website.
  2. Brython: is a JS substitute? I couldnt find the way how to load pytorch or libraries.
  3. Onnx: Seems to be a very good option, however I dont quite understand how to run the model in JS, since I have been using python and pytorch only, What is the learning roadmap? What is the relation with Webassembly?
  4. NCNN: This is the method I know the least, It seems to be able to work on basically any device, Webassembly, windows, android..., but again, I cant understand how to use my python-pytorch model to this framework since I dont know the roadmap.

Are there other options?

2 Answers2

1

There's TensorFlow.js.

You still need to convert your model with something like ONNX, though.

marpor
  • 153
  • 3
0

Just to update you. Tensorflow.js is suitable for the TensorFlow model while onnx runtime web is a good option for others. Things to do are;

  • Convert your model to onnx(see PyTorch export onnx)
  • Use onnxruntime web to use generated onnx with javascript(detailed at onnxruntime.ai)

If anyone knows more options, kindly add.