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.

    Facial Recognition Module - Step by Step Guide

    Scheduled Pinned Locked Moved Troubleshooting
    28 Posts 14 Posters 34.8k Views 22 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.
    • N Offline
      naktah
      last edited by

      specify your user labels in the environment with

      export FACE_USERS=Alice,Bob,Casey,Doug

      im not sure what to do with this. do i have to write this in the terminal? because everytime i restart my pi, the facial recognition doesnt recognize my face

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @naktah
        last edited by

        @naktah u need to put that in your logon profile

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        N 1 Reply Last reply Reply Quote 0
        • N Offline
          naktah @sdetweil
          last edited by

          @sdetweil im not sure how to do that. can you show me how? im pretty much new to this stuff and this issue has been bothering me for days now.

          1 Reply Last reply Reply Quote 0
          • S Offline
            Sneek
            last edited by

            @naktah after writing the following command in the terminal:

            python tools.train.py
            

            you get some output with the users you have setup (remember the order). Assuming it gives you Alice,Bob,Casey,Doug, then you run this in the terminal:

            export FACE_USERS=Alice,Bob,Casey,Doug
            
            
            1 Reply Last reply Reply Quote 0
            • A Offline
              andrewgamalkamel @Irfan ali
              last edited by

              @Irfan-ali yes!

              1 Reply Last reply Reply Quote 0
              • S Offline
                SdeGeata
                last edited by

                Error on “python capture.py”

                pi@raspberrypi:~/MagicMirror/modules/MMM-Facial-Recognition-Tools $ python capture.py
                Traceback (most recent call last):
                  File "capture.py", line 18, in <module>
                    import lib.capture as capture
                  File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/capture.py", line 21, in <module>
                    from . import config
                  File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/config.py", line 15, in <module>
                    (CV_MAJOR_VER, CV_MINOR_VER, mv1, mv2) = cv2.__version__.split(".")
                ValueError: need more than 3 values to unpack
                
                
                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  aniketdongare07 @SdeGeata
                  last edited by

                  @SdeGeata Got the same error, did you resolve it?

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @aniketdongare07
                    last edited by sdetweil

                    @aniketdongare07 @SdeGeata the newer version of python only provide 3 version info strings. So that code needs to drop the 4th parm from the parse request

                    (CV_MAJOR_VER, CV_MINOR_VER, mv1) = cv2.
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    A M 2 Replies Last reply Reply Quote 0
                    • A Offline
                      aniketdongare07 @sdetweil
                      last edited by

                      @sdetweil I tried to do what you said and in turn I got the following error:```
                      Traceback (most recent call last):
                      File “capture.py”, line 18, in
                      import lib.capture as capture
                      File “/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/capture.py”, line 21, in
                      from . import config
                      File “/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/config.py”, line 15, in
                      (CV_MAJOR_VER, CV_MINOR_VER, mv1) = cv2
                      TypeError: ‘module’ object is not iterable

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @aniketdongare07
                        last edited by sdetweil

                        @aniketdongare07 you need the rest of the line cv2… I am on my phone, so cut/paste is a pain

                        (CV_MAJOR_VER, CV_MINOR_VER, mv1) = cv2.__version__.split(".")
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        O 1 Reply Last reply Reply Quote 0
                        • A Offline
                          amsuvarna27 @konradwalsh
                          last edited by

                          @konradwalsh
                          I’m using Raspberry pi CSI camera.
                          How to do with it.
                          Please help me.

                          1 Reply Last reply Reply Quote 0
                          • O Offline
                            OGElijah @sdetweil
                            last edited by

                            @sdetweil Hey, buddy… I’m not sure what it is you’re telling me to do here. I wrote what you sent into the terminal but it didn’t do anything. In fact, it’s treating the = sign as a syntax error… what am I doing wrong?

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @OGElijah
                              last edited by

                              @ogelijah u have to edit the failing py script
                              and change the failing line

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              O 1 Reply Last reply Reply Quote 1
                              • O Offline
                                OGElijah @sdetweil
                                last edited by

                                @sdetweil I get you! I was being an idiot and I went into the wrong script. But now I’ve reached the point where it says “no module named cv2”

                                S 1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sdetweil @OGElijah
                                  last edited by

                                  @ogelijah no idea. that’s a python lib, which should have been installed from the prior setup steps

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  O 1 Reply Last reply Reply Quote 0
                                  • O Offline
                                    OGElijah @sdetweil
                                    last edited by

                                    @sdetweil Ah, okay. I’ll keep on working on this. Cheers

                                    S 1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      sdetweil @OGElijah
                                      last edited by

                                      @ogelijah because you replaced a line that used cv2, with another line that used cv2

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        mraeymaekers @sdetweil
                                        last edited by mraeymaekers

                                        @sdetweil
                                        This fix worked! Thank you.

                                        My error message:

                                        python capture.py
                                        Traceback (most recent call last):
                                        File “capture.py”, line 18, in
                                        import lib.capture as capture
                                        File “/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/capture.py”, line 21, in
                                        from . import config
                                        File “/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/config.py”, line 15, in
                                        (CV_MAJOR_VER, CV_MINOR_VER, mv1, mv2) = cv2.version.split(“.”)
                                        ValueError: need more than 3 values to unpack

                                        Steps to fix:

                                        cd ~/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/
                                        nano config.py

                                        go to line 15 … I commented out the original line and added a line with ‘,mv2’ removed.

                                        #(CV_MAJOR_VER, CV_MINOR_VER, mv1, mv2) = cv2.version.split(“.”)
                                        (CV_MAJOR_VER, CV_MINOR_VER, mv1) = cv2.version.split(“.”)

                                        1 Reply Last reply Reply Quote 1
                                        • O Offline
                                          OGElijah
                                          last edited by

                                          I can’t get the .xml file no matter how hard I try… I keep running the train.py file and wait, but nothing happens

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            sdetweil @OGElijah
                                            last edited by

                                            @ogelijah how many images do you have for different people,?

                                            what pi is this?

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            1 Reply Last reply Reply Quote 0

                                            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
                                            • 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