• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 - Where do elements go go?

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 2 Posters 9.2k Views 5 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.
  • P Offline
    Pauliolio
    last edited by Jul 10, 2016, 9:56 PM

    Hi

    Can someone give me a bit of help getting this going please?
    I’m making a real rookie mistake here I’m sure - This is the first module I’ve tried to add in after getting the modules in the sample config file configured & working.

    I’ve put the main(?) module folder called MMM-Facial-Recognition-master in /home/pi/MagicMirror/modules/default/.
    I’ve installed the dependencies OK.
    I’ve used the tool to create the training images.
    I’ve added my ‘name’ to the facerecognition_tester/lib/config.py file
    I’ve used the trainer to create the XML file.

    The next step in the test tool instructions have me stuck though:
    “2. Copy your training.xml from tools/facetrainer into the root folder of this tool.”
    And having added the module info to the MagicMirror conf file all I get is a blank screen now.

    So, some questions please:
    Is the MMM-Facial-Recognition-master folder in the right place?
    Is anything from the capture, training, and testing tools required for the module to work other than the xml file?
    If not, why does adding the config for the face recognition module to config.js result in a completely blank output on the mirror?

    With regards to the testing tool…
    There is no ‘tools’ folder. Does it have to be in a folder called ‘tools’? If so, where should it be?
    When I try to use the test tool I get this error:
    pi@MirrorPi3:~/MagicMirror/Tools/facerecognition_tester $ python facerecognition.py
    Loading training data…
    ALGORITHM: LBPH
    Training data loaded!
    OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp, line 3737
    Traceback (most recent call last):
    File “facerecognition.py”, line 42, in
    image = cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY)
    cv2.error: /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp:3737: error: (-215) scn == 3 || scn == 4 in function cvtColor

    Any idea what the issue is here?

    Many thanks,
    Pauliolio

    1 Reply Last reply Reply Quote 0
    • K Offline
      KirAsh4 Moderator
      last edited by Jul 11, 2016, 12:34 AM

      No modules get installed in the /modules/default folder, just in /modules.

      A Life? Cool! Where can I download one of those from?

      1 Reply Last reply Reply Quote 0
      • P Offline
        Pauliolio
        last edited by Jul 11, 2016, 1:05 AM

        Many thanks @KirAsh4 .
        I’ve tried it there, still no joy though…

        1 Reply Last reply Reply Quote 0
        • K Offline
          KirAsh4 Moderator
          last edited by Jul 11, 2016, 2:49 AM

          Yeah, you’d have to ask the module’s author for help, or others who use this module.

          A Life? Cool! Where can I download one of those from?

          1 Reply Last reply Reply Quote 0
          • C Offline
            Cato Module Developer
            last edited by Jul 11, 2016, 5:04 AM

            From one rookie to another:

            I had to add ‘classes’ in config.js with ‘default’, ‘for_all’ or person’s name in all modules I wanted to be shown.

            Eksample:

                        {
                                module: 'alert',
                                classes: 'default'
                        },
            
            1 Reply Last reply Reply Quote 0
            • K Offline
              KirAsh4 Moderator
              last edited by Jul 11, 2016, 5:34 AM

              That should not be necessary. If you had to do that and MM² loaded up after that, then there’s something seriously wrong with the module for it to “leak” like that.

              A Life? Cool! Where can I download one of those from?

              1 Reply Last reply Reply Quote 0
              • P Offline
                paviro Admin
                last edited by paviro Jul 11, 2016, 12:08 PM Jul 11, 2016, 12:07 PM

                It is because I hide every module that is not for everyone at startup.
                default modules are for users that are not recognized or if there is no user at all.
                for_all are modules shown for everyone.

                We're all stories in the end. Just make it a good one, eh?

                – The Doctor

                C 1 Reply Last reply Jul 11, 2016, 7:04 PM Reply Quote 0
                • C Offline
                  Cato Module Developer @paviro
                  last edited by Jul 11, 2016, 7:04 PM

                  @paviro Would it make more sence to say that no “classes” equals to “default” and therefore would be visible?

                  P 1 Reply Last reply Jul 12, 2016, 7:34 AM Reply Quote 0
                  • P Offline
                    paviro Admin @Cato
                    last edited by Jul 12, 2016, 7:34 AM

                    @Cato i think there was a reason why I did not do that but if you would like to look into it you can send me a pull request! :)

                    We're all stories in the end. Just make it a good one, eh?

                    – The Doctor

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      plumcraft
                      last edited by Jul 20, 2016, 2:23 PM

                      Hello,

                      I’m trying to use facial trainer but i got this error ( when executing python capture.py)
                      reference : https://github.com/paviro/MMM-Facial-Recognition-Tools/tree/master/facetrainer


                      What do you want to do?
                      [1] Capture training images from webcam
                      [2] Convert ‘*.jpg’ pictures from other cameras to training images
                      –> 1

                      Enter the name of the person you want to capture or convert images for.
                      –> plumcraft
                      Images will be placed in ./training_data/plumcraft


                      Starting process…

                      Capturing positive training images.
                      Press enter to capture an image.
                      Press Ctrl-C to quit.

                      Capturing image…
                      OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp, line 3737
                      Traceback (most recent call last):
                      File “capture.py”, line 35, in
                      capture.capture()
                      File “/home/pi/MMM-Facial-Recognition-Tools/facetrainer/lib/capture.py”, line 57, in capture
                      image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
                      cv2.error: /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp:3737: error: (-215) scn == 3 || scn == 4 in function cvtColor

                      I’m using a raspberry pi 3 with pi camera.

                      Looking forward to use this module.

                      Thanks

                      X 1 Reply Last reply Dec 23, 2016, 7:52 PM 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