joanaz / MMM-Smile

MagicMirror² Module Smile Test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MMM-Smile

This is a module for the MagicMirror. It displays a random funny GIF on the magic mirror, then conducts smiling test for the current user by detecting smiling faces on camera using Haar Cascades, and saves the images in the log folder.

Reference: REAL-TIME SMILE DETECTION IN PYTHON OPENCV.

Usage

The entry in config.js can look like the following. (NOTE: You only have to add the variables to config if you want to change its standard value.)

{
	module: 'MMM-Smile',
    position: "middle_center",
	config: {
        // recognition interval in ms, default to 8 hours
        interval: 8 * 60 * 60 * 1000,
        // total test running time in seconds
        testRunTime: 120,
        // the smiling period in seconds in order to pass the test
        smileLength: 5,
        // use pi camera by default; set it to false for laptop camera
        usePiCam: true
	}
}

Dependencies

  • python-shell (installed via npm install)
  • OpenCV
    • Mac: brew install opencv
    • Linux: sudo apt-get install libopencv-dev python-opencv
    • Raspberry Pi: follow this guide, will take few hours

About

MagicMirror² Module Smile Test

License:MIT License


Languages

Language:JavaScript 63.5%Language:Python 35.6%Language:CSS 0.9%