Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@iad-os/emotion-detector
Advanced tools
EmotionDetector makes use of face-api to detect emotions, genders, age.
EmotionDetector is a fully configurable React library that makes use of face-api.js to detect:
The library has been successfully tested with the following packages versions. If you have a more recent version of these packages feel free to experiment and give me a feedback.
"react": "16.14.0",
"react-dom": "16.14.0",
"react-scripts": "3.4.3",
"web-vitals": "2.1.4"
npm install @iad-os/emotion-detector
During the installation process you will notice that some required files will be copied under your "public" dir.
Minimal code to use the component:
<EmotionDetector
onEmotionDetect={(detection: Detection) => {
//... some stuff with Detection object
}}
detecting={true}
/>
You can also use various props to fully configure the component.
Key | Type | Description | Default |
---|---|---|---|
detecting | boolean | Enable/Disable Detection |
Key | Type | Description | Default |
---|---|---|---|
onEmotionDetect | Function | Called on each detection. Returns a Detection object. | |
emotionDetectPeriod | number | Specifies the period between onEmotionDetect calls | 1000 |
detectionPeriodMillis | number | Set detection period of face-api in milliseconds. Should be <= emotionDetectPeriod | 1000 |
emoThreshold | number | Set a minimum percentage to say a emotion is for sure the one detected. Ex: if "happy" percentage is < emoThreshold, say it's positive. | 60 |
detectAge | boolean | Enable/Disable Age detection | true |
detectSex | boolean | Enable/Disable Sex Detection | true |
showCam | boolean | Show/Hide Cam Component | true |
camSizeRatio | number | Size ratio of the cam component. "1" is the Max Cam Size Resolution. | 1 |
showLabel | boolean | Show/Hide Label component | true |
enableAnimations | boolean | Enable/Disable Animations | true |
labelFormat | string | Detection label format. Available values: "text", "emoji", "both". The Default value depend on the camSizeRatio and on the cam size. | "both" |
text | string | Custom label text | |
labelStyle | React.CSSProperties | Custom label style |
FAQs
EmotionDetector makes use of face-api to detect emotions, genders, age.
We found that @iad-os/emotion-detector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.