CUDA for OpenCV to get more FPS?

GCV scripting for Gtuner IV and Titan Two. Configuration, examples, questions.

CUDA for OpenCV to get more FPS?

Postby Giga20 » Sun Sep 06, 2020 7:50 pm

Hi,

I installed CV as shown in the thread and everything works (i use XBox-Companion-App)...

But, when using it in Apex Legends, Gtuner shows me only 20 FPS when holding the P2020 and 30 FPS when holding no weapon.
With R99 i have 30 FPS, with other weapons only 20 FPS...

Now i heard that OpenCV does support Cuda, but it is not included in the the normal OpenCV-Installation.

I am not an expert, but can anybody tell me, what i have to do to get Cuda-Support running on OpenCV.

Is there an OpenCV-Cuda-Version? And what else do i need?

My Hardware is Cuda-Compatible: Intel i7, nVidia GTX 1080, Windows 10

Can any expert write a step-by-step instruction for dummys?

I want to test if i get more FPS when using Cuda...

Thx!
User avatar
Giga20
Sergeant Major
Sergeant Major
 
Posts: 69
Joined: Thu Jul 30, 2020 7:17 am

Re: CUDA for OpenCV to get more FPS?

Postby J2Kbr » Mon Sep 07, 2020 12:15 pm

Yes, it is possible use CUDA acceleration. Please note, however, you will need completely rework the GCV script code to take advantage of CUDA acceleration, as the regular OpenCV API call does not automatically do that.

Side note. with i7 processors you should have no performance issues. I have an i7 and can get 60fps without stressing the processor. However, I am using a capture card (not Xbox Companion App), please note Window Capture or Display Capture are capped by the Windows API at 30FPS max.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: CUDA for OpenCV to get more FPS?

Postby Giga20 » Mon Sep 07, 2020 12:26 pm

J2Kbr wrote:Yes, it is possible use CUDA acceleration. Please note, however, you will need completely rework the GCV script code to take advantage of CUDA acceleration, as the regular OpenCV API call does not automatically do that.

Side note. with i7 processors you should have no performance issues. I have an i7 and can get 60fps without sweat the processor. However, I am using a capture card (not XBox Companion App), please note Window Capture or Display Capture are capped by the Windows API at 30FPS max.

Thanks!
Ok, i checked the installed OpenCV Version which is 4.3.0

But the actuall version is 4.4.0 - but it seem to be very complicated to update from 4.3.0 to 4.4.0

Is there an easy way to update to 4.4.0?!?

I installed the whole think like it was discripted in the Thread "Gtuner IV Computer Vision Setup and Info".

Can anybody tell me how to update CV?

Thanks!
User avatar
Giga20
Sergeant Major
Sergeant Major
 
Posts: 69
Joined: Thu Jul 30, 2020 7:17 am

Re: CUDA for OpenCV to get more FPS?

Postby J2Kbr » Mon Sep 07, 2020 1:30 pm

I am still on Python 3.8. Later version should work just fine. I will be upgrading mine during this week.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: CUDA for OpenCV to get more FPS?

Postby Giga20 » Mon Sep 07, 2020 1:44 pm

J2Kbr wrote:I am still on Python 3.8. Later version should work just fine. I will be upgrading mine during this week.

I am on Python 3.8.5 which is the newest version at the moment.
But i am on OpenCV 4.3.0 which is not the newest version (4.4.0).
I want to know how to update OpenCV to 4.4.0... not how to update Python...

Do you have instructions for that or a Ready-to-Install-Package (Exe-File or something)?
User avatar
Giga20
Sergeant Major
Sergeant Major
 
Posts: 69
Joined: Thu Jul 30, 2020 7:17 am

Re: CUDA for OpenCV to get more FPS?

Postby J2Kbr » Mon Sep 07, 2020 2:24 pm

Right, yes. 3.8 is the latest Python, sorry for the confusion.

This is what you need to run in order to upgrade the OpenCV module to a specific version:
Code: Select all
pip install --upgrade opencv-python==4.4.0
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: CUDA for OpenCV to get more FPS?

Postby Giga20 » Mon Sep 07, 2020 3:16 pm

Thx!

to Update Pip to the newest version:
d:\tools\python38\python.exe -m pip install --upgrade pip

to upgrade OpenCV:
pip install --upgrade opencv-python==4.4.0.42

Was easier then i thought... i read the i have to install Visual Studio and CMaker and such things... but its that easy...;)
User avatar
Giga20
Sergeant Major
Sergeant Major
 
Posts: 69
Joined: Thu Jul 30, 2020 7:17 am

Re: CUDA for OpenCV to get more FPS?

Postby J2Kbr » Mon Sep 07, 2020 3:27 pm

:joia: :joia:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: CUDA for OpenCV to get more FPS?

Postby Giga20 » Tue Sep 08, 2020 6:12 am

pip install --upgrade opencv-python==4.2.0.34

This is the last version that works good...
Any other version like 4.3.x.x oder 4.4.x.x causes framedrops.
Verifyed on discork with an other member who has the same problem...

Using 4.2.0.32 fixed these FPS-Drops! Dont update to higher version then 4.2.0.34
User avatar
Giga20
Sergeant Major
Sergeant Major
 
Posts: 69
Joined: Thu Jul 30, 2020 7:17 am

Re: CUDA for OpenCV to get more FPS?

Postby J2Kbr » Tue Sep 08, 2020 4:18 pm

This is correct, latest versions of OpenCV are causing performance issues.
Giga20 wrote:Using 4.2.0.32 fixed these FPS-Drops! Dont update to higher version then 4.2.0.34

+1
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to Gtuner Computer Vision

Who is online

Users browsing this forum: Geezy831 and 38 guests