-2

I try to run algorithm from this guy: https://github.com/theAIGuysCode/Object-Detection-API

I download all requirements and algorithm run BUT only on CPU I guess. I get just up to 2,5 FPS (that's why I think that run on CPU not GPU) and that not the real-time I need. I don't how to "force" Python to run this on GPU to get at least 10 FPS. I tried different versions of tensorflow and CUDA and that didn't help. Did anybody have the same problem with this algorithm or have any idea how to fix this? I tried run this even on 2 different PCs and I got the same situation. On Linux (Mint 20) and Windows (10) also have the same result.

I work on Dell Inspiron 17 and graphic card is: Nvidia GeForce 940MX

CUDA Version: 10.1

Tensorflow-gpu==2.1.0

talonmies
  • 70,661
  • 34
  • 192
  • 269
KrysPy
  • 79
  • 5
  • So you do not need to guess, check your gpu usage with tools like gpu-z to see if the gpu REALLY is not used – MichaelJanz Aug 13 '20 at 12:22
  • You should probably search in the issues of the repo you are getting this code, it will raise your chances of getting help. Also, there is a whole discussion about checking the use of GPU for tensorflow here https://stackoverflow.com/questions/38009682/how-to-tell-if-tensorflow-is-using-gpu-acceleration-from-inside-python-shell. – xicocaio Aug 13 '20 at 12:25

1 Answers1

0

Run the code below to see if the GPU is detected by tensorflow. If Number of GPU =0 it is not detecting it. In that case if you have Anaconda installed I would reinstall tensorflow using Conda. Conda will install tensorflow and the Cuda Toolkit and Cudnn. Pip does not install those two items and without them tensorflow will not use the GPU

import tensorflow as tf
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
print(tf.__version__)
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
tf.test.is_gpu_available()
!python --version
Gerry P
  • 7,662
  • 3
  • 10
  • 20