urban-detection icon indicating copy to clipboard operation
urban-detection copied to clipboard

Problems encountered when using code for model evaluation

Open guomingxi1996 opened this issue 2 years ago • 1 comments

When I used the model for training and testing, I encountered the following errors, Traceback (most recent call last): File "test.py", line 296, in test(opt.data, File "test.py", line 115, in test for batch_i, (img, targets, paths, shapes) in enumerate(tqdm(dataloader, desc=s)): File "/home/mingxiguo/anaconda3/envs/urban/lib/python3.8/site-packages/tqdm/std.py", line 1195, in iter for obj in iterable: File "/home/mingxiguo/urban-detection-master/yolov5/utils/datasets.py", line 91, in iter yield next(self.iterator) File "/home/mingxiguo/anaconda3/envs/urban/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/home/mingxiguo/anaconda3/envs/urban/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/home/mingxiguo/anaconda3/envs/urban/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/home/mingxiguo/anaconda3/envs/urban/lib/python3.8/site-packages/torch/_utils.py", line 425, in reraise raise self.exc_type(msg) TypeError: Caught TypeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/mingxiguo/anaconda3/envs/urban/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 235, in _worker_loop init_fn(worker_id) TypeError: 'bool' object is not callable

guomingxi1996 avatar Jun 14 '22 20:06 guomingxi1996

And I have inquired about some similar problems and found that without modifying the source code, it can be solved by using a lower version of cuda. Since the computer I am using is too new, I can only install versions above 11.1, so I cannot verify whether it is the problem here. I hope the author can help to answer this question.

guomingxi1996 avatar Jun 14 '22 20:06 guomingxi1996