pytorch-openpose icon indicating copy to clipboard operation
pytorch-openpose copied to clipboard

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

Open femifapo opened this issue 5 years ago • 2 comments

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'

femifapo avatar Jun 27 '20 12:06 femifapo

Your input image is None.

Hzzone avatar Jun 27 '20 12:06 Hzzone

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).

femifapo avatar Jun 27 '20 17:06 femifapo