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.54k stars 384 forks source link

跑UCF01为什么会一直报错ValueError: not enough values to unpack (expected 3, got 2) 应该怎么改正 #601

Open andrewis88 opened 1 year ago

andrewis88 commented 1 year ago

报错: Traceback (most recent call last): File "main.py", line 143, in main() File "main.py", line 139, in main profiler_options=args.profiler_options) File "F:\PaddleVideo-develop\paddlevideo\tasks\train.py", line 111, in train_model train_dataset = build_dataset((cfg.DATASET.train, cfg.PIPELINE.train)) File "F:\PaddleVideo-develop\paddlevideo\loader\builder.py", line 49, in build_dataset dataset = build(cfg_dataset, DATASETS, key="format") File "F:\PaddleVideo-develop\paddlevideo\utils\build_utils.py", line 35, in build return obj_cls(**cfg_copy) File "F:\PaddleVideo-develop\paddlevideo\loader\dataset\frame.py", line 58, in init super().init(file_path, pipeline, data_prefix, test_mode) File "F:\PaddleVideo-develop\paddlevideo\loader\dataset\base.py", line 48, in init self.info = self.load_file() File "F:\PaddleVideo-develop\paddlevideo\loader\dataset\frame.py", line 66, in load_file frame_dir, frames_len, labels = line_split ValueError: not enough values to unpack (expected 3, got 2) INFO 2023-03-19 16:28:41,692 launch_utils.py:343] terminate all the procs INFO 2023-03-19 16:28:41,692 launch_utils.py:343] terminate all the procs ERROR 2023-03-19 16:28:41,693 launch_utils.py:642] ABORT!!! Out of all 1 trainers, the trainer process with rank=[0] was aborted. Please check its log. ERROR 2023-03-19 16:28:41,693 launch_utils.py:642] ABORT!!! Out of all 1 trainers, the trainer process with rank=[0] was aborted. Please check its log. INFO 2023-03-19 16:28:44,708 launch_utils.py:343] terminate all the procs INFO 2023-03-19 16:28:44,708 launch_utils.py:343] terminate all the procs INFO 2023-03-19 16:28:44,708 launch.py:402] Local processes completed. INFO 2023-03-19 16:28:44,708 launch.py:402] Local processes completed.

报错位置: def load_file(self): """Load index file to get video information.""" info = [] with open(self.file_path, 'r') as fin: for line in fin: line_split = line.strip().split() frame_dir, frames_len, labels = line_split if self.data_prefix is not None: frame_dir = osp.join(self.data_prefix, frame_dir) info.append( dict(frame_dir=frame_dir, suffix=self.suffix, frames_len=frames_len, labels=int(labels))) return info

huangjun12 commented 1 year ago

frame_dir, frames_len, labels = line_split 这一行报错 标注文件可能是video格式的,但使用的配置文件是针对frame格式的,换成video格式的配置文件就好了https://github.com/PaddlePaddle/PaddleVideo/blob/develop/configs/recognition/tsm/tsm_ucf101_videos.yaml