准备 HMDB51:https://github.com/open-mmlab/mmaction2/blob/main/tools/data/hmdb51/README_zh-CN.md
问题1
在运行build_rawframes.py时,报错NameError: name ‘args’ is not defined。
解决方案:参考MMaction 使用build_rawframes.py出现提取数据帧错误NameError: name ‘args‘ is not defined解决方案
问题2
rawframes目录少一级,原本应该是:
但我的是:
解决方案:
将bulid_rawframes.py中的:
if '/' in vid_path:
act_name = osp.basename(osp.dirname(vid_path))
out_full_path = osp.join(args.out_dir, act_name)
else:
out_full_path = args.out_dir
改为:
act_name = osp.basename(osp.dirname(vid_path)) # e.g., brush_hair
video_name = osp.splitext(osp.basename(vid_path))[0] # e.g., April_09_...
out_full_path = osp.join(args.out_dir, act_name, video_name)
os.makedirs(out_full_path, exist_ok=True)
同时把下面video_name、out_full_path那两行注释掉了,其余不变
if task == 'rgb':
if args.use_opencv:
# Not like using denseflow,
# Use OpenCV will not make a sub directory with the video name
# video_name = osp.splitext(osp.basename(vid_path))[0]
# out_full_path = osp.join(out_full_path, video_name)
问题3
在运行build_file_list时,报错:[Errno 2] No such file or directory: ‘data/hmdb51/annotations/trainlist01.txt’
解决方案:参考解决方案,将 data/hmdb51/annotations/classInd.txt 重命名为 data/hmdb51/annotations/classInd.txt.bk,重新运行,就可以啦