mmaction2
mmaction2 copied to clipboard
[Bug] demo_skeleton.py error
Branch
main branch (1.x version, such as v1.0.0
, or dev-1.x
branch)
Prerequisite
- [X] I have searched Issues and Discussions but cannot get the expected help.
- [X] I have read the documentation but cannot get the expected help.
- [X] The bug has not been fixed in the latest version.
Environment
pytorch 2.0.1 python 3.8.17
Describe the bug
At the line 108, "visualizer.add_datasample(", the following error occurred. TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Reproduces the problem - code sample
No response
Reproduces the problem - command or script
No response
Reproduces the problem - error message
(openmmlab) dl@dl-machine:~/mmaction2/mmaction2$ python ./demo/demo_skeleton.py ./demo/demo_skeleton.mp4 ./out02.mp4
Loads checkpoint by http backend from path: http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_2x_coco/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth
Performing Human Detection for each frame
[ ] 0/72, elapsed: 0s, ETA:08/01 09:47:23 - mmengine - WARNING - "FileClient" will be deprecated in future. Please use io functions in https://mmengine.readthedocs.io/en/latest/api/fileio.html#file-io
08/01 09:47:23 - mmengine - WARNING - "HardDiskBackend" is the alias of "LocalBackend" and the former will be deprecated in future.
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 72/72, 16.9 task/s, elapsed: 4s, ETA: 0s
Loads checkpoint by http backend from path: https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth
Performing Human Pose Estimation for each frame
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 72/72, 16.3 task/s, elapsed: 4s, ETA: 0s
Loads checkpoint by http backend from path: https://download.openmmlab.com/mmaction/skeleton/posec3d/slowonly_r50_u48_240e_ntu60_xsub_keypoint/slowonly_r50_u48_240e_ntu60_xsub_keypoint-f3adabf1.pth
Drawing skeleton for each frame
[ ] 0/72, elapsed: 0s, ETA:Traceback (most recent call last):
File "./demo/demo_skeleton.py", line 189, in
Additional information
No response
It seems that some frames of your video don't have any detection results. Currently, the demo can't handle an empty detection result, you could try to fix it.
I will fix it this weekend, please hold on.