background
Tensorflow.js is a JavaScript library for training and deploying machine learning models on browsers and Node.js.
Similarly, it is now possible to run some pre-training models out of the box using a plugin provided by the TensorFlow team in the wechat applet.
Now the project has introduced two models: real-time estimation of human posture (PoseNet) and localization and recognition of multiple objects in a single image (Coco SSD).
Quick start
-
First you need to add the tensorflow.js plug-in in the background of the applet, refer to this documentation.
-
Install the NPM package required by the project in the root directory of the project. Use YARN or NPM.
yarn install
Copy the code
-
Note: NPM must be built in developer tools after you install the NPM package. You can refer to official wechat documents to use NPM in small programs.
-
Modify the env.js.example file in the root directory and replace the model address with your model address.
The online version
Wechat search: TensorFlow machine learning Model. Or scan code:
GitHub address: github.com/GeekYmm/ten…