Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
cordova-plugin-facedetection-lite
Advanced tools
A face detection offline with a few lines of code. Was designed to run on old smartphones.
This plug-in makes facial detection offline with a few lines of code, without the need to use TensorFlow. Was designed to run on old smartphones. This plugin implementation of the method described in 2013 by Markuš et al.
PS: For older smartphones, it is ideal that each frame analyzed has a maximum height and width of 60 pixels and the processing loop runs every 100 milliseconds or more. In the sample project this was implemented.
cordova plugins add cordova-plugin-facedetection-lite
sizeFrameMemory
, faceFinderPath, resultCallback)sizeFrameMemory
- Number of frames that will be used to reinforce the detection of all faces. Defaults to 5faceFinderPath
- Facial training file location, being allowed offline. Defaults to cascades/facefinderresultCallback
- Callback functionfacedetection.initFaceDetection(5, "./facefinder", function (result) {
/* Here you can create the loop to detect frames */
});
Warning: Until the current version, the parameters are being ignored on some platforms, being ixed default value in the code. {: .alert .alert-warning}
rgba
- Image in byte arraywidth
- Image widthheight
- Image heightminSizeFace
- Minimum size of selected facesmaxSizeFace
- Minimum size of selected facesiouthreshold
- Maximum size of selected facesresultCallback
- Callback functionWarning: Until the current version, only the first 3 parameters are implemented and the rest of the parameters are being ignored on some of the platforms, being fixed default value in the code.
facedetection.detections(rgba, cameraWidth, cameraHeight, cameraWidth * 0.2, cameraWidth * 1.2, 0.1, function (dets) {
for (i = 0; i < dets.length; ++i) {
var box = dets[i];
var canvasPreviewCtx = canvasPreview.getContext('2d');
canvasPreviewCtx.beginPath();
canvasPreviewCtx.arc(box[1], box[0], box[2] / 2, 0, 2 * Math.PI, false);
canvasPreviewCtx.lineWidth = 1;
canvasPreviewCtx.strokeStyle = 'red';
canvasPreviewCtx.stroke();
}
});
TODO
iOS |
Browser |
If you intend to do some improvement in the project, follow some instructions, such as compiling library in the C language.
If you modify the C source files, be sure to re-build the compiled libraries.
You can re-build the libpicornt.so
binaries using the ndk-build script.
To do so:
export PATH=$PATH;$ANDROID_SDK_HOME/ndk-bundle
export ANDROID_NDK_HOME=$ANDROID_SDK_HOME/ndk-bundle
./compile-android
(compile-android.cmd
on Windows)If you modify the C source code in common/picornt/
you'll need to rebuild the static library and headers in src/ios/libs
.
./compile-ios
Created by Luís De Marchi @luisdemarchi - Linkedin
FAQs
A face detection offline with a few lines of code. Was designed to run on old smartphones.
The npm package cordova-plugin-facedetection-lite receives a total of 5 weekly downloads. As such, cordova-plugin-facedetection-lite popularity was classified as not popular.
We found that cordova-plugin-facedetection-lite 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.