happyqu / wx-tfjs-demo

微信小程序运行 TensorFlow 的 Demo

Home Page:https://hunterx.xyz/retry-tfjs-on-wx.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wx-tfjs-demo

微信小程序运行 TensorFlow 的 Demo

实现思路

改造 tfjs-core,使 TensorFlow.js 可以运行在小程序中。小程序调用摄像头成像,将图片显示在 canvas 上,通过小程序的 API 可以获取到 canvas 的「类 ImageData」数据,再调用 tfjs 的 API 实现预测。

对实现的坎坷经历感兴趣的,可以看看博文 tfjs 移植到微信小程序TensorFlowJS 移植再次尝试

小程序 Demo

临时上线了(随时可能下线),欢迎大家体验下,测试下自己手机的算力

gh_7390d3414c10_258.jpg

Demo 自嗨效果

图片较大,加载时间可能比较长

交流

欢迎关注个人微信公众号「猎人杂货铺」,附二维码:

猎人杂货铺 • 微信公众号

About

微信小程序运行 TensorFlow 的 Demo

https://hunterx.xyz/retry-tfjs-on-wx.html


Languages

Language:JavaScript 100.0%