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

MMM-Face-Reco-DNN - All new Face Recognition

Scheduled Pinned Locked Moved Utilities
36 Posts 14 Posters 16.8k Views 17 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.
  • C Offline
    ChrizZz
    last edited by ChrizZz Jul 21, 2019, 12:52 PM Jul 21, 2019, 12:51 PM

    as a Noob I have a few questions regarding the installation process - I passed now OpenCV:

    At first for me it looks like this is the newest face recognition module and therefore I should go for installing this one instead of the other 2 options, right?

    Now I finished the OpenCV installation by using the linked guide from pyimagesearch. There OpenCV was installed in an virtual environment. Is this important? Do I have to install all the libs like dlib or face recognition also in this virtual environment?

    N 1 Reply Last reply Jul 22, 2019, 6:11 AM Reply Quote 0
    • N Offline
      nischi @ChrizZz
      last edited by Jul 22, 2019, 6:11 AM

      @ChrizZz

      Yes its the newest version of the face reco 😊

      No its not that important that you use a virtual environment, bit with this you can also install different versions on the same machine. but if you have a virtual environment you need to install all dependencies ther, dlib and face reco too.

      1 Reply Last reply Reply Quote 0
      • I Offline
        Ivanov_d
        last edited by Jul 22, 2019, 8:16 AM

        @ChrizZz I followed the tutorial and installed OpenCV and all dependencies in a virtual environment, but that did not go very well afterwards, you have to reconfigure the module with the correct paths and that can be cumbersome, therefore I started on a clean state and installed OpenCV and the dependencies without a virtual envioronment - e.g. follow the same tutorial without the part related to virtual enviornment. That is the most appropriate for our use case.

        1 Reply Last reply Reply Quote 2
        • C Offline
          ChrizZz
          last edited by Jul 22, 2019, 7:22 PM

          damn - 2nd try without a virtual environment.

          @nischi: Is there a chance that you merge your module also with MMM-MotionDetector? Currently I use the camera to activate and deactive my screen and Google told me that it isn’t possible that 2 processes use the same camera. The suggested solution was to use a 2nd camera, merge both processes or stream the camera picture.

          N 1 Reply Last reply Jul 25, 2019, 12:53 PM Reply Quote 1
          • I Offline
            Ivanov_d
            last edited by Jul 24, 2019, 7:58 PM

            @ChrizZz I have used camera motion detection and I gave it up, because:

            1. It is not very reliable (maybe it was just my cheap camera that I used for testing back then)
            2. it is resource hungry

            Because of that I use an external wireless PIR sensor which is part of my smart home system to turn on/off my SmartMirror and it works great. Since the motion processing happens on my smart home system and the Mirror is turned on/off via SSH command it takes up no resources at all from the MagicMirror which is already at 60% load when using Facial Recognition.

            1 Reply Last reply Reply Quote 2
            • N Offline
              nischi @ChrizZz
              last edited by Jul 25, 2019, 12:53 PM

              @ChrizZz
              You can use my other Module https://github.com/nischi/MMM-MotionControl to control TV with my Face Reco Module. It communicate with Notifications and is not using an own Camera Stream.

              G 1 Reply Last reply Jul 25, 2020, 11:29 PM Reply Quote 1
              • C Offline
                ChrizZz
                last edited by ChrizZz Jul 26, 2019, 9:43 PM Jul 26, 2019, 3:13 PM

                oh, I didn’t know that you have a modul for it. But unfortunately it isn’t working on my Pi. Your modul doesn’t recognize a motion.

                Do I have to uninstall the MMM-MotionDetector first?
                Or do I need to run Face-Reco-DNN or the OCV3 version?

                //edit: I think I know why it isn’t working. Maybe my display isn’t HDMI-CEC ready. I changed the command of your node_helper.js.
                Default:

                turnOn: function() {
                		var self = this;
                		exec('echo "on 0" | cec-client ' + this.config.comport + ' -s -d 1', function (error, stdout, stderr) {
                			self.status = 'on';
                

                My version:

                turnOn: function() {
                		var self = this;
                		exec('vcgencmd display_power 1', function (error, stdout, stderr) {
                			self.status = 'on';
                

                Instead of sending a note to my display for standby I switch off the display_power. But I can’t wake up the display again. I think I have to use Face-Reco-DNN or Facial-Recognition-OCV3. Currently I don’t use them because I have to do the setup for the DNN version.

                N 1 Reply Last reply Jul 27, 2019, 6:07 AM Reply Quote 0
                • N Offline
                  nischi @ChrizZz
                  last edited by Jul 27, 2019, 6:07 AM

                  @ChrizZz
                  Yes you need to use one of the Face Reco Module that this works. Better my new Module ;) it’s much more accurate.

                  C 1 Reply Last reply Jul 27, 2019, 11:33 AM Reply Quote 1
                  • C Offline
                    ChrizZz @nischi
                    last edited by ChrizZz Jul 27, 2019, 12:47 PM Jul 27, 2019, 11:33 AM

                    @nischi said in MMM-Face-Reco-DNN - All new Face Recognition:

                    @ChrizZz
                    Yes you need to use one of the Face Reco Module that this works. Better my new Module ;) it’s much more accurate.

                    Thanks, I will use your new module.

                    During the setup I have another issue. It’s when I want to start encoding I get this error message:

                    Traceback (most recent call last):
                      File "encode.py", line 5, in <module>
                        from imutils import paths
                      File "/usr/local/lib/python3.7/dist-packages/imutils/__init__.py", line 8, in <module>
                        from .convenience import translate
                      File "/usr/local/lib/python3.7/dist-packages/imutils/convenience.py", line 6, in <module>
                        import cv2
                    ModuleNotFoundError: No module named 'cv2'
                    

                    I think it’s a problem of my OpenCV installation where I skipped the virtualenvs. In step 6 of the tutorial I should do this:

                    $ cd ~/.virtualenvs/cv/lib/python3.5/site-packages/
                    $ ln -s /usr/local/python/cv2/python-3.5/cv2.cpython-35m-arm-linux-gnueabihf.so cv2.so
                    $ cd ~
                    

                    I skipped that because I have no idea where I have to create the link when I install this without virtualenvs. But it seems that I have to link it…

                    //edit: Key to success:

                    cd ~/opencv-4.0.0/build/lib/python3
                    sudo cp cv2.cpython-35m-arm-linux-gnueabihf.so /usr/local/lib/python3.5/dist-packages/cv2.so
                    
                    N 1 Reply Last reply Jul 28, 2019, 3:31 PM Reply Quote 0
                    • N Offline
                      nischi @ChrizZz
                      last edited by Jul 28, 2019, 3:31 PM

                      @ChrizZz
                      Thanks for your solution. Usually it’s because the link for cv2 is to the wrong python Version.
                      Happy to hear that it works.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 1 / 4
                      1 / 4
                      • First post
                        10/36
                        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