Files
Double_V a823d4eebf [Doc] add readme for js packages (#421)
* add contributor

* add package readme

* refine ocr readme

* refine ocr readme
2022-10-24 16:18:00 +08:00
..
2022-10-23 14:05:13 +08:00
2022-10-23 14:05:13 +08:00
2022-10-23 14:05:13 +08:00
2022-10-23 14:05:13 +08:00

中文版

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 '@paddle-js-models/facedetect';

const faceDetector = new FaceDetector();
await faceDetector.init();
// Required parameterimgEle(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 }
);

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