Hip module for emitting face movement and emotion events
npm install thumos
Thumos is built upon the clmtrackr library and emits only one event every 5 seconds:
faceMoving
: emitted every 5 seconds with data desribing the change in facial movement during 5 second intervals
Thumos initiates with three different variables:
videoId
: id of HTML5 video elementoverlayId
: id of overlay element necessary for clmtrackr to work correctlydrawModel
: boolean toggle for turning the facial model on the video overlay on/off
It also emits data containing:
data.start
: start time of change in face movementdata.end
: end time of change in face movementdata.now
: time event triggeddata.delta
: integer representing average of all the euclidean differences from the start to end of the movement intervaldata.array
: array of position differences for every coordinate during the movement intervaldata.xArray
: array of x coordinatesdata.yArray
: array of y coordinates
const Thumos = require('thumos')
var faceEvents = new Thumos(videoId, overlayId, drawModel)
faceEvents.bind('faceMoving', function (data) {
console.log('Face moved!', 'start:', data.start, 'end:', data.end, 'now:' data.now, 'delta average:' data.delta, 'delta arrays:' data.array)
})
The ability to emit events based on emotion change
MIT