Read the statement by Michael Teeuw here.
MMM-Face-Reco-DNN , Blank Screen error
-
Hi, I am very new to Rasp Pi. Would be grateful for your help.
I have installed MMM-Face-Reco-DNN module,
When I run the script, I got Magic mirror screen with modules, screen for 1 sec, and then a blank screen.When I look at camera, camera recognizes me, and
I got the message “Hello oberk” on mid top of a blank screen, but no other modules. And then message disappears and I end up with a blank screen, againWould appreciate your help.
-
@oberk so, its sounds like you have a short time to logoff
and then you don’t have the classes: configured in config.js on the modules that match the person identifier
-
You are right, thank you,
Sorted. -
S sdetweil has marked this topic as solved on
-
@oberk Hey, hope you are well!
How did you get this to work correctly?
I have successfully installed everything and my face gets detected successfully. I get the notification pop up saying I’m detected but it doesn’t switch profiles. The modules all have classes assigned too.Am I missing something?
Thanks,
Alfie -
@N3UR0515 show a couple modules w classes defined
-
@sdetweil Hey, thanks for the quick reply.
Here is my full config, it’s a fresh install with just the 2 modules installed.
/* Config Sample * * For more information on how you can configure this file * see https://docs.magicmirror.builders/configuration/introduction.html * and https://docs.magicmirror.builders/modules/configuration.html * * You can use environment variables using a `config.js.template` file instead of `config.js` * which will be converted to `config.js` while starting. For more information * see https://docs.magicmirror.builders/configuration/introduction.html#enviromnent-variables */ let config = { address: "0.0.0.0", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "0.0.0.0", "::" to listen on any interface // Default, when address config is left out or empty, is "localhost" port: 8080, basePath: "/", // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy // you must set the sub path here. basePath must end with a / ipWhitelist: [], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], useHttps: false, // Support HTTPS or not, default "false" will use HTTP httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true language: "en", locale: "en-GB", logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging timeFormat: 24, units: "metric", modules: [ { module: "alert", classes: "default everyone", }, { module: "updatenotification", position: "top_bar", classes: "default everyone" }, { module: "clock", position: "top_left", classes: "default everyone" }, { module: "calendar", header: "US Holidays", position: "top_left", classes: "kirsty", config: { calendars: [ { fetchInterval: 7 * 24 * 60 * 60 * 1000, symbol: "calendar-check", url: "https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics" } ] } }, { module: "compliments", position: "lower_third", classes: 'kirsty' }, { module: "weather", position: "top_right", classes: "default everyone", config: { weatherProvider: "openmeteo", type: "current", lat: 40.776676, lon: -73.971321 } }, { module: "weather", position: "top_right", header: "Weather Forecast", classes: "default everyone", config: { weatherProvider: "openmeteo", type: "forecast", lat: 40.776676, lon: -73.971321 } }, { module: "newsfeed", position: "bottom_bar", classes: 'alfie', config: { feeds: [ { title: "BBC News - England", url: "https://feeds.bbci.co.uk/news/england/rss.xml" } ], showSourceTitle: true, showPublishDate: true, broadcastNewsFeeds: true, broadcastNewsUpdates: true } }, { module: 'MMM-ProfileSwitcher', config: { enterMessages: { // I will have only one message. "alfie": "You again?!?!", // Kirsty has two portions "kirsty": ["Oh hello.", "Hey how is it going?"] } } }, { module: 'MMM-Face-Reco-DNN', config: { // Logout 15 seconds after user was not detected anymore, if they will be detected between this 15 // Seconds, they delay will start again logoutDelay: 15000, // How many time the recognition starts, with a RasPi 3+ it would be good every 2 seconds checkInterval: 2000, // Module set used for when there is no face detected ie no one is in front of the camera noFaceClass: 'noface', // Module set used for when there is an unknown/unrecognised face detected unknownClass: 'unknown', // Module set used for when there is a known/recognised face detected knownClass: 'known', // Module set used for strangers and if no user is detected defaultClass: 'default', // Set of modules which should be shown for any user ie when there is any face detected everyoneClass: 'everyone', // Set of modules that are always shown - show if there is a face or no face detected alwaysClass: 'always', // xml to recognize with haarcascade cascade: 'modules/MMM-Face-Reco-DNN/model/haarcascade_frontalface_default.xml', // pre encoded pickle with the faces encodings: 'modules/MMM-Face-Reco-DNN/model/encodings.pickle', // Brightness (0-100) brightness: 0, // Contrast (0-127) contrast: 0, // Rotate camera image (-1 = no rotation, 0 = 90°, 1 = 180°, 2 = 270°) rotateCamera: -1, // method of face recognition (dnn = deep neural network, haar = haarcascade) method: 'dnn', // which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate // deep-learning model which is GPU/CUDA accelerated (if available). The default is "hog". detectionMethod: 'hog', // how fast in ms should the modules hide and show (face effect) animationSpeed: 0, // Path to Python to run the face recognition (null / '' means default path, with Bookworm you need to set the virutal environment like /home/youruser/python-facereco/bin/python3. You can also find out the correct path if you are activated the virtual environment and run "which python3") pythonPath: "/home/alfie/python-facereco/bin/python3", // Boolean to toggle welcomeMessage welcomeMessage: true, // Dictionary for person name mapping in welcome message // Allows for displaying name with complex character sets in welcome message // e.g. jerome => Jérôme, hideyuki => 英之, mourad => مراد usernameDisplayMapping: null, // Save some pictures from recognized people, if unknown we save it in folder "unknown" // So you can extend your dataset and retrain it afterwards for better recognitions extendDataset: false, // if extenDataset is set, you need to set the full path of the dataset dataset: 'modules/MMM-Face-Reco-DNN/dataset/', // How much distance between faces to consider it a match. Lower is more strict. tolerance: 0.6, // allow multiple concurrent user logins, 0=no, any other number is the maximum number of concurrent logins multiUser: 0, // resoltuion of the image resolution: [1920, 1080], // width of the image for processing processWidth: 500, // output image on mm outputmm: 0, // turn on extra debugging 0=no, 1=yes debug: 0, } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; } -
@N3UR0515 and what is the user name detected
-
@sdetweil The username detected is
alfie.Here is a log extract confirming it successfully detects me:
0|mm | [2024-11-02 17:20:49.387] [INFO] Newsfeed-Fetcher: Broadcasting 26 items. 0|mm | [2024-11-02 17:20:49.390] [INFO] updatenotification: Updater Class Loaded! 0|mm | [2024-11-02 17:20:49.390] [INFO] updatenotification: Checking PM2 using... 0|mm | [2024-11-02 17:20:49.401] [INFO] updatenotification: [PM2] You are not using pm2 0|mm | [2024-11-02 17:20:49.483] [INFO] Newsfeed-Fetcher: reloadInterval set to ttl=900000 for url https://feeds.bbci.co.uk/news/england/rss.xml 0|mm | [2024-11-02 17:20:49.536] [INFO] Newsfeed-Fetcher: Broadcasting 26 items. 0|mm | [2024-11-02 17:20:49.798] [INFO] Calendar-Fetcher: Broadcasting 13 events from https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics. 0|mm | [2024-11-02 17:21:04.327] [LOG] [MMM-Face-Reco-DNN] Users alfie logged in. 0|mm | [2024-11-02 17:21:06.463] [LOG] [MMM-Face-Reco-DNN] Users alfie logged out. -
@N3UR0515 you cant have profile switcher AND facereco. they do the same thing
so, only newsfeed should show for alfie
-
@sdetweil Thank you so much! Knew I’d done something wrong.
Not sure why I thought they had to be used together.
Thanks for the speedy responses👊
-
@N3UR0515 you would use profileswitcher if you had something else advising which profile to use and nothing else doing that function
facereco is doing it all
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login