Divadi / SOLOFusion

Time Will Tell: New Outlooks and A Baseline for Temporal Multi-View 3D Object Detection
Apache License 2.0
232 stars 13 forks source link

SOLOFusion with python3.7.10, torch1.9, cudatoolkit 11.1 bug fixed #17

Open MalignusCN opened 1 year ago

MalignusCN commented 1 year ago

Hi Divadi, I've found that execute SOLOFusion project with python3.7.10, torch1.9, cudatoolkit 11.1 as your project mentioned, there is a small bug.

mmdet3d/models/necks/view_transformer_solofusion.py meshgrid = torch.stack(torch.meshgrid(torch.arange(stereo_W), torch.arange(stereo_H), indexing="xy"), dim=2) should changed as meshgrid = torch.stack(torch.meshgrid(torch.arange(stereo_H), torch.arange(stereo_W)), dim=2)

which is mainly because pytorch with version 1.9, the meshgrid method didn't support indexing. The problem further results in the reverse of stereo_H and stereo_W, hope that can help other people

Environment

Python: 3.7.10 (default, Feb 26 2021, 18:47:35) [GCC 7.3.0] CUDA available: True GPU 0,1: NVIDIA GeForce RTX 3090 CUDA_HOME: /usr/local/cuda NVCC: Build cuda_11.1.TC455_06.29190527_0 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.9.0 PyTorch compiling details: PyTorch built with:

TorchVision: 0.10.0 OpenCV: 4.7.0 MMCV: 1.3.16 MMCV Compiler: GCC 7.3 MMCV CUDA Compiler: 11.1 MMDetection: 2.14.0 MMSegmentation: 0.14.1 MMDetection3D: 0.17.2+683edce

Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

Cc19245 commented 11 months ago

Thanks a lot, it's useful for me.

Divadi commented 4 months ago

Thank you so much for the bugfix - I'll incorporate it when I get some bandwidth.