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.

    problems wanting to use MMM-Face-Reco-DNN and MMM-MotionDetector at the same time

    Scheduled Pinned Locked Moved Troubleshooting
    5 Posts 2 Posters 744 Views 2 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
      cala
      last edited by

      Hello averyone mates,

      I write because I am having problems when wanting to use several modules that both need access to the camera. Specifically, they are MMM-Face-Reco-DNN and MMM-MotionDetector.
      The error that the console shows me is the following:

      [28.04.2021 19:38.32.307] [LOG] [MMM-Face-Reco-DNN] starting video stream…
      [28.04.2021 19:38.37.680] [ERROR] Whoops! There was an uncaught exception…
      [28.04.2021 19:38.37.763] [ERROR] PythonShellError: [ WARN:0] global /home/pi/opencv/opencv-4.5.0/modules/videoio/src/cap_gstreamer.cpp (1761) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Device ‘/dev/video0’ is busy
      [ WARN:0] global /home/pi/opencv/opencv-4.5.0/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
      [ WARN:0] global /home/pi/opencv/opencv-4.5.0/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
      [ WARN:0] global /home/pi/opencv/opencv-4.5.0/modules/videoio/src/cap_v4l.cpp (893) open VIDEOIO(V4L2:/dev/video0): can’t open camera by index
      Traceback (most recent call last):
      File “modules/MMM-Face-Reco-DNN/tools/facerecognition.py”, line 111, in
      frame = imutils.resize(originalFrame, width=500)
      File “/home/pi/.local/lib/python3.7/site-packages/imutils/convenience.py”, line 69, in resize
      (h, w) = image.shape[:2]
      AttributeError: ‘NoneType’ object has no attribute ‘shape’

      at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:254:21)
      at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32)
      at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13)
      at ChildProcess.emit (events.js:315:20)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) {
      

      executable: ‘python3’,
      options: null,
      script: ‘modules/MMM-Face-Reco-DNN/tools/facerecognition.py’,
      args: [
      ‘–cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml’,
      ‘–encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle’,
      ‘–usePiCamera=0’,
      ‘–source=0’,
      ‘–rotateCamera=0’,
      ‘–method=dnn’,
      ‘–detectionMethod=hog’,
      ‘–interval=2000’,
      ‘–output=0’,
      ‘–extendDataset=False’,
      ‘–dataset=modules/MMM-Face-Reco-DNN/dataset/’,
      ‘–tolerance=0.6’
      ],
      exitCode: 1
      }

      Does anyone know how it could be solved? the camera used is an “eye ps3” and everything about a rapsberry pi 3.

      Thanks in advance!

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

        @cala there is no camera sharing. I have thought about looking into that. but no time yet.

        use linux motion project (handles all the cameras and has data and events for motion and frame capture)

        and allow registration for movement info, pub/sub

        either just info
        motion start/stop
        and/or
        video frames for opencv for reco
        and/or
        a stream of video to be used however

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          cala @sdetweil
          last edited by

          @sdetweil thank you very much for your answer.
          I will try to configure it in the way in which you are indicating me.
          I will update this post if I can get it to work on that way.
          Best regards.

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

            @cala I was saying it would be nice if.

            it does not work that way today

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              cala @sdetweil
              last edited by

              @sdetweil motion mounted and feeding the modules of Magic Mirror through the stream direction that motion creates, and they are working pretty well.
              There is a little more consumption in the resources, but in the absence of testing it more I would say that the problem is solved.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • 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