Skip to content
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

FileNotFoundError: [Errno 2] No such file or directory: 'dataset/CDD-256/A\\filenames.txt' #4

Closed
Crawlling opened this issue Jul 19, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@Crawlling
Copy link

22-07-19 12:54:06.763 - INFO: Cd Model [CD] is created.
22-07-19 12:54:06.763 - INFO: Begin Model Evaluation (testing).
Traceback (most recent call last):
File "D:\test\ddpm-cd-master\ddpm_cd.py", line 326, in
for current_step, test_data in enumerate(test_loader):
File "C:\Anaconda3\envs\torch\lib\site-packages\torch\utils\data\dataloader.py", line 530, in next
data = self._next_data()
File "C:\Anaconda3\envs\torch\lib\site-packages\torch\utils\data\dataloader.py", line 1224, in _next_data
return self._process_data(data)
File "C:\Anaconda3\envs\torch\lib\site-packages\torch\utils\data\dataloader.py", line 1250, in _process_data
data.reraise()
File "C:\Anaconda3\envs\torch\lib\site-packages\torch_utils.py", line 457, in reraise
raise exception
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Anaconda3\envs\torch\lib\site-packages\torch\utils\data_utils\worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "C:\Anaconda3\envs\torch\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Anaconda3\envs\torch\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\test\ddpm-cd-master\data\CDDataset.py", line 65, in getitem
img_A = Image.open(A_path).convert("RGB")
File "C:\Anaconda3\envs\torch\lib\site-packages\PIL\Image.py", line 2953, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'dataset/CDD-256/A\filenames.txt'

i try all of the model is great but just CDD-test happen this.bother again.

@wgcban
Copy link
Owner

wgcban commented Jul 19, 2022

@Crawlling, I got this! This is the problem when I was generating the splits. Please check the test split (test.txt) file and delete the "filenames.txt" from it.

@wgcban
Copy link
Owner

wgcban commented Jul 19, 2022

Screen Shot 2022-07-19 at 9 18 29 AM

You can see the first row has "filenames.txt". Please delete that row and try again.

@wgcban
Copy link
Owner

wgcban commented Jul 19, 2022

Thank you for pointing out this bug. I will update the dataset files to avoid this error in the future.

@wgcban wgcban added the bug Something isn't working label Jul 19, 2022
@wgcban wgcban pinned this issue Jul 19, 2022
@Crawlling
Copy link
Author

Crawlling commented Jul 20, 2022

Thank you for pointing out this bug. I will update the dataset files to avoid this error in the future.

Thank you for your patience and reply,It is my pleasure to point out the bug.hope you have a good day.

@wgcban
Copy link
Owner

wgcban commented Jul 20, 2022

I think the problem is resolved now, so I am closing this issue.

@wgcban wgcban closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants