I istalled your fabulous module on my raspberry pi 4 with bullseye OS and PiCamera 2.
I am currently running it with the following lib versions:
OpenCV: 4.7.0
dlib: 19.22.1
face_recognition: 1.2.3
imutils: 0.5.4
I had some issues with running the VideoStream, as it was not able to work with libcamera. So I changed your facerecognition.py to make it work with the picamera2 package.
Firstly I imported the pycamera2 package:
from picamera2 import Picamera2
So I fully removed the following lines, as they are not necessary anymore when only the PiCamera is attached:
if args["source"].isdigit():
src = int(args["source"])
else:
src = args["source"]
Then I replaced the lines
if args["usePiCamera"] >= 1:
vs = VideoStream(usePiCamera=True, rotation=args["rotateCamera"], resolution=resolution).start()
else:
vs = VideoStream(src=src, resolution=resolution).start()
Thank you for your input. i think i need to refactor my module to be more actual anyway. I will try to use only one lib that we can reduce the boilerplate.
Hi @nischi
I istalled your fabulous module on my raspberry pi 4 with bullseye OS and PiCamera 2. I am currently running it with the following lib versions:
I had some issues with running the VideoStream, as it was not able to work with libcamera. So I changed your facerecognition.py to make it work with the picamera2 package.
Firstly I imported the pycamera2 package:
So I fully removed the following lines, as they are not necessary anymore when only the PiCamera is attached:
Then I replaced the lines
with
Then, instead of getting the frame with
originalFrame = vs.read()
simply dooriginalFrame = picam2.capture_array()
Also I deactivated the
fps
counter and removed all relatedfps
andvs
related code.Just wanted to tell you and I hope you keep maintaining this super project.