1 Star 0 Fork 16

Paddles / Paddle.js

forked from PaddlePaddle / Paddle.js 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
JingyuanZhang 提交于 2022-02-28 22:03 . chore(badge): add repo info badge

中文版

Facedetect

Facedetect is used for face detection in image. It provides a simple interface. At the same time, you can use your own model.

version size downloads downloads

Usage

import { FaceDetector } from '@paddlejs-models/facedetect';

const faceDetector = new FaceDetector();
await faceDetector.init();
// Required parameter:imgEle(HTMLImageElement)
// Optional parameter: shrink, threshold
// Result is face area information. It includes left, top, width, height, confidence
const res = await faceDetector.detect(
    imgEle,
    { shrink: 0.4, threshold: 0.6 }
);

Run Demo

  1. Execute in the current directory
npm install
npm run dev
  1. Visit http://0.0.0.0:8867

Performance

  • multi small-sized face
  • single big-sized face

Postprocess

This model has a better recognition effect for small-sized faces, and the image will be shrink before prediction, so it is necessary to transform the prediction output data.

The red line indicates the predicted output result, and the green line indicates the converted result. dx dy fw fh are known parameters.

Reference

original model link

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/paddles/Paddle.js.git
git@gitee.com:paddles/Paddle.js.git
paddles
Paddle.js
Paddle.js
release/v2.2.5

搜索帮助

344bd9b3 5694891 D2dac590 5694891