# senno-test

> 使用说明 1.请先登录小程序并进入“设置-第三方服务-插件管理”，搜索并添加插件"TensorFlowJS"

Latest version **1.0.26** (published 2022-11-06) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install senno-test
pnpm add senno-test
yarn add senno-test
bun add senno-test
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.26 |
| Published | 2022-11-06 |
| First published | 2022-11-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bananamoll |

## Links

- npm: https://www.npmjs.com/package/senno-test
- npm.io page: https://npm.io/package/senno-test

## Dependencies (6)

- [fetch-wechat](https://npm.io/package/fetch-wechat.md) 0.0.3
- [@mediapipe/pose](https://npm.io/package/@mediapipe/pose.md) ^0.3.1621277220
- [@tensorflow/tfjs-core](https://npm.io/package/@tensorflow/tfjs-core.md) ^3.6.0
- [@tensorflow/tfjs-converter](https://npm.io/package/@tensorflow/tfjs-converter.md) ^3.6.0
- [@tensorflow/tfjs-backend-webgl](https://npm.io/package/@tensorflow/tfjs-backend-webgl.md) ^3.6.0
- [@tensorflow-models/pose-detection](https://npm.io/package/@tensorflow-models/pose-detection.md) 2.0.0

## Recent versions

- 1.0.26 (latest) — 2022-11-06
- 1.0.25 — 2022-11-06
- 1.0.24 — 2022-11-06
- 1.0.23 — 2022-11-06
- 1.0.22 — 2022-11-06
- 1.0.2 — 2022-11-06
- 1.0.21 — 2022-11-05
- 1.0.20 — 2022-11-04

## README

使用说明
1.请先登录小程序并进入“设置-第三方服务-插件管理”，搜索并添加插件"TensorFlowJS"

2.在微信小程序的app.json中声明使用该插件，如下：
  {
    ...
    "plugins": {
      "tfjsPlugin": {
        "version": "0.2.0",
        "provider": "wx6afed118d9e81df9"
      }
    }
    ...
  }

3.参考微信小程序npm工具文档如何编译npm包到小程序中。https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html

4.添加npm包senno-test，执行命令：npm i senno-test --legacy-peer-deps

5.构建npm，先进入微信开发工具点击“工具-构建npm”，其次点击“编译”运行（注意：如果编译过程tr46一直卡着，把miniprogram_npm目录下的tr46文件夹删掉，重新编译）

6.在app.js的onLaunch里调用插件configPlugin函数，如下：
  var fetchWechat = require('fetch-wechat');
  var tf = require('@tensorflow/tfjs-core');
  var webgl = require('@tensorflow/tfjs-backend-webgl');
  var plugin = requirePlugin('tfjsPlugin');
  //app.js
  App({
    onLaunch: function () {
      plugin.configPlugin({
        fetchFunc: fetchWechat.fetchFunc(),
        tf,
        webgl,
        canvas: wx.createOffscreenCanvas()
      });
    }
  });
7.使用senno-test进行姿态识别，在index.js中引入senno-test模块，如：
  var senno = require('senno-test')
  接口说明：
  senno.loadModel()            用于加载模型
  senno.estimatePoses(frame)   用于姿态识别，参数frame为相机的帧

代码演示请参照Demo

---
_Source: https://npm.io/package/senno-test · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
