0.1.0 • Published 9 months ago

@melon-technologies/web-face-status v0.1.0

Weekly downloads
-
License
CC BY-NC-ND 4.0
Repository
-
Last release
9 months ago

web-face-status

A face detection module for the browser that finds the best face and status using get-face-status

Installation

MethodInstallImport
CDN (html)N/A<script src="https://cdn.jsdelivr.net/npm/@melon-technologies/web-face-status"</script>
CDN (module)N/Aimport "https://cdn.jsdelivr.net/npm/@melon-technologies/web-face-status";
npmnpm install @melon-technologies/web-face-statusimport * as mt from "@melon-technologies/web-face-status";
sourcenpm install && npm run buildimport "./dist/web_face_status.js";

Usage

const video = document.getElementById("video");
const options = { checkFaceMinSize: 0.3, checkFaceMaxSize: 0.4 };
const detector = new mt.FaceDetector(options);
await detector.initialize();

...

// Camera loop
{
    const { status, face } = await detector.run(video);

    ...
}

See examples/ for a full working example using the webcam

More Information

For more details, refer to the get-face-status project wiki.