Usmankhujaev / Wrong-direction-drivers-detection

This project is to detect cars that move in wrong way.
18 stars 2 forks source link

How to call gpu? #1

Open byq-luo opened 3 years ago

byq-luo commented 3 years ago

How to call gpu, fps is equal to 1

Usmankhujaev commented 3 years ago

config = tf.ConfigProto(allow_soft_placement=True, log_device_placement=True) config.gpu_options.allow_growth = True

try to put this code in the detector_car_person.py file

byq-luo commented 3 years ago

config = tf.ConfigProto(allow_soft_placement=True, log_device_placement=True) config.gpu_options.allow_growth = True

try to put this code in the detector_car_person.py file

It doesn't work.

Usmankhujaev commented 3 years ago

then the problem with your Cuda or cudnn installation check the versions and installations

Usmankhujaev commented 3 years ago

it works fine for me

byq-luo commented 3 years ago

it works fine for me PS C:\Users\Administrator.BNH-20210405RRL\Downloads\Compressed> nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Thu_Jun_11_22:26:48_Pacific_Daylight_Time_2020 Cuda compilation tools, release 11.0, V11.0.194 Build cuda_11.0_bu.relgpu_drvr445TC445_37.28540450_0

cudnn cudnn-11.3-windows-x64-v8.2.1.32

Usmankhujaev commented 3 years ago

set this code in detector_car_person.py

config = tf.ConfigProto() config.gpu_options.allow_growth = True tf.keras.backend.set_session(tf.Session(config=config))

it should work