RSiopa / SAVI_TP1

First Practical Work from SAVI
0 stars 0 forks source link

Slow down when face is recognised #1

Open RSiopa opened 2 years ago

RSiopa commented 2 years ago

Whenever the program is recognizing a known face it slows down a lot. Would be much much better if the camera continued smoothly. I have searched around and seems to work fine on videos, maybe it is just my PC?

gilviegas commented 2 years ago

I've been testing with my machine and everything seems fine. The video speed is the same before and after detection.

Maybe is something with your GPU drivers.

Run the following command: nvidia-smi

And if everything is alright with that, it should show you something like this:

Fri Oct 21 22:36:46 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.76       Driver Version: 515.76       CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| N/A   45C    P0    24W /  N/A |    717MiB /  6144MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1250      G   /usr/lib/xorg/Xorg                308MiB |
|    0   N/A  N/A      2862      G   ...5/usr/lib/firefox/firefox      312MiB |
|    0   N/A  N/A      4010      G   ...RendererForSitePerProcess       93MiB |
+-----------------------------------------------------------------------------+
RSiopa commented 2 years ago

I was able to add the driver by disabling the Secure Boot. That was what was messing with the drivers. However it is still much slower than yours, even if i get almost the same as you when doing nvidia-smi

Screenshot at 2022-10-22 17-49-48

gilviegas commented 2 years ago

Strange. I think the Secure boot might be the source of all your problems. Everywhere I've read about using dual boot is that you may never have secure boot enabled. You should disable secure boot before installation and never turn him back on ever again.

So, I would recomend you to delete ubuntu partition, and reinstall ubuntu with a clean image and start all over again with the drivers. I don't know if that will solve your problem.

About the Drivers, you seem to have the same GPU as me, so I think you're running an older version of the driver for our GPU. The current recomended one is the 515.xx.

If your CPU has integrated GPU (2 GPU in your PC): Check in yout BIOS if you have selected discrete or switchable graphics card. Select discrete graphics card.

Run the following commands after reinstalling ubuntu: ~$ ubuntu-drivers devices You should get a similar output:

== /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
modalias : pci:v000010DEd00001F15sv000017AAsd00003A47bc03sc00i00
vendor   : NVIDIA Corporation
model    : TU106M [GeForce RTX 2060 Mobile]
driver   : nvidia-driver-510 - distro non-free
driver   : nvidia-driver-470 - distro non-free
driver   : nvidia-driver-515 - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-510-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-515-server - distro non-free
driver   : nvidia-driver-515-open - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Then install the recommended driver by: $ sudo ubuntu-drivers autoinstall Or by apt: $ sudo apt install nvidia-driver-515