xinntao / EDVR

Winning Solution in NTIRE19 Challenges on Video Restoration and Enhancement (CVPR19 Workshops) - Video Restoration with Enhanced Deformable Convolutional Networks. EDVR has been merged into BasicSR and this repo is a mirror of BasicSR.
https://github.com/xinntao/BasicSR
1.48k stars 320 forks source link

An error when runing run_sripts.sh #68

Open zhangclaire opened 5 years ago

zhangclaire commented 5 years ago

Hello, thanks for your great work. The error occurred when I started training and run the file run_scripts.sh.

File "/home/sggyqq/EDVR-master/codes/data/REDS_dataset.py", line 110, in __getitem__ name_a, name_b = key.split('_') ValueError: not enough values to unpack (expected 2, got 1)

I can't find the cause of the error. I think I created the _REDS_trainvalkeys.pkl file right,do I need to modifiy the code below in REDS_dataset.py? By the way,what does the parameter index represent?

`

    key = self.paths_GT[index]

    name_a, name_b = key.split('_')

    center_frame_idx = int(name_b)

`

Wishing for your reply!

xinntao commented 5 years ago
  1. If you use the REDS dataste, it will use the default REDS_trainval_keys.pkl in the codes. Did you use your own data? You can also print the key for debugging.

  2. In the import torch.utils.data.Dataset class, we pass the index to the def __getitem__(self, index): function. And the dataset will return the corresponding data to the index. So that you can control your data loader.