MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Face recognition recognizing anyone as me

    Scheduled Pinned Locked Moved Troubleshooting
    11 Posts 3 Posters 7.7k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      j.e.f.f Project Sponsor Module Developer @saifkazi
      last edited by

      @saifkazi How many training images did you use? And did you use training images taken from the actual camera or a bunch of existing photos?

      I got decent results when I trained the engine with about 80 images, all taken from the camera. I took the training images in similar lighting conditions to where my mirror ultimately ended up being mounted, and at various distances and angles from the mirror that would be fairly “typical” of someone standing in front of the mirror. I don’t recall the confidence numbers I got, but I had it reliably recognizing myself and my wife, as well as NOT recognizing anyone else and returning to the default profile.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        saifkazi @j.e.f.f
        last edited by

        @j.e.f.f
        Hey Jeff thanks for the reply . I used existing pic taken from my old usb webcam and It’s only one pic. Do you think taking pic from dslr would make any difference? Or should I use existing usb webcam ?

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          j.e.f.f Project Sponsor Module Developer @saifkazi
          last edited by

          @saifkazi Use the camera you are using for facial recognition (if that’s your USB cam, then use that), ideally in the same or similar lighting conditions as where your mirror will ultimately be mounted.

          Pictures taken with the DSLR will be vastly optically different from what the USB cam will pick up, so you’ll likely have difficulty getting good results.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            saifkazi @j.e.f.f
            last edited by

            @j.e.f.f
            thanks for the reply Jeff .But Some time using fswebcam command for more than 80 image can be frustrating . Still I will try this
            Regards Saif

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              j.e.f.f Project Sponsor Module Developer @saifkazi
              last edited by

              @saifkazi Indeed, it is quite time consuming. Try taking, say, about 20 pictures to start with to see if your results improve. If they don’t, take another 20 or so. The first 20 will still be there to use for training when you run it the second time.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                saifkazi @j.e.f.f
                last edited by saifkazi

                @j.e.f.f
                Thanks Jeff for your help
                One last thing is can I use other software other than fswebcam ? Like camera on Windows 10 ?because pic quality is quite good in that app it’s good rather than rpi3 fswebcam.

                Regards Saif

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  j.e.f.f Project Sponsor Module Developer @saifkazi
                  last edited by

                  @saifkazi I’m not aware of anything else, but I’m not sure the quality is a product of the software so much as how the image is processed in preparation for facial recognition. From what I recall, the image is first lowered in resolution, then converted to greyscale, which would produce a visually low quality image.

                  1 Reply Last reply Reply Quote 0
                  • da4throuxD Offline
                    da4throux
                    last edited by

                    I lightly modified the training software so that it loops on its own when taking pictures, so that by just standing a few minutes in front of the mirror it gets a lot of different picture.
                    That might be a solution for you maybe.

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      saifkazi @da4throux
                      last edited by

                      @da4throux
                      What modifications you made on training software?

                      da4throuxD 1 Reply Last reply Reply Quote 0
                      • da4throuxD Offline
                        da4throux @saifkazi
                        last edited by

                        @saifkazi I just checked to see if I still have the code but it’s gone with a module update :(
                        basically, I think I just modified capture.py in MMM-Facial-Recognition-Tools, and added a loop around the capture.capture(preview) with a wait time of 3 seconds (you get to see if the process was successful in the shell).

                        Hope that help

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy