Face-Recognition-Jetson-Nano
Face-Recognition-Jetson-Nano copied to clipboard
How to make it work with IP network camera??
HI, i tried using it with IP camera RTSP stream but latency is too high, How i can make it work with it??
I'm afraid you have a common OpenCV problem. First, determine the cause of your latency. Do you have a fluid video (with a constant -low- latency) when you're showing the frames and not analysing the faces? In that case, face recognition is slowing down your pipeline, meaning that VideoCapture() cannot read frames as fast as they are being produced over the network. They are gradually queuing up to build in increased latency. The only solution here is grabbing some frames without recognition after one with face detection. You get a sequence like | Face - No Face - No Face | Face - No Face - No Face | The overall process time of the pipeline needs to be at least in sync with the frame rate.
Hii @Qengineering I tried working with Gstream but still it is unable to detect face on rtsp stream
using this gst-launch-1.0 rtspsrc location=rtsp://root:[email protected]/axis-media/media.amp latency=200 ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw, width=640, height=480, format=BGRx ! videoconvert ! appsink drop=true
@starlord263 Start debugging. Do you have live video when the whole analyse algorithm is commented out? Once you have a video working, try to detect only the faces. Still comment out the person recognition, blur detecting etc. Because the code works fine with a Rpi camera, the interaction with the IP camera is causing your problem. Tip: see https://github.com/Qengineering/GStreamer-1.18.4-RPi_64-bits or https://github.com/Qengineering/Libcamera-OpenCV-RPi-Bullseye-64OS if you can get your camera working without any deep learning.