visionml / pytracking

Visual tracking library based on PyTorch.
GNU General Public License v3.0
3.22k stars 605 forks source link

any way to get higher FPS #293

Closed Elad-Shmueli closed 2 years ago

Elad-Shmueli commented 2 years ago

so i am using a jetson xavier NX to run the trackers, currently only gotten a few to work but those that do work are working on <10 fps, which doesn't really make sense. the opencv standard CPU trackers (like KCF CSRT and so on) run on minimum of 20 fps, and trackers in pytracking working with cuda and on GPU only run on 5-10 fps, any way to make them faster or maybe something is wrong with the way i downloaded them, jetson xavier NX has a lot of gpu cores and tensor cores to do calculations on so it shouldn't lower fps when using it. any help would be greatly appreciated

2006pmach commented 2 years ago

While being less computationally intensive the opencv standard trackers typically achieve lower tracking accuracy and are less robust. Given our trackers I would recommend to use a tracker with a small backbone such as resent18 instead of resnet50 if you want to increase the frame rate. For example dimp18. There are inference parameters that you can change in order to speed up tracking but be aware that they influence the tracking performance too. For example create a new parameter file for dimp18. Have a look at pytracking/parameter/dimp/dimp18.py you could:

Btw. there are other issues about jetson GPUs asked in this repo. Maybe they can help you better since I never tried to run our trackers on a jetson GPU.

Ahsanr312 commented 2 years ago

@2006pmach I will second you on your comments above. I have done an experiment comparing both OpenCV and Pytracking Trackers. CSRT as the most accurate OpenCV Trackers achieve similar FPS as Dimp18, that is, 10 FPS on NVIDIA Jetson Tx2. Whereas, Dimp18 is far more better in performace. If one needs higher FPS can change the parameters mentioned above with definitely trade off on accuracy but still it will outclass CSRT.

hphnngcquan commented 1 year ago

@2006pmach I will second you on your comments above. I have done an experiment comparing both OpenCV and Pytracking Trackers. CSRT as the most accurate OpenCV Trackers achieve similar FPS as Dimp18, that is, 10 FPS on NVIDIA Jetson Tx2. Whereas, Dimp18 is far more better in performace. If one needs higher FPS can change the parameters mentioned above with definitely trade off on accuracy but still it will outclass CSRT.

Sorry for late question, I want to be clear about what you commented, 10fps is when you track 1 object or multiple object?