HEAL icon indicating copy to clipboard operation
HEAL copied to clipboard

cv2.error: Caught error in DataLoader worker process 0.

Open kitschlin opened this issue 1 year ago • 7 comments

请问一下,使用OP2V2数据进行主目录的运行命令python opencood/tools/train.py -y None --model_dir opencood/logs/HEAL_m1_based/stage2/m2_alignto_m1 的时候,一直报这个错误,显示dataloader中的bev_visibility.png为空 ---------------------<torch.utils.data.dataloader.DataLoader object at 0x7f28363fbc70>----------------- Traceback (most recent call last): File "opencood/tools/train.py", line 217, in main() File "opencood/tools/train.py", line 128, in main for i, batch_data in enumerate(train_loader): File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 652, in next data = self._next_data() File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1347, in _next_data return self._process_data(data) File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1373, in _process_data data.reraise() File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise raise exception cv2.error: Caught error in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/mnt/DATA/kitsch/HEAL/opencood/data_utils/datasets/late_heter_fusion_dataset.py", line 82, in getitem reformat_data_dict = self.get_item_train(base_data_dict) File "/mnt/DATA/kitsch/HEAL/opencood/data_utils/datasets/late_heter_fusion_dataset.py", line 103, in get_item_train selected_cav_processed = self.get_item_single_car(selected_cav_base) File "/mnt/DATA/kitsch/HEAL/opencood/data_utils/datasets/late_heter_fusion_dataset.py", line 195, in get_item_single_car object_bbx_center, object_bbx_mask, object_ids = self.generate_object_center_single( File "/mnt/DATA/kitsch/HEAL/opencood/data_utils/datasets/basedataset/opv2v_basedataset.py", line 469, in generate_object_center_camera return self.post_processor.generate_visible_object_center( File "/mnt/DATA/kitsch/HEAL/opencood/data_utils/post_processor/base_postprocessor.py", line 523, in generate_visible_object_center visibility_map = np.asarray(cv2.cvtColor(cav_contents[0]["bev_visibility.png"], cv2.COLOR_BGR2GRAY)) cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-jhawztrk/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

kitschlin avatar Jul 23 '24 10:07 kitschlin

https://drive.google.com/drive/u/0/mobile/folders/1dkDeHlwOVbmgXcDazZvO6TFEZ6V_7WUu?pli=1

Hi,你还要下载这里的additional.zip 并且解压到同目录。m2是camera modality,依赖一些额外的标注数据

yifanlu0227 avatar Jul 23 '24 10:07 yifanlu0227

好的谢谢您

kitschlin avatar Jul 23 '24 13:07 kitschlin

@yifanlu0227 您好,在使用OP2V2数据时,运行命令“python opencood/tools/train.py -y None --model_dir opencood/logs/HEAL_m1_based/stage2/m3_alignto_m1”会报错下面的,同时提示找不到pcd文件,请问是怎么回事呢?

Traceback (most recent call last): File "opencood/tools/train.py", line 218, in main() File "opencood/tools/train.py", line 140, in main ouput_dict = model(batch_data['ego']) File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in call_impl return forward_call(*input, **kwargs) File "/mnt/DATA/kitsch/HEAL/opencood/models/heter_pyramid_single.py", line 105, in forward feature = eval(f"self.encoder{modality_name}")(data_dict, modality_name) File "/usr/local/anaconda3/envs/coalign/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/mnt/DATA/kitsch/HEAL/opencood/models/heter_encoders.py", line 70, in forward batch_size = voxel_coords[:,0].max() + 1 RuntimeError: max(): Expected reduction dim to be specified for input.numel() == 0. Specify the reduction dim with the 'dim' argument. Snipaste_2024-07-23_23-57-05 Snipaste_2024-07-23_23-56-29

kitschlin avatar Jul 23 '24 15:07 kitschlin

你的 dataset/OPV2V Hetero/train/2021_08_16_22_26_54/650/ 里面什么内容吗

yifanlu0227 avatar Jul 23 '24 16:07 yifanlu0227

问题已经解决,没有完全下载好雷达数据,谢谢您的提醒!

kitschlin avatar Jul 24 '24 14:07 kitschlin

https://drive.google.com/drive/u/0/mobile/folders/1dkDeHlwOVbmgXcDazZvO6TFEZ6V_7WUu?pli=1

Hi,你还要下载这里的additional.zip 并且解压到同目录。m2是camera modality,依赖一些额外的标注数据

您好,该链接已经失效,请问数据在哪里可以获取?

chinagalaxy2002 avatar Feb 19 '25 19:02 chinagalaxy2002

Google Drive link已经失效了,请用下面的链接 @chinagalaxy2002

https://ucla.app.box.com/v/UCLA-MobilityLab-OPV2V

yifanlu0227 avatar Feb 20 '25 06:02 yifanlu0227