We know Accelerated Shape Detection API already allows web apps to utilize the hardware capabilities for computer vision. So can we follow this approach and introduce API (WebML) to accelerate machine learning on Web? Client OS are adding ML APIs, for example Google’s Tensoflow-lite/NNAPI, Apple’s CoreML/BNNS/MPS, and Microsoft's WinML/DirectML.
I've been following up with Miguel on this idea and come up with a WebML polyfill and browser POC. You may checkout the MobileNet examples by WebML:
https://huningxin.github.io/webml-examples/
The WebML polyfill implements both WASM and WebGL2 backends. The browser POC is based on Chromium M65. The Android POC implements with NNAPI. The MacOS POC implements with MPSCNN. We observed 6-7X speedup for MobileNet inference by WebML POC comparing to WASM/WebGL2.
Miguel suggest me to check with device-dev folks here. I am attaching a deck about the idea and POC. Your feedbacks are highly welcome. :)
Thanks,
-ningxin