我使用的是https://github.com/fxia22/pointnet.pytorch
pointnet的源代码,运行train_classification.py后出现如下错误:
Traceback (most recent call last):
File "D:/学习资料/博三/点云处理教程/pointnet/pointnet.pytorch/utils/train_classification.py", line 159, in <module>
sys.exit(main())
File "D:/学习资料/博三/点云处理教程/pointnet/pointnet.pytorch/utils/train_classification.py", line 110, in main
for i, data in enumerate(dataloader, 0):
File "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 856, in _next_data
return self._process_data(data)
File "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 881, in _process_data
data.reraise()
File "D:\ANA\envs\pytorch\lib\site-packages\torch\_utils.py", line 395, in reraise
raise self.exc_type(msg)
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "D:\ANA\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 "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\学习资料\博三\点云处理教程\pointnet\pointnet.pytorch\pointnet\dataset.py", line 170, in __getitem__
cls = self.cat[fn.split('/')[0]]
KeyError: 'sofa_0457'
想知道如何解决这类问题,或者什么源代码比较好跑一些,被这个折磨很久了