SuperAPI AI Directory

ascend-mmdet3d-install

Deployment & operations

View repository

Updated 10-24 04:38

About this skill

ascend-mmdet3d-install

Features

Install mmdetection3d (3D object detection library) in an Ascend NPU container

Prerequisites

  • mmcv is installed
  • mmsegmentation is installed (required by mmdet3d)
  • Ascend CANN and torch_npu are installed in the container
  • The working directory is mounted

Usage

Step 1: Confirm prerequisites

Ensure mmcv is installed:

python -c "import mmcv; print(mmcv.__version__)"

Step 2: Install mmsegmentation

mmdet3d depends on mmsegmentation; choose according to version:

Recommended version(compatible with mmcv 1.7.x):

pip install mmsegmentation==0.30.0

Step 3: Clone the mmdetection3d repository

Choose according to network conditions:

Direct server connection:

git clone -b v1.0.0rc4 https://github.com/open-mmlab/mmdetection3d.git

Server network timeout: configure a proxy or clone locally and transfer via scp

# 方案1:配置代理
export http_proxy=http://proxy:port
export https_proxy=http://proxy:port
git clone -b v1.0.0rc4 https://github.com/open-mmlab/mmdetection3d.git

# 方案2:本地克隆后传输(仍使用GitHub链接)
# 本地执行
git clone -b v1.0.0rc4 https://github.com/open-mmlab/mmdetection3d.git
scp -r mmdetection3d user@server:/target/path/

Important: always use the official GitHub link, do not use mirror sites.

Step 4: Apply patch (if any)

cd mmdetection3d
cp /path/to/DrivingSDK/model_examples/BEVFormer/mmdet3d_config.patch .
git apply --reject mmdet3d_config.patch

Step 5: Install

source /opt/conda/bin/activate <conda-env-name>
pip install -e .

Step 6: Verify installation

python -c "import mmdet3d; print(mmdet3d.__version__)"

NPU verification:

python -c "import site; print([p for p in site.getsitepackages() if 'cuda' in p.lower()])"
# 应输出空列表

Dependencies

mmcv
  └── mmsegmentation == 0.30.0
        └── mmdet3d

FAQ

  • mmsegmentation version: must use version 0.30.0, which is compatible with mmcv 1.7.x
  • import mmseg fails: ensure mmsegmentation is installed correctly
  • patch fails: skip non-critical patches or handle manually

Decision guidance

Ask the user:

  1. Is mmcv already installed?
  2. Which version of mmsegmentation should be used?
  3. Can the server network access GitHub?
  4. Do any specific patches need to be applied?