Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuscenes data visualization fails #76

Open
Ultran-cyf opened this issue Jul 31, 2024 · 1 comment
Open

nuscenes data visualization fails #76

Ultran-cyf opened this issue Jul 31, 2024 · 1 comment

Comments

@Ultran-cyf
Copy link

Ultran-cyf commented Jul 31, 2024

Can anyone tell me how to fix it?

command:
python tools/demo.py --cfg_file tools/cfgs/dsvt_models/dsvt_plain_1f_onestage_nusences.yaml --data_path demo --ckpt ckpt/DSVT_Nuscenes_val.pth

The following error occurs when I run demo.py to test the Lidar data for nuscenes:

2024-07-31 10:22:55,076   INFO  -----------------Quick Demo of OpenPCDet-------------------------
2024-07-31 10:22:55,076   INFO  Total number of samples:        3
/home/user/anaconda3/envs/dsvt/lib/python3.9/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1695392035629/work/aten/src/ATen/native/TensorShape.cpp:3526.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
2024-07-31 10:22:55,186   INFO  ==> Loading parameters from checkpoint ckpt/DSVT_Nuscenes_val.pth to CPU
2024-07-31 10:22:55,213   INFO  ==> Done (loaded 449/449)
Traceback (most recent call last):
  File "/home/user/Pycharm_Project/DSVT-master/tools/demo.py", line 112, in <module>
    main()
  File "/home/user/Pycharm_Project/DSVT-master/tools/demo.py", line 94, in main
    for idx, data_dict in enumerate(demo_dataset):
  File "/home/user/Pycharm_Project/DSVT-master/tools/demo.py", line 59, in __getitem__
    data_dict = self.prepare_data(data_dict=input_dict)
  File "/home/user/Pycharm_Project/DSVT-master/pcdet/datasets/dataset.py", line 180, in prepare_data
    data_dict = self.point_feature_encoder.forward(data_dict)
  File "/home/user/Pycharm_Project/DSVT-master/pcdet/datasets/processor/point_feature_encoder.py", line 29, in forward
    data_dict['points'], use_lead_xyz = getattr(self, self.point_encoding_config.encoding_type)(
  File "/home/user/Pycharm_Project/DSVT-master/pcdet/datasets/processor/point_feature_encoder.py", line 48, in absolute_coordinates_encoding
    assert points.shape[-1] == len(self.src_feature_list)
AssertionError

I've tried removing the 'timestamp' field from POINT_FEATURE_ENCODING in nuscenes_dataset.yaml, but it still doesn't run!

POINT_FEATURE_ENCODING: { encoding_type: absolute_coordinates_encoding, used_feature_list: ['x', 'y', 'z', 'intensity', 'timestamp'], src_feature_list: ['x', 'y', 'z', 'intensity', 'timestamp'], }

The error is as follows:

2024-07-31 10:34:15,288   INFO  -----------------Quick Demo of OpenPCDet-------------------------
2024-07-31 10:34:15,288   INFO  Total number of samples: 	3
/home/user/anaconda3/envs/dsvt/lib/python3.9/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1695392035629/work/aten/src/ATen/native/TensorShape.cpp:3526.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
2024-07-31 10:34:15,368   INFO  ==> Loading parameters from checkpoint /home/user/Pycharm_Project/DSVT-master/ckpt/DSVT_Nuscenes_val.pth to CPU
2024-07-31 10:34:15,387   INFO  Not updated weight vfe.pfn_layers.0.linear.weight: torch.Size([64, 10])
2024-07-31 10:34:15,387   INFO  ==> Done (loaded 448/449)
2024-07-31 10:34:15,543   INFO  Visualized sample index: 	1
Traceback (most recent call last):
  File "/home/user/Pycharm_Project/DSVT-master/tools/demo.py", line 112, in <module>
    main()
  File "/home/user/Pycharm_Project/DSVT-master/tools/demo.py", line 100, in main
    V.draw_scenes(
  File "/home/user/Pycharm_Project/DSVT-master/tools/visual_utils/open3d_vis_utils.py", line 70, in draw_scenes
    vis = draw_box(vis, ref_boxes, (0, 1, 0), ref_labels, ref_scores)
  File "/home/user/Pycharm_Project/DSVT-master/tools/visual_utils/open3d_vis_utils.py", line 109, in draw_box
    line_set.paint_uniform_color(box_colormap[ref_labels[i]])
IndexError: list index out of range
@chenshi3
Copy link
Collaborator

chenshi3 commented Sep 3, 2024

Please note that the demo.py file is cloned directly from the original pcdet repository and has not been validated or tested by our team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants