Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
facedetector
Advanced tools
Detect and track faces in real-time from web camera and video stream
facedetector is a javascript library for real-time face detection.
This library is based on the work of Martin Tschirsich's js-objectdetect.
Watch this video for a short demonstration.
facedetector is distributed under MIT license. The included *.js files are subject to their own licenses.
Online realtime-face-detecting example here.
https://riversun.github.io/facedetector/example/index.html
var videoTag=document.getElementById("video");
var faceDetector = new FaceDetector(
{
video: videoTag,
flipLeftRight: false,
flipUpsideDown: false
}
);
faceDetector.setOnFaceAddedCallback(function (addedFaces, detectedFaces) {
for (var i = 0; i < addedFaces.length; i++) {
console.log("[facedetector] New face detected id=" + addedFaces[i].faceId + " index=" + addedFaces[i].faceIndex);
}
});
faceDetector.setOnFaceLostCallback(function (lostFaces, detectedFaces) {
for (var i = 0; i < lostFaces.length; i++) {
console.log("[facedetector] Face removed id=" + lostFaces[i].faceId + " index=" + lostFaces[i].faceIndex);
}
});
faceDetector.setOnFaceUpdatedCallback(function (detectedFaces) {
for (var i = 0; i < detectedFaces.length; i++) {
var face = detectedFaces[i];
console.log(face.faceId+" x="+face.x+" y="+face.y+" w="+ face.width+" h="+face.height );
}
});
//after getUserMedia
faceDetector.startDetecting();
You can import library with npm.
Install
npm install facedetector
Download actual files
<script src="FaceDetector.js"></script>
FAQs
Detect and track faces in real-time from web camera and video stream
We found that facedetector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.