Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
smile-face-detector
Advanced tools
Readme
smile-face-detector detects smiles in your image.
$ npm install smile-face-detector --save
const SmileFaceDetector = require('smile-face-detector');
const detector = new SmileFaceDetector({smileScale: 1.01, smileNeighbor: 10});
detector.on('error', (error) => {
console.error(error);
});
detector.on('face', (faces, image) => {
console.log(faces);
faces.forEach((face) => {
// write rectangle
image.rectangle([face.x, face.y], [face.width, face.height], SmileFaceDetector.green, 2);
});
});
detector.on('smile', (smiles, face, image) => {
console.log(smiles);
smiles.forEach((smile) => {
image.rectangle([smile.x + face.x, smile.y + face.height/2 + face.y], [smile.width, smile.height], SmileFaceDetector.blue, 2);
});
image.save('./images/Lenna_result.jpg');
});
detector.load('./images/Lenna.png').then((image) => {
detector.detect(image);
}).catch((e) => {
console.error(e);
});
new SmileFaceDetector({
// Parameter specifying how much the image size is reduced at each image scale on face detection default: 1.05
faceScale: 1.01,
// Parameter specifying how many neighbors each candidate rectangle should have to retain it on face detection default: 8
faceNeighbor: 2,
// Parameter specifying how much the image size is reduced at each image scale on smile detection default: 1.7
smileScale: 1.01,
// Parameter specifying how many neighbors each candidate rectangle should have to retain it on smile detection default: 22
smileNeighbor: 2,
});
const detector = new SmileFaceDetector();
detector.load('/foo/bar.jpg').then((image) => {
// image is Matrix instance on opencv
}).catch((e) => {
// load image failure
});
const detector = new SmileFaceDetector();
detector.on('face', (faces, image) => {
// faces is an array of face area like face.x, face.y, face.width, face.height
});
detector.on('smile', (smiles, face, image) => {
// smiles is an array of smile area like smile.x, smile.y, smile.width, smile.height
});
detector.load('/foo/bar.jpg').then((image) => {
detector.detect(image);
})
FAQs
smile face detector
The npm package smile-face-detector receives a total of 1 weekly downloads. As such, smile-face-detector popularity was classified as not popular.
We found that smile-face-detector 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.