WoodwindHu / DTS

Code for "Density-Insensitive Unsupervised Domain Adaption on 3D Object Detection"
MIT License
32 stars 5 forks source link

Beam_labels of Waymo #6

Open csj777 opened 1 year ago

csj777 commented 1 year ago

Thank you for your outstanding work。

when running python -m pcdet.datasets.waymo.waymo_dataset --func create_waymo_infos --cfg_file tools/cfgs/dataset_configs/waymo_dataset.yaml I meet

Traceback (most recent call last):
  File "/space/chensj/anaconda3/envs/ST3D/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/space/chensj/anaconda3/envs/ST3D/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/space0/chensj/projects/DTS-main/pcdet/datasets/waymo/waymo_dataset.py", line 388, in <module>
    processed_data_tag=dataset_cfg.PROCESSED_DATA_TAG
  File "/space0/chensj/projects/DTS-main/pcdet/datasets/waymo/waymo_dataset.py", line 364, in create_waymo_infos
    used_classes=['Vehicle', 'Pedestrian', 'Cyclist']
  File "/space0/chensj/projects/DTS-main/pcdet/datasets/waymo/waymo_dataset.py", line 287, in create_groundtruth_database
    points, _ = self.get_lidar(sequence_name, sample_idx)
  File "/space0/chensj/projects/DTS-main/pcdet/datasets/waymo/waymo_dataset.py", line 119, in get_lidar
    beam_labels = beam_labels[NLZ_flag == -1]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 183680 but corresponding boolean dimension is 171606

I try

import numpy as np
lidar_file = '/space/chensj/projects/DTS-main/data/waymo/waymo_processed_data/segment-15832924468527961_1564_160_1584_160_with_camera_labels/0000.beam_labels.npy'
point_features = np.load(lidar_file)
beam_labels_file = '/space/chensj/projects/DTS-main/data/waymo/waymo_processed_data/segment-15832924468527961_1564_160_1584_160_with_camera_labels/0000.npy'
beam_labels = np.load(beam_labels_file).astype(np.int32)  # (N, )

for point_features.shape, I find: (185289,) but for beam_labels.shape, I find: (169035, 6) so the dims between npy and its beam_labels are not completely matched. Can you help me solve this problem?

WoodwindHu commented 1 year ago

It seems like the 0000.npy is corrupted, have you check the completeness of segment-15832924468527961_1564_160_1584_160_with_camera_labels?