Open enxi3629 opened 3 years ago
the same error. Can you help us fix it? @sunke123
Hi @enxi3629 and @richenyunqi , Usually this error occurs when there is an invalid path to the images that are written in .lst files.
Suppose there are 100 images for training and those path was written in .lst files. If one picture path was written and at that path if the image is not present, that the system will through up this error.
Try to debug it and if you feel there are many images that you cannot check, split the .lst file using python code and try to test for small .lst files, then you will know where's the issue.
Traceback (most recent call last): File "tools/test.py", line 150, in
main()
File "tools/test.py", line 119, in main
for i,j in testloader:
File "C:\Anaconda\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 819, in next
return self._process_data(data)
File "C:\Anaconda\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 846, in _process_data
data.reraise()
File "C:\Anaconda\envs\pytorch\lib\site-packages\torch_utils.py", line 369, in reraise
raise self.exc_type(msg)
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Anaconda\envs\pytorch\lib\site-packages\torch\utils\data_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "C:\Anaconda\envs\pytorch\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Anaconda\envs\pytorch\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\HRNet\HRNet-Semantic-Segmentation-HRNet-OCR\tools..\lib\datasets\lip.py", line 90, in getitem
size = label.shape
AttributeError: 'NoneType' object has no attribute 'shape'