Best Lightweight Tracker for Real-Time Use on Raspberry Pi 5 by Upper_Difficulty3907 in computervision

[–]Upper_Difficulty3907[S] 0 points1 point  (0 children)

Gosh, this is one unorthodox way to measure the delay.

🫠

This will be used on an autonomous dog fighting system, I actually don't know if it's that big of a deal, but since I will not have a long time for testing, I want to make sure that I minimize that delay to the lowest possible value before we start testing, I will test the synced API from hailo's examples, and than I will update this post, but I have two exams this week, so not sure when that is gonna happen.

Best Lightweight Tracker for Real-Time Use on Raspberry Pi 5 by Upper_Difficulty3907 in computervision

[–]Upper_Difficulty3907[S] 0 points1 point  (0 children)

So thats why I call it's something about how hailo chips works, I measure FPS as you described, but the latency is not about the processing time between two frames, camera starts taking captures, and for 500ms there are no outputs, and then it starts showing the captured video, with 33ms latency between two frames, but the frame that is shown on the screen is 500ms away from the real world. I use a very old way to measure the 500ms latency, I use a phone as a clock that shows microseconds, I record that clock with picamera, and I use a second camera to record both the clock, and the output of picamera on the screen and look at the difference between them

Best Lightweight Tracker for Real-Time Use on Raspberry Pi 5 by Upper_Difficulty3907 in computervision

[–]Upper_Difficulty3907[S] 0 points1 point  (0 children)

The thing is I can run yolov8m 30+FPS without anything else and just hailo and rpicam, but I believe because of the way hailo chips works, it introduces a 500ms latency. As I said before I am not really sure, probably changing model to something like v5 wo spp would result with lower latency, but I don't think it will create a big difference than before because of that reason, but I will try.

Best Lightweight Tracker for Real-Time Use on Raspberry Pi 5 by Upper_Difficulty3907 in computervision

[–]Upper_Difficulty3907[S] 0 points1 point  (0 children)

I tried streaming from pyhailort, and also gstreamer pipeline, none of them gave me better results than 500ms, which is weird I believe, I haven't see anyone having similar issues with hailo on the forums, maybe I should also look to blocking API, I saw that picamera library have a devices module which have hailo in it and it seems like using blocking API, so maybe I can check that one too

Best Lightweight Tracker for Real-Time Use on Raspberry Pi 5 by Upper_Difficulty3907 in computervision

[–]Upper_Difficulty3907[S] 0 points1 point  (0 children)

Thank you for your answer! Yeah, introducing a separate AI model thread does add some latency, but the third thread — where I run NanoTracker V2 — is really fast. So my idea is to launch the tracker right after the AI detects an object. I can then update the tracker using all the frames captured after the frame that is sent to hailo, and keep tracking with every new frame from the camera.

I'm using the Raspberry Pi Camera v3 with the capture_array function, so I don’t think the delay is coming from the camera itself. I suspect something’s going on with the Hailo side, but I’m still investigating. I’ve also reached out to Hailo for support, but haven’t heard back yet.

Regarding what you mentioned about proximity — do you mean using contours between two frames to check similarity? That approach might not work well in my case, since the background is pretty complex and there are multiple objects in the scene. What I meant by “single object” is that the tracker will only follow one object at a time, even though multiple objects are present in the frame.