-
Notifications
You must be signed in to change notification settings - Fork 0
/
face.js
38 lines (25 loc) · 834 Bytes
/
face.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
function detect_faces(){
//alert("hi")
var {PythonShell} = require('python-shell');
var pyshell = new PythonShell('faces.py');
pyshell.on('message', function (message) {
console.log(message);
});
pyshell.send('hello');
}
detect_faces()
// function add_face(){
// var python = require("python-shell")
// var path = require("path")
// var name = document.getElementById("person").value
// var options = {
// scriptPath : path.join(__dirname, '/../engine/'),
// pythonPath : '/usr/local/bin/python3',
// args : ["cam", name]
// }
// var face = new python("add_face.py", options);
// face.end(function(err, code, message) {
// swal("Face added!", "We can now recognize your face", "success")
// document.getElementsById("add").innerHTML = "Add a new face";
// })
// }