@iad-os/emotion-detector
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@iad-os/emotion-detector", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "EmotionDetector makes use of face-api to detect emotions, genders, age.", | ||
@@ -21,2 +21,2 @@ "main": "index.ts", | ||
"license": "ISC" | ||
} | ||
} |
@@ -1,2 +0,3 @@ | ||
# Introduction | ||
# Introduction | ||
EmotionDetector is a fully configurable library that makes use of [face-api.js](https://github.com/justadudewhohacks/face-api.js/) to detect: | ||
@@ -9,2 +10,3 @@ | ||
# Getting Started | ||
## Install | ||
@@ -16,7 +18,5 @@ | ||
## Usage Example | ||
For a complete usage example could the see the [demo project](https://dev.azure.com/iad-ops/P219%20G4Mobility/_git/demo-emotion-detector). However, there's the minimal code to use the component: | ||
Minimal code to use the component: | ||
@@ -32,4 +32,4 @@ ```react | ||
You can also use various props to fully configure the component. | ||
## Available props | ||
@@ -45,15 +45,15 @@ | ||
| 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 | 1000 | | ||
| 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 | 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 | | ||
| **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 | | | ||
| **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 | | ||
| **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 | | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36795
56