
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
face-detector-polyfill
Advanced tools
Polyfill for FaceDetector, part of shape detection api
Uses the BBF object detector from JsFeat.
Note that currently landmarks are not detected.
Install:
bower install face-detector-polyfill
Use:
<script>
(function () {
function loadScript(src, done) {
var $script = document.createElement('script');
$script.src = src;
$script.onload = function() {
done();
};
$script.onerror = function() {
done(new Error('Failed to load script ' + src));
};
document.head.appendChild($script);
}
if (FaceDetector in window) {
continueToStartTheApp();
} else {
loadScript(
"bower_components/face-detector-polyfill/FaceDetector.min.js",
continueToStartTheApp
);
}
})()
// ...
</script>
Install:
npm install --save face-detector-polyfill
Use:
if ('FaceDetector' in window) {
continueToStartTheApp();
} else {
require.ensure(['face-detector-polyfill'], function(require) {
const FaceDetector = require('face-detector-polyfill');
window.FaceDetector = FaceDetector;
continueToStartTheApp();
}, function(err) {
console.log('Failed to load FaceDetector', err);
});
}
See the examples folder, or live demo
Requires Promises (can also be polyfilled) and typed arrays which are supported in all modern browsers, down to IE11.
FAQs
Polyfill for FaceDetector API
The npm package face-detector-polyfill receives a total of 1 weekly downloads. As such, face-detector-polyfill popularity was classified as not popular.
We found that face-detector-polyfill 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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.