Skip to content

Commit 1e79b48

Browse files
authored
* fix ci * change to ort fp32
1 parent 9ccf2f1 commit 1e79b48

File tree

12 files changed

+33
-32
lines changed

12 files changed

+33
-32
lines changed

.github/scripts/linux/test_full_pipeline.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if [ $backend == "trt" ]; then
5858
fi
5959

6060
# prepare dataset
61-
wget -P data/ https://github.com/open-mmlab/mmdeploy/files/9401216/imagenet-val100.zip
61+
wget -P data/ https://github.com/open-mmlab/mmdeploy/releases/download/v0.1.0/imagenet-val100.zip
6262
unzip data/imagenet-val100.zip -d data/
6363

6464
echo "Running test with $backend"

.github/scripts/prepare_reg_test.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@ def run_cmd(cmd_lines, log_path=None, raise_error=True):
7070

7171

7272
def prepare_codebases(codebases):
73-
run_cmd(['python -m mim install "mmcv>=2.0.0"'])
7473
for codebase in codebases:
7574
full_name = REPO_NAMES[codebase]
7675
target_dir = os.path.join(MMDEPLOY_DIR, '..', full_name)
7776
branch = 'main'
78-
if codebase in ['mmrotate', 'mmdet3d']:
79-
branch = 'dev-1.x'
80-
if not osp.exists(target_dir):
81-
run_cmd([
82-
'git clone --depth 1 ', f'-b {branch} '
83-
f'https://github.com/open-mmlab/{full_name}.git '
84-
f'{target_dir} '
85-
])
77+
if codebase == 'mmrotate':
78+
branch = 'v1.0.0rc1'
79+
if osp.exists(target_dir):
80+
shutil.rmtree(target_dir)
81+
run_cmd([
82+
'git clone --depth 1 ', f'-b {branch} '
83+
f'https://github.com/open-mmlab/{full_name}.git '
84+
f'{target_dir} '
85+
])
8686
run_cmd([
8787
'python -m mim install ',
8888
f'-r {target_dir}/requirements/mminstall.txt ',

.github/scripts/windows/test_full_pipeline.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ python tools\deploy.py `
5656
--dump-info
5757

5858
# prepare dataset
59-
Invoke-WebRequest -Uri https://github.com/open-mmlab/mmdeploy/files/9401216/imagenet-val100.zip -OutFile $pwd\data\imagenet-val100.zip
59+
Invoke-WebRequest -Uri https://github.com/open-mmlab/mmdeploy/releases/download/v0.1.0/imagenet-val100.zip -OutFile $pwd\data\imagenet-val100.zip
6060
Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$pwd\data\imagenet-val100.zip", "$pwd\data\")
6161

6262
Write-Host "Running test with ort"

.github/workflows/build.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ jobs:
2525
runs-on: ubuntu-20.04
2626
strategy:
2727
matrix:
28-
torch: [1.8.0, 1.9.0]
28+
torch: [1.9.0]
2929
include:
30-
- torch: 1.8.0
31-
torchvision: 0.9.0
3230
- torch: 1.9.0
3331
torchvision: 0.10.0
3432
steps:
@@ -44,7 +42,7 @@ jobs:
4442
python -m pip install openmim
4543
python -m pip install -r requirements.txt
4644
python -m pip install -r requirements/backends.txt
47-
python -m mim install "mmcv>=2.0.0"
45+
python -m mim install "mmcv==2.0.1"
4846
python -m mim install -r requirements/codebases.txt
4947
python -m pip install clip numba transformers numpy==1.23 albumentations
5048
python -m pip list
@@ -180,7 +178,7 @@ jobs:
180178
python -m pip install --no-cache-dir openmim
181179
python -m pip install --no-cache-dir -r requirements.txt
182180
python -m pip install --no-cache-dir -r requirements/backends.txt
183-
python -m mim install "mmcv>=2.0.0"
181+
python -m mim install "mmcv==2.0.1"
184182
python -m pip install --no-cache-dir -r requirements/codebases.txt
185183
python -m pip install --no-cache-dir -U pycuda numpy==1.23 clip numba transformers albumentations
186184
python -m pip list
@@ -245,7 +243,7 @@ jobs:
245243
python -m pip install --no-cache-dir openmim
246244
python -m pip install --no-cache-dir -r requirements.txt
247245
python -m pip install --no-cache-dir -r requirements/backends.txt
248-
python -m mim install --no-cache-dir "mmcv>=2.0.0"
246+
python -m mim install --no-cache-dir "mmcv==2.0.1"
249247
python -m pip install --no-cache-dir -r requirements/codebases.txt
250248
python -m pip install --no-cache-dir -U pycuda numpy clip numba transformers albumentations
251249
python -m pip list

.github/workflows/regression-test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
python -m pip install opencv-python==4.5.4.60 opencv-python-headless==4.5.4.60 opencv-contrib-python==4.5.4.60
116116
python .github/scripts/prepare_reg_test.py --torch-version ${{ matrix.torch_version }} --codebases ${{ matrix.codebase}}
117117
python -m pip install -r requirements.txt
118+
python -m pip install --upgrade rich
118119
python -m pip list
119120
- name: Install mmdeploy with sdk
120121
run: |

docs/en/01-how-to-build/rockchip.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ It is recommended to create a virtual environment for the project.
2020
git clone [email protected]:rockchip-linux/rknn-toolkit2.git
2121
```
2222

23-
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:
23+
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:
2424

2525
```
2626
pip install packages/rknn_toolkit2-1.4.0_22dcfef4-cp36-cp36m-linux_x86_64.whl --no-deps

docs/zh_cn/01-how-to-build/rockchip.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ MMDeploy 支持把模型部署到瑞芯微设备上。已支持的芯片:RV112
5353
<tr>
5454
<td>RK3566 / RK3568 / RK3588 / RV1103 / RV1106</td>
5555
<td><code>git clone https://github.com/rockchip-linux/rknn-toolkit2</code></td>
56-
<td><a href="https://github.com/rockchip-linux/rknn-toolkit/tree/master/doc">安装指南</a></td>
56+
<td><a href="https://github.com/rockchip-linux/rknn-toolkit/tree/master/docs">安装指南</a></td>
5757
</tr>
5858
</tbody>
5959
</table>

mmdeploy/mmcv/ops/nms.py

+2
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ def _multiclass_nms_single(boxes: Tensor,
368368
bbox_index = box_inds.unsqueeze(0)
369369
if pre_top_k > 0:
370370
bbox_index = pre_topk_inds[None, box_inds]
371+
# pad index to keep same dim as dets and labels
372+
bbox_index = torch.cat([bbox_index, -bbox_index.new_ones((1, 1))], 1)
371373
if keep_top_k > 0:
372374
bbox_index = bbox_index[:, topk_inds]
373375
return dets, labels, bbox_index

requirements/codebases.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
mmagic>=1.0.0
2-
mmdet>=3.0.0
3-
mmdet3d>=1.1.0rc2
4-
mmocr>=1.0.0
5-
mmpose>=1.0.0
6-
mmpretrain>=1.0.0rc7
7-
mmrotate>=1.0.0rc0
8-
mmsegmentation>=1.0.0
1+
mmagic==1.0.0
2+
mmdet==3.0.0
3+
mmdet3d==1.3.0
4+
mmocr==1.0.0
5+
mmpose==1.0.0
6+
mmpretrain==1.0.0
7+
mmrotate==1.0.0rc1
8+
mmsegmentation==1.0.0

tests/regression/mmdet.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ models:
213213
- configs/retinanet/retinanet_r50_fpn_1x_coco.py
214214
pipelines:
215215
- *pipeline_ts_fp32
216-
- *pipeline_ort_dynamic_fp16
216+
- *pipeline_ort_dynamic_fp32
217217
- *pipeline_trt_dynamic_fp32
218218
- *pipeline_ncnn_static_fp32
219219
- *pipeline_pplnn_dynamic_fp32
@@ -330,7 +330,7 @@ models:
330330
- configs/mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py
331331
pipelines:
332332
- *pipeline_seg_ts_fp32
333-
- *pipeline_seg_ort_dynamic_fp16
333+
- *pipeline_seg_ort_dynamic_fp32
334334
- *pipeline_seg_trt_dynamic_fp32
335335
- *pipeline_seg_openvino_dynamic_fp32
336336

tests/regression/mmocr.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ models:
248248
- configs/textdet/dbnet/dbnet_resnet18_fpnc_1200e_icdar2015.py
249249
pipelines:
250250
- *pipeline_ts_detection_fp32
251-
- *pipeline_ort_detection_dynamic_fp16
251+
- *pipeline_ort_detection_dynamic_fp32
252252
- *pipeline_trt_detection_dynamic_fp16
253253
- *pipeline_ncnn_detection_static_fp32
254254
- *pipeline_pplnn_detection_dynamic_fp32
@@ -312,7 +312,7 @@ models:
312312
- configs/textrecog/crnn/crnn_mini-vgg_5e_mj.py
313313
pipelines:
314314
- *pipeline_ts_recognition_fp32
315-
- *pipeline_ort_recognition_dynamic_fp16
315+
- *pipeline_ort_recognition_dynamic_fp32
316316
- *pipeline_trt_recognition_dynamic_fp16_H32_C1
317317
- *pipeline_ncnn_recognition_static_fp32
318318
- *pipeline_pplnn_recognition_dynamic_fp32

tests/regression/mmseg.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ models:
220220
model_configs:
221221
- configs/bisenetv1/bisenetv1_r18-d32_4xb4-160k_cityscapes-1024x1024.py
222222
pipelines:
223-
- *pipeline_ort_dynamic_fp16
223+
- *pipeline_ort_dynamic_fp32
224224
- *pipeline_trt_dynamic_fp16
225225
- *pipeline_ncnn_static_fp32
226226
- *pipeline_openvino_dynamic_fp32

0 commit comments

Comments
 (0)