Open Mike-7777777 opened 5 months ago
What I did to get the list non empty: The folder structure after the split is
However, in the code line 72 you find:
for camera_list in sorted(glob(os.path.join(self.load_dir, self.map_version_to_dir[split], 'labels_images',
So the code searches for "labels_images", which doesn't exist but there is "labels_point_cloud". Change the code there to
for camera_list in sorted(glob(os.path.join(self.load_dir, self.map_version_to_dir[split], 'labels_point_clouds',
and the list won't be empty anymore.
You can clearly see that they changed their project structure, since the documentation also doesn't match directories for several scripts. I think it ran on their PC before they changed it and therefore maybe all bugs in the code are related to changed directory names.
Next error python gives me after changing the code:
line 174, in _fill_infos cam_info['filename'] = os.path.join(cam_annotations[i]['frame_properties']['image_file_name']) KeyError: 'image_file_name'
I will look into it. Please let me know if you found a solution.
If you look into the JSON, you can see that there is no entry called image_file_name
. However, there is image_file_names
, which contains two immage names.
For example: 'image_file_names': ['1646667310_044372291_s110_camera_basler_south1_8mm.jpg', '1646667310_055996268_s110_camera_basler_south2_8mm.jpg']
You can replace
cam_info['filename'] = os.path.join(cam_annotations[i]['frame_properties']['image_file_name'])
with
cam_info['filename'] = os.path.join(cam_annotations[i]['frame_properties']['image_file_names'])
however, this will return a list instead of just an image file name, which gives you the following error:
a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not list
It seems like the code is written for a dataset with one camera, however the default dataset the code links for if you give no arguments, cleary mentions the R02 dataset.
default='/data/00_tum_traffic_dataset/r02_tum_traffic_intersection_dataset/r02_tum_traffic_intersection_dataset_train_val_test/',
This is really messed up.
Ok, the converter, once it works, doesn't make a dataset like nuscenes, but instead directly generates the corresponding .pkl files that are probably ment for use in mmdetection3D.
However, I think the BEV-Fusion repo has modified the way .pkl files are generated so they may not work as intended. I think I won't look further in this.
Code related to this error is(I think):
When I print the
camera_labels_list
, it shows empty: