I converted my custom yolov8s.pt model directly to Myriad .blob format using luxonis tools from depthai-ml training notebook. Upon runnning Spatial Object Tracker in my Oak-D Pro, I am getting less than 1 fps. My project asks for getting precise location of detected objects(x,y,z) in real time. So, is there any way to get higher fps on-device or I was planning of sending the isp color frame from Oak-D to my laptop, perform yolov8 inference on my own laptop and again send the Region Of Interest of bounding box to OakD to get the spatial location. And the problem in my approach is that, there will be delay in this two way communication, and how to sync the exact frames for this whole time-consuming process.
High latency during Neural Network inference
Hey @ApilChaudhary ,
I'd recommend YoloV8 nano for the lowest latency on OAK. Regardless, 1 FPS is lower than expected. What input shapes are you using for neural network? Empircially, 512x288 works well in most cases for real-time applications and let's you use 16:9 FOV.
CC @jakaskerl for other thoughts.
Since, I have trained my yolov8 model using imagesize 640 px. So, I am using 640x640 as input to Neural Network and for getting the overall view I am using ImageManip node to convert isp frame to resize into 640x640 (setResizeThumbnail)
Can you try using setPreviewSize and linking preview instead?
Are you using USB3 cable?
I have tried linking preview but in preview I only get the cropped view
Hi @ApilChaudhary
You can use setPreviewSize
and setKeepAspectRatio(True)
to avoid the cropping of the preview stream.
Also make sure you are using the optimal amount of SHAVES and setting the proper number of inference threads - if you don't the library will notify you in the terminal output.
Thoughts?