How to increase openpose fps with webcam

asked 2018-11-07 12:13:22 -0500

Digbijay2 gravatar image

updated 2018-11-08 04:48:34 -0500

berak gravatar image

I am doing a program for Realtime human pose estimation and for detecting it through webcam i am using this code:

cap = cv2.VideoCapture(0) ret, frame =

but the frame rate detected is too much slow. Can anyone please show me a code to run camera at it should detect frames at normal rate. Also i am using intel i3 processor and intel HD graphics 5500, So if there any hardware issue please let me know....but i think there should be any?

edit retag flag offensive close merge delete


I am doing a program for Realtime human pose estimation

we probably need to see, what you're doing there.

did you make any attempts at profiling ?

berak gravatar imageberak ( 2018-11-08 02:41:07 -0500 )edit

berak pls look at this repo: Here I just took input from webcam instead of any video but still frame rate is very slow.

Digbijay2 gravatar imageDigbijay2 ( 2018-11-08 03:44:33 -0500 )edit

oook. openpose inference takes 30 seconds on my slow box, imho, you can't expect it to run realtime ;(

btw, which model are you using ?

berak gravatar imageberak ( 2018-11-08 03:51:45 -0500 )edit

When i run it with an input video... again the the frame rate is slow. Is it due to hardware?? If not please help me to run the frame with normal rate

Digbijay2 gravatar imageDigbijay2 ( 2018-11-08 03:55:21 -0500 )edit

Please check the repo :)

Digbijay2 gravatar imageDigbijay2 ( 2018-11-08 03:56:40 -0500 )edit

you could try the (smaller,faster,but less accurate) model from here:

berak gravatar imageberak ( 2018-11-08 04:07:14 -0500 )edit

i know that repo (and i wrote the c++ opencv sample ;)

which opencv version do you use ? you could try to enable the opencl target

have a look e.g. here how to configure backend / target from py

berak gravatar imageberak ( 2018-11-08 04:08:36 -0500 )edit

any updates ? (just curious)

berak gravatar imageberak ( 2018-11-11 05:31:02 -0500 )edit

berak no change there, i looked both the repo but won't get any solution. the frame detected and processes very slow whenever i open webcam through terminal to run this program.

Digbijay2 gravatar imageDigbijay2 ( 2018-11-13 12:54:16 -0500 )edit
LBerger gravatar imageLBerger ( 2019-03-31 11:33:57 -0500 )edit