Created
December 3, 2020 12:49
-
-
Save jefBinomed/905cc2fa4637c78573dbd875f6e930b9 to your computer and use it in GitHub Desktop.
2020-fugu-face-detection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const faceDetector = new FaceDetector({ | |
// (Optional) Hint to try and limit the amount of detected faces | |
// on the scene to this maximum number. | |
maxDetectedFaces: 5, | |
// (Optional) Hint to try and prioritize speed over accuracy | |
// by, e.g., operating on a reduced scale or looking for large features. | |
fastMode: false | |
}); | |
try { | |
const faces = await faceDetector.detect(image); | |
faces.forEach(face => console.log(face)); | |
} catch (e) { | |
console.error('Face detection failed:', e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment