MengyangPu / EDTER

EDTER: Edge Detection with Transformer, in CVPR 2022

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors when running python tools/test.py with pretrained model

mumulll17 opened this issue · comments

Hi, I am running the test process with pretrained BSDS VOC stage I model. I have such errors
FileNotFoundError: [Errno 2] No such file or directory: '/home/pumengyang/Data/BSDS/test/100007.jpg'.

Do you know why could I have this error? Below is the whole report of this error. Thank you in advance.
File "./tools/test.py", line 139, in
main()
File "./tools/test.py", line 132, in main
outputs = multi_gpu_test(model, data_loader, args.tmpdir,
File "/oscar/scratch/zwang570/EDTER/mmseg/apis/test.py", line 123, in multi_gpu_test
for i, data in enumerate(data_loader):
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 363, in next
data = self._next_data()
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 989, in _next_data
return self._process_data(data)
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1014, in _process_data
data.reraise()
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/torch/_utils.py", line 395, in reraise
raise self.exc_type(msg)
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop
data = fetcher.fetch(index)
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/oscar/scratch/zwang570/EDTER/mmseg/datasets/custom.py", line 189, in getitem
return self.prepare_test_img(idx)
File "/oscar/scratch/zwang570/EDTER/mmseg/datasets/custom.py", line 224, in prepare_test_img
return self.pipeline(results)
File "/oscar/scratch/zwang570/EDTER/mmseg/datasets/pipelines/compose.py", line 43, in call
data = t(data)
File "/oscar/scratch/zwang570/EDTER/mmseg/datasets/pipelines/loading.py", line 63, in call
img_bytes = self.file_client.get(filename)
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/mmcv/fileio/file_client.py", line 294, in get
return self.client.get(filepath)
File "/users/zwang570/scratch/edtervenv/lib/python3.8/site-packages/mmcv/fileio/file_client.py", line 185, in get
with open(filepath, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/pumengyang/Data/BSDS/test/100007.jpg'

I am just a little bit confused of where did it get this path /home/pumengyang.

Nevermind, I get it solved. I changed the paths in the imagesets folder