Download the dair-v2x(cooperative-vehicle-infrastructure )dataset and the new annotation data as mentioned in the github homepage of where2comm
Organize your dataset file into the following structure: https://github.com/AIR-THU/DAIR-V2X/tree/main/data
Replace the lidar annotation data of the collaborative and the vehicle side with the new annotation data downloaded in step 1. (you will also find the train.json file and the val.json file in this zip )
Change data path in the yaml file to your own path (data_dir, root_dir...)
However, a new issue has emerged, which may be the reading issue of 'pypcd. py'. Here are all the error messages:
learning rate 0.002000
/home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/004717.pcd
/home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/000518.pcd
/home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/000632.pcd
/home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/010769.pcd
/home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/011355.pcd
/home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/004888.pcd
/home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/013123.pcd
error: length of type, count and fields must be equal
/home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/014120.pcd
error: length of type, count and fields must be equal
Traceback (most recent call last):
File "opencood/tools/train.py", line 192, in
main()
File "opencood/tools/train.py", line 96, in main
for i, batch_data in enumerate(train_loader):
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise
raise exception
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/selfdriving/mingchao/Where2comm/opencood/data_utils/datasets/intermediate_fusion_dataset_dair.py", line 318, in getitem
base_data_dict = self.retrieve_base_data(idx)
File "/home/selfdriving/mingchao/Where2comm/opencood/data_utils/datasets/intermediate_fusion_dataset_dair.py", line 132, in retrieve_base_data
data[0]['lidarnp'], = pcd_utils.read_pcd(os.path.join(self.root_dir,frame_info["vehicle_pointcloud_path"]))
File "/home/selfdriving/mingchao/Where2comm/opencood/utils/pcd_utils.py", line 206, in read_pcd
pcd = pypcd.PointCloud.from_path(pcd_path)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 738, in from_path
return point_cloud_from_path(fname)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 305, in point_cloud_from_path
pc = point_cloud_from_fileobj(f)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 298, in point_cloud_from_fileobj
return PointCloud(metadata, pc_data)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 673, in init
self.check_sanity()
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 685, in check_sanity
assert(_metadata_is_consistent(md))
AssertionError
I have solved a problem by following these steps:
Download the dair-v2x(cooperative-vehicle-infrastructure )dataset and the new annotation data as mentioned in the github homepage of where2comm Organize your dataset file into the following structure: https://github.com/AIR-THU/DAIR-V2X/tree/main/data Replace the lidar annotation data of the collaborative and the vehicle side with the new annotation data downloaded in step 1. (you will also find the train.json file and the val.json file in this zip ) Change data path in the yaml file to your own path (data_dir, root_dir...)
However, a new issue has emerged, which may be the reading issue of 'pypcd. py'. Here are all the error messages:
learning rate 0.002000 /home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/004717.pcd /home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/000518.pcd /home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/000632.pcd /home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/010769.pcd /home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/011355.pcd /home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/004888.pcd /home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/013123.pcd error: length of type, count and fields must be equal /home/selfdriving/mingchao/Where2comm/data/DAIR-V2X/v2x/cooperative-vehicle-infrastructure/vehicle-side/velodyne/014120.pcd error: length of type, count and fields must be equal Traceback (most recent call last): File "opencood/tools/train.py", line 192, in
main()
File "opencood/tools/train.py", line 96, in main
for i, batch_data in enumerate(train_loader):
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise
raise exception
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/selfdriving/mingchao/Where2comm/opencood/data_utils/datasets/intermediate_fusion_dataset_dair.py", line 318, in getitem
base_data_dict = self.retrieve_base_data(idx)
File "/home/selfdriving/mingchao/Where2comm/opencood/data_utils/datasets/intermediate_fusion_dataset_dair.py", line 132, in retrieve_base_data
data[0]['lidarnp'], = pcd_utils.read_pcd(os.path.join(self.root_dir,frame_info["vehicle_pointcloud_path"]))
File "/home/selfdriving/mingchao/Where2comm/opencood/utils/pcd_utils.py", line 206, in read_pcd
pcd = pypcd.PointCloud.from_path(pcd_path)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 738, in from_path
return point_cloud_from_path(fname)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 305, in point_cloud_from_path
pc = point_cloud_from_fileobj(f)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 298, in point_cloud_from_fileobj
return PointCloud(metadata, pc_data)
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 673, in init
self.check_sanity()
File "/home/selfdriving/anaconda3/envs/Where2comm/lib/python3.7/site-packages/pypcd/pypcd.py", line 685, in check_sanity
assert(_metadata_is_consistent(md))
AssertionError