csjliang / DASR

Official implementation of the paper 'Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution' in ECCV 2022
Apache License 2.0
128 stars 9 forks source link

NameError: name 'img_bytes' is not defined #23

Open wgfrhebnr opened 1 year ago

wgfrhebnr commented 1 year ago

Traceback (most recent call last): File "dasr/train.py", line 11, in train_pipeline(root_path) File "/home/chenz/DASR/basicsr/train.py", line 155, in train_pipeline train_data = prefetcher.next() File "/home/chenz/DASR/basicsr/data/prefetch_dataloader.py", line 76, in next return next(self.loader) File "/home/chenz/anaconda3/envs/DASR4/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 628, in next data = self._next_data() File "/home/chenz/anaconda3/envs/DASR4/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1333, in _next_data return self._process_data(data) File "/home/chenz/anaconda3/envs/DASR4/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1359, in _process_data data.reraise() File "/home/chenz/anaconda3/envs/DASR4/lib/python3.7/site-packages/torch/_utils.py", line 543, in reraise raise exception NameError: Caught NameError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/chenz/anaconda3/envs/DASR4/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "/home/chenz/anaconda3/envs/DASR4/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/chenz/anaconda3/envs/DASR4/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 58, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/chenz/DASR/dasr/data/DASR_dataset.py", line 114, in getitem img_gt = imfrombytes(img_bytes, float32=True) NameError: name 'img_bytes' is not defined

How to address this problem?