Skip to content

Commit

Permalink
[Docs] Add NPU support page (#2307)
Browse files Browse the repository at this point in the history
  • Loading branch information
LRJKD authored and Ben-Louis committed Apr 28, 2023
1 parent 5c50c8f commit d596cbe
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
29 changes: 29 additions & 0 deletions docs/en/device/npu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# NPU (HUAWEI Ascend)

## Usage

Please refer to the [building documentation of MMCV](https://mmcv.readthedocs.io/en/latest/get_started/build.html#build-mmcv-full-on-ascend-npu-machine) to install MMCV on NPU devices.

Here we use 4 NPUs on your computer to train the model with the following command:

```shell
bash tools/dist_train.sh configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py 4
```

Also, you can use only one NPU to train the model with the following command:

```shell
python tools/train.py configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py
```

## Models Results

| Model | Input Size | AP | AP50 | AP75 | AR | AR50 | Config | Download |
| :---------------------------------------------------: | :--------: | :---: | :---: | :---: | :---: | :---: | :------------------------------------------------------ | :-------------------------------------------------------- |
| [HigherHRNet](https://mmpose.readthedocs.io/zh_CN/0.x/papers/backbones.html#associative-embedding-higherhrnet-on-coco) | 512x512 | 0.670 | 0.859 | 0.732 | 0.724 | 0.893 | [config](https://github.com/open-mmlab/mmpose/blob/dev-0.x/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py) | [log](https://download.openmmlab.com/mmpose/device/npu/hrnet_20230413_035450.log.json) |

**Notes:**

- If not specially marked, the results on NPU with amp are the basically same as those on the GPU with FP32.

**All above models are provided by Huawei Ascend group.**
28 changes: 28 additions & 0 deletions docs/zh_cn/device/npu_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# NPU (华为昇腾)

## 使用方法

首先,请参考[MMCV](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html#npu-mmcv-full) 安装带有 NPU 支持的 MMCV。
使用如下命令,可以利用 4 个 NPU 训练模型(以 HRNet为例):

```shell
bash tools/dist_train.sh configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py 4
```

或者,使用如下命令,在一个 NPU 上训练模型(以 HRNet为例):

```shell
python tools/train.py configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py
```

## 经过验证的模型

| Model | Input Size | AP | AP50 | AP75 | AR | AR50 | Config | Download |
| :---------------------------------------------------: | :--------: | :---: | :---: | :---: | :---: | :---: | :------------------------------------------------------ | :-------------------------------------------------------- |
| [HigherHRNet](https://mmpose.readthedocs.io/zh_CN/0.x/papers/backbones.html#associative-embedding-higherhrnet-on-coco) | 512x512 | 0.670 | 0.859 | 0.732 | 0.724 | 0.893 | [config](https://github.com/open-mmlab/mmpose/blob/dev-0.x/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py) | [log](https://download.openmmlab.com/mmpose/device/npu/hrnet_20230413_035450.log.json) |

**注意:**

- 如果没有特别标记,NPU 上的结果与使用 FP32 的 GPU 上的结果结果相同。

**以上所有模型权重及训练日志均由华为昇腾团队提供**
2 changes: 1 addition & 1 deletion model-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ Import:
- configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_dark_wflw.yml
- configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_wflw.yml
- configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/resnet_deepfashion.yml
- configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/resnet_deepfashion.yml
- configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion2/resnet_deepfashion2.yml
- configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/resnet_deepfashion.yml
- configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/resnet_onehand10k.yml
- configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/resnet_panoptic2d.yml
- configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/resnet_rhd2d.yml
Expand Down

0 comments on commit d596cbe

Please sign in to comment.