EbenKouao / MMM-Face-Recognition-SMAI

MagicMirror Face Recognition module recognising your profile for Raspberry Pi 4
https://smartbuilds.io/
MIT License
83 stars 48 forks source link

Camera error #2

Closed Genemills closed 4 years ago

Genemills commented 4 years ago

I get this when opening terminal to try and run the run-face-rec sh script. Showing pic of Tony Stark to camera works so it appears camera is connected.

mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0x6cc7510 (ENOSPC) mmal: mmal_connection_enable: output port couldn't be enabled Traceback (most recent call last): File "/home/pi/dlib/build/face_recognition/examples/MMM-Face-Recognition-SMAI.py", line 17, in camera = picamera.PiCamera() File "/usr/lib/python3/dist-packages/picamera/camera.py", line 433, in init self._init_preview() File "/usr/lib/python3/dist-packages/picamera/camera.py", line 513, in _init_preview self, self._camera.outputs[self.CAMERA_PREVIEW_PORT]) File "/usr/lib/python3/dist-packages/picamera/renderers.py", line 558, in init self.renderer.inputs[0].connect(source).enable() File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2212, in enable prefix="Failed to enable connection") File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check raise PiCameraMMALError(status, prefix) picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources

EbenKouao commented 4 years ago

Hi Gene,

picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources

Typically happens when another process is running in the background. With the pre-packaged version, the face recognition model runs in the background. Run-face-rec.sh (is a manual way to start it up) so you do not need to re-run this script.

You could confirm this by observing by seeing the race-recognition module recognizing Tony Stark's face.

Genemills commented 4 years ago

Yes I can see it’s checking guest continuous over and over…so how do I train it for my face…and then train it just to show my modules for my profile? :)

Thanks!!!

On May 9, 2020, at 4:55 PM, EbenKouao notifications@github.com wrote:

Hi Gene,

picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources

Typically happens when another process is running in the background. With the pre-packaged version, the face recognition model runs in the background. Run-face-rec.sh (is a manual way to start it up) so you do not need to re-run this script.

You could confirm this by observing by seeing the race-recognition module recognizing Tony Stark's face.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EbenKouao/MMM-Face-Recognition-SMAI/issues/2#issuecomment-626227479, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJYCF25YDRH76OJZ4GQ6FTRQWYKVANCNFSM4M45IT4A.

EbenKouao commented 4 years ago

Sweet, you can find the details on changing the face ID on our site: https://smartbuilds.io/

At the bottom under 'Configuring FaceID' tab. We'll release a video tutorial on this soon.

Genemills commented 4 years ago

Ok..I don’t see any details on the web page at all on configuring, so I’ll guess I’ll have to wait for the video tutorial.

On May 9, 2020, at 5:03 PM, EbenKouao notifications@github.com wrote:

Sweet, you can find the details on changing the face ID on our site: https://smartbuilds.io/ https://smartbuilds.io/ At the bottom under 'Configuring FaceID' tab. We'll release a video tutorial on this soon.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EbenKouao/MMM-Face-Recognition-SMAI/issues/2#issuecomment-626228394, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJYCF4BD6EVD2YO5YKMEJ3RQWZI5ANCNFSM4M45IT4A.

EbenKouao commented 4 years ago

Here's the snippet from the smartbuilds.io. We'll post a tutorial soon to support this topic

Face Recognition Module: 1) Note: Ensure you have a Raspberry Pi Camera Module attached to the Pi – and enabled via sudo raspi-config.

On start-up: The Face Detection model would automatically run on start without Keyboard input(Use CTRL + M to minimise mirror interface)

As this module is still under development, we recommend not updating the face recognition module if you’re downloading the beta face recognition image.

2) Changing your profile:

The beta version of this module is restricted to only 1 user. Go into the directory (preferably via GUI)

cd /home/pi/MagicMirror/modules/MMM-Face-Recognition-SMAI/public

Replace the two .png with your face. Whilst keeping the same naming format. Using the below-naming convention.

1) face.png 2) -id.png e.g Tony-id.png – This is what would be displayed on the display, being Tony.

Watch your faceID pop up on display every-time you’re detected. Using this you could build your own applications.