tusen-ai / SST

Code for a series of work in LiDAR perception, including SST (CVPR 22), FSD (NeurIPS 22), FSD++ (TPAMI 23), FSDv2, and CTRL (ICCV 23, oral).
Apache License 2.0
765 stars 96 forks source link

Problem for installation with new mmdetection #172

Closed LiuStan99 closed 6 months ago

LiuStan99 commented 8 months ago

Dear Authors,

Thanks for sharing your interesting work! When trying to run the script: run.sh. I met the following error.

Traceback (most recent call last):
  File "tools/train.py", line 10, in <module>
    from mmcv import Config, DictAction
ImportError: cannot import name 'Config' from 'mmcv' (/home/stanliu/.local/lib/python3.8/site-packages/mmcv/__init__.py)
Traceback (most recent call last):
  File "/home/stanliu/storage/mnt/miniconda3/envs/openmmlab/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/stanliu/storage/mnt/miniconda3/envs/openmmlab/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/stanliu/storage/mnt/miniconda3/envs/tracking/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in <module>
    main()
  File "/home/stanliu/storage/mnt/miniconda3/envs/tracking/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
    raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/home/stanliu/storage/mnt/miniconda3/envs/openmmlab/bin/python3', '-u', 'tools/train.py', '--local_rank=7', 'configs/fsd/fsd_waymoD1_1x.py', '--launcher', 'pytorch', '--work-dir', './work_dirs/fsd_waymoD1_1x/', '--cfg-options', 'evaluation.pklfile_prefix=./work_dirs/fsd_waymoD1_1x/results', 'evaluation.metric=fast', '--seed', '1']' returned non-zero exit status 1.

I think this is probably because of the newer version of MMDetection3D, which is the default version users will have if they install now by following the overall installation instruction. Because they have moved Config, DictAction to mmengine now. Even if I fixed this by importing from mmengine, the runner folder is also removed from the mmcv package now. Is there any way to solve this without reinstalling MMDetection3D with the previous version? Thank you very much!

Here, I provide the package versions:

mmcv       2.1.0      https://github.com/open-mmlab/mmcv
mmdet      3.2.0      https://github.com/open-mmlab/mmdetection
mmdet3d    1.2.0      /home/stanliu/code/SST/mmdetection3d
mmengine   0.8.4      https://github.com/open-mmlab/mmengine
Abyssaledge commented 7 months ago

I suggest you use the environment in our instruction. I do know what would happen if you use the newer versions since there are many modifications.