Skip to content

Commit e850760

Browse files
committed
update readme
1 parent faac019 commit e850760

File tree

4 files changed

+30
-23
lines changed

4 files changed

+30
-23
lines changed

MMM-Smile.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Module.register('MMM-Smile', {
1212
defaults: {
1313
// recognition interval in ms, default to 8 hours
1414
interval: 8 * 60 * 60 * 1000,
15+
// test running time in seconds
16+
testRunTime: 60,
1517
// smile time in seconds
1618
smileLength: 5,
1719
// use pi camera by default
18-
usePiCam: true,
19-
// test running time in seconds
20-
testRunTime: 60
20+
usePiCam: true
2121
},
2222

2323
start: function() {
@@ -91,10 +91,6 @@ Module.register('MMM-Smile', {
9191
if (this.gitUrl != '') {
9292
var img = document.createElement("img");
9393
img.src = this.gifUrl
94-
95-
// image.width = this.config.imageSize.toString();
96-
// image.height = this.config.imageSize.toString();
97-
9894
wrapper.appendChild(img);
9995
}
10096

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
# MMM-Emotion-Detection
2-
This is an extension for the [MagicMirror](https://github.com/MichMich/MagicMirror). It does smile test for the current user.
1+
# MMM-Smile
32

4-
Algorithm from [emotion-detection](https://github.com/liy9393/emotion-detection)
3+
This is a module for the [MagicMirror](https://github.com/MichMich/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.
4+
5+
Reference: [REAL-TIME SMILE DETECTION IN PYTHON OPENCV](http://pushbuttons.io/blog/2015/4/27/smile-detection-in-python-opencv).
56

67
## Usage
78

8-
The entry in config.js can look like the following. (NOTE: You only have to add the variables to config if want to change its standard value.)
9+
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.)
910

1011
```
1112
{
12-
module: 'MMM-Emotion-Detection',
13+
module: 'MMM-Smile',
14+
position: "middle_center",
1315
config: {
14-
// recognition intervall in seconds
15-
interval: 2,
16+
// recognition interval in ms, default to 8 hours
17+
interval: 8 * 60 * 60 * 1000,
18+
// total test running time in seconds
19+
testRunTime: 120,
20+
// the smiling period in seconds in order to pass the test
21+
smileLength: 5,
22+
// use pi camera by default; set it to false for laptop camera
23+
usePiCam: true
1624
}
1725
}
1826
```
@@ -21,6 +29,8 @@ The entry in config.js can look like the following. (NOTE: You only have to add
2129
## Dependencies
2230
- [python-shell](https://www.npmjs.com/package/python-shell) (installed via `npm install`)
2331
- [OpenCV](http://opencv.org)
32+
- Mac: `brew install opencv`
2433
- Linux: `sudo apt-get install libopencv-dev python-opencv`
25-
- Mac: `brew install opencv`
34+
- Raspberry Pi: follow this [guide](http://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/), will take few hours
35+
2636

node_helper.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
const NodeHelper = require('node_helper');
33
const request = require('request');
44
const PythonShell = require('python-shell');
5-
// this.pythonStarted = false
65

76
module.exports = NodeHelper.create({
87

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@
44
"description": "Smile Test for the Magic Mirror.",
55
"repository": {
66
"type": "git",
7-
"url": "git+https://github.com/paviro/MMM-Facial-Recognition"
7+
"url": "git+https://github.com/joanaz/MMM-Smile"
88
},
99
"keywords": [
1010
"magic mirror",
1111
"smart mirror",
12-
"Facial expression recognition",
13-
"module"
12+
"module",
13+
"magic mirror module",
14+
"facial expression recognition",
15+
"smile detection"
1416
],
15-
"author": "Paul-Vincent Roll",
16-
"contributors": "https://github.com/paviro/MMM-Facial-Recognition/graphs/contributors",
17+
"author": "Joanna Zhang",
18+
"contributors": "https://github.com/joanaz/MMM-Smile/graphs/contributors",
1719
"license": "MIT",
1820
"bugs": {
19-
"url": "https://github.com/paviro/MMM-Facial-Recognition/issues"
21+
"url": "https://github.com/joanaz/MMM-Smile/issues"
2022
},
21-
"homepage": "https://github.com/paviro/MMM-Facial-Recognition#readme",
23+
"homepage": "https://github.com/joanaz/MMM-Smile#readme",
2224
"dependencies": {
2325
"python-shell": "latest"
2426
}

0 commit comments

Comments
 (0)