PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.78k stars 2.88k forks source link

pptsm打架识别复现,抽帧报错 #7987

Open blueWall8 opened 1 year ago

blueWall8 commented 1 year ago

问题确认 Search before asking

请提出你的问题 Please ask your question

参考这个文档进行打架识别的复现: 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

blueWall8 commented 1 year ago

@zhiboniu 请问我的问题该怎么解决呢?谢谢

zhiboniu commented 1 year ago

把args.out_dir换成自己保存路径的字符串吧

blueWall8 commented 1 year ago

把args.out_dir换成自己保存路径的字符串吧

谢谢,我把文件路径换成绝对路径就行了