Hzzone / pytorch-openpose

pytorch implementation of openpose including Hand and Body Pose Estimation.
2.03k stars 390 forks source link

Can't open camera by index error when trying to use Kinect #31

Open femifapo opened 4 years ago

femifapo commented 4 years ago

Thank you guys for providing the PyTorch model.

I am trying to get it to work with Kinect using libfreenect2(Openkinect) on my desktop, but I get the error below.

Do you know of a way to resolve it? or How do I change the settings to connect to Kinect?

(pytorch-openpose) User@computer:~/software/pytorch-openpose$ python demo_camera.py Torch device: GeForce RTX 2080 Ti [ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video0): can't open camera by index Traceback (most recent call last): File "demo_camera.py", line 22, in candidate, subset = body_estimation(oriImg) File "/home/femifapo/software/pytorch-openpose/src/body.py", line 31, in call multiplier = [x boxsize / oriImg.shape[0] for x in scale_search] File "/home/femifapo/software/pytorch-openpose/src/body.py", line 31, in multiplier = [x boxsize / oriImg.shape[0] for x in scale_search] AttributeError: 'NoneType' object has no attribute 'shape'

Hzzone commented 4 years ago

Your input image is None.

femifapo commented 4 years ago

Thanks for your response, I have been trying to understand why the input image is none. Is that because I have to find a way to detect the connect?

The default script works on my Webcam (though a bit delayed).