alew3 / faceit_live3

This is an update to faceit_live using first order model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Low performance on Windows

Migushthe2nd opened this issue · comments

#2 (comment)

Not sure if this is a Pytorch thing on Windows or a CPU bottleneck because of the preprocessing.

If I look at this thread, it seems to me like it is caused by the preprocessing. According to a post, augmentation on the GPU should be possible.

That thread is talking about something different: data augmentation which is also called preprocessing.

I was referring to the preprocessing that is being done on the function make_animation on file /first-oder-model/demo.py lines 58-74 before running the neural net on line 75. Would have to dig into that code to see if optimization opportunities exist.

Oh alright I see now what you mean.

I find it really weird that when recording the while loop execution time in faceit_live.py there is no difference between python running on all six cores or on only a single one, though total cpu usage has decreased drastically. This can be seen in both Windows' task manager and third-party software. Cuda usage has not decreased.

There is a lot of OpenCV usage in the project, might be worth trying to compile OpenCV with GPU support to see if it makes a diference.

https://jamesbowley.co.uk/build-opencv-4-0-0-with-cuda-10-0-and-intel-mkl-tbb-in-windows/

Commenting out the process_image function at line 141 and directly writing the video_capture frame to a cv2 window has no performance issues (33fps camera footage and low cpu usage), so it won't make a difference.

I tried and ran the application I have having the issue is with input where even the input is slow. I have Nvidia GeForce 940MX dedicated GPU of 2gb and gpu memory in total 7.9 gb including shared gpu memory. Is there any way to optimize it?

Hi, I am right now trying this on i7(9thg gen) 8gb ram and Nvidia GTX 1650 (4gb) and my GPU usage is not crossing 40% (task manager) while I am getting very less FPS and processing is not accurate as well.

Hi, I am right now trying this on i7(9thg gen) 8gb ram and Nvidia GTX 1650 (4gb) and my GPU usage is not crossing 40% (task manager) while I am getting very less FPS and processing is not accurate as well.

Window Task manager doesn't report the usage of the GPU correctly. Use the nvidia-smi command line, path=C:\Program Files\NVIDIA Corporation\NVSMI