Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

How to improve processing speed of "Live" mode

Open FMsunyh opened this issue 1 year ago • 6 comments

Hello, I would like to ask, where can I start to improve the processing speed? Based on the test result of "Live" mode , it cannot achieve real-time performance, and I want to improve the speed.

CPU : i7-13700 GPU: 4090D Memory: 48G

FMsunyh avatar Aug 13 '24 10:08 FMsunyh

Are you running the main script with cuda enabled? On my AMD Ryzen 9 7950x I get about 3 FPS using all the cores, and when I run it with Docker through my 4090 it is definitely close to 30FPS.

cvaisnor avatar Aug 14 '24 19:08 cvaisnor

Are you running the main script with cuda enabled? On my AMD Ryzen 9 7950x I get about 3 FPS using all the cores, and when I run it with Docker through my 4090 it is definitely close to 30FPS.

What is the frame size of the video stream? I am Setting it to 640x360 can reach 25fps, but it will get stuck if it is larger(such as 960x540). I need clearer picture quality.

FMsunyh avatar Aug 15 '24 02:08 FMsunyh

Are you running the main script with cuda enabled? On my AMD Ryzen 9 7950x I get about 3 FPS using all the cores, and when I run it with Docker through my 4090 it is definitely close to 30FPS.

Also, by pulling the stream through rtmp, it can currently achieve 1280x720p, without face enhancement, do you have a good solution to speed up face enhancement?

FMsunyh avatar Aug 15 '24 03:08 FMsunyh

I am running the stream in the default resolution. Using 'face enhancement' with cuda enabled did bring the frames down quite a bit. It runs at around 10FPS now. I'm not sure how to speed up that configuration.

cvaisnor avatar Aug 15 '24 19:08 cvaisnor

Up, which gpu'll work best for this? considering a laptop or pc to buy within 2-3k

maxfrans avatar Aug 20 '24 11:08 maxfrans

Up, which gpu'll work best for this? considering a laptop or pc to buy within 2-3k

CPU : i7-13700 GPU: 4090D Memory: 48G

I modified the code and added multi-threaded processing. 1280x720p can be done in real time. The problem now is that I can't turn on enhanced processing. @maxfrans

FMsunyh avatar Aug 21 '24 01:08 FMsunyh