Open henrychou1233 opened 1 month ago
I couldn't reproduce the error on Ubuntu. However, I encountered the same issue on my Windows machine; it seems there is a bug related to the paths. We recommend using ubuntu since all our experiments were conducted on this OS. I tested it again on an Ubuntu 20.04 installation via WSL and it worked fine.
on orders. To turn them off, set the environment variable
execute_main_test()
File "D:\download2\ss\d3ad\main.py", line 155, in execute_main_test
evaluate(args)
File "D:\download2\ss\d3ad\main.py", line 120, in evaluate
validate(unet, constants_dict, config)
File "D:\download2\ss\d3ad\test.py", line 221, in validate
for step, (data, targets, labels, filename) in enumerate(testloader):
File "C:\Users\user.conda\envs\AI\lib\site-packages\torch\utils\data\dataloader.py", line 631, in next
data = self._next_data()
File "C:\Users\user.conda\envs\AI\lib\site-packages\torch\utils\data\dataloader.py", line 1346, in _next_data
return self._process_data(data)
File "C:\Users\user.conda\envs\AI\lib\site-packages\torch\utils\data\dataloader.py", line 1372, in _process_data
data.reraise()
File "C:\Users\user.conda\envs\AI\lib\site-packages\torch_utils.py", line 705, in reraise
raise exception
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\user.conda\envs\AI\lib\site-packages\torch\utils\data_utils\worker.py", line 308, in _worker_loop
data = fetcher.fetch(index) # type: ignore[possibly-undefined]
File "C:\Users\user.conda\envs\AI\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\user.conda\envs\AI\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\download2\ss\d3ad\dataset.py", line 133, in getitem
target = Image.open(
File "C:\Users\user.conda\envs\AI\lib\site-packages\PIL\Image.py", line 3431, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'D:\download2\ss\d3ad\MVTec\grid\test\broken\000_mask.png'
TF_ENABLE_ONEDNN_OPTS=0
. 2024-07-16 00:17:20.311977: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variableTF_ENABLE_ONEDNN_OPTS=0
. 2024-07-16 00:17:20.849243: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variableTF_ENABLE_ONEDNN_OPTS=0
. Traceback (most recent call last): File "D:\download2\ss\d3ad\main.py", line 158, in為何會報以上錯誤 test裡面 應該是只有數字.png而已喔? 以下是我資料集的包法 "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\000_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\001_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\002_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\003_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\004_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\005_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\006_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\007_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\008_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\009_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\010_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\011_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\012_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\013_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\014_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\015_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\016_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\017_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\018_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\019_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\020_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\021_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\022_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\023_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\024_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\025_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\026_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\027_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\028_mask.png" "D:\download2\ss\d3ad\MVTec\grid\ground_truth\broken\029_mask.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\000.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\001.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\002.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\003.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\004.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\005.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\006.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\007.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\008.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\009.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\010.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\011.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\012.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\013.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\014.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\015.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\016.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\017.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\018.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\019.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\020.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\021.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\022.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\023.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\024.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\025.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\026.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\027.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\028.png" "D:\download2\ss\d3ad\MVTec\grid\test\broken\029.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\000.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\001.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\002.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\003.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\004.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\005.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\006.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\007.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\008.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\009.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\010.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\011.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\012.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\013.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\014.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\015.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\016.png" "D:\download2\ss\d3ad\MVTec\grid\test\good\017.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\000.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\001.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\002.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\003.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\004.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\005.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\006.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\007.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\008.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\009.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\010.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\011.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\012.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\013.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\014.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\015.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\016.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\017.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\018.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\019.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\020.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\021.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\022.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\023.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\024.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\025.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\026.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\027.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\028.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\029.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\030.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\031.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\032.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\033.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\034.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\035.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\036.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\037.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\038.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\039.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\040.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\041.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\042.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\043.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\044.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\045.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\046.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\047.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\048.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\049.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\050.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\051.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\052.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\053.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\054.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\055.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\056.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\057.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\058.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\059.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\060.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\061.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\062.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\063.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\064.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\065.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\066.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\067.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\068.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\069.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\070.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\071.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\072.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\073.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\074.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\075.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\076.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\077.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\078.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\079.png" "D:\download2\ss\d3ad\MVTec\grid\train\good\080.png"
以下是我的config.yaml