lidar_file path: /root/autodl-tmp/project/data/KITTI/object/testing/velodyne/000204.bin lidar_file path: /root/autodl-tmp/project/data/KITTI/object/testing/velodyne/000205.bin lidar_file path: /root/autodl-tmp/project/data/KITTI/object/testing/velodyne/000206.bin lidar_file path: /root/autodl-tmp/project/data/KITTI/object/testing/velodyne/000207.bin eval: 39%|█████████████████████████████▍ | 44/112 [00:06<00:07, 8.56it/s, mode=TEST, recall=0/0, rpn_iou=0]Traceback (most recent call last): File "eval_rcnn.py", line 908, in <module> eval_single_ckpt(root_result_dir) File "eval_rcnn.py", line 771, in eval_single_ckpt eval_one_epoch(model, test_loader, epoch_id, root_result_dir, logger) File "eval_rcnn.py", line 694, in eval_one_epoch ret_dict = eval_one_epoch_rpn(model, dataloader, epoch_id, result_dir, logger) File "eval_rcnn.py", line 143, in eval_one_epoch_rpn for data in dataloader: File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ lidar_file path: /root/autodl-tmp/project/data/KITTI/object/testing/velodyne/000208.bin data = self._next_data() File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data return self._process_data(data) File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data data.reraise() File "/root/miniconda3/lib/python3.8/site-packages/torch/_utils.py", line 428, in reraise raise self.exc_type(msg) AssertionError: Caught AssertionError in DataLoader worker process 0.
时间: 2023-09-19 13:08:17 浏览: 167
根据打印信息,可以看到 `get_lidar` 方法中的打印语句已经生效,输出了每个样本的 `lidar_file` 路径。但是,在处理第 208 个样本时,程序出现了 `AssertionError` 异常,可能是因为对应的 `lidar_file` 文件不存在。
建议再次检查一下对应的数据集文件夹中是否存在 `000208.bin` 这个文件。如果该文件确实不存在,可以尝试重新下载数据集或者检查一下数据集路径是否正确。
相关问题
File "/root/autodl-tmp/project/tools/../lib/datasets/kitti_rcnn_dataset.py", line 234, in __getitem__ return self.get_rpn_sample(index) File "/root/autodl-tmp/project/tools/../lib/datasets/kitti_rcnn_dataset.py", line 252, in get_rpn_sample pts_lidar = self.get_lidar(sample_id) File "/root/autodl-tmp/project/tools/../lib/datasets/kitti_dataset.py", line 43, in get_lidar assert os.path.exists(lidar_file) AssertionError
这是一个AssertionError,通常是由于断言(assert)语句失败导致的异常。在这段代码中,断言语句`assert os.path.exists(lidar_file)`检查lidar_file是否存在,如果不存在,则会抛出这个异常。你需要检查lidar_file的路径是否正确,以及文件是否存在。如果文件确实不存在,你需要找到原因并解决。如果文件存在,那么你需要检查代码中是否有其他问题。
File "/root/miniconda3/lib/python3.8/site-packages/torch/_utils.py", line 428, in reraise raise self.exc_type(msg) AssertionError: Caught AssertionError in DataLoader worker process 0. Original Traceback (most recent call last): File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop data = fetcher.fetch(index) File "/root/miniconda3/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 "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/autodl-tmp/project/tools/../lib/datasets/kitti_rcnn_dataset.py", line 234, in __getitem__ return self.get_rpn_sample(index) File "/root/autodl-tmp/project/tools/../lib/datasets/kitti_rcnn_dataset.py", line 252, in get_rpn_sample pts_lidar = self.get_lidar(sample_id) File "/root/autodl-tmp/project/tools/../lib/datasets/kitti_dataset.py", line 43, in get_lidar assert os.path.exists(lidar_file) AssertionError eval: 39%|█████████████████████████████▍ | 44/112 [00:06<00:09, 6.96it/s, mode=TEST, recall=0/0, rpn_iou=0]
这是一个AssertionError异常,通常是由于断言(assert)语句失败导致的异常。在这段代码中,断言语句`assert os.path.exists(lidar_file)`检查lidar_file是否存在,如果不存在,则会抛出这个异常。你需要检查lidar_file的路径是否正确,以及文件是否存在。如果文件确实不存在,你需要找到原因并解决。如果文件存在,那么你需要检查代码中是否有其他问题。另外,根据错误信息,这个异常可能是在DataLoader的worker进程中发生的,你需要在主进程中捕获这个异常并处理。你可以在主进程中加入try-except语句来捕获这个异常,并在except语句中进行处理。
阅读全文