XuyangBai / TransFusion

[PyTorch] Official implementation of CVPR2022 paper "TransFusion: Robust LiDAR-Camera Fusion for 3D Object Detection with Transformers". https://arxiv.org/abs/2203.11496
Apache License 2.0
613 stars 76 forks source link

Repo is not out-of-the box anymore, please specify versions #98

Open gaborlegradi opened 1 year ago

gaborlegradi commented 1 year ago

Hello, It is a really nice repo, however it is not out-of-the box anymore. I have been fighting version-hell for a while. I think that the problem is threefold:

Rennylex commented 1 year ago

That's a very good point! Did you get yours running? I'm stucked in the version-hell as well. What's the version working for you?

gaborlegradi commented 1 year ago

That's a very good point! Did you get yours running? I'm stucked in the version-hell as well. What's the version working for you?

Here are my notes, which I am not 100% sure that complete. I have abandoned playing with TransFusion, I will be back soon, then I awake again the repo from zero and I refresh here my notes.

Requirement: Conda or miniconda installed.

cd ~/install/ # Typically I use ~/install/ for storing install files.

wget http://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda_11.0.2_450.51.05_linux.run

chmod 777 cuda_11.0.2_450.51.05_linux.run

sudo sh cuda_11.0.2_450.51.05_linux.run # accept, only toolkit to be installed

/usr/local/cuda/bin/nvcc --version # Build cuda_11.0_bu.TC445_37.28540450_0 # nvcc --version

conda remove -n trfu --all -y #If env was created and deleted several times.

conda create -n trfu python=3.7 -y

conda activate trfu

conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch -y

python

import torch

torch.cuda.is_available()

exit()

pip install -U openmim # mim is the package management tool for the OpenMMLab projects, which makes it easy to install mmcv # https://mmcv.readthedocs.io/en/latest/get_started/installation.html

mim install "mmcv<=1.4.0"

mim install "mmdet<=2.10.0"

mim install mmcv-full==1.2.4

git clone https://github.com/open-mmlab/mmdetection3d.git

cd mmdetection3d

git checkout 9802d41

pip install -v -e . # or "python setup.py develop"

pip uninstall pycocotools -y

pip install mmpycocotools

pip uninstall mmpycocotools

pip install mmpycocotools

Then you can run demo/pcd_demo.py

Rennylex commented 1 year ago

Thanks a lot!!!! Have you got the Docker running btw?

gaborlegradi commented 1 year ago

Thanks a lot!!!! Have you got the Docker running btw?

I do not remember... I will fix that too sooner or later...

Rennylex commented 1 year ago

Thanks! Lemme know if you have any update. I'm gonna send you my notes too once I get mine working.

changxu-zhang commented 1 year ago

Hi,

I'm also trapped into version problem right now, tried all combinations between recommended mmcv (1.2.4 to 1.3.0) and mmdet (2.5.0 to 3.0.0) and it didn't work

DanielDoerr commented 1 year ago

Hey @changxu-zhang

I tried @gaborlegradi instruction but ran into cuda errors. So I tried it with cuda 11.1 and Pytorch 1.8.0

wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run

sudo sh cuda_11.1.0_455.23.05_linux.run --silent --toolkit --override

pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html

pip install -U openmim

... and the further commands of the instruction

After that I had to copy/replace the following files to train with the nuscenes dataset. From the folder TransFusion/mmdet3d into the folder mmdetection3d/mmdet3d: ./models/detectors

./models/dense_heads

./core/bbox/coders

./core/bbox/assigners.py

./datasets

./datasets/pipelines

I'm pretty new into this. Maybe there is a better workaround.

changxu-zhang commented 1 year ago

Hi @DanielDoerr ,

Could you please post your mmcv, mmdet and mmdet3d version?

Thanks

DanielDoerr commented 1 year ago

@changxu-zhang

mmcv 1.4.0 mmcv-full 1.2.4 mmdet 2.10.0 mmdet3d 0.11.0

What errors do you get during the installation?

I also have many installation attempts before that. The only way that worked for me was the instructions from above. I installed it on Ubuntu 20.04 and also on WSL2.

Please make sure you install the correct CUDA version for your distribution.

tlhopl commented 1 year ago

hello @DanielDoerr @gaborlegradi I have a problem while installing mmdet 2.10.0 to try @gaborlegradi instroductions..

mim install "mmdet<=2.10.0" or pip install mmpycocotools:

ERROR: Failed building wheel for mmpycocotools I can't google abour this problem because the latest version of mmdet is no longer using mmpycocotools

I'm using CUDA 11.1 and pytorch 1.8.0, gcc 9.4.0 and ubuntu 20.04

how can I solve this problem to run Transfusion? Screenshot from 2023-08-02 14-08-05