Making an open-source and relatively lightweight face-mood monitoring tool for various live input
- To make a javascript library that can be imported and instantiated quickly and easily, wiring basic variables into facial expression characteristics.
- To make a face that is racially neutral
- To make a face that is aesthetically pleasing without being "too human"
For instance:
from mood-monitor import face;
let variables = {
"width":100,
"height":100,
"mouth": "1.0", // a float between -1 and 1
"eyes": "0.5", // a float between 0 and 1
"eyebrowFactor": "0.75", // a float between -1 and 1 (can extend for emphasis)
"eye-bags": "0.5", // a float between 0 and 1
"cheeks": "0.5" // a float between 0 and 1
};
$("that-div").html(face(variables));
Or
from mood-monitor import expression;
let variables = {
"width":100,
"height":100,
"stressed":"0.5",
"happy":"0.3"
};
$("that-div").html(expression(variables));
Other variables or characteristics could be implemented as well.
This should be considered open source. Beer code license applies.
Azure Facial Detection example
Switch to using template literals Template Literals