diddlesnaps / fakecam

Virtual Backgrounds for your video conferences and streaming presentations
Other
47 stars 11 forks source link

Very High CPU Usage #7

Open tylerwmarrs opened 4 years ago

tylerwmarrs commented 4 years ago

Would you mind sharing the source to create the model? It seems that it is saved to use all CPU cores available. I also had issues with the hardcoded "/dev/video0" in the snap package. Once I checked out the code and edited it, I was able to get it to work. This is simply due to me having multiple cameras set up.

Adding an option to choose the camera would be good.

image

MarkoShiva commented 3 years ago

CAn confirm the issue having similar problem on archlinux although even with single camera model is not minified and it uses way too much CPU and do not use GPU at all.

lucyllewy commented 3 years ago

I've added more GPU capability in the beta release, which will eventually become stable once I've verified everything works correctly. You can give the beta a try by running:

sudo snap refresh --beta fakecam

If you have uninstalled the app, then replace refresh with install in the command to reinstall it from the beta channel.

dysonsphere-startmail commented 3 years ago

I had a similar issue with CPU over GPU. I refreshed to --beta. The video in the beta version freezes after a couple of seconds.

dysonsphere-startmail commented 3 years ago

very strange. I uninstalled the beta and reinstalled the stable, and now the performance is even worse (more CPU heavy) than before. at first it was using ~25% of all 24 threads, now it is taking up ~80% of all 24 threads and camera frame rate is very slow.

dysonsphere-startmail commented 3 years ago

Ah, ok the performance is better (~25% of all threads) with an image in the background vs having the blur effect (~80% of all threads). Still does not seem to using GPU:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.73.01    Driver Version: 460.73.01    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce RTX 2070    Off  | 00000000:07:00.0  On |                  N/A |
| N/A   56C    P0    32W /  N/A |    630MiB /  7973MiB |     11%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2009      G   /usr/lib/xorg/Xorg                 78MiB |
|    0   N/A  N/A      3971      G   /usr/lib/xorg/Xorg                182MiB |
|    0   N/A  N/A      4148      G   /usr/bin/gnome-shell              134MiB |
|    0   N/A  N/A      6299      G   ...tcloud/Nextcloud.AppImage       14MiB |
|    0   N/A  N/A      7833      G   /usr/lib/firefox/firefox          155MiB |
+-----------------------------------------------------------------------------+
PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND        
   9297 kdys      20   0 3882864 188008  54564 S 283.7   0.3  20:19.29 python3