Closed LiangJunhao-THU closed 4 years ago
I modified the code in data_loader.py
line 19: IMG_EXTENSIONS = ['.png'] change to IMG_EXTENSIONS = str('.png')
The code works again. Thank you again for your fantastic work!
I modified the code in data_loader.py
line 19: IMG_EXTENSIONS = ['.png'] change to IMG_EXTENSIONS = str('.png')
The code works again. Thank you again for your fantastic work!
Hi Alan,
Sorry for the late reply. I'm glad that you solved the problem!
Best, Yide
Hi! Very nice work! But when I run train_dncnn.py and benchmark.py in Google Colab, it reminds TypeError:
/// Traceback (most recent call last): File "train_dncnn.py", line 133, in
patch_size=args.imsize, test_fov=19)
File "/content/denoising-fluorescence/denoising/utils/data_loader.py", line 412, in load_denoising
target_transform=target_transform, loader=pil_loader)
File "/content/denoising-fluorescence/denoising/utils/data_loader.py", line 137, in init
self.samples = self._gather_files()
File "/content/denoising-fluorescence/denoising/utils/data_loader.py", line 167, in _gather_files
if is_image_file(fname):
File "/content/denoising-fluorescence/denoising/utils/data_loader.py", line 28, in is_image_file
return has_file_allowed_extension(filename, IMG_EXTENSIONS)
File "/usr/local/lib/python3.6/dist-packages/torchvision/datasets/folder.py", line 20, in has_file_allowed_extension
return filename.lower().endswith(extensions)
TypeError: endswith first arg must be str or a tuple of str, not list
///
Do you know how to deal with it? Thank you so much.