Tracking-with-darkflow
Tracking-with-darkflow copied to clipboard
yolo2 and deepsort models run on the same gpu?
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?
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 :)
thanks for reply! i will try to test it, hopefully it works.
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
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