davanstrien / fastai4GLAMS

A study group for v4 of the fastai introduction to deep learning course with a focus on applications in GLAM settings
Creative Commons Zero v1.0 Universal
15 stars 4 forks source link

Examples/use cases to cover #8

Open davanstrien opened 4 years ago

davanstrien commented 4 years ago

From week 2 call discussion, some things that could be nice examples to try and prepare notebooks etc for.

barnabywalker commented 4 years ago

I had a quick look into this

  • [ ] Tensorflow javascript - how to import weights so the model can be used from Javascript https://glitch.com/ (maybe used js from TensorFlow model)

after the previous call.

I hadn't really looked into it before but after training a model with webcam images in Google's Teachable Machine, I realised that the option it gives you is a snippet of HTML to add your model to a webpage. The way it includes the trained model is as a link to a cloud hosting site. So I don't think you can just upload some weights from a different model.

I then found this tutorial on how to convert a PyTorch model to a TensorFlowJS model - and it uses ONNX!

It might be preferable to just use torchJS to directly host a PyTorch model instead, as ONNX might not support all the features of PyTorch.

If anyone wants to see some examples of TensorFlowJS apps that have been made using Teachable Machine, there is this showcase on glitch.