Tracking-with-darkflow icon indicating copy to clipboard operation
Tracking-with-darkflow copied to clipboard

yolo2 and deepsort models run on the same gpu?

Open ifangcheng opened this issue 7 years ago • 4 comments

it seems that in this project yolo2 and deepsort models run on the same gpu, can it be configured to run different models on multiple different gpus to further improve the fps of the whole end-to-end system?

ifangcheng avatar Nov 26 '17 13:11 ifangcheng

you can change the GPU Flag in YOLO :

FLAGS.gpuName = '/gpu:0'

by default it's on GPU 0 , but you can set it to another GPU (for example /gpu:1) , hopefully deep_sort will still run on GPU 0 (I only have one GPU so can't test it )

Another thing to try is to set deep sort to run on GPU 1 , by adding this line to deep sort tf_session :

config = tf.ConfigProto(device_count = {'GPU': 1})
session = tf.Session(config=config) 

these should replace line 318 in the script deep_sort/generate_detection.py

if it works out, a pull request would be appreciated for future users :)

obendidi avatar Nov 26 '17 13:11 obendidi

thanks for reply! i will try to test it, hopefully it works.

ifangcheng avatar Nov 26 '17 13:11 ifangcheng

I tried the two ways you mentioned, however it both turns out that they have no effects on the gpu assignment. it always used both of the memory of gpu0 and gpu1 but the gpu util shows only the percent value(like 40%-60%)on gpu0, while 0% on gpu 1

ifangcheng avatar Nov 27 '17 01:11 ifangcheng

try using with tf.device("GPU:1"): before calling the encoder I'm sorry I don't have the required hardware so can't really help much

obendidi avatar Nov 27 '17 11:11 obendidi