MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. thebeetleuk
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    T
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 4
    • Groups 0

    thebeetleuk

    @thebeetleuk

    1
    Reputation
    294
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    thebeetleuk Unfollow Follow

    Best posts made by thebeetleuk

    • RE: Facial Recognition - customize your mirror for every user!

      Hi All, I have found out that if you want to use your USB webcam for training you can update the file https://github.com/paviro/MMM-Facial-Recognition-Tools/blob/master/lib/config.py in the appropriate directory with the following. for some reason it doesnt seem to want to fall over to the webcam so I just commented out the pi web cam and added the usb one.

      def get_camera(preview=True):
          try:
      #        from . import picam
      #        capture = picam.OpenCVCapture(preview)
      #        capture.start()
      #        return capture
              from . import webcam
              return webcam.OpenCVCapture(device_id=0)
              capture.start()
              return capture
          except Exception:
              from . import webcam
              return webcam.OpenCVCapture(device_id=0)
      
      posted in Troubleshooting
      T
      thebeetleuk

    Latest posts made by thebeetleuk

    • RE: Facial Recognition - customize your mirror for every user!

      OK after lots and lots of trial and error I hope this helps people… these are the settings and results I had and as far as I can tell the everyone setting doesnt do what I would expect…

      I don’t hink you have a way of identifying a stranger and do something specific for them?

      defaultClass: "default", //Module set used for strangers and if no user is detected
      

      It looks like when everyone is specified on its own then the logic doesnt seem to work. See classes: “everyone” below…

                                      users: ['martin'], // Array with usernames (copy and paste from training script)
                                      defaultClass: "default", //Module set used for strangers and if no user is detected
                                      everyoneClass: "everyone", //Set of modules which should be shown for every user
                                      welcomeMessage: false // Boolean to toggle welcomeMessage
                              }
                      },
                      {
                              module: "clock",
                              position: "top_left",
                              classes: "default" // displays with no face detection (OK) - not displayed when martin detected (OK) - displayed with no specific user detected (OK?)
                      },
                      {
                              module: "clock",
                              position: "top_right",
                              classes: "default everyone" // displays with no face detection (OK) - displayed with no specific user and martin (OK)
                      },
                      {
                              module: "clock",
                              position: "bottom_right",
                              classes: "default martin" // displays with no face detection (OK) - displayed with no specific user and martin (OK)
                      },
                      {
                              module: "clock",
                              position: "bottom_left",
                              classes: "everyone" // never displays (??? I would expect this to display when Martin is detected - or any other user)
                      },
                      {
                              module: "compliments",
                              position: "lower_third",
                              classes: "martin" // only displayed when martin detected (OK)
                      },
      
      posted in Troubleshooting
      T
      thebeetleuk
    • RE: Facial Recognition - customize your mirror for every user!

      Hi All, I have found out that if you want to use your USB webcam for training you can update the file https://github.com/paviro/MMM-Facial-Recognition-Tools/blob/master/lib/config.py in the appropriate directory with the following. for some reason it doesnt seem to want to fall over to the webcam so I just commented out the pi web cam and added the usb one.

      def get_camera(preview=True):
          try:
      #        from . import picam
      #        capture = picam.OpenCVCapture(preview)
      #        capture.start()
      #        return capture
              from . import webcam
              return webcam.OpenCVCapture(device_id=0)
              capture.start()
              return capture
          except Exception:
              from . import webcam
              return webcam.OpenCVCapture(device_id=0)
      
      posted in Troubleshooting
      T
      thebeetleuk
    • RE: Facial Recognition - customize your mirror for every user!

      @mc_landin I’m at this stage as well! for some reason the classes dont change whats displayed when a new face is seen. So in this example the “default” is seen all the time and then when a generic face is seen then the “everyone” class isnt shown. Has anyone got this working?

                  {
                          module: "updatenotification",
                          position: "top_bar",
                          classes: 'default'
                  },
                  {
                          module: "clock",
                          position: "top_left",
                          classes: 'everyone'
                  },
                  {
                          module: 'MMM-Facial-Recognition',
                          config: {
                                  recognitionAlgorithm: 1, // 1=LBPH | 2=Fisher | 3=Eigen
                                  // Threshold for the confidence of a recognized face before it's considered a
                                  // positive match.  Confidence values below this threshold will be considered
                                  // a positive match because the lower the confidence value, or distance, the
                                  // more confident the algorithm is that the face was correctly detected.
                                  lbphThreshold: 50,
                                  fisherThreshold: 250,
                                  eigenThreshold: 3000,
                                  useUSBCam: true, // force the use of a usb webcam on raspberry pi (on other platforms this is always true automatically)
                                  trainingFile: 'modules/MMM-Facial-Recognition-Tools/training.xml', // Path to your training xml
                                  interval: 2, // recognition intervall in seconds (smaller number = faster but CPU intens!)
                                  logoutDelay: 15, // Logout delay after last recognition so that a user does not get instantly logged out if he turns away from the mirror f$
                                  users: [], // Array with usernames (copy and paste from training script)
                                  defaultClass: "default", //Module set used for strangers and if no user is detected
                                  everyoneClass: "everyone", //Set of modules which should be shown for every user
                                  welcomeMessage: true // Boolean to toggle welcomeMessage
                          }
                  },
      
      posted in Troubleshooting
      T
      thebeetleuk