-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while training #6
Comments
I have received the same problem |
1 similar comment
I have received the same problem |
I have received the same problem too |
The cause of this error is the line "image_list_haze = glob.glob(hazy_images_path + "*.jpg")" in "dataloader.py". The path obtained by the "glob.glob" function under windows and linux systems is slightly different. The path of the same file in windows system is "data/images/data\NYU2_714.jpg", and the path in linux system is "data/images/data/NYU2_714.jpg". After the above path is sliced by the code "image = image.split("/")[-1]" on line 27, the "image" variable is "data/NYU2_714.jpg". The code can be changed to "image = image.split("\\")[-1]", after the string is sliced, the "image" variable is "NYU2_714.jpg" |
—————————————————————————————————— |
thanks,I need to train other datasets. How should I handle datasets? And modify the dataloader?? |
Hi Mayank,
I created a folder "data" and placed the data and images folder from the google sites. I'm getting below error. Please guide me any corrections.
Total training examples: 24443
Total validation examples: 2813
Traceback (most recent call last):
File "train.py", line 104, in
train(config)
File "train.py", line 43, in train
for iteration, (img_orig, img_haze) in enumerate(train_loader):
File "C:\Users\aruna\Anaconda3\envs\test\lib\site-packages\torch\utils\data\dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "C:\Users\aruna\Anaconda3\envs\test\lib\site-packages\torch\utils\data\dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
FileNotFoundError: Traceback (most recent call last):
File "C:\Users\aruna\Anaconda3\envs\test\lib\site-packages\torch\utils\data\dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "C:\Users\aruna\Anaconda3\envs\test\lib\site-packages\torch\utils\data\dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "C:\Users\aruna\PycharmProjects\PyTorch-Image-Dehazing-master\dataloader.py", line 90, in getitem
data_orig = Image.open(data_orig_path)
File "C:\Users\aruna\Anaconda3\envs\test\lib\site-packages\PIL\Image.py", line 2766, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'data\images\data\data\NYU2_714.jpg'
The text was updated successfully, but these errors were encountered: