Skip to content

Commit

Permalink
Fix retinanet wrong visualization with torch1.13+openvino (#1977)
Browse files Browse the repository at this point in the history
* fix

* fix ci

* fix dead links
  • Loading branch information
RunningLeon committed Apr 12, 2023
1 parent 4bb9bc7 commit 58bcdae
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .circleci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ commands:
cd mmdeploy
python -m mim install -r requirements/codebases.txt
python -m pip install -r requirements.txt
python -m pip install -U numpy clip numba
python -m pip install -U numpy clip numba transformers
cd ..
perform_model_converter_ut:
steps:
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
docker exec mmdeploy pip install onnxruntime==1.8.1
docker exec mmdeploy mim install -r mmdeploy/requirements/codebases.txt
docker exec mmdeploy pip install -r mmdeploy/requirements.txt
docker exec mmdeploy pip install -U numpy clip numba
docker exec mmdeploy pip install -U numpy clip numba transformers
- run:
name: Perform Model Converter unittests
command: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backend-ort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

jobs:
buils_ort:
build_ort:
runs-on: ubuntu-20.04
strategy:
matrix:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
python -m pip install -r requirements/backends.txt
python -m mim install "mmcv>=2.0.0rc1"
python -m mim install -r requirements/codebases.txt
python -m pip install -U numpy clip numba
python -m pip install -U numpy clip numba transformers
python -m pip list
- name: Install mmyolo
run: |
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
python -m pip install -r requirements/backends.txt
python -m mim install "mmcv>=2.0.0rc1"
CFLAGS=$CFLAGS python -m mim install -r requirements/codebases.txt
python -m pip install -U pycuda numpy clip numba
python -m pip install -U pycuda numpy clip numba transformers
python -m pip list
- name: Build and install
run: |
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
python -m pip install -r requirements/backends.txt
python -m mim install "mmcv>=2.0.0rc1"
python -m mim install -r requirements/codebases.txt
python -m pip install -U pycuda numpy clip numba
python -m pip install -U pycuda numpy clip numba transformers
python -m pip list
- name: Build and install
run: |
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
apt update && apt install unzip
python3 -V
python3 -m pip install opencv-python==4.5.4.60 opencv-python-headless==4.5.4.60 opencv-contrib-python==4.5.4.60
python3 -m pip install openmim numpy pycuda clip
python3 -m pip install openmim numpy pycuda clip transformers
python3 -m pip install -r requirements.txt
python3 -m mim install $(cat requirements/codebases.txt | grep mmcls)
python3 -m pip list
Expand Down
10 changes: 5 additions & 5 deletions docs/en/04-supported-codebases/mmaction2.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ______________________________________________________________________

### Install mmaction2

Please follow the [installation guide](https://github.com/open-mmlab/mmaction2/tree/1.x#installation) to install mmaction2.
Please follow the [installation guide](https://github.com/open-mmlab/mmaction2/tree/main#installation) to install mmaction2.

### Install mmdeploy

Expand Down Expand Up @@ -184,7 +184,7 @@ Besides python API, mmdeploy SDK also provides other FFI (Foreign Function Inter
## Supported models

| Model | TorchScript | ONNX Runtime | TensorRT | ncnn | PPLNN | OpenVINO |
| :---------------------------------------------------------------------------------------- | :---------: | :----------: | :------: | :--: | :---: | :------: |
| [TSN](https://github.com/open-mmlab/mmaction2/tree/1.x/configs/recognition/tsn) | N | Y | Y | N | N | N |
| [SlowFast](https://github.com/open-mmlab/mmaction2/tree/1.x/configs/recognition/slowfast) | N | Y | Y | N | N | N |
| Model | TorchScript | ONNX Runtime | TensorRT | ncnn | PPLNN | OpenVINO |
| :----------------------------------------------------------------------------------------- | :---------: | :----------: | :------: | :--: | :---: | :------: |
| [TSN](https://github.com/open-mmlab/mmaction2/tree/main/configs/recognition/tsn) | N | Y | Y | N | N | N |
| [SlowFast](https://github.com/open-mmlab/mmaction2/tree/main/configs/recognition/slowfast) | N | Y | Y | N | N | N |
2 changes: 1 addition & 1 deletion docs/en/04-supported-codebases/mmocr.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ______________________________________________________________________

### Install mmocr

Please follow the [installation guide](https://mmocr.readthedocs.io/en/latest/install.html) to install mmocr.
Please follow the [installation guide](https://mmocr.readthedocs.io/en/latest/get_started/install.html) to install mmocr.

### Install mmdeploy

Expand Down
2 changes: 1 addition & 1 deletion docs/en/07-developer-guide/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Operators customized for ncnn are in the `csrc/mmdeploy/backend_ops/ncnn/` direc

- topk
- tensorslice
- shpe
- shape
- gather
- expand
- constantofshape
Expand Down
10 changes: 5 additions & 5 deletions docs/zh_cn/04-supported-codebases/mmaction2.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ______________________________________________________________________

### 安装 mmaction2

请参考[官网安装指南](https://github.com/open-mmlab/mmaction2/tree/1.x#installation).
请参考[官网安装指南](https://github.com/open-mmlab/mmaction2/tree/main#installation).

### 安装 mmdeploy

Expand Down Expand Up @@ -187,7 +187,7 @@ for label_id, score in result:
## 模型支持列表

| Model | TorchScript | ONNX Runtime | TensorRT | ncnn | PPLNN | OpenVINO |
| :---------------------------------------------------------------------------------------- | :---------: | :----------: | :------: | :--: | :---: | :------: |
| [TSN](https://github.com/open-mmlab/mmaction2/tree/1.x/configs/recognition/tsn) | N | Y | Y | N | N | N |
| [SlowFast](https://github.com/open-mmlab/mmaction2/tree/1.x/configs/recognition/slowfast) | N | Y | Y | N | N | N |
| Model | TorchScript | ONNX Runtime | TensorRT | ncnn | PPLNN | OpenVINO |
| :----------------------------------------------------------------------------------------- | :---------: | :----------: | :------: | :--: | :---: | :------: |
| [TSN](https://github.com/open-mmlab/mmaction2/tree/main/configs/recognition/tsn) | N | Y | Y | N | N | N |
| [SlowFast](https://github.com/open-mmlab/mmaction2/tree/main/configs/recognition/slowfast) | N | Y | Y | N | N | N |
2 changes: 1 addition & 1 deletion docs/zh_cn/04-supported-codebases/mmocr.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ______________________________________________________________________

### 安装 mmocr

请参考[官网安装指南](https://mmocr.readthedocs.io/en/latest/install.html).
请参考[官网安装指南](https://mmocr.readthedocs.io/en/latest/get_started/install.html).

### 安装 mmdeploy

Expand Down
2 changes: 1 addition & 1 deletion docs/zh_cn/07-developer-guide/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $ tree -L 1

- topk
- tensorslice
- shpe
- shape
- gather
- expand
- constantofshape
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ def delta2bbox(rois,
dxy = denorm_deltas[..., :2]
dwh = denorm_deltas[..., 2:]

xy1 = rois[..., None, :2]
xy2 = rois[..., None, 2:]
# fix openvino on torch1.13
xy1 = rois[..., :2].unsqueeze(2)
xy2 = rois[..., 2:].unsqueeze(2)

pxy = (xy1 + xy2) * 0.5
pwh = xy2 - xy1
Expand Down

0 comments on commit 58bcdae

Please sign in to comment.