🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@paddlejs-models/facedetect

Package Overview
Dependencies
Maintainers
5
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paddlejs-models/facedetect

face detect

1.0.3
latest
npm
Version published
Weekly downloads
2
-71.43%
Maintainers
5
Weekly downloads
 
Created
Source

中文版

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

  • Execute in the current directory
npm install
npm run dev

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

FAQs

Package last updated on 09 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts