diff --git a/ACL_PyTorch/contrib/cv/classfication/ResNeSt50/README.md b/ACL_PyTorch/contrib/cv/classfication/ResNeSt50/README.md
index 75d1dd15750db5a8b4d073628e2ba535498723ea..8f9378f069a088b6a8b085159fe6ab1610db3521 100755
--- a/ACL_PyTorch/contrib/cv/classfication/ResNeSt50/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ResNeSt50/README.md
@@ -5,10 +5,6 @@
- [输入输出数据](#section540883920406)
-
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -56,24 +52,6 @@ ResNeSt 的全称是:Split-Attention Networks,引入了Split-Attention模块
| output1 | FLOAT32 | batchsize x 1000 | ND |
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.5.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-
-
-
# 快速上手
## 获取源码
@@ -108,7 +86,7 @@ ResNeSt 的全称是:Split-Attention Networks,引入了Split-Attention模块
执行resnest_preprocess.py脚本,完成预处理。
```
- python resnest_preprocess.py ./imagenet/val ./prep_dataset
+ python3 resnest_preprocess.py ./imagenet/val ./prep_dataset
```
- 参数说明:
@@ -137,7 +115,7 @@ ResNeSt 的全称是:Split-Attention Networks,引入了Split-Attention模块
运行resnest_pth2onnx.py脚本。
```
- python resnest_pth2onnx.py --source="./resnest50-528c19ca.pth" --target="resnest50.onnx"
+ python3 resnest_pth2onnx.py --source="./resnest50-528c19ca.pth" --target="resnest50.onnx"
```
获得resnest50.onnx文件。
@@ -206,7 +184,7 @@ ResNeSt 的全称是:Split-Attention Networks,引入了Split-Attention模块
2. 执行推理。
```
- python -m ais_bench --model=resnest50_bs${bs}.om --input=./prep_dataset --output=./ --output_dirname=./result --batchsize=${batch_size} --outfmt TXT
+ python3 -m ais_bench --model=resnest50_bs${bs}.om --input=./prep_dataset --output=./ --output_dirname=./result --batchsize=${batch_size} --outfmt TXT
```
- 参数说明:
@@ -224,7 +202,7 @@ ResNeSt 的全称是:Split-Attention Networks,引入了Split-Attention模块
调用脚本与数据集标签val\_label.txt比对,可以获得Accuracy数据。
```
- python resnest_postprocess.py --result_path=result_summary.json --gt_path=./imagenet/val_label.txt
+ python3 resnest_postprocess.py --result_path=result_summary.json --gt_path=./imagenet/val_label.txt
```
- 参数说明:
@@ -240,7 +218,7 @@ ResNeSt 的全称是:Split-Attention Networks,引入了Split-Attention模块
可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下:
```
- python -m ais_bench --model=resnest50_bs${bs}.om --loop=100 --batchsize=${batch_size}
+ python3 -m ais_bench --model=resnest50_bs${bs}.om --loop=100 --batchsize=${batch_size}
```
- 参数说明:
diff --git a/ACL_PyTorch/contrib/cv/classfication/ResNeXt50/ReadMe.md b/ACL_PyTorch/contrib/cv/classfication/ResNeXt50/ReadMe.md
index aa4fed7c01d0ed1c3a5856f312196bb75d3abe90..d786dfd611af9045e84afe8f02a064842ead9a57 100644
--- a/ACL_PyTorch/contrib/cv/classfication/ResNeXt50/ReadMe.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ResNeXt50/ReadMe.md
@@ -5,10 +5,6 @@
- [输入输出数据](#section540883920406)
-
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -53,26 +49,6 @@ ResNeXt50是一种用于图像分类的卷积神经网络,这个模型的默
| -------- | -------- | -------- | ------------ |
| output1 | FLOAT32 | batchsize x 1000 | ND |
-
-
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.6.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-
-
-
# 快速上手
## 获取源码
@@ -96,7 +72,7 @@ ResNeXt50是一种用于图像分类的卷积神经网络,这个模型的默
执行ResNeXt_preprocess.py脚本,完成预处理。
```
- python ResNeXt_preprocess.py ./imagenet/val/ ./prep_dataset
+ python3 ResNeXt_preprocess.py ./imagenet/val/ ./prep_dataset
```
@@ -119,7 +95,7 @@ ResNeXt50是一种用于图像分类的卷积神经网络,这个模型的默
运行ResNeXt50_pth2onnx.py脚本。
```
- python ResNeXt50_pth2onnx.py ./resnext50_32x4d-7cdf4587.pth ./resnext50.onnx
+ python3 ResNeXt50_pth2onnx.py ./resnext50_32x4d-7cdf4587.pth ./resnext50.onnx
```
获得resnext50.onnx文件。
@@ -187,7 +163,7 @@ ResNeXt50是一种用于图像分类的卷积神经网络,这个模型的默
2. 执行推理。
```
- python -m ais_bench --model=resnext50_bs${bs}.om --input=./prep_dataset --output=./ --output_dirname=./result --batchsize=${batch_size} --outfmt=TXT
+ python3 -m ais_bench --model=resnext50_bs${bs}.om --input=./prep_dataset --output=./ --output_dirname=./result --batchsize=${batch_size} --outfmt=TXT
```
- 参数说明:
@@ -206,7 +182,7 @@ ResNeXt50是一种用于图像分类的卷积神经网络,这个模型的默
调用脚本与数据集标签val\_label.txt比对,可以获得Accuracy数据,结果保存在result.json中。
```
- python ResNeXt_postprocess.py result ./val_label.txt ./ result.json
+ python3 ResNeXt_postprocess.py result ./val_label.txt ./ result.json
```
- 参数说明:
@@ -224,7 +200,7 @@ ResNeXt50是一种用于图像分类的卷积神经网络,这个模型的默
可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下:
```
- python -m ais_bench --model=resnext50_bs${bs}.om --loop=100 --batchsize=${batch_size}
+ python3 -m ais_bench --model=resnext50_bs${bs}.om --loop=100 --batchsize=${batch_size}
```
- 参数说明:
@@ -244,4 +220,8 @@ ResNeXt50是一种用于图像分类的卷积神经网络,这个模型的默
| Ascend310P3 | 8 | imagenet | 77.61% | 3560 |
| Ascend310P3 | 16 | imagenet | 77.61% | 3695 |
| Ascend310P3 | 32 | imagenet | 77.61% | 3749 |
-| Ascend310P3 | 64 | imagenet | 77.61% | 2188 |
\ No newline at end of file
+| Ascend310P3 | 64 | imagenet | 77.61% | 2188 |
+
+
+# 公网地址说明
+代码涉及公网地址参考 public_address_statement.md
\ No newline at end of file
diff --git a/ACL_PyTorch/contrib/cv/classfication/ResNeXt50/public_address_statement.md b/ACL_PyTorch/contrib/cv/classfication/ResNeXt50/public_address_statement.md
new file mode 100644
index 0000000000000000000000000000000000000000..04e0f7087d00129890705756d52ee9758fe26168
--- /dev/null
+++ b/ACL_PyTorch/contrib/cv/classfication/ResNeXt50/public_address_statement.md
@@ -0,0 +1,3 @@
+| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 |
+| ---- | ------------ | ------ | ------------------------------------ | -------- |
+|开发引入| https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py |ResNeXt_pth2onnx.py |https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py |说明源码出处 |
\ No newline at end of file
diff --git a/ACL_PyTorch/contrib/cv/classfication/ResNet101/README.md b/ACL_PyTorch/contrib/cv/classfication/ResNet101/README.md
index 3260c8e6df956d279b88bbc7c7ab2a61c8f7c400..97ed4eced1d44754c09cc32fc21e09b6769ab0e7 100644
--- a/ACL_PyTorch/contrib/cv/classfication/ResNet101/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ResNet101/README.md
@@ -46,8 +46,6 @@ commit_id:7d955df73fe0e9b47f7d6c77c699324b256fc41f
### 2.1 深度学习框架
```
-CANN 5.0.1
-
torch == 1.5.1
torchvision == 0.6.1
onnx == 1.9.0
@@ -95,7 +93,7 @@ cd ..
4.执行pth2onnx脚本,生成onnx模型文件
```
-python3.7 resnet101_pth2onnx.py ./resnet101-63fe2227.pth resnet101.onnx
+python3 resnet101_pth2onnx.py ./resnet101-63fe2227.pth resnet101.onnx
```
**模型转换要点:**
@@ -129,14 +127,14 @@ atc --framework=5 --model=./resnet101.onnx --output=resnet101_bs1 --input_format
2.执行预处理脚本,生成数据集预处理后的bin文件
```
-python3.7 imagenet_torch_preprocess.py resnet /root/datasets/imagenet/val ./prep_dataset
+python3 imagenet_torch_preprocess.py resnet /root/datasets/imagenet/val ./prep_dataset
```
### 4.3 生成数据集信息文件
1.生成数据集信息文件脚本gen_dataset_info.py
2.执行生成数据集信息脚本,生成数据集信息文件
```
-python3.7 gen_dataset_info.py bin ./prep_dataset ./resnet101_prep_bin.info 224 224
+python3 gen_dataset_info.py bin ./prep_dataset ./resnet101_prep_bin.info 224 224
```
第一个参数为模型输入的类型,第二个参数为生成的bin文件路径,第三个为输出的info文件,后面为宽高信息
## 5 离线推理
@@ -171,7 +169,7 @@ source /usr/local/Ascend/ascend-toolkit/set_env.sh
调用imagenet_acc_eval.py脚本推理结果与label比对,可以获得Accuracy Top5数据,结果保存在result.json中。
```
-python3.7 imagenet_acc_eval.py result/dumpOutput_device0/ /root/datasets/imagenet/val_label.txt ./ result.json
+python3 imagenet_acc_eval.py result/dumpOutput_device0/ /root/datasets/imagenet/val_label.txt ./ result.json
```
第一个为benchmark输出目录,第二个为数据集配套标签,第三个是生成文件的保存目录,第四个是生成的文件名。
查看输出结果:
diff --git a/ACL_PyTorch/contrib/cv/classfication/ResNet152/README.md b/ACL_PyTorch/contrib/cv/classfication/ResNet152/README.md
index 793954454ca6c6a28e238a93a9658a3ae139a0b2..d9e4ac8a6cf6d8b3b804863bf9ca4f298d26cea0 100644
--- a/ACL_PyTorch/contrib/cv/classfication/ResNet152/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ResNet152/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -41,28 +39,6 @@ commit_id=7d955df73fe0e9b47f7d6c77c699324b256fc41f
| -------- | ---------------- | -------- | ------------ |
| class | batchsize x 1000 | FLOAT32 | ND |
-### 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- | 配套 | 版本 | 环境准备指导 |
- | ----------------------------------------- | ------- | --------------------------------------------------------------------------------------------- |
- | 固件与驱动 | 22.0.4 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | |
- | PyTorch | 1.5.1 | |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | | |
-
-- 该模型需要以下依赖。
-
- | 依赖名称 | 版本 |
- | ------------- | -------- |
- | onnx | >=1.9.0 |
- | torch | >=1.5.1 |
- | torchVision | >=0.6.1 |
- | numpy | >=1.19.2 |
- | Pillow | >=8.2.0 |
- | opencv-python | >=4.5.2 |
-
## 快速上手
### 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/ResNet18/README.md b/ACL_PyTorch/contrib/cv/classfication/ResNet18/README.md
index c1834817ac78c43a94232c8e48e9c085f2089f5e..094d8b372f0d9ffa57e7252d4e72698c9c85ab39 100644
--- a/ACL_PyTorch/contrib/cv/classfication/ResNet18/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ResNet18/README.md
@@ -46,8 +46,6 @@ commit_id:7d955df73fe0e9b47f7d6c77c699324b256fc41f
### 2.1 深度学习框架
```
-CANN 5.0.1
-
torch == 1.5.1
torchvision == 0.6.1
onnx == 1.9.0
@@ -85,7 +83,7 @@ wget https://download.pytorch.org/models/resnet18-f37072fd.pth
```
git clone https://github.com/pytorch/vision
cd vision
-python3.7 setup.py install
+python3 setup.py install
cd ..
```
3.编写pth2onnx脚本resnet18_pth2onnx.py
@@ -95,7 +93,7 @@ cd ..
4.执行pth2onnx脚本,生成onnx模型文件
```
-python3.7 resnet18_pth2onnx.py ./resnet18-f37072fd.pth resnet18.onnx
+python3 resnet18_pth2onnx.py ./resnet18-f37072fd.pth resnet18.onnx
```
**模型转换要点:**
@@ -129,14 +127,14 @@ atc --framework=5 --model=./resnet18.onnx --output=resnet18_bs1 --input_format=N
2.执行预处理脚本,生成数据集预处理后的bin文件
```
-python3.7 imagenet_torch_preprocess.py resnet /root/datasets/imagenet/val ./prep_dataset
+python3 imagenet_torch_preprocess.py resnet /root/datasets/imagenet/val ./prep_dataset
```
### 4.3 生成数据集信息文件
1.生成数据集信息文件脚本gen_dataset_info.py
2.执行生成数据集信息脚本,生成数据集信息文件
```
-python3.7 gen_dataset_info.py bin ./prep_dataset ./resnet18_prep_bin.info 224 224
+python3 gen_dataset_info.py bin ./prep_dataset ./resnet18_prep_bin.info 224 224
```
第一个参数为模型输入的类型,第二个参数为生成的bin文件路径,第三个为输出的info文件,后面为宽高信息
## 5 离线推理
@@ -171,7 +169,7 @@ source /usr/local/Ascend/ascend-toolkit/set_env.sh
调用imagenet_acc_eval.py脚本推理结果与label比对,可以获得Accuracy Top5数据,结果保存在result.json中。
```
-python3.7 imagenet_acc_eval.py result/dumpOutput_device0/ /root/datasets/imagenet/val_label.txt ./ result.json
+python3 imagenet_acc_eval.py result/dumpOutput_device0/ /root/datasets/imagenet/val_label.txt ./ result.json
```
第一个为benchmark输出目录,第二个为数据集配套标签,第三个是生成文件的保存目录,第四个是生成的文件名。
查看输出结果:
diff --git a/ACL_PyTorch/contrib/cv/classfication/ResNet34/README.md b/ACL_PyTorch/contrib/cv/classfication/ResNet34/README.md
index 59c6e4dda5528f3c193c76a037b479bf0b8429e1..6b102ff2cc83fdc98ed250e74fc817c215786f68 100644
--- a/ACL_PyTorch/contrib/cv/classfication/ResNet34/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ResNet34/README.md
@@ -5,8 +5,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -49,25 +47,6 @@ Resnet是残差网络(Residual Network)的缩写,该系列网络广泛用于目
| -------- | -------- | -------- | ------------ |
| output1 | FLOAT32 | 1 x 1000 | ND |
-
-
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 22.0.3 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.6.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-
-
# 快速上手
## 获取源码
@@ -77,7 +56,7 @@ Resnet是残差网络(Residual Network)的缩写,该系列网络广泛用于目
```
git clone https://github.com/pytorch/vision
cd vision
- python3.7 setup.py install
+ python3 setup.py install
cd ..
```
@@ -106,7 +85,7 @@ Resnet是残差网络(Residual Network)的缩写,该系列网络广泛用于目
执行imagenet_torch_preprocess.py脚本,完成预处理
```
- python3.7 imagenet_torch_preprocess.py resnet ./Imagenet/val ./prep_dataset
+ python3 imagenet_torch_preprocess.py resnet ./Imagenet/val ./prep_dataset
```
@@ -130,7 +109,7 @@ Resnet是残差网络(Residual Network)的缩写,该系列网络广泛用于目
运行resnet34_pth2onnx.py脚本。
```
- python3.7 resnet34_pth2onnx.py ./resnet34-b627a593.pth resnet34.onnx
+ python3 resnet34_pth2onnx.py ./resnet34-b627a593.pth resnet34.onnx
```
获得`resnet34.onnx`文件。
@@ -213,7 +192,7 @@ Resnet是残差网络(Residual Network)的缩写,该系列网络广泛用于目
调用imagenet_acc_eval.py脚本推理结果与label比对,可以获得Accuracy Top5数据,结果保存在result.json中。
```
- python3.7 imagenet_acc_eval.py ./result ./Imagenet/val_label.txt ./ result.json
+ python3 imagenet_acc_eval.py ./result ./Imagenet/val_label.txt ./ result.json
```
- 参数说明
- ./result: 推理结果
diff --git a/ACL_PyTorch/contrib/cv/classfication/ResNext101_32x8d/README.md b/ACL_PyTorch/contrib/cv/classfication/ResNext101_32x8d/README.md
index bb2c0cfd12def11ef6019e96de7548ea4357e204..39fdac03dbcc64d52f67f895b3e3e375a773e6bf 100644
--- a/ACL_PyTorch/contrib/cv/classfication/ResNext101_32x8d/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ResNext101_32x8d/README.md
@@ -5,10 +5,6 @@
- [输入输出数据](#section540883920406)
-
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -57,34 +53,6 @@ ResNext101是一个轻量化,并且高度模块化的用于图像分类的神
| -------- | -------- | ---------------- | ------------ |
| output1 | FLOAT32 | batchsize x 1000 | ND |
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.5.1 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-- 该模型需要以下依赖
-
- **表 2** 依赖列表
-
- | 依赖名称 | 版本 |
- | ------------- | ------ |
- | onnx | 1.9.0 |
- | Torch | 1.5.1 |
- | TorchVision | 0.6.1 |
- | numpy | 1.20.3 |
- | Pillow | 8.2.0 |
- | opencv-python | 4.5.2 |
-
# 快速上手
## 获取源码
@@ -250,7 +218,7 @@ ResNext101是一个轻量化,并且高度模块化的用于图像分类的神
可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下:
```
- python3.7 -m ais_bench --model=${om_model_path} --loop=20 --batchsize=${batch_size}
+ python3 -m ais_bench --model=${om_model_path} --loop=20 --batchsize=${batch_size}
```
- 参数说明:
diff --git a/ACL_PyTorch/contrib/cv/classfication/Resnetvd/README.md b/ACL_PyTorch/contrib/cv/classfication/Resnetvd/README.md
index 1ee73764c3b00c908540e3d91cf8f530bf0e440e..c5c507a64be888d27170f6db3b20d88777e9e2ed 100644
--- a/ACL_PyTorch/contrib/cv/classfication/Resnetvd/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Resnetvd/README.md
@@ -5,10 +5,6 @@
- [输入输出数据](#section540883920406)
-
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -57,38 +53,6 @@ SE_ResNet50模型是在ResNet网络的基础上,增加了Squeeze-and-Excitatio
| -------- | -------- | -------- | ------------ |
| output1 | FLOAT32 | 1 x 1000 | ND |
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.8.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-- 该模型需要以下依赖
-
- **表 2** 依赖列表
-
- | 依赖名称 | 版本 |
- | ---------------- | -------- |
- | onnx | 1.10.2 |
- | Torch | 1.8.0 |
- | TorchVision | 0.9.0 |
- | numpy | 1.21.4 |
- | Pillow | 9.3.0 |
- | opencv-python | 4.5.4.58 |
- | pretrainedmodels | 0.7.4 |
- | protobuf | 3.20.0 |
-
-
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/SE-ResNeXt50_32x4d/README.md b/ACL_PyTorch/contrib/cv/classfication/SE-ResNeXt50_32x4d/README.md
index c7a6121f167404f7e4e29a2e9c783c91dfd3e7f3..db6e63a6e8468a98c6402e14553767a176c1a418 100644
--- a/ACL_PyTorch/contrib/cv/classfication/SE-ResNeXt50_32x4d/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/SE-ResNeXt50_32x4d/README.md
@@ -8,7 +8,6 @@ branch:master
commit_id:8aae3d8f1135b6b13fed79c1d431e3449fdbf6e0
## 2 环境说明
-使用CANN版本为CANN:5.1.RC2
深度学习框架与第三方库
```
@@ -44,7 +43,7 @@ protobuf=3.19.0
将原始数据(.jpeg)转化为二进制文件(.bin)。转化方法参考Trochvision训练预处理方法处理数据,以获得最佳精度。通过缩放、均值方差手段归一化,输出为二进制文件。
执行preprocess_se_resnext50_32x4d_pth.py脚本:
-python3.7 preprocess_se_resnext50_32x4d_pth.py /opt/npu/imageNet/val ./prep_bin
+python3 preprocess_se_resnext50_32x4d_pth.py /opt/npu/imageNet/val ./prep_bin
第一个参数为原始数据验证集(.jpeg)所在路径,第二个参数为输出的二进制文件(.bin)所在路径。每个图像对应生成一个二进制文件。
```
@@ -54,7 +53,7 @@ python3.7 preprocess_se_resnext50_32x4d_pth.py /opt/npu/imageNet/val ./prep_bin
#### 二进制输入info文件生成
```text
使用benchmark推理需要输入二进制数据集的info文件,用于获取数据集。使用get_info.py脚本,输入已经得到的二进制文件,输出生成二进制数据集的info文件。运行get_info.py脚本。
-python3.7 get_info.py bin ./prep_bin ./seresnext50_val.info 224 224
+python3 get_info.py bin ./prep_bin ./seresnext50_val.info 224 224
第一个参数为生成的数据集文件格式,第二个参数为预处理后的数据文件路径,第三个参数为生成的数据集文件保存的路径,第四个和第五个参数分别为模型输入的宽度和高度。
运行成功后,在当前目录中生成seresnext50_val.info。
```
@@ -77,7 +76,7 @@ git clone https://github.com/Cadene/pretrained-models.pytorch.git (commit_id:8aa
b. 将代码仓上传至服务器任意路径下如(如:/home/HwHiAiUser)。
c. 进入代码仓目录并将seresnext50_pth2onnx.py和se_resnext50_32x4d-a260b3a4.pth移到pretrained-models.pytorch上级目录。
d. 进入pretrained-models.pytorch目录下,执行seresnext50_pth2onnx.py脚本将.pth文件转换为.onnx文件,执行如下命令。
-python3.7 seresnext50_pth2onnx.py ../se_resnext50_32x4d-a260b3a4.pth ../se_resnext50_32x4d.onnx
+python3 seresnext50_pth2onnx.py ../se_resnext50_32x4d-a260b3a4.pth ../se_resnext50_32x4d.onnx
第一个参数为输入权重文件路径,第二个参数为输出onnx文件路径。
运行成功后,在当前目录生成se_resnext50_32x4d.onnx模型文件。然后将生成onnx文件移到源码包中。
```
@@ -110,7 +109,7 @@ python3 -m ais_bench –model seresnext50_32x4d.om --input prep_bin/ --output ./
2. 精度验证
```shell
# 调用ais_verify.py脚本与数据集标签val_label.txt比对,可以获得Accuracy数据,结果保存在result.json中。
-python3.7 vision_metric_ImageNet.py ${ais_output} ./val_label.txt ./ result.json
+python3 vision_metric_ImageNet.py ${ais_output} ./val_label.txt ./ result.json
# 第一个参数为生成推理结果所在路径,第二个参数为标签数据,第三个参数为生成结果文件。
```
diff --git a/ACL_PyTorch/contrib/cv/classfication/SENet/README.md b/ACL_PyTorch/contrib/cv/classfication/SENet/README.md
index 71df73ae46da9b54a833e20c5bbaa880d471da7e..ee6a17822eef0f073ed6556487d95638fdcd7064 100644
--- a/ACL_PyTorch/contrib/cv/classfication/SENet/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/SENet/README.md
@@ -3,8 +3,6 @@
- [概述](#ZH-CN_TOPIC_0000001172161501)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -46,21 +44,6 @@
| -------- | -------- | -------- | ------------ |
| output1 | batchsize x 1000 | FLOAT32 | ND |
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
-| 配套 | 版本 | 环境准备指导 |
-| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
-| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
-| CANN | 6.0.RC1 | - |
-| Python | 3.7.5 | - |
-| PyTorch | 1.5.0 | - |
-| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本 。 | \ | \ |
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/SPACH/README.md b/ACL_PyTorch/contrib/cv/classfication/SPACH/README.md
index eb26d966b9fba0ce240b7d389aec82b061b9a6fc..30c6b8078b2c56a219318cd72188890ac68558d6 100644
--- a/ACL_PyTorch/contrib/cv/classfication/SPACH/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/SPACH/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -45,20 +43,6 @@ SPACH 是结合了卷积和Transformer模块的混合模型,应用于分类任
| -------- | -------- | ---------------- | ------------ |
| output | FP32 | batchsize x 1000 | ND |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2FModelZoo%2Fpytorchframework%2Fpies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.12.1 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
@@ -209,7 +193,7 @@ SPACH 是结合了卷积和Transformer模块的混合模型,应用于分类任
调用SPACH_postprocess.py脚本与数据集标签val_label.txt比对,可以获得Accuracy数据。
```
- python SPACH_postprocess.py --txt-path=${result_dir} --label-path=${gt_file}
+ python3 SPACH_postprocess.py --txt-path=${result_dir} --label-path=${gt_file}
```
参数说明:
diff --git a/ACL_PyTorch/contrib/cv/classfication/Se-Resnext101/README.md b/ACL_PyTorch/contrib/cv/classfication/Se-Resnext101/README.md
index ad761cfad9191c6290432e59f58fcd15de3e5ca8..7c288f86bd580e92e0209e7367d1958fbd792bde 100644
--- a/ACL_PyTorch/contrib/cv/classfication/Se-Resnext101/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Se-Resnext101/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
- [准备数据集](#section183221994411)
@@ -44,20 +42,6 @@
| -------- | -------- | ---------------- | ------------ |
| class | FP32 | batchsize x 1000 | ND |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2FModelZoo%2Fpytorchframework%2Fpies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.12.1 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
@@ -212,7 +196,7 @@
调用脚本与数据集标签val_label.txt比对,可以获得Accuracy数据,结果保存在result.json中。
```shell
- python3. Se_Resnext101_postprocess.py ${result_dir} ${gt_file} ./result.json
+ python3 Se_Resnext101_postprocess.py ${result_dir} ${gt_file} ./result.json
```
参数说明:
diff --git a/ACL_PyTorch/contrib/cv/classfication/ShiftViT/README.md b/ACL_PyTorch/contrib/cv/classfication/ShiftViT/README.md
index 1d8d59f0d4fd584ba475bbac7728f8511ce2378c..8a29fe54896c033c6020d9782e97a7159edd9607 100644
--- a/ACL_PyTorch/contrib/cv/classfication/ShiftViT/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ShiftViT/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -45,20 +43,6 @@
| -------- | -------- | ---------------- | ------------ |
| output1 | FP32 | batchsize x 1000 | ND |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2FModelZoo%2Fpytorchframework%2Fpies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.12.1 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/Shufflenetv1/README.md b/ACL_PyTorch/contrib/cv/classfication/Shufflenetv1/README.md
index 6f9ca774eb8642e391eacb6f907f55222ebcfbe0..da72f596187525cddf4e22663843ce7bc06d1f65 100755
--- a/ACL_PyTorch/contrib/cv/classfication/Shufflenetv1/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Shufflenetv1/README.md
@@ -5,10 +5,6 @@
- [输入输出数据](#section540883920406)
-
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -55,24 +51,6 @@
| -------- | -------- | -------- | ------------ |
| output1 | FLOAT32 | batchsize x 1000 | ND |
-
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 5.1.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.8.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-
-
# 快速上手
## 获取源码
@@ -89,7 +67,7 @@
2. 安装依赖。
```
- pip install -r requirements.txt
+ pip3 install -r requirements.txt
```
## 准备数据集
@@ -107,7 +85,7 @@
执行shufflenetv1_preprocess.py脚本,完成预处理。
```
- python shufflenetv1_preprocess.py ./imagenet/val ./prep_dataset
+ python3 shufflenetv1_preprocess.py ./imagenet/val ./prep_dataset
```
@@ -129,7 +107,7 @@
运行shufflenetv1_pth2onnx.py脚本。
```
- python shufflenetv1_pth2onnx.py 1.0x.pth.tar shufflenetv1_bs${bs}.onnx ${bs}
+ python3 shufflenetv1_pth2onnx.py 1.0x.pth.tar shufflenetv1_bs${bs}.onnx ${bs}
```
- 参数说明:
@@ -200,7 +178,7 @@
2. 执行推理。
```
- python -m ais_bench --model=shufflenetv1_bs${bs}.om --input=./prep_dataset --output=./ --output_dirname=./result --batchsize=${batch_size} --outfmt=TXT
+ python3 -m ais_bench --model=shufflenetv1_bs${bs}.om --input=./prep_dataset --output=./ --output_dirname=./result --batchsize=${batch_size} --outfmt=TXT
```
- 参数说明:
@@ -219,7 +197,7 @@
调用脚本与数据集标签val\_label.txt比对,可以获得Accuracy数据,结果保存在result.json中。
```
- python shufflenetv1_postprocess.py result ./val_label.txt ./ result.json
+ python3 shufflenetv1_postprocess.py result ./val_label.txt ./ result.json
```
- 参数说明:
@@ -237,7 +215,7 @@
可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下:
```
- python -m ais_bench --model=shufflenetv1_bs${bs}.om --loop=100 --batchsize=${batch_size}
+ python3 -m ais_bench --model=shufflenetv1_bs${bs}.om --loop=100 --batchsize=${batch_size}
```
- 参数说明:
diff --git a/ACL_PyTorch/contrib/cv/classfication/Shufflenetv2+/README.md b/ACL_PyTorch/contrib/cv/classfication/Shufflenetv2+/README.md
index 26b26e8c683323ecfc5d01e3ba76c234e8073980..8247d0cffa15f6c4c640727d8de4c7f7948a4d90 100644
--- a/ACL_PyTorch/contrib/cv/classfication/Shufflenetv2+/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Shufflenetv2+/README.md
@@ -31,31 +31,6 @@ commit_id=d69403d4b5fb3043c7c0da3c2a15df8c5e520d89
| -------- | ---------------- | -------- | ------------ |
| output1 | batchsize x 1000 | FLOAT32 | ND |
-
-### 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
- | 固件与驱动 | [1.0.15](https://www.hiascend.com/hardware/firmware-drivers?tag=commercial) | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | [5.1.RC1](https://www.hiascend.com/software/cann/commercial?version=5.1.RC1) | |
- | PyTorch | [1.5.1](https://github.com/pytorch/pytorch/tree/v1.5.1) | |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | | |
-
-- 该模型需要以下依赖。
-
- | 依赖名称 | 版本 |
- | ------------- | -------- |
- | onnx | >=1.9.0 |
- | torch | >=1.5.1 |
- | torchVision | >=0.6.1 |
- | numpy | >=1.19.2 |
- | Pillow | >=8.2.0 |
- | opencv-python | >=4.5.2 |
-
-
-
## 快速上手
### 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/SimCLR_inference/README.md b/ACL_PyTorch/contrib/cv/classfication/SimCLR_inference/README.md
index 3d6c711655aa57672a7c2cbd0b3ca186ca490aac..4aeb1d684cb90d00d071137391de23a203ad36fb 100644
--- a/ACL_PyTorch/contrib/cv/classfication/SimCLR_inference/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/SimCLR_inference/README.md
@@ -3,8 +3,6 @@
- [概述](#ZH-CN_TOPIC_0000001172161501)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -62,23 +60,6 @@ SimCLR:一个简单的视觉表示对比学习框架,不仅比以前的工
| -------- | -------- | -------- | ------------ |
| output1 | 1 x 128 | FLOAT32 | ND |
-
-
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
-| 配套 | 版本 | 环境准备指导 |
-| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
-| 固件与驱动 | 1.0.15 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
-| CANN | 5.1.RC2 | - |
-| Python | 3.7.5 | - |
-| PyTorch | 1.8.0 | - |
-| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
@@ -90,7 +71,7 @@ SimCLR:一个简单的视觉表示对比学习框架,不仅比以前的工
2. 安装依赖。
```
- pip install -r requirements.txt
+ pip3 install -r requirements.txt
```
@@ -125,7 +106,7 @@ root
执行Simclr_preprocess.py脚本,完成预处理。
```
- python3.7 Simclr_preprocess.py ./cifar-10-batches-py/test_batch ./prep_data
+ python3 Simclr_preprocess.py ./cifar-10-batches-py/test_batch ./prep_data
```
@@ -149,7 +130,7 @@ root
运行Simclr_pth2onnx.py脚本。
```
- python3.7 Simclr_pth2onnx.py ./simclr.pth Simclr_model.onnx
+ python3 Simclr_pth2onnx.py ./simclr.pth Simclr_model.onnx
```
获得Simclr_model.onnx文件。
@@ -221,7 +202,7 @@ root
b.执行推理。
```
-python3.7 -m ais_bench --model ../Simclr_model_bs1.om --input "../prep_data/" --output ./result/ --outfmt "TXT" --batchsize 1
+python3 -m ais_bench --model ../Simclr_model_bs1.om --input "../prep_data/" --output ./result/ --outfmt "TXT" --batchsize 1
```
- 参数说明:
@@ -241,7 +222,7 @@ python3.7 -m ais_bench --model ../Simclr_model_bs1.om --input "../prep_data/" --
调用脚本Simclr_postprocess.py获取,可以获得Accuracy数据,结果保存在log文件中。
```
- python3.7 Simclr_postprocess.py ./ais_bench/result/2022_07_25-10_41_40/ > result_bs1.log
+ python3 Simclr_postprocess.py ./ais_bench/result/2022_07_25-10_41_40/ > result_bs1.log
```
result/2022_07_25-10_41_40/:为生成推理结果所在路径
diff --git a/ACL_PyTorch/contrib/cv/classfication/Sknet50/README.md b/ACL_PyTorch/contrib/cv/classfication/Sknet50/README.md
index e2b242a7d41ba467e79b4c54becbd09203ebd89a..f224c90baaeeedc5adb59775acc9bd5f510dd507 100755
--- a/ACL_PyTorch/contrib/cv/classfication/Sknet50/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Sknet50/README.md
@@ -5,10 +5,6 @@
- [输入输出数据](#section540883920406)
-
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -53,25 +49,6 @@
| output1 | FLOAT32 | batchsize x 1000 | ND |
-
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.8.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-
-
-
# 快速上手
## 获取源码
@@ -88,7 +65,7 @@
2. 安装依赖。
```
- pip install -r requirements.txt
+ pip3 install -r requirements.txt
```
## 准备数据集
@@ -106,7 +83,7 @@
执行sknet_preprocess.py脚本,完成预处理。
```
- python sknet_preprocess.py -s ./imageNet/val -d ./prep_data
+ python3 sknet_preprocess.py -s ./imageNet/val -d ./prep_data
```
- 参数说明:
@@ -134,7 +111,7 @@
运行sknet_pth2onnx.py脚本。
```
- python sknet_pth2onnx.py --pth sk_resnet50.pth.tar --onnx sk_resnet50.onnx
+ python3 sknet_pth2onnx.py --pth sk_resnet50.pth.tar --onnx sk_resnet50.onnx
```
- 参数说明:
@@ -202,7 +179,7 @@
2. 执行推理。
```
- python -m ais_bench --model=sk_resnet50_bs${bs}.om --input=./prep_data --output=./ --output_dirname=./result --batchsize=${batch_size} --outfmt=TXT
+ python3 -m ais_bench --model=sk_resnet50_bs${bs}.om --input=./prep_data --output=./ --output_dirname=./result --batchsize=${batch_size} --outfmt=TXT
```
- 参数说明:
@@ -222,7 +199,7 @@
调用脚本与数据集标签val\_label.txt比对,可以获得Accuracy数据,结果保存在result.json中。
```
- python sknet_postprocess.py result ./val_label.txt ./ result.json
+ python3 sknet_postprocess.py result ./val_label.txt ./ result.json
```
- 参数说明:
@@ -240,7 +217,7 @@
可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下:
```
- python -m ais_bench --model=sk_resnet50_bs${bs}.om --loop=100 --batchsize=${batch_size}
+ python3 -m ais_bench --model=sk_resnet50_bs${bs}.om --loop=100 --batchsize=${batch_size}
```
- 参数说明:
diff --git a/ACL_PyTorch/contrib/cv/classfication/Squeezenet1_1/README.md b/ACL_PyTorch/contrib/cv/classfication/Squeezenet1_1/README.md
index c8d6f188a692038fdacc1cdd93b1b137af753b26..fa15ab218789d3e57dd13756700de934aa79779e 100644
--- a/ACL_PyTorch/contrib/cv/classfication/Squeezenet1_1/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Squeezenet1_1/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -44,20 +42,6 @@ Squeezenet的设计采用了卷积替换、减少卷积通道数和降采样操
| -------- | -------- | ------------------------- | ------------ |
| class | RGB_FP32 | batchsize x 3 x 224 x 224 | NCHW |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2FModelZoo%2Fpytorchframework%2Fpies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.12.1 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/Starnet_Resnet34/README.md b/ACL_PyTorch/contrib/cv/classfication/Starnet_Resnet34/README.md
index 59681d84ed24eab47ab7fa0f183081a1e76bfb1f..7275d7960e51c8f3903612e0544440d02f60448d 100644
--- a/ACL_PyTorch/contrib/cv/classfication/Starnet_Resnet34/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Starnet_Resnet34/README.md
@@ -5,10 +5,6 @@
- [输入输出数据](#section540883920406)
-
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -50,25 +46,6 @@ Starnet是一个对于不规则的文字具有鲁棒性的识别模型模型,
| -------- | -------- | -------- | ------------ |
| output1 | FLOAT32 | batchsize x 25 x 37 | ND |
-
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 22.0.2.3 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.12.1 | - |
- | paddlepaddle | 2.3.2 | 该依赖只支持x86 |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-
-
# 快速上手
## 获取源码
@@ -349,4 +326,8 @@ Starnet是一个对于不规则的文字具有鲁棒性的识别模型模型,
|Ascend310P3| 8 | IIIT, SVT, IC03, IC13, IC15, SVTP, CUTE | {'acc': 0.8437, 'norm_edit_dis': 0.9346} | 1762.73029 fps |
|Ascend310P3| 16 | IIIT, SVT, IC03, IC13, IC15, SVTP, CUTE | {'acc': 0.8437, 'norm_edit_dis': 0.9346} | 1983.8578 fps |
|Ascend310P3| 32 | IIIT, SVT, IC03, IC13, IC15, SVTP, CUTE | {'acc': 0.8437, 'norm_edit_dis': 0.9346} | 2067.5093 fps |
-|Ascend310P3| 64 | IIIT, SVT, IC03, IC13, IC15, SVTP, CUTE | {'acc': 0.8437, 'norm_edit_dis': 0.9346} | 2071.3276 fps |
\ No newline at end of file
+|Ascend310P3| 64 | IIIT, SVT, IC03, IC13, IC15, SVTP, CUTE | {'acc': 0.8437, 'norm_edit_dis': 0.9346} | 2071.3276 fps |
+
+
+# 公网地址说明
+代码涉及公网地址参考 public_address_statement.md
\ No newline at end of file
diff --git a/ACL_PyTorch/contrib/cv/classfication/Starnet_Resnet34/public_address_statement.md b/ACL_PyTorch/contrib/cv/classfication/Starnet_Resnet34/public_address_statement.md
new file mode 100644
index 0000000000000000000000000000000000000000..fdc9c908311bc971143d69eada531ac78b130c40
--- /dev/null
+++ b/ACL_PyTorch/contrib/cv/classfication/Starnet_Resnet34/public_address_statement.md
@@ -0,0 +1,3 @@
+| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 |
+| ---- | ------------ | ------ | ------------------------------------ | -------- |
+|开源代码引入|https://github.com/PaddlePaddle/PaddleOCR.git |tarnet_Resnet34_vd.patch |https://github.com/clovaai/deep-text-recognition-benchmark/blob/master/modules/t |说明源码出处|
\ No newline at end of file
diff --git a/ACL_PyTorch/contrib/cv/classfication/Swin-Transformer_tiny/README.md b/ACL_PyTorch/contrib/cv/classfication/Swin-Transformer_tiny/README.md
index 73af06e21f37a04a0af2ec6ac454c5a9dc507932..14b21bfd3733043cbd0669a07ae9aa891e29b93b 100644
--- a/ACL_PyTorch/contrib/cv/classfication/Swin-Transformer_tiny/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Swin-Transformer_tiny/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -44,21 +42,6 @@ Swin-Transformer是针对于图片处理设计的基于Transformer架构的神
| -------- | -------- | -------- | ------------ |
| class | batch_size x 1000 | FLOAT32 | ND |
-
-# 推理环境准备\[所有版本\]
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
-| 配套 | 版本 | 环境准备指导 |
-| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
-| 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
-| CANN | 6.0.RC1 | - |
-| Python | 3.7.5 | - |
-| PyTorch | 1.8.0+ | - |
-| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/T2T-ViT/README.md b/ACL_PyTorch/contrib/cv/classfication/T2T-ViT/README.md
index 139178f44dcdfc55bd745ac6be336277453e8a79..92d6fbe02ddf6fb87a6878d101c9f9de4b2dc1d3 100644
--- a/ACL_PyTorch/contrib/cv/classfication/T2T-ViT/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/T2T-ViT/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -46,20 +44,6 @@ balabala
| -------- | -------- | ---------------- | ------------ |
| class | FP32 | batchsize x 1000 | ND |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2FModelZoo%2Fpytorchframework%2Fpies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.12.1 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/TNT/README.md b/ACL_PyTorch/contrib/cv/classfication/TNT/README.md
index 990b6b6e0486afd3945409957a6058fbb5d4543b..6d923ee4d25247ebc5118179982a91add36ff1a6 100644
--- a/ACL_PyTorch/contrib/cv/classfication/TNT/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/TNT/README.md
@@ -3,8 +3,6 @@
- [概述](#ZH-CN_TOPIC_0000001172161501)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -46,22 +44,6 @@ TNT是针对图像分类的模型,该模型将图像的patch进一步划分为
| -------- | -------- | -------- | ------------ |
| output1 | 1 x 1000 | FLOAT32 | ND |
-
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
-| 配套 | 版本 | 环境准备指导 |
-| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
-| 固件与驱动 | 22.0.3 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
-| CANN | 6.0.RC1 | - |
-| Python | 3.7.5 | - |
-| PyTorch | 1.5.0 | - |
-| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
@@ -102,7 +84,7 @@ TNT是针对图像分类的模型,该模型将图像的patch进一步划分为
```shell
- python3.7 TNT_preprocess.py --src-path /home/HwHiAiUser/dataset/imagenet/val --save-path ./prep_dataset
+ python3 TNT_preprocess.py --src-path /home/HwHiAiUser/dataset/imagenet/val --save-path ./prep_dataset
```
--src-path:原始数据验证集(.jpeg)所在路径。
@@ -128,7 +110,7 @@ TNT是针对图像分类的模型,该模型将图像的patch进一步划分为
运行“TNT_pth2onnx.py”脚本。
```
- python3.7 TNT_pth2onnx.py --pretrain_path tnt_s_81.5.pth.tar --batch_size 16
+ python3 TNT_pth2onnx.py --pretrain_path tnt_s_81.5.pth.tar --batch_size 16
```
获得`tnt_s_patch16_224_bs16_cast.onnx`文件。
diff --git a/ACL_PyTorch/contrib/cv/classfication/TResNet/README.md b/ACL_PyTorch/contrib/cv/classfication/TResNet/README.md
index 6e5b04881daab67f1ee2757376e287ff9b8b4c2d..46c895f0be95d0c06385fa2dc4ee199203d2e310 100644
--- a/ACL_PyTorch/contrib/cv/classfication/TResNet/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/TResNet/README.md
@@ -5,8 +5,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -49,23 +47,6 @@ TResNet系列是针对ImageNet数据集的图片分类模型。一共有三种
| -------- | -------- | ---------------- | ------------ |
| output1 | FLOAT32 | batchsize x 1000 | ND |
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 22.0.3 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.6.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/TimeSformer/README.md b/ACL_PyTorch/contrib/cv/classfication/TimeSformer/README.md
index aec3378af10b7c8f9b9a5131a7e7fc96a55eab97..8ef876c27ab6d072ddfa788846dff60b451a1026 100644
--- a/ACL_PyTorch/contrib/cv/classfication/TimeSformer/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/TimeSformer/README.md
@@ -3,8 +3,6 @@
- [概述](#ZH-CN_TOPIC_0000001172161501)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -46,22 +44,6 @@ TimeSformer论文提出了一种无卷积的视频分类方法,该方法专门
| -------- | -------- | -------- | ------------ |
| result | 3 x 400 | float32 | ND |
-
-
-# 推理环境准备\[所有版本\]
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
-| 配套 | 版本 | 环境准备指导 |
-| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
-| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
-| CANN | 5.1.RC2 | - |
-| Python | 3.7.5 | - |
-| PyTorch | 1.7.1 | - |
-| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/Twins-PCPVT-S/README.md b/ACL_PyTorch/contrib/cv/classfication/Twins-PCPVT-S/README.md
index 284ae065bfcaf28c40a265f91e63c6d0a9100d21..f001421a677c1529ce67b30b295a05600d007005 100644
--- a/ACL_PyTorch/contrib/cv/classfication/Twins-PCPVT-S/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Twins-PCPVT-S/README.md
@@ -3,8 +3,6 @@
- [概述](#ZH-CN_TOPIC_0000001172161501)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手Twins_PCPVT_S](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -62,21 +60,6 @@ Twins_PCPVT_S使用CPVT中提出的条件位置编码(CPE)来代替PVT中的绝
| -------- | -------- | -------- | ------------ |
| output1 | 1 x 1000 | FLOAT32 | ND |
-
-# 推理环境准备\[所有版本\]
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
-| 配套 | 版本 | 环境准备指导 |
-| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
-| 固件与驱动 | 1.0.15 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
-| CANN | 5.1.RC2 | - |
-| Python | 3.7.5 | - |
-| PyTorch | 1.7.0 | - |
-| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/VAN/README.md b/ACL_PyTorch/contrib/cv/classfication/VAN/README.md
index 8c59fbe251e384115524dc9f143a82644457a14e..b5fb8edb5723dc5bb59d18b0f705588759e88424 100644
--- a/ACL_PyTorch/contrib/cv/classfication/VAN/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/VAN/README.md
@@ -6,8 +6,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
- [准备数据集](#section183221994411)
@@ -45,20 +43,6 @@ VAN模型基于一种新的大核注意(LKA)模块,以实现自注意中
| -------- | --------------------- | -------- | ------------ |
| output | FLOAT32 | batchsize x 1000 | ND |
-# 推理环境准备\[所有版本\]
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.15 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 5.1.RC2 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.11.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
@@ -225,7 +209,7 @@ VAN模型基于一种新的大核注意(LKA)模块,以实现自注意中
可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下:
```shell
- python3-m ais_bench --model=${van_bs.om} --loop=100 --batchsize=${bs}
+ python3 -m ais_bench --model=${van_bs.om} --loop=100 --batchsize=${bs}
```
- 参数说明:
diff --git a/ACL_PyTorch/contrib/cv/classfication/VGG16/README.md b/ACL_PyTorch/contrib/cv/classfication/VGG16/README.md
index 8891be9a8b47ab5a77bb5fc21abd9bcb07b4e1bd..b0956ecb6b75033bf210f5c5325f36d28e79000a 100644
--- a/ACL_PyTorch/contrib/cv/classfication/VGG16/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/VGG16/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#ZH-CN_TOPIC_0000001126281702)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -43,39 +41,6 @@ VGG16包含了16个隐藏层(13个卷积层和3个全连接层)
| -------- | -------- | ---------------- | ------------ |
| output1 | FLOAT32 | batchsize x 1000 | ND |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | --------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------- |
- | 固件与驱动 | 1.0.15 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 5.1.RC2 | - |
- | Python | 3.7.13 | - |
- | PyTorch | 1.9.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-- 该模型需要以下依赖
-
- **表 1** 依赖列表
-
- | 依赖名称 | 版本 |
- | --------------- | -------- |
- | torch | 1.9.0 |
- | torchvision | 0.10.0 |
- | onnx | 1.9.0 |
- | onnx-simplifier | 0.3.6 |
- | onnxruntime | 1.8.0 |
- | numpy | 1.21.0 |
- | Cython | 0.29.25 |
- | Opencv-python | 4.5.4.60 |
- | pycocotools | 2.0.3 |
- | Pytest-runner | 5.3.1 |
- | protobuf | 3.20.0 |
- | decorator | \ |
-
# 快速上手
## 获取源码
@@ -109,7 +74,7 @@ VGG16包含了16个隐藏层(13个卷积层和3个全连接层)
将原始数据集转换为模型输入的二进制数据。执行“vgg16_preprocess.py”脚本。
```shell
- python vgg16_preprocess.py ${dataset_dir} ./prep_dataset
+ python3 vgg16_preprocess.py ${dataset_dir} ./prep_dataset
```
- 参数说明
- `${dataset_dir}`:原始数据验证集(.jpeg)所在路径
@@ -132,7 +97,7 @@ VGG16包含了16个隐藏层(13个卷积层和3个全连接层)
使用 `vgg16_pth2onnx.py` 导出onnx文件。
```shell
- python vgg16_pth2onnx.py --pth_path=./vgg16-397923af.pth --out=./vgg16.onnx
+ python3 vgg16_pth2onnx.py --pth_path=./vgg16-397923af.pth --out=./vgg16.onnx
```
获得 `vgg16.onnx` 文件。
@@ -196,7 +161,7 @@ VGG16包含了16个隐藏层(13个卷积层和3个全连接层)
2. 执行推理。
```shell
- python -m ais_bench \
+ python3 -m ais_bench \
--model ./vgg16_bs1.om \
--input ./prep_dataset \
--output ./vgg16out/ \
@@ -220,7 +185,7 @@ VGG16包含了16个隐藏层(13个卷积层和3个全连接层)
调用脚本与数据集标签 `val_label.txt` 比对,可以获得Accuracy数据。
```shell
- python vgg16_postprocess.py \
+ python3 vgg16_postprocess.py \
--gtfile=./val_label.txt \
--result_path=./vgg16out/2022_xx_xx-xx_xx_xx/sumary.json
```
diff --git a/ACL_PyTorch/contrib/cv/classfication/VGG19/README.md b/ACL_PyTorch/contrib/cv/classfication/VGG19/README.md
index 1d776110ad574b2fcab77c8f3c4ca8d69734e224..150d5edaafd7888fcf7a86a0f7cb52d26e5f589e 100644
--- a/ACL_PyTorch/contrib/cv/classfication/VGG19/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/VGG19/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#ZH-CN_TOPIC_0000001126281702)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -43,39 +41,6 @@ VGG19包含了19个隐藏层(16个卷积层和3个全连接层)
| -------- | -------- | ---------------- | ------------ |
| output1 | FLOAT32 | batchsize x 1000 | ND |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | --------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------- |
- | 固件与驱动 | 1.0.15 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 5.1.RC2 | - |
- | Python | 3.7.13 | - |
- | PyTorch | 1.9.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-- 该模型需要以下依赖
-
- **表 1** 依赖列表
-
- | 依赖名称 | 版本 |
- | --------------- | -------- |
- | torch | 1.9.0 |
- | torchvision | 0.10.0 |
- | onnx | 1.9.0 |
- | onnx-simplifier | 0.3.6 |
- | onnxruntime | 1.8.0 |
- | numpy | 1.21.0 |
- | Cython | 0.29.25 |
- | Opencv-python | 4.5.4.60 |
- | pycocotools | 2.0.3 |
- | Pytest-runner | 5.3.1 |
- | protobuf | 3.20.0 |
- | decorator | \ |
-
# 快速上手
## 获取源码
@@ -109,7 +74,7 @@ VGG19包含了19个隐藏层(16个卷积层和3个全连接层)
将原始数据集转换为模型输入的二进制数据。执行“VGG19_preprocess.py”脚本。
```python
- python VGG19_preprocess.py ${dataset_dir} ./prep_dataset
+ python3 VGG19_preprocess.py ${dataset_dir} ./prep_dataset
```
- 参数说明
- ${datasets_path}:原始数据验证集(.jpeg)所在路径
@@ -196,7 +161,7 @@ VGG19包含了19个隐藏层(16个卷积层和3个全连接层)
2. 执行推理。
```shell
- python -m ais_bench \
+ python3 -m ais_bench \
--model ./VGG19_bs1.om \
--input ./prep_dataset \
--output ./VGG19out/ \
@@ -220,7 +185,7 @@ VGG19包含了19个隐藏层(16个卷积层和3个全连接层)
调用脚本与数据集标签 `val_label.txt` 比对,可以获得Accuracy数据。
```shell
- python vgg19_postprocess.py \
+ python3 vgg19_postprocess.py \
--gtfile=./val_label.txt \
--result_path=./VGG19out/2022_xx_xx-xx_xx_xx/sumary.json
```
diff --git a/ACL_PyTorch/contrib/cv/classfication/ViT_base/README.md b/ACL_PyTorch/contrib/cv/classfication/ViT_base/README.md
index ba0f6c805b990dd50260c7c5e3a43eec80355807..6d2039f10e752b64192368d20d8c6049ec791b39 100644
--- a/ACL_PyTorch/contrib/cv/classfication/ViT_base/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/ViT_base/README.md
@@ -5,10 +5,6 @@
- [输入输出数据](#section540883920406)
-
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -57,22 +53,6 @@ mode_name = [
| -------- | -------- | -------- | ------------ |
| output | FLOAT32 | batchsize x num_class | ND |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动:
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 22.0.4 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.8.0+ | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
-
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/Video-Swin-Transformer/README.md b/ACL_PyTorch/contrib/cv/classfication/Video-Swin-Transformer/README.md
index 0ffa27fa8e62679ad9aa1858419dc6cefb6e2003..a751956948da37ae46dd1ce3161983ed3115ec61 100644
--- a/ACL_PyTorch/contrib/cv/classfication/Video-Swin-Transformer/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/Video-Swin-Transformer/README.md
@@ -5,9 +5,6 @@
- [输入输出数据](#section540883920406)
-
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -79,13 +76,13 @@ Video swin transformer是一种基于Transformer的视频识别主干网络结
```shell
#安装1.11.0版本pytorch
- pip install torch==1.11.0+cpu torchvision==0.12.0+cpu torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cpu
+ pip3 install torch==1.11.0+cpu torchvision==0.12.0+cpu torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cpu
#安装对应pytorch版本的mmcv库
- pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.5/index.html
+ pip3 install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.5/index.html
#安装mmaction2库
- pip install -v -e .
+ pip3 install -v -e .
#安装其他所需依赖
- pip install -r requirements.txt
+ pip3 install -r requirements.txt
#参考下方链接仓库dev分支安装magiconnx
https://gitee.com/Ronnie_zheng/MagicONNX
```
diff --git a/ACL_PyTorch/contrib/cv/classfication/sMLP/README.md b/ACL_PyTorch/contrib/cv/classfication/sMLP/README.md
index 2229343b726a338aafb6e760c905943bfb92f5c7..5cd011fca63098d09a5e5969eadd6c38435302f7 100644
--- a/ACL_PyTorch/contrib/cv/classfication/sMLP/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/sMLP/README.md
@@ -1,7 +1,6 @@
# sMLP模型-推理指导
- [概述](#概述)
-- [推理环境](#推理环境)
- [快速上手](#快速上手)
- [获取源码](#获取源码)
- [准备数据集](#准备数据集)
@@ -40,22 +39,6 @@
| 输出数据 | 数据类型 | 数据排布格式 | 大小 |
| ------- | -------- | ---------- | ---------- |
| output | FLOAT32 | ND | batchsize x 1000|
-
-
-----
-# 推理环境
-
-- 该模型离线推理使用 Atlas 300I Pro 推理卡,推理所需配套的软件如下:
-
- | 配套 | 版本 | 环境准备指导 |
- | --------- | ------- | ---------- |
- | firmware | 1.82.22.2.220 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | driver | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 5.1.RC2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | Python | 3.7.5 | - |
- | PyTorch | 1.5.0 | - |
-
-
----
# 快速上手
@@ -96,7 +79,7 @@
源码仓目录下执行数据预处理脚本,将原始数据集中的 JPEG 图片转换为模型输入需要的 bin 文件。
```shell
- python3.7 smlp_preprocess.py --save_dir ./imagenet-val-bin --data_root /opt/npu/imagenet/
+ python3 smlp_preprocess.py --save_dir ./imagenet-val-bin --data_root /opt/npu/imagenet/
```
参数说明:
+ --data_root: 数据集路径
@@ -119,7 +102,7 @@
在开源仓目录下执行前处理脚本加载权重文件(.pth)并将其转换为 ONNX 模型
```shell
- python smlp_pth2onnx.py --model_name smlpnet_tiny --pth_path ./smlp_t.pth --onnx_path ./sMLPNet-T.onnx --opset_version 11
+ python3 smlp_pth2onnx.py --model_name smlpnet_tiny --pth_path ./smlp_t.pth --onnx_path ./sMLPNet-T.onnx --opset_version 11
```
参数说明:
+ --model_name: 模型名称
@@ -196,7 +179,7 @@
mkdir /SPACH/infer_results/
# 执行推理
- python -m ais_bench \
+ python3 -m ais_bench \
--model /SPACH/sMLPNet-T-batch8-high.om \
--input /SPACH/imagenet-val-bin \
--output /SPACH/infer_results/ \
@@ -216,7 +199,7 @@
推理结束后,回到开源仓目录,执行后处理脚本计算模型在 Top@1 与 Top@5 上的准确率。
```shell
- python smlp_postproces.py --infer_result_dir SPACH/infer_results/2022_07_09-18_05_40/
+ python3 smlp_postproces.py --infer_result_dir SPACH/infer_results/2022_07_09-18_05_40/
```
参数说明:
+ --infer_result_dir: 存放推理结果的目录路径。例如本例中为SPACH/infer_results/2022_07_09-18_05_40/
@@ -231,7 +214,7 @@
纯推理100次,然后通过日志获取模型的性能指标。
```shell
mkdir tmp_out # 提前创建临时目录用于存放纯推理输出
- python3.7 -m ais_bench --model /path/to/model --output ./tmp_out --outfmt BIN --batchsize ${bs} --loop 100
+ python3 -m ais_bench --model /path/to/model --output ./tmp_out --outfmt BIN --batchsize ${bs} --loop 100
rm -r tmp_out # 删除临时目录
```
说明:
diff --git a/ACL_PyTorch/contrib/cv/classfication/spnasnet_100/README.md b/ACL_PyTorch/contrib/cv/classfication/spnasnet_100/README.md
index 8511fce0004bb68e646bda1613561eb69d9e2df0..37b2e6000bd63f67904269bcf7f8bcc0ee824ca1 100644
--- a/ACL_PyTorch/contrib/cv/classfication/spnasnet_100/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/spnasnet_100/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#section540883920406)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -45,20 +43,6 @@ SPNASNet_100是一个经典的图像分类网络,其自动的为移动端设
| -------- | -------- | ---------------- | ------------ |
| output1 | RGB_FP32 | batchsize x 1000 | NCHW |
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ |
- | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2FModelZoo%2Fpytorchframework%2Fpies) |
- | CANN | 6.0.RC1 | - |
- | Python | 3.7.5 | - |
- | PyTorch | 1.12.1 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
diff --git a/ACL_PyTorch/contrib/cv/classfication/vit-small/README.md b/ACL_PyTorch/contrib/cv/classfication/vit-small/README.md
index f25a6c5eb62eccd170a7c1a3fa1eaeef15b6b156..aa0e829ae80b5499e149f3c004cc875cb8ed6f0b 100644
--- a/ACL_PyTorch/contrib/cv/classfication/vit-small/README.md
+++ b/ACL_PyTorch/contrib/cv/classfication/vit-small/README.md
@@ -4,8 +4,6 @@
- [输入输出数据](#ZH-CN_TOPIC_0000001126281702)
-- [推理环境准备](#ZH-CN_TOPIC_0000001126281702)
-
- [快速上手](#ZH-CN_TOPIC_0000001126281700)
- [获取源码](#section4622531142816)
@@ -43,21 +41,6 @@ Vision Transformer是一个经典的图像分类网络。以前的cv领域虽然
| -------- | -------- | ---------------- | ------------ |
| output | FLOAT32 | batchsize x 1000 | ND |
-
-# 推理环境准备
-
-- 该模型需要以下插件与驱动
-
- **表 1** 版本配套表
-
- | 配套 | 版本 | 环境准备指导 |
- | --------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------- |
- | 固件与驱动 | 1.0.15 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) |
- | CANN | 5.1.RC2 | - |
- | Python | 3.7.13 | - |
- | PyTorch | 1.9.0 | - |
- | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ |
-
# 快速上手
## 获取源码
@@ -263,3 +246,7 @@ Vision Transformer是一个经典的图像分类网络。以前的cv领域虽然
| bs64 | 508.6636 | 730.0449 | 613.2265 | 1.19 | 1.19 |
| | | | | | |
| 最优batch | 508.6636 | 1013.199 | 621.6682 | 1.99 | 1.63 |
+
+
+# 公网地址说明
+代码涉及公网地址参考 public_address_statement.md
\ No newline at end of file
diff --git a/ACL_PyTorch/contrib/cv/classfication/vit-small/public_address_statement.md b/ACL_PyTorch/contrib/cv/classfication/vit-small/public_address_statement.md
new file mode 100644
index 0000000000000000000000000000000000000000..fd1561c252b777d2005d800bda8ad8906703c296
--- /dev/null
+++ b/ACL_PyTorch/contrib/cv/classfication/vit-small/public_address_statement.md
@@ -0,0 +1,3 @@
+| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 |
+| ---- | ------------ | ------ | ------------------------------------ | -------- |
+|开源代码引入|https://github.com/rwightman/pytorch-image-models.git |vit_small_patch16_224.patch |https://github.com/NVIDIA/apex/commit/d5e2bb4bdeedd27b1dfaf5bb2b24d6c000dee9be#diff-cf86c282ff7fba81fad27a559379d5bf |说明源码出处 |
\ No newline at end of file