Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow detection speed using GPU #265

Open
alvinxiii opened this issue Mar 2, 2018 · 2 comments
Open

Slow detection speed using GPU #265

alvinxiii opened this issue Mar 2, 2018 · 2 comments

Comments

@alvinxiii
Copy link

Refer to #61 post. I added the custom code for using a video demo. However, when I run the code. The video is process at an average of 5 fps. Even I added --gpu 0 . I tested on picture with both cpu and gpu. The execution time is the same. How to increase the processing speed?

@Ellexm
Copy link

Ellexm commented Jun 12, 2018

I have met the same problem, have you solved it?

@dahaigui
Copy link

Refer to #61 post. I added the custom code for using a video demo. However, when I run the code. The video is process at an average of 5 fps. Even I added --gpu 0 . I tested on picture with both cpu and gpu. The execution time is the same. How to increase the processing speed?

Maybe you used tensorflow rather than tensorflow-gpu, because when you installed tensorflow-CPU and tensorflow-GPU, only CPU will work, you can try

import tensorflow as tf

with tf.device('/cpu:0'):
a = tf.constant ([1.0, 2.0, 3.0], shape=[3], name='a')
b = tf.constant ([1.0, 2.0, 3.0], shape=[3], name='b')
with tf.device('/gpu:1'):
c = a + b

sess = tf.Session(config=tf.ConfigProto (allow_soft_placement=True, log_device_placement=True))
sess.run(tf.global_variables_initializer())
print sess.run(c)

if error, you need uninstall protobuf, tensorflow-CPU and tensorflow-GPU, and only install tensorflow-GPU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants