mmdetection3d icon indicating copy to clipboard operation
mmdetection3d copied to clipboard

How to configure the environment and start training

Open Frank-DA opened this issue 2 years ago • 2 comments

Hello, Thank you for your contribution in your paper. I have some questions about configuring the environment. As usual, I read readme.md. First, according to the prompt of getting_started.md, I installed mmcv and mmdetection. Then, according to the data_ preparation. Md, I downloaded the KITTI dataset. However, there is no next step in the readme.md. I also read README_ Zh CN.md, but there are two links in it that have failed and have not provided me with any help. At present, I don't know whether the environment has been configured and I can't start training correctly.Therefore, I want to ask what I should do next.Or, if you can provide me with a document reading order, I would be very grateful.

Frank-DA avatar Sep 17 '22 08:09 Frank-DA

Can you give a more precise description of the actual problems/errors you're dealing with?

For me though, the following setup worked (partially depends on your installed CUDA version):

  1. Create a conda environment: 1.1 conda create --name <environment_name> python=3.8 -y 1.2 conda activate <environment> 1.3 conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge
  2. Set up MMDetection3D 2.1 pip install openmim 2.2 mim install mmcv-full 2.3 mim install mmdet 2.4 mim install mmsegmentation 2.5 pip install cumm-cu113 2.6 pip install spconv-cu113 2.5 git clone https://github.com/open-mmlab/mmdetection3d.git 2.6 cd mmdetection3d 2.7 pip install -e .
  3. Prepare KITTI dataset 3.1 Download dataset from here 3.2 Download training/test/validation splits, e.g., from here and store them inside ./data/kitti/ImageSets 3.3 Initialize dataset for MMDetection3D via python ./tools/create_data.py kitti --root-path ./data/kitti --out-dir ./data/kitti --extra-tag kitti
  4. Start your training/testing!

holtvogt avatar Sep 17 '22 12:09 holtvogt

Can you give a more precise description of the actual problems/errors you're dealing with?

For me though, the following setup worked (partially depends on your installed CUDA version):

1. Create a conda environment:
   1.1 `conda create --name <environment_name> python=3.8 -y`
   1.2 `conda activate <environment>`
   1.3 `conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge`

2. Set up MMDetection3D
   2.1 `pip install openmim`
   2.2 `mim install mmcv-full`
   2.3 `mim install mmdet`
   2.4 `mim install mmsegmentation`
   2.5 `pip install cumm-cu113`
   2.6 `pip install spconv-cu113`
   2.5 `git clone https://github.com/open-mmlab/mmdetection3d.git`
   2.6 `cd mmdetection3d`
   2.7 `pip install -e .`

3. Prepare KITTI dataset
   3.1 Download dataset from [here](https://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d)
   3.2 Download training/test/validation splits, e.g., from [here](https://github.com/traveller59/second.pytorch/tree/master/second/data/ImageSets) and store them inside `./data/kitti/ImageSets`
   3.3 Initialize dataset for MMDetection3D via `python ./tools/create_data.py kitti --root-path ./data/kitti --out-dir ./data/kitti --extra-tag kitti`

4. Start your training/testing!

Thank you for your quick reply. I have completed steps 1 to 3. But I encountered problems in training. My training code is: python tools/train.py configs/pointpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class.py. I first encountered the problem 1: 'ConfigDict' object has no attribute 'device'. And, I solved problem 1 successfully by adding the code :' cfg.device ='cuda' '. Then I encountered the problem 2:'KittiDataset is not in the dataset registry'. I didn't find a solution. Can you analyze the cause of this problem?

Frank-DA avatar Sep 18 '22 02:09 Frank-DA

Please follow the issue template for "reimplementation" to provide more information about your case.

Tai-Wang avatar Oct 01 '22 05:10 Tai-Wang