weiyithu / SurroundOcc

[ICCV 2023] SurroundOcc: Multi-camera 3D Occupancy Prediction for Autonomous Driving
Apache License 2.0
772 stars 95 forks source link

problem in 'process_your_own_data.py' #12

Open acse-qj320 opened 1 year ago

acse-qj320 commented 1 year ago

Hi, thanks for your great work firstly. I am trying to process my own data based on your work. However, when I run 'process_your_own_data.py', I met the problem:

Traceback (most recent call last):
  File "tools/generate_occupancy_with_own_data/process_your_own_data.py", line 3, in <module>
    import chamfer
ImportError: libc10.so: cannot open shared object file: No such file or directory

So I think maybe need to 'import torch' before 'import chamfer', and it works. Is that a little bug in the code?

lqzhao commented 1 year ago

Thanks for pointing this out. We must "import torch" before "import chamfer". We have fixed the bug~

acse-qj320 commented 1 year ago

Happy to hear that. I met another problem, when I put the data demo _gt_generationtemplate you provided below the dir 'tool/generate_occupancy_with_own_data' and ran the command python process_your_own_data.py --to_mesh --with_semantic --data_path gt_generation_template --len_sequence 10, it could get gt_generation_templateoccupancy_gt0.npy and gt_generation_templateoccupancy_gt_with_semantic0.npy. But then it would give the warning as below:

[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 6
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 2
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 5
...

At last, the program get core dump. I am so confused about that, my open3d is 0.16.0. Maybe the version cause this? Looking forward for your reply and thank you for your help.

rockywind commented 1 year ago

Hi, I met the error bellow. The script is python process_your_own_data.py --data_path data/gt_generation_template/ --len_sequence 10

    pc = LidarPointCloud(pc.T)
  File "/opt/conda/lib/python3.7/site-packages/nuscenes/utils/data_classes.py", line 35, in __init__
    assert points.shape[0] == self.nbr_dims(), 'Error: Pointcloud points must have format: %d x n' % self.nbr_dims()
AssertionError: Error: Pointcloud points must have format: 4 x n
lqzhao commented 1 year ago

Happy to hear that. I met another problem, when I put the data demo _gt_generationtemplate you provided below the dir 'tool/generate_occupancy_with_own_data' and ran the command python process_your_own_data.py --to_mesh --with_semantic --data_path gt_generation_template --len_sequence 10, it could get gt_generation_templateoccupancy_gt0.npy and gt_generation_templateoccupancy_gt_with_semantic0.npy. But then it would give the warning as below:

[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 6
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 2
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 5
...

At last, the program get core dump. I am so confused about that, my open3d is 0.16.0. Maybe the version cause this? Looking forward for your reply and thank you for your help.

We sometimes have this problem, but this problem is random and cannot be reproduced. It may be gone after rerunning. It is suspected that the resources are exhausted or the bug of open3d. You can try to change the hyperparameters of Poisson reconstruction. BTW, our open3d version is 0.9.0

acse-qj320 commented 1 year ago

Happy to hear that. I met another problem, when I put the data demo _gt_generationtemplate you provided below the dir 'tool/generate_occupancy_with_own_data' and ran the command python process_your_own_data.py --to_mesh --with_semantic --data_path gt_generation_template --len_sequence 10, it could get gt_generation_templateoccupancy_gt0.npy and gt_generation_templateoccupancy_gt_with_semantic0.npy. But then it would give the warning as below:

[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 6
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 2
[WARNING] /root/Open3D/build/poisson/src/ext_poisson/PoissonRecon/Src/FEMTree.IsoSurface.specialized.inl (Line 1858)
          Extract
          bad average roots: 5
...

At last, the program get core dump. I am so confused about that, my open3d is 0.16.0. Maybe the version cause this? Looking forward for your reply and thank you for your help.

We sometimes have this problem, but this problem is random and cannot be reproduced. It may be gone after rerunning. It is suspected that the resources are exhausted or the bug of open3d. You can try to change the hyperparameters of Poisson reconstruction. BTW, our open3d version is 0.9.0

Thank you for your timely reply. I will try in 0.9.0

lqzhao commented 1 year ago

Hi, I met the error bellow. The script is python process_your_own_data.py --data_path data/gt_generation_template/ --len_sequence 10

    pc = LidarPointCloud(pc.T)
  File "/opt/conda/lib/python3.7/site-packages/nuscenes/utils/data_classes.py", line 35, in __init__
    assert points.shape[0] == self.nbr_dims(), 'Error: Pointcloud points must have format: %d x n' % self.nbr_dims()
AssertionError: Error: Pointcloud points must have format: 4 x n

You can choose to concatenate a vector of all 0s to make the point cloud have the format: 4 x n. Or you can visit this link https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/utils/data_classes.py#L27 to modify your code.

    Every point cloud (lidar and radar) consists of points where:
    - Dimensions 0, 1, 2 represent x, y, z coordinates.
        These are modified when the point cloud is rotated or translated.
    - All other dimensions are optional. Hence these have to be manually modified if the reference frame changes.
acse-qj320 commented 1 year ago

Hi, I found another bug in this demo (maybe), in row 250, you set while int(i) < 10000:, however there is no change of i in the loop. So the value of i is always 0, the loop would not stop.

lqzhao commented 1 year ago

Hi, I found another bug in this demo (maybe), in row 250, you set while int(i) < 10000:, however there is no change of i in the loop. So the value of i is always 0, the loop would not stop.

Hi, you are right. We add "i = i + 1" in the bottom. This loop will not stop until all the frames in the dictionary are traversed, so we use 'break' in row 253. Thanks. We will make the code more elegant, even if this version can generate occupancy without fatal bugs.