Opencv 4.10 too slow with jetson nx

I am using the KCF (Kernelized Correlation Filters) tracker, but there is a noticeable delay in the camera feed, even though the CPU usage is reported to be low (around 62% idle). I am working with OpenCV 4.10.0 on a Jetson NX. Has anyone else encountered this issue? If so, can you suggest a solution to minimize the delay?

top - 21:36:51 up 47 min, 1 user, load average: 1.78, 1.48, 1.93
Tasks: 274 total, 1 running, 273 sleeping, 0 stopped, 0 zombie
%Cpu0 : 17.7 us, 19.3 sy, 0.0 ni, 60.0 id, 0.0 wa, 2.0 hi, 1.0 si, 0.0 st
%Cpu1 : 17.8 us, 11.4 sy, 0.0 ni, 69.8 id, 0.0 wa, 0.7 hi, 0.3 si, 0.0 st
%Cpu2 : 19.1 us, 16.2 sy, 0.0 ni, 63.7 id, 0.0 wa, 0.7 hi, 0.3 si, 0.0 st
%Cpu3 : 19.2 us, 13.9 sy, 0.0 ni, 65.6 id, 0.3 wa, 1.0 hi, 0.0 si, 0.0 st
%Cpu4 : 16.3 us, 15.0 sy, 0.0 ni, 67.8 id, 0.3 wa, 0.7 hi, 0.0 si, 0.0 st
%Cpu5 : 17.3 us, 12.0 sy, 0.0 ni, 70.0 id, 0.0 wa, 0.7 hi, 0.0 si, 0.0 st
MiB Mem : 6833.6 total, 4010.2 free, 1737.8 used, 1085.7 buff/cache
MiB Swap: 11608.8 total, 11608.8 free, 0.0 used. 4780.3 avail Mem

I am also curious if there is a way to run OpenCV trackers using CUDA acceleration. While I am using the KCF tracker in my current implementation, I have noticed that there is still a delay in the camera feed, even though my system’s CPU usage is relatively low (around 62% idle). I am working with OpenCV 4.10.0 on a Jetson NX, and I’m wondering if CUDA-based acceleration could improve the performance of my tracker and help reduce the delay.

Is there any existing approach or method to use CUDA to accelerate OpenCV’s tracking algorithms, like KCF or others, for better real-time performance on the Jetson NX platform?

Additionally, are there alternative trackers that are compatible with CUDA and work similarly to the KCF tracker, either within OpenCV or outside of it, that could potentially offer better performance?

Is there anyone who can help?

Hi,

Sorry for the late update.
Have you maximized the device performance first?

$ sudo nvpmodel -m 0
$ sudo jetson_clocks

To use GPU resources for the KCF tracker, you will need a CUDA implementation first.
As we cannot share third-party links here, please search the internet with related keywords to find them.

If the DCF (Discriminative Correlation Filter) tracker is acceptable, we do have some libraries that have its CUDA implementation:

  1. Deepstream: Gst-nvtracker — DeepStream documentation
  2. VPI: VPI - Vision Programming Interface: DCF Tracker

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.