Replies: 1 comment
-
I've had some health issues and haven't updated my github in almost a year but look at this code: I use round-robin sampling of rtsp streams from security DVRs or netcams to feed a single Coral TPU for Mobilenet_v2 object detection. On an old i7-6800K can get ~70 fps aggregate framerate with 22 cameras, using one openCV rtsp decoding thread per camera which is a bit over 3 fps per camera. This code is reliable, variations of it has been running 24/7/365 on my home security system for a bit over three years now. I have recently added an intermediate queue that does AlexeyAB's Darknet yolo4 on a zoomed in detection from the TPU to reduce the "false positive" rate by about a factor of 100. I've just recently discovered this yolo5 and am working on adding it as an alternative second inference and plan to update the github after it is running and tested. But you can use my rtsp thread function and parts of my main function, and my TPU thread to get an idea of how to rotate the images from the rtsp streams into a yolo inference thread. In a nut shell I make one queue per camera and launch one rtsp decoding thread per camera that puts frames into the queues. The Inference thread reads the queues in round-robin fashion and writes the results to an output queue that the main loop reads where security system stuff happens. You can also see how I do multiple inference threads to support multiple AI inferences, I've tested simultaneously using TPU, CPU, OpenVino NCS2, and OpenVINO CPU AI threads. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
hello , i would like to know if it is possible to run yolov5 on a multi rtsp streams .
if it is possible how ? annd thank you
Beta Was this translation helpful? Give feedback.
All reactions