SwinTransformer / Video-Swin-Transformer

This is an official implementation for "Video Swin Transformers".
https://arxiv.org/abs/2106.13230
Apache License 2.0
1.42k stars 199 forks source link

if results['frame_inds'].ndim != 1: KeyError: 'frame_inds' #3

Open Note-Liu opened 3 years ago

Note-Liu commented 3 years ago

KeyError: Caught KeyError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop data = fetcher.fetch(index) File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/Video-Swin-Transformer-master/mmaction/datasets/base.py", line 287, in getitem return self.prepare_train_frames(idx) File "/home/Video-Swin-Transformer-master/mmaction/datasets/rawframe_dataset.py", line 168, in prepare_train_frames return self.pipeline(results) File "/home/Video-Swin-Transformer-master/mmaction/datasets/pipelines/compose.py", line 41, in call data = t(data) File "/home/ideo-Swin-Transformer-master/mmaction/datasets/pipelines/loading.py", line 1153, in call if results['frame_inds'].ndim != 1: KeyError: 'frame_inds'

pandababyer commented 2 years ago

I guess you didn't write the config file correct. You can check the compose order in your train_pipeline: maybe you put the DecordDecode before SampleFrames or you miss it . image