<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MMM-Facial-Recognition]]></title><description><![CDATA[<p dir="auto">hello everyone,<br />
First of all,thank you very much for face recognition on smart mirror <a class="plugin-mentions-user plugin-mentions-a" href="/user/paviro" aria-label="Profile: paviro">@<bdi>paviro</bdi></a><br />
but ı stuck somewhere<br />
ı did all the steps but ı’m using raspberry pi camera and magic mirror does not turn on when I start<br />
but in the capture and train part is running smoothly<br />
what should ı do<br />
I’m waiting for your help</p>
]]></description><link>https://forum.magicmirror.builders/topic/9203/mmm-facial-recognition</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 00:58:51 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/9203.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Dec 2018 11:13:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-Facial-Recognition on Tue, 16 Apr 2019 13:03:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anandprabhat567" aria-label="Profile: anandprabhat567">@<bdi>anandprabhat567</bdi></a>  canu edit this and change the marks before and after to the backtic char (left of the 1 key), need three before and after</p>
]]></description><link>https://forum.magicmirror.builders/post/56005</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/56005</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 16 Apr 2019 13:03:13 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Facial-Recognition on Tue, 16 Apr 2019 04:54:55 GMT]]></title><description><![CDATA[<p dir="auto">I hope you are talking about capture part and train part in MMM-Facial-recognition-Tools. It works fine but in mmm-facial recognition folder there is a config .py file which created the problem throwing config=jsonl.oads(sys arg…) // I do not remmeber.<br />
I just figured out few hours ago.<br />
TRy this code</p>
<p dir="auto">#!/usr/bin/python</p>
<h1>coding: utf8</h1>
<p dir="auto">“”"MMM-Facial-Recognition - MagicMirror Module<br />
Face Recognition script config<br />
The MIT License (MIT)</p>
<p dir="auto">Copyright © 2016 Paul-Vincent Roll (MIT License)<br />
Based on work by Tony DiCola (Copyright 2013) (MIT License)<br />
“”"<br />
import inspect<br />
import os<br />
import json<br />
import sys<br />
import platform</p>
<p dir="auto">def to_node(type, message):<br />
print(json.dumps({type: message}))<br />
sys.stdout.flush()</p>
<p dir="auto">_platform = platform.uname()[4]<br />
path_to_file = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))</p>
<h1>Size (in pixels) to resize images for training and prediction.</h1>
<h1>Don’t change this unless you also change the size of the training images.</h1>
<p dir="auto">FACE_WIDTH = 92<br />
FACE_HEIGHT = 112</p>
<h1>Face detection cascade classifier configuration.</h1>
<h1>You don’t need to modify this unless you know what you’re doing.</h1>
<h1>See: <a href="http://docs.opencv.org/modules/objdetect/doc/cascade_classification.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://docs.opencv.org/modules/objdetect/doc/cascade_classification.html</a></h1>
<p dir="auto">HAAR_FACES = path_to_file + ‘/haarcascade_frontalface.xml’<br />
HAAR_SCALE_FACTOR = 1.3<br />
HAAR_MIN_NEIGHBORS = 4<br />
HAAR_MIN_SIZE = (30, 30)</p>
<p dir="auto">#CONFIG = json.loads(sys.argv[1]);<br />
CONFIG={</p>
<pre><code>    "recognitionAlgorithm": 1,
    
    "lbphThreshold": 50,
    "fisherThreshold": 250,
    "eigenThreshold": 3000,
    
    "useUSBCam": False,
    
    "trainingFile": '/home/pi/MagicMirror/modules/MMM-Facial-Recognition/training.xml',
    
    "interval": 2,
    
    "logoutDelay": 15,
    
    "users": ['user1'],
    
    "defaultClass": "default",
    
    "everyoneClass": "everyone",
    
    "welcomeMessage": True
</code></pre>
<p dir="auto">}</p>
<p dir="auto">def get(key):<br />
return CONFIG[key]</p>
<p dir="auto">def get_camera():<br />
to_node(“status”, “-” * 20)<br />
try:<br />
if get(“useUSBCam”) == False:<br />
#import picam<br />
from imutils.video import VideoStream<br />
to_node(“status”, “PiCam Enabled…”)<br />
vs = VideoStream(usePiCamera=True,resolution=(640,480)).start()<br />
#cam = picam.OpenCVCapture()<br />
#cam.start()<br />
return vs<br />
else:<br />
raise Exception<br />
except Exception:<br />
import webcam<br />
to_node(“status”, “Webcam ausgewählt…”)<br />
return webcam.OpenCVCapture(device_id=0)<br />
to_node(“status”, “-” * 20)</p>
<p dir="auto">replace the <a href="http://config.py" target="_blank" rel="noopener noreferrer nofollow ugc">config.py</a> code with above code.<br />
I was able to fix the error with this. Hope it helps!</p>
]]></description><link>https://forum.magicmirror.builders/post/55980</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/55980</guid><dc:creator><![CDATA[anandprabhat567]]></dc:creator><pubDate>Tue, 16 Apr 2019 04:54:55 GMT</pubDate></item></channel></rss>