diff --git a/.github/scripts/linux/test_full_pipeline.sh b/.github/scripts/linux/test_full_pipeline.sh index 1ed0ec0221..0a4998dd69 100644 --- a/.github/scripts/linux/test_full_pipeline.sh +++ b/.github/scripts/linux/test_full_pipeline.sh @@ -58,7 +58,7 @@ if [ $backend == "trt" ]; then fi # prepare dataset -wget -P data/ https://github.com/open-mmlab/mmdeploy/files/9401216/imagenet-val100.zip +wget -P data/ https://github.com/open-mmlab/mmdeploy/releases/download/v0.1.0/imagenet-val100.zip unzip data/imagenet-val100.zip -d data/ echo "Running test with $backend" diff --git a/.github/scripts/prepare_reg_test.py b/.github/scripts/prepare_reg_test.py index b135dae71f..b2d8b0295c 100644 --- a/.github/scripts/prepare_reg_test.py +++ b/.github/scripts/prepare_reg_test.py @@ -70,19 +70,19 @@ def run_cmd(cmd_lines, log_path=None, raise_error=True): def prepare_codebases(codebases): - run_cmd(['python -m mim install "mmcv>=2.0.0"']) for codebase in codebases: full_name = REPO_NAMES[codebase] target_dir = os.path.join(MMDEPLOY_DIR, '..', full_name) branch = 'main' - if codebase in ['mmrotate', 'mmdet3d']: - branch = 'dev-1.x' - if not osp.exists(target_dir): - run_cmd([ - 'git clone --depth 1 ', f'-b {branch} ' - f'https://github.com/open-mmlab/{full_name}.git ' - f'{target_dir} ' - ]) + if codebase == 'mmrotate': + branch = 'v1.0.0rc1' + if osp.exists(target_dir): + shutil.rmtree(target_dir) + run_cmd([ + 'git clone --depth 1 ', f'-b {branch} ' + f'https://github.com/open-mmlab/{full_name}.git ' + f'{target_dir} ' + ]) run_cmd([ 'python -m mim install ', f'-r {target_dir}/requirements/mminstall.txt ', diff --git a/.github/scripts/windows/test_full_pipeline.ps1 b/.github/scripts/windows/test_full_pipeline.ps1 index fd374b7fc9..377611120d 100644 --- a/.github/scripts/windows/test_full_pipeline.ps1 +++ b/.github/scripts/windows/test_full_pipeline.ps1 @@ -56,7 +56,7 @@ python tools\deploy.py ` --dump-info # prepare dataset -Invoke-WebRequest -Uri https://github.com/open-mmlab/mmdeploy/files/9401216/imagenet-val100.zip -OutFile $pwd\data\imagenet-val100.zip +Invoke-WebRequest -Uri https://github.com/open-mmlab/mmdeploy/releases/download/v0.1.0/imagenet-val100.zip -OutFile $pwd\data\imagenet-val100.zip Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$pwd\data\imagenet-val100.zip", "$pwd\data\") Write-Host "Running test with ort" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf2a5d89eb..d31eb947a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,10 +25,8 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - torch: [1.8.0, 1.9.0] + torch: [1.9.0] include: - - torch: 1.8.0 - torchvision: 0.9.0 - torch: 1.9.0 torchvision: 0.10.0 steps: @@ -44,7 +42,7 @@ jobs: python -m pip install openmim python -m pip install -r requirements.txt python -m pip install -r requirements/backends.txt - python -m mim install "mmcv>=2.0.0" + python -m mim install "mmcv==2.0.1" python -m mim install -r requirements/codebases.txt python -m pip install clip numba transformers numpy==1.23 albumentations python -m pip list @@ -180,7 +178,7 @@ jobs: python -m pip install --no-cache-dir openmim python -m pip install --no-cache-dir -r requirements.txt python -m pip install --no-cache-dir -r requirements/backends.txt - python -m mim install "mmcv>=2.0.0" + python -m mim install "mmcv==2.0.1" python -m pip install --no-cache-dir -r requirements/codebases.txt python -m pip install --no-cache-dir -U pycuda numpy==1.23 clip numba transformers albumentations python -m pip list @@ -245,7 +243,7 @@ jobs: python -m pip install --no-cache-dir openmim python -m pip install --no-cache-dir -r requirements.txt python -m pip install --no-cache-dir -r requirements/backends.txt - python -m mim install --no-cache-dir "mmcv>=2.0.0" + python -m mim install --no-cache-dir "mmcv==2.0.1" python -m pip install --no-cache-dir -r requirements/codebases.txt python -m pip install --no-cache-dir -U pycuda numpy clip numba transformers albumentations python -m pip list diff --git a/.github/workflows/regression-test.yml b/.github/workflows/regression-test.yml index e3638e1a72..4e4fa24c13 100644 --- a/.github/workflows/regression-test.yml +++ b/.github/workflows/regression-test.yml @@ -115,6 +115,7 @@ jobs: python -m pip install opencv-python==4.5.4.60 opencv-python-headless==4.5.4.60 opencv-contrib-python==4.5.4.60 python .github/scripts/prepare_reg_test.py --torch-version ${{ matrix.torch_version }} --codebases ${{ matrix.codebase}} python -m pip install -r requirements.txt + python -m pip install --upgrade rich python -m pip list - name: Install mmdeploy with sdk run: | diff --git a/docs/en/01-how-to-build/rockchip.md b/docs/en/01-how-to-build/rockchip.md index bb5da8e427..53e13c3bda 100644 --- a/docs/en/01-how-to-build/rockchip.md +++ b/docs/en/01-how-to-build/rockchip.md @@ -20,7 +20,7 @@ It is recommended to create a virtual environment for the project. git clone git@github.com:rockchip-linux/rknn-toolkit2.git ``` -2. Install RKNN python package following [rknn-toolkit2 doc](https://github.com/rockchip-linux/rknn-toolkit2/tree/master/doc) or [rknn-toolkit doc](https://github.com/rockchip-linux/rknn-toolkit/tree/master/doc). When installing rknn python package, it is better to append `--no-deps` after the commands to avoid dependency conflicts. RKNN-Toolkit2 package for example: +2. Install RKNN python package following [rknn-toolkit2 doc](https://github.com/rockchip-linux/rknn-toolkit2/tree/master/doc) or [rknn-toolkit doc](https://github.com/rockchip-linux/rknn-toolkit/tree/master/docs). When installing rknn python package, it is better to append `--no-deps` after the commands to avoid dependency conflicts. RKNN-Toolkit2 package for example: ``` pip install packages/rknn_toolkit2-1.4.0_22dcfef4-cp36-cp36m-linux_x86_64.whl --no-deps diff --git a/docs/zh_cn/01-how-to-build/rockchip.md b/docs/zh_cn/01-how-to-build/rockchip.md index b44e10b8da..495e7ac876 100644 --- a/docs/zh_cn/01-how-to-build/rockchip.md +++ b/docs/zh_cn/01-how-to-build/rockchip.md @@ -53,7 +53,7 @@ MMDeploy 支持把模型部署到瑞芯微设备上。已支持的芯片:RV112 RK3566 / RK3568 / RK3588 / RV1103 / RV1106 git clone https://github.com/rockchip-linux/rknn-toolkit2 - 安装指南 + 安装指南 diff --git a/mmdeploy/mmcv/ops/nms.py b/mmdeploy/mmcv/ops/nms.py index 226eca48f2..145d78c374 100644 --- a/mmdeploy/mmcv/ops/nms.py +++ b/mmdeploy/mmcv/ops/nms.py @@ -368,6 +368,8 @@ def _multiclass_nms_single(boxes: Tensor, bbox_index = box_inds.unsqueeze(0) if pre_top_k > 0: bbox_index = pre_topk_inds[None, box_inds] + # pad index to keep same dim as dets and labels + bbox_index = torch.cat([bbox_index, -bbox_index.new_ones((1, 1))], 1) if keep_top_k > 0: bbox_index = bbox_index[:, topk_inds] return dets, labels, bbox_index diff --git a/requirements/codebases.txt b/requirements/codebases.txt index 56c0dbb7d5..6ea09408c6 100644 --- a/requirements/codebases.txt +++ b/requirements/codebases.txt @@ -1,8 +1,8 @@ -mmagic>=1.0.0 -mmdet>=3.0.0 -mmdet3d>=1.1.0rc2 -mmocr>=1.0.0 -mmpose>=1.0.0 -mmpretrain>=1.0.0rc7 -mmrotate>=1.0.0rc0 -mmsegmentation>=1.0.0 +mmagic==1.0.0 +mmdet==3.0.0 +mmdet3d==1.3.0 +mmocr==1.0.0 +mmpose==1.0.0 +mmpretrain==1.0.0 +mmrotate==1.0.0rc1 +mmsegmentation==1.0.0 diff --git a/tests/regression/mmdet.yml b/tests/regression/mmdet.yml index c7dc1d9a73..f22b2db7dc 100644 --- a/tests/regression/mmdet.yml +++ b/tests/regression/mmdet.yml @@ -213,7 +213,7 @@ models: - configs/retinanet/retinanet_r50_fpn_1x_coco.py pipelines: - *pipeline_ts_fp32 - - *pipeline_ort_dynamic_fp16 + - *pipeline_ort_dynamic_fp32 - *pipeline_trt_dynamic_fp32 - *pipeline_ncnn_static_fp32 - *pipeline_pplnn_dynamic_fp32 @@ -330,7 +330,7 @@ models: - configs/mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py pipelines: - *pipeline_seg_ts_fp32 - - *pipeline_seg_ort_dynamic_fp16 + - *pipeline_seg_ort_dynamic_fp32 - *pipeline_seg_trt_dynamic_fp32 - *pipeline_seg_openvino_dynamic_fp32 diff --git a/tests/regression/mmocr.yml b/tests/regression/mmocr.yml index 6e3769743b..d29d095014 100644 --- a/tests/regression/mmocr.yml +++ b/tests/regression/mmocr.yml @@ -248,7 +248,7 @@ models: - configs/textdet/dbnet/dbnet_resnet18_fpnc_1200e_icdar2015.py pipelines: - *pipeline_ts_detection_fp32 - - *pipeline_ort_detection_dynamic_fp16 + - *pipeline_ort_detection_dynamic_fp32 - *pipeline_trt_detection_dynamic_fp16 - *pipeline_ncnn_detection_static_fp32 - *pipeline_pplnn_detection_dynamic_fp32 @@ -312,7 +312,7 @@ models: - configs/textrecog/crnn/crnn_mini-vgg_5e_mj.py pipelines: - *pipeline_ts_recognition_fp32 - - *pipeline_ort_recognition_dynamic_fp16 + - *pipeline_ort_recognition_dynamic_fp32 - *pipeline_trt_recognition_dynamic_fp16_H32_C1 - *pipeline_ncnn_recognition_static_fp32 - *pipeline_pplnn_recognition_dynamic_fp32 diff --git a/tests/regression/mmseg.yml b/tests/regression/mmseg.yml index 832b4f761a..2c0f8c1427 100644 --- a/tests/regression/mmseg.yml +++ b/tests/regression/mmseg.yml @@ -220,7 +220,7 @@ models: model_configs: - configs/bisenetv1/bisenetv1_r18-d32_4xb4-160k_cityscapes-1024x1024.py pipelines: - - *pipeline_ort_dynamic_fp16 + - *pipeline_ort_dynamic_fp32 - *pipeline_trt_dynamic_fp16 - *pipeline_ncnn_static_fp32 - *pipeline_openvino_dynamic_fp32