Please help me with use vid4 and vimo90k #1268
-
(1)What is the file structure of vimo90k, Original Traceback (most recent call last): File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/group/dphi_algo_scratch_03/yinl/mmediting-master/mmedit/datasets/base_sr_dataset.py", line 52, in __getitem__
return self.pipeline(results)
File "/group/dphi_algo_scratch_03/yinl/mmediting-master/mmedit/datasets/pipelines/compose.py", line 43, in __call__
data = t(data)
File "/group/dphi_algo_scratch_03/yinl/mmediting-master/mmedit/datasets/pipelines/loading.py", line 135, in __call__
f'filepath should be list, but got {type(filepaths)}')
TypeError: filepath should be list, but got <class 'str'> in the config file: test_dataset_type = 'SRVid4Dataset'
# test
test=dict(
type=test_dataset_type,
lq_folder='videoSR/BIx4',
gt_folder='videoSR/original',
ann_file='videoSR/annotation.txt',
pipeline=test_pipeline,
scale=4,
filename_tmpl='{:03d}',
num_input_frames=7,
test_mode=True),
) |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
|
Beta Was this translation helpful? Give feedback.
-
@ckkelvinchan please add folder structure in the doc https://mmediting.readthedocs.io/en/latest/sr_datasets.html#vimeo90k-dataset |
Beta Was this translation helpful? Give feedback.
-
@ckkelvinchan test_dataset_type = 'SRTestMultipleGTDataset'
test_pipeline = [
dict(
type='LoadImageFromFileList',
io_backend='disk',
key='lq',
channel_order='rgb'),
dict(
type='LoadImageFromFileList',
io_backend='disk',
key='gt',
channel_order='rgb'),
dict(type='RescaleToZeroOne', keys=['lq', 'gt']),
dict(type='MirrorSequence', keys=['lq']),
dict(type='FramesToTensor', keys=['lq', 'gt']),
dict(
type='Collect',
keys=['lq', 'gt'],
meta_keys=['lq_path', 'gt_path', 'key'])
]
test=dict(
type=test_dataset_type,
lq_folder='videoSR/BIx4',
gt_folder='videoSR/original',
pipeline=test_pipeline,
scale=4,
test_mode=True),
)
the same as SRTestMultipleGTDataset
- my vid4 dataset structure is
| videoSR
| BIx4
| city
| Frame001.jpg
...
...
| original
| city
| Frame001.jpg
...
... but i still meet the problem: Traceback (most recent call last):
File "tools/test.py", line 136, in <module>
main()
File "tools/test.py", line 99, in main
save_image=args.save_image)
File "/group/dphi_algo_scratch_03/yinl/mmediting-master/mmedit/apis/test.py", line 40, in single_gpu_test
for data in data_loader:
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
data = self._next_data()
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data
data.reraise()
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/_utils.py", line 429, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/scratch/workspace/yinl/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/group/dphi_algo_scratch_03/yinl/mmediting-master/mmedit/datasets/base_sr_dataset.py", line 52, in __getitem__
return self.pipeline(results)
File "/group/dphi_algo_scratch_03/yinl/mmediting-master/mmedit/datasets/pipelines/compose.py", line 43, in __call__
data = t(data)
File "/group/dphi_algo_scratch_03/yinl/mmediting-master/mmedit/datasets/pipelines/loading.py", line 135, in __call__
f'filepath should be list, but got {type(filepaths)}')
TypeError: filepath should be list, but got <class 'str'> |
Beta Was this translation helpful? Give feedback.
-
Your test_pipline is not correct. You should use
Moreover, please note the use of |
Beta Was this translation helpful? Give feedback.
-
Okay. |
Beta Was this translation helpful? Give feedback.
-
@ckkelvinchan and if i use vimeo90k to train basicvsr mmedit/models/restorers/basic_restorer.py |
Beta Was this translation helpful? Give feedback.
-
Yes, you can use And you can follow exactly basicvsr_vimeo90k_bi.py for training on Vimeo-90K. |
Beta Was this translation helpful? Give feedback.
-
@ckkelvinchan thank you ^^ |
Beta Was this translation helpful? Give feedback.
-
Closing due to inactivity, please reopen if there are any further problems. |
Beta Was this translation helpful? Give feedback.
clip/sequence/img.png
. For instance,SRVid4Dataset
is for sliding-window methods such asEDVR
. Please useSRTestMultipleGTDataset
. For more details, please refer to the validation settings in basicvsr_vimeo90k_bd.py.