keras_Realtime_Multi-Person_Pose_Estimation icon indicating copy to clipboard operation
keras_Realtime_Multi-Person_Pose_Estimation copied to clipboard

model.predict(input_img) very slow

Open mingmingDiii opened this issue 7 years ago • 2 comments

@michalfaber Thanks for your great work!! When I test the image 'ski.jpg'(shape: 7126743), 'model.predict(input_img)' took about 1200ms with a TITAN X GPU(only with scale 1). But in the caffe version, 'output_blobs = net.forward()' only took about 72ms. Can you help me figure it out? Thanks a lot!!

mingmingDiii avatar Nov 04 '17 06:11 mingmingDiii

you are right! I have meeted the same situation.Someone can help me figure it out?

yokings avatar Nov 07 '17 03:11 yokings

@mingmingDiii @allenwangcheng I executed several iterations of model.predict(input_img) - only with scale 1 and shape 712x673x3. The first iteration took around 2300ms but all next iterations around 260ms (GPU 1070). I am not sure but there may be an additional cost of recompiling computation graph. I noticed that there is a latency peak every time when input image size changes (scale = multiplier[m]).

michalfaber avatar Nov 07 '17 13:11 michalfaber