mmaction2 icon indicating copy to clipboard operation
mmaction2 copied to clipboard

can't open camera by index

Open vasanth4224 opened this issue 2 years ago • 1 comments

(mmlab) a@R4-610-AI:/media/a/Data-2/MMAction/mmaction2$ python demo/webcam_demo.py work_dirs_2/slowonly_r50_u48_240e_ntu120_xsub_keypoint/slowonly_r50_u48_240e_ntu120_xsub_keypoint.py work_dirs_2/slowonly_r50_u48_240e_ntu120_xsub_keypoint/best_top1_acc_epoch_140.pth work_dirs_2/slowonly_r50_u48_240e_ntu120_xsub_keypoint/gesture_Label.txt --camera-id 0 load checkpoint from local path: work_dirs_2/slowonly_r50_u48_240e_ntu120_xsub_keypoint/best_top1_acc_epoch_140.pth [ WARN:[email protected]] global /io/opencv/modules/videoio/src/cap_v4l.cpp (889) open VIDEOIO(V4L2:/dev/video0): can't open camera by index Press "Esc", "q" or "Q" to exit Exception in thread Thread-1: Traceback (most recent call last): File "/home/a/anaconda3/envs/mmlab/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/home/a/anaconda3/envs/mmlab/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "demo/webcam_demo.py", line 84, in show_results frame_queue.append(np.array(frame[:, :, ::-1])) TypeError: 'NoneType' object is not subscriptable

Anyone can please help me to fix this issue.

vasanth4224 avatar Apr 15 '22 00:04 vasanth4224

@dreamerlin Do you have time to look at this problem?

kennymckormick avatar Apr 29 '22 09:04 kennymckormick