PaddlePaddle / PaddleVideo

Awesome video understanding toolkits based on PaddlePaddle. It supports video data annotation tools, lightweight RGB and skeleton based action recognition model, practical applications for video tagging and sport action detection.
Apache License 2.0
1.5k stars 375 forks source link

pptsm打架识别,抽帧报错 #603

Open blueWall8 opened 1 year ago

blueWall8 commented 1 year ago

参考这个文档进行打架识别的复现: https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/docs/advanced_tutorials/customization/action_recognotion/videobased_rec.md

在执行以下抽帧命令是出现报错: python data/ucf101/extract_rawframes.py dataset/ rawframes/ --level 2 --ext mp4

报错内容: multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "D:\Anaconda3\envs\PPVideo_1\lib\multiprocessing\pool.py", line 121, in worker result = (True, func(*args, *kwds)) File "D:\Anaconda3\envs\PPVideo_1\lib\multiprocessing\pool.py", line 44, in mapstar return list(map(args)) File "D:\code_tools\python_all\py_projects_path\PaddleVideo-develop\data\ucf101\extract_rawframes.py", line 14, in dump_frames out_full_path = osp.join(args.out_dir, vid_name) NameError: name 'args' is not defined """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "data/ucf101/extract_rawframes.py", line 99, in pool.map(dump_frames, zip(fullpath_list, vid_list, range(len(vid_list)))) File "D:\Anaconda3\envs\PPVideo_1\lib\multiprocessing\pool.py", line 268, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "D:\Anaconda3\envs\PPVideo_1\lib\multiprocessing\pool.py", line 657, in get raise self._value NameError: name 'args' is not defined

huangjun12 commented 1 year ago

手动把args传进dump_frames函数试下 https://github.com/PaddlePaddle/PaddleVideo/blob/4389c568f431f524f0b69763e8a1671a944cf988/data/ucf101/extract_rawframes.py#L98