From 783a87f30a2f1dc6ef228482965cb869edaecc6b Mon Sep 17 00:00:00 2001 From: hymhym4321 Date: Wed, 17 Jan 2024 07:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E7=90=86=E7=8E=AF=E5=A2=83=E4=B8=8E?= =?UTF-8?q?=E5=85=AC=E7=BD=91=E5=9C=B0=E5=9D=80=E6=95=B4=E6=94=B9=EF=BC=88?= =?UTF-8?q?2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contrib/cv/face/FaceBoxes/README.md | 31 +++++----------- ACL_PyTorch/contrib/cv/face/FaceNet/README.md | 26 +++----------- .../contrib/cv/face/ReId-MGN-master/README.md | 18 +++++----- .../contrib/cv/face/Retinaface/README.md | 19 ---------- .../cv/face/reid_PCB_baseline/Readme.md | 26 -------------- ACL_PyTorch/contrib/cv/gan/BigGAN/README.md | 27 +++----------- .../cv/gan/BigGAN/public_address_statement.md | 4 +++ ACL_PyTorch/contrib/cv/gan/CGAN/README.md | 27 +++----------- .../cv/gan/CGAN/public_address_statement.md | 4 +++ ACL_PyTorch/contrib/cv/gan/CycleGAN/README.md | 26 +++----------- .../gan/CycleGAN/public_address_statement.md | 5 +++ ACL_PyTorch/contrib/cv/gan/DCGAN/README.md | 19 +--------- ACL_PyTorch/contrib/cv/gan/GAN/README.md | 26 +++----------- ACL_PyTorch/contrib/cv/gan/Pix2Pix/README.md | 28 +++------------ .../gan/Pix2Pix/public_address_statement.md | 23 ++++++++++++ .../contrib/cv/gan/Pix2pixHD/README.md | 20 ----------- ACL_PyTorch/contrib/cv/gan/StarGAN/README.md | 22 ------------ .../contrib/cv/gan/StyleGAN2-ADA/README.md | 23 +----------- .../Cross-Scale-Non-Local-Attention/README.md | 16 --------- .../contrib/cv/image_process/DnCNN/READEME.md | 32 +++-------------- .../contrib/cv/image_process/SRFlow/README.md | 32 ++++++----------- .../SRFlow/public_address_statement.md | 3 ++ .../contrib/cv/image_process/wdsr/README.md | 16 --------- .../image_registration/superpoint/README.md | 30 ++++------------ .../contrib/cv/image_retrieval/BLIP/readme.md | 35 ++++--------------- .../pose_estimation/3DMPPE-ROOTNET/README.md | 30 ++++------------ .../contrib/cv/pose_estimation/DEKR/README.md | 19 ---------- .../cv/pose_estimation/HRNet/README.md | 26 +++----------- .../cv/pose_estimation/HigherHRNet/README.md | 16 --------- .../contrib/cv/pose_estimation/MSPN/README.md | 21 ----------- .../cv/pose_estimation/PoseC3D/README.md | 30 ++++------------ .../cv/pose_estimation/TransPose/README.md | 27 +++----------- .../TransPose/public_address_statement.md | 9 +++++ .../cv/pose_estimation/UniFormer/readme.md | 33 ++++------------- .../cv/pose_estimation/VideoPose3D/README.md | 22 +++--------- .../cv/quality_enhancement/ADNet/README.md | 18 ---------- .../cv/quality_enhancement/SRGAN/README.md | 21 ----------- .../cv/segmentation/3D_HRNet/README.md | 16 --------- 38 files changed, 157 insertions(+), 669 deletions(-) create mode 100644 ACL_PyTorch/contrib/cv/gan/BigGAN/public_address_statement.md create mode 100644 ACL_PyTorch/contrib/cv/gan/CGAN/public_address_statement.md create mode 100644 ACL_PyTorch/contrib/cv/gan/CycleGAN/public_address_statement.md create mode 100644 ACL_PyTorch/contrib/cv/gan/Pix2Pix/public_address_statement.md create mode 100644 ACL_PyTorch/contrib/cv/image_process/SRFlow/public_address_statement.md create mode 100644 ACL_PyTorch/contrib/cv/pose_estimation/TransPose/public_address_statement.md diff --git a/ACL_PyTorch/contrib/cv/face/FaceBoxes/README.md b/ACL_PyTorch/contrib/cv/face/FaceBoxes/README.md index c674f17620..c9216f8d6b 100644 --- a/ACL_PyTorch/contrib/cv/face/FaceBoxes/README.md +++ b/ACL_PyTorch/contrib/cv/face/FaceBoxes/README.md @@ -3,7 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) - [准备数据集](#section183221994411) @@ -43,20 +42,6 @@ FaceBoxes的新型人脸检测器,它在速度和准确性方面都有卓越 | -------- | ---------------- | -------- | ------------ | | output1 | batchsize x 1024 | FLOAT32 | ND | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ---------- | ---------------------------------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.16(NPU驱动固件版本为5.1.RC2) | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 5.1.RC2 | - - | Python | 3.7.5| - - # 快速上手 ## 获取源码 @@ -85,7 +70,7 @@ FaceBoxes的新型人脸检测器,它在速度和准确性方面都有卓越 3. 安装依赖。 ``` - pip install -r requirements.txt + pip3 install -r requirements.txt ``` 4. 切换到主目录。 @@ -116,7 +101,7 @@ FaceBoxes的新型人脸检测器,它在速度和准确性方面都有卓越 执行faceboxes_pth_preprocess.py脚本,完成预处理。 ``` - python faceboxes_pth_preprocess.py --dataset datasets/FDDB --save-folder prep + python3 faceboxes_pth_preprocess.py --dataset datasets/FDDB --save-folder prep ``` - 参数说明: @@ -140,7 +125,7 @@ FaceBoxes的新型人脸检测器,它在速度和准确性方面都有卓越 运行 faceboxes_pth2onnx.py 脚本。 ``` - python faceboxes_pth2onnx.py --trained_model FaceBoxesProd.pth --save_folder faceboxes-b0.onnx + python3 faceboxes_pth2onnx.py --trained_model FaceBoxesProd.pth --save_folder faceboxes-b0.onnx ``` - 参数说明: @@ -209,7 +194,7 @@ FaceBoxes的新型人脸检测器,它在速度和准确性方面都有卓越 3. 执行推理。 ``` - python -m ais_bench --model faceboxes-b0_bs1.om --input prep/ --output result --output_dir dumpout_bs1 --batchsize 1 + python3 -m ais_bench --model faceboxes-b0_bs1.om --input prep/ --output result --output_dir dumpout_bs1 --batchsize 1 ``` - 参数说明: @@ -236,7 +221,7 @@ FaceBoxes的新型人脸检测器,它在速度和准确性方面都有卓越 2. 运行后处理脚本faceboxes_pth_postprocess.py。 ``` - python faceboxes_pth_postprocess.py --save_folder FDDB_Evaluation/ --prep_info prep/ --prep_folder result/dumpout_bs1/ + python3 faceboxes_pth_postprocess.py --save_folder FDDB_Evaluation/ --prep_info prep/ --prep_folder result/dumpout_bs1/ ``` - 参数说明: @@ -250,8 +235,8 @@ FaceBoxes的新型人脸检测器,它在速度和准确性方面都有卓越 ``` cd FDDB_Evaluation - python setup.py install - python evaluate.py -g ./ground_truth + python3 setup.py install + python3 evaluate.py -g ./ground_truth ``` - 参数说明: @@ -264,7 +249,7 @@ FaceBoxes的新型人脸检测器,它在速度和准确性方面都有卓越 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python -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} ``` - 参数说明: - --model:om模型的路径。 diff --git a/ACL_PyTorch/contrib/cv/face/FaceNet/README.md b/ACL_PyTorch/contrib/cv/face/FaceNet/README.md index 35948a36cd..478a0d7304 100644 --- a/ACL_PyTorch/contrib/cv/face/FaceNet/README.md +++ b/ACL_PyTorch/contrib/cv/face/FaceNet/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -70,20 +68,6 @@ | -------- | -------- | -------- | ------------ | | class | batchsize x class | 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.5.0+ | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 @@ -185,11 +169,11 @@ 2. 优化onnx。 ``` - python utils/fix_prelu.py ./weights/PNet_truncated.onnx ./weights/PNet_truncated_fix.onnx - python utils/fix_prelu.py ./weights/RNet_truncated.onnx ./weights/RNet_truncated_fix.onnx - python utils/fix_prelu.py ./weights/ONet_truncated.onnx ./weights/ONet_truncated_fix.onnx - python utils/fix_prelu.py ./weights/Inception_facenet_vggface2.onnx ./weights/Inception_facenet_vggface2_fix.onnx - python utils/fix_clip.py ./weights/Inception_facenet_vggface2_fix.onnx ./weights/Inception_facenet_vggface2_fix.onnx + python3 utils/fix_prelu.py ./weights/PNet_truncated.onnx ./weights/PNet_truncated_fix.onnx + python3 utils/fix_prelu.py ./weights/RNet_truncated.onnx ./weights/RNet_truncated_fix.onnx + python3 utils/fix_prelu.py ./weights/ONet_truncated.onnx ./weights/ONet_truncated_fix.onnx + python3 utils/fix_prelu.py ./weights/Inception_facenet_vggface2.onnx ./weights/Inception_facenet_vggface2_fix.onnx + python3 utils/fix_clip.py ./weights/Inception_facenet_vggface2_fix.onnx ./weights/Inception_facenet_vggface2_fix.onnx ``` - 参数说明:第一个参数为原始onnx,第二个参数为优化后的onnx。 diff --git a/ACL_PyTorch/contrib/cv/face/ReId-MGN-master/README.md b/ACL_PyTorch/contrib/cv/face/ReId-MGN-master/README.md index e639127ce9..6a47301e26 100644 --- a/ACL_PyTorch/contrib/cv/face/ReId-MGN-master/README.md +++ b/ACL_PyTorch/contrib/cv/face/ReId-MGN-master/README.md @@ -44,8 +44,6 @@ ### 2.1 深度学习框架 ``` -CANN 5.1.RC1 -python == 3.7.5 pytorch >= 1.8.1 torchvision >= 0.8.1 onnx >= 1.9.0 @@ -62,8 +60,8 @@ scikit-learn == 0.24.1 h5py == 3.3.0 ``` **说明:** -> X86架构:pytorch,torchvision和onnx可以通过官方下载whl包安装,其它可以通过pip3.7 install 包名 安装 -> Arm架构:pytorch,torchvision和onnx可以通过源码编译安装,其它可以通过pip3.7 install 包名 安装 +> X86架构:pytorch,torchvision和onnx可以通过官方下载whl包安装,其它可以通过pip3 install 包名 安装 +> Arm架构:pytorch,torchvision和onnx可以通过源码编译安装,其它可以通过pip3 install 包名 安装 ## 3 模型转换 @@ -93,7 +91,7 @@ patch -R MGN/data.py < module.patch 4.执行pth2onnx脚本,生成onnx模型文件 ``` #将model.pt模型转为market1501.onnx模型,注意,生成onnx模型名(第二个参数)和batch size(第三个参数)根据实际大小设置. -python3.7 ./pth2onnx.py ./model/model.pt ./model/model_mkt1501_bs1.onnx 1 +python3 ./pth2onnx.py ./model/model.pt ./model/model_mkt1501_bs1.onnx 1 ``` **模型转换要点:** @@ -136,11 +134,11 @@ python3 ./postprocess_MGN.py --mode save_bin --data_path ./data/market1501 2.执行生成数据集信息脚本,生成数据集信息文件 ``` -python ./preprocess_MGN.py bin ./data/market1501/bin_data/q/ ./q_bin.info 384 128 -python ./preprocess_MGN.py bin ./data/market1501/bin_data/g/ ./g_bin.info 384 128 +python3 ./preprocess_MGN.py bin ./data/market1501/bin_data/q/ ./q_bin.info 384 128 +python3 ./preprocess_MGN.py bin ./data/market1501/bin_data/g/ ./g_bin.info 384 128 -python ./preprocess_MGN.py bin ./data/market1501/bin_data_flip/q/ ./q_bin_flip.info 384 128 -python ./preprocess_MGN.py bin ./data/market1501/bin_data_flip/g/ ./g_bin_flip.info 384 128 +python3 ./preprocess_MGN.py bin ./data/market1501/bin_data_flip/q/ ./q_bin_flip.info 384 128 +python3 ./preprocess_MGN.py bin ./data/market1501/bin_data_flip/g/ ./g_bin_flip.info 384 128 ``` 第一个参数为模型输入的类型,第二个参数为生成的bin文件路径,第三个为输出的info文件,后面为宽高信息 ## 5 离线推理 @@ -179,7 +177,7 @@ source /usr/local/Ascend/ascend-toolkit/set_env.sh 调用postprocess_MGN.py脚本的“evaluate_om”模式推理结果与语义分割真值进行比对,可以获得mAP精度数据。 ``` -python3.7 ./postprocess_MGN.py --mode evaluate_om --data_path ./data/market1501/ +python3 ./postprocess_MGN.py --mode evaluate_om --data_path ./data/market1501/ ``` 第一个参数为main函数运行模式,第二个为原始数据目录,第三个为模型所在目录。 查看输出结果: diff --git a/ACL_PyTorch/contrib/cv/face/Retinaface/README.md b/ACL_PyTorch/contrib/cv/face/Retinaface/README.md index 1231279423..f79483d243 100644 --- a/ACL_PyTorch/contrib/cv/face/Retinaface/README.md +++ b/ACL_PyTorch/contrib/cv/face/Retinaface/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -44,23 +42,6 @@ Retinaface模型是2019年提出的人脸检测模型,使用deformable convolu | output1 | FLOAT32 | batchsize x 41236 x 2 | ND | | output2 | FLOAT32 | batchsize x 41236 x 10 | 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.8.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/cv/face/reid_PCB_baseline/Readme.md b/ACL_PyTorch/contrib/cv/face/reid_PCB_baseline/Readme.md index 9de899f951..02d19457dc 100644 --- a/ACL_PyTorch/contrib/cv/face/reid_PCB_baseline/Readme.md +++ b/ACL_PyTorch/contrib/cv/face/reid_PCB_baseline/Readme.md @@ -35,32 +35,6 @@ commit_id=e29cf54486427d1423277d4c793e39ac0eeff87c | -------- | -------------------------| -------- | ------------ | | output_1 | batchsize x 2048 x 6 x 1 | 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.13.0 | - | torchVision | >=0.14.0 | - | numpy | >=1.19.2 | - | Pillow | >=8.2.0 | - | opencv-python | >=4.5.2 | - | skl2onnx | >= 1.8.0 | - | h5py | >=3.3.0 | - | scikit-learn | >=0.24.1 | - ## 快速上手 ### 获取源码 diff --git a/ACL_PyTorch/contrib/cv/gan/BigGAN/README.md b/ACL_PyTorch/contrib/cv/gan/BigGAN/README.md index 2baa1faea9..77810b70df 100644 --- a/ACL_PyTorch/contrib/cv/gan/BigGAN/README.md +++ b/ACL_PyTorch/contrib/cv/gan/BigGAN/README.md @@ -4,10 +4,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -58,23 +54,6 @@ BigGAN是用于图像生成的大规模生成对抗网络。相较于先前的 | -------- | -------- | --------------------- | ------------ | | image | FLOAT32 | batchsize x3x 128x128 | NCHW | - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------ | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.4 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.6.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 @@ -290,4 +269,8 @@ BigGAN是用于图像生成的大规模生成对抗网络。相较于先前的 | 310P3 | 8 | 463.0535 | | 310P3 | 16 | 524.359 | | 310P3 | 32 | 542.7187 | -| 310P3 | 64 | 489.6636 | \ No newline at end of file +| 310P3 | 64 | 489.6636 | + + +# 公网地址说明 +代码涉及公网地址参考 public_address_statement.md \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/gan/BigGAN/public_address_statement.md b/ACL_PyTorch/contrib/cv/gan/BigGAN/public_address_statement.md new file mode 100644 index 0000000000..f0cb079e6a --- /dev/null +++ b/ACL_PyTorch/contrib/cv/gan/BigGAN/public_address_statement.md @@ -0,0 +1,4 @@ +| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 | +| ---- | ------------ | ------ | ------------------------------------ | -------- | +|开源代码引入|https://github.com/ajbrock/BigGAN-PyTorch.git |biggan.patch |https://github.com/msubhransu/matrix-sqrt |说明源码出处| +|开源代码引入|https://github.com/ajbrock/BigGAN-PyTorch.git |biggan.patch |https://github.com/bioinf-jku/TTUR |说明源码出处| \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/gan/CGAN/README.md b/ACL_PyTorch/contrib/cv/gan/CGAN/README.md index 98597ae1a8..6fc64745f6 100644 --- a/ACL_PyTorch/contrib/cv/gan/CGAN/README.md +++ b/ACL_PyTorch/contrib/cv/gan/CGAN/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -47,23 +43,6 @@ CGAN(条件生成对抗网络,Conditional Generative Adversarial Nets)是生 | -------- | -------- | -------- | ------------ | | output1 | FLOAT32 | 100 x 3 x 28 x 28 | NCHW | - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 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版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 @@ -230,4 +209,8 @@ CGAN(条件生成对抗网络,Conditional Generative Adversarial Nets)是生 | 芯片型号 | Batch Size | 数据集 | 精度 | 性能 | | --------- | ---------------- | ---------- | ---------- | --------------- | -| Ascend310 | 1 | 随机生成数据 | 图片视觉评价 | 1935.7336 fps | \ No newline at end of file +| Ascend310 | 1 | 随机生成数据 | 图片视觉评价 | 1935.7336 fps | + + +# 公网地址说明 +代码涉及公网地址参考 public_address_statement.md \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/gan/CGAN/public_address_statement.md b/ACL_PyTorch/contrib/cv/gan/CGAN/public_address_statement.md new file mode 100644 index 0000000000..5ccda16766 --- /dev/null +++ b/ACL_PyTorch/contrib/cv/gan/CGAN/public_address_statement.md @@ -0,0 +1,4 @@ +| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 | +| ---- | ------------ | ------ | ------------------------------------ | -------- | +|开源代码引入|https://github.com/znxlwm/pytorch-generative-model-collections |CGAN.py |https://arxiv.org/abs/1606.03657 |论文地址| +|开源代码引入|https://github.com/znxlwm/pytorch-generative-model-collections |CGAN.py |https://arxiv.org/abs/1606.03657 |论文地址| \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/gan/CycleGAN/README.md b/ACL_PyTorch/contrib/cv/gan/CycleGAN/README.md index aff4eb0a8f..9f29e4a8c9 100644 --- a/ACL_PyTorch/contrib/cv/gan/CycleGAN/README.md +++ b/ACL_PyTorch/contrib/cv/gan/CycleGAN/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -56,22 +52,6 @@ CycleGAN是基于对抗生成的图像风格转换卷积神经网络,该网络 | output | FLOAT32 | batchsize x 3 x 256x 256 | NCHW | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | :------------------------------------------------------------: | :-------: | :------------------------------------------------------------: | - | 固件与驱动 | 1.0.16 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 5.1.RC2 | - | - | Python | 3.7.5 | \ | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - # 快速上手 ## 获取源码 @@ -296,4 +276,8 @@ CycleGAN是基于对抗生成的图像风格转换卷积神经网络,该网络 | Ascend310P | 8 | maps | 0.999077 | 206.62 | | Ascend310P | 16 | maps | 0.999077 | 218.42 | | Ascend310P | 32 | maps | 0.999077 | 226.60 | - | Ascend310P | 64 | maps | 0.999077 | 232.37 | \ No newline at end of file + | Ascend310P | 64 | maps | 0.999077 | 232.37 | + + +# 公网地址说明 +代码涉及公网地址参考 public_address_statement.md \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/gan/CycleGAN/public_address_statement.md b/ACL_PyTorch/contrib/cv/gan/CycleGAN/public_address_statement.md new file mode 100644 index 0000000000..72e956cf35 --- /dev/null +++ b/ACL_PyTorch/contrib/cv/gan/CycleGAN/public_address_statement.md @@ -0,0 +1,5 @@ +| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 | +| ---- | ------------ | ------ | ------------------------------------ | -------- | +|开源代码引入|https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix |CycleGAN.patch |https://pytorch.org/docs/stable/optim.html |说明源码出处| +|开源代码引入|https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix |CycleGAN.patch |WGAN-GP paper https://arxiv.org/abs/1704.00028 |论文地址| +|开源代码引入|https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix |CycleGAN.patch |https://github.com/jcjohnson/fast-neural-style |说明源码出处| \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/gan/DCGAN/README.md b/ACL_PyTorch/contrib/cv/gan/DCGAN/README.md index 3775a80e66..f7fd732c25 100644 --- a/ACL_PyTorch/contrib/cv/gan/DCGAN/README.md +++ b/ACL_PyTorch/contrib/cv/gan/DCGAN/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -54,21 +52,6 @@ DCGAN是生成对抗网络GAN中一种常见的模型结构。其中的生成器 | ------- | -------- | ----------------------- | ----------- | | output | GREY_FP16 | batchsize x 1 x 28 x 28 | NCHW | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 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.5.0 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 @@ -151,7 +134,7 @@ DCGAN是生成对抗网络GAN中一种常见的模型结构。其中的生成器 2. 使用onnx-simplifier工具简化原始onnx文件。 ```shell - python3.7 -m onnxsim --input-shape=1,100,1,1 dcgan.onnx dcgan_sim_bs{batch_size}.onnx + python3 -m onnxsim --input-shape=1,100,1,1 dcgan.onnx dcgan_sim_bs{batch_size}.onnx ``` 最终获得`dcgan_sim_bs{batch_size}.onnx`文件。 diff --git a/ACL_PyTorch/contrib/cv/gan/GAN/README.md b/ACL_PyTorch/contrib/cv/gan/GAN/README.md index c62457cc4a..30d1d31e9a 100644 --- a/ACL_PyTorch/contrib/cv/gan/GAN/README.md +++ b/ACL_PyTorch/contrib/cv/gan/GAN/README.md @@ -2,8 +2,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -51,20 +49,6 @@ | ------ | ----------------- | ---- | ------ | | output | batchsizex1x28x28 | FP32 | NCHW | -# 推理环境准备[所有版本] - -- 该模型需要以下插件与驱动 - - **表 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.5.0 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 1. 获取源码 @@ -90,7 +74,7 @@ 将原始数据集转换为模型输入的二进制数据。执行GAN_preprocess.py脚本。 ``` - python3.7 GAN_preprocess.py --online_path=images --offline_path=vectors --pth_path=generator_8p_0.0008_128.pth --iters 100 --batch_size 64 + python3 GAN_preprocess.py --online_path=images --offline_path=vectors --pth_path=generator_8p_0.0008_128.pth --iters 100 --batch_size 64 ``` > **说明:** @@ -129,7 +113,7 @@ 运行GAN_pth2onnx.py”脚本。 ``` - python3.7 GAN_pth2onnx.py --input_file=generator_8p_0.0008_128.pth --output_file=GAN.onnx + python3 GAN_pth2onnx.py --input_file=generator_8p_0.0008_128.pth --output_file=GAN.onnx ``` 获得“GAN.onnx”文件。 @@ -210,7 +194,7 @@ ``` ``` - python3.7 -m ais_bench --model "GAN_bs1.om" --input ./vectors --output "./result" --batchsize 1 --loop 100 + python3 -m ais_bench --model "GAN_bs1.om" --input ./vectors --output "./result" --batchsize 1 --loop 100 ``` - 参数说明: @@ -227,7 +211,7 @@ 调用GAN_postprocess.py来进行后处理,详细的结果输出在genimg文件夹中,可以和images文件夹下的在线推理结果做对比,看谁生成的图片质量更好。 ``` - python3.7 GAN_postprocess.py --txt_path=./result/2022_11_14-14_02_51 --infer_results_path=genimg + python3 GAN_postprocess.py --txt_path=./result/2022_11_14-14_02_51 --infer_results_path=genimg ``` **说明:** @@ -238,7 +222,7 @@ ais_infer纯推理验证不同batch_size的om模型的性能,参考命令如下: ``` - python3.7 -m ais_bench --model=${om_model_path} --loop=100 --batchsize=${batch_size} + python3 -m ais_bench --model=${om_model_path} --loop=100 --batchsize=${batch_size} ``` # 模型推理性能&精度 diff --git a/ACL_PyTorch/contrib/cv/gan/Pix2Pix/README.md b/ACL_PyTorch/contrib/cv/gan/Pix2Pix/README.md index 96490e3228..b69166d4ee 100755 --- a/ACL_PyTorch/contrib/cv/gan/Pix2Pix/README.md +++ b/ACL_PyTorch/contrib/cv/gan/Pix2Pix/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -57,29 +53,11 @@ pix2pix是一个图像合成网络,是将GAN应用于有监督的图像到图 | output | RGB_FP32 | batchsize x 3 x 256 x 256 | NCHW | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 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.0 | [AscendPyTorch环境准备](https://gitee.com/ascend/pytorch) | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 -1. 获取源码。 +1. 获取源码。 ``` git clone https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git git reset --hard aac572a869b6cfc7486d1d8e2846e5e34e3f0e05 @@ -273,3 +251,7 @@ pix2pix是一个图像合成网络,是将GAN应用于有监督的图像到图 | Ascend310P | 16 | facades | 通过观察图片精度达标 | 945.187 | | Ascend310P | 32 | facades | 通过观察图片精度达标 | 963.043 | | Ascend310P | 64 | facades | 通过观察图片精度达标 | 956.723 | + + +# 公网地址说明 +代码涉及公网地址参考 public_address_statement.md \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/gan/Pix2Pix/public_address_statement.md b/ACL_PyTorch/contrib/cv/gan/Pix2Pix/public_address_statement.md new file mode 100644 index 0000000000..22b54d9c43 --- /dev/null +++ b/ACL_PyTorch/contrib/cv/gan/Pix2Pix/public_address_statement.md @@ -0,0 +1,23 @@ +| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 | +| ---- | ------------ | ------ | ------------------------------------ | -------- | +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch |https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py |说明源码出处| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://pytorch.org/docs/stable/elastic/run.html |引用环境配置说明| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://pytorch.org/docs/stable/elastic/run.html |引用环境配置说明| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://pytorch.org/docs/stable/elastic/run.html |引用环境配置说明| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://gitee.com/ascend/modelzoo/tree/master/contrib/PyTorch/Official/cv/image_classification |说明源码出处| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://github.com/s9xie/hed/blob/master/examples/hed/HED-tutorial.ipynb |说明源码出处| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://github.com/s9xie/hed |说明源码出处| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://github.com/shelhamer/clockwork-fcn |说明源码出处| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://github.com/shelhamer/clockwork-fcn |说明源码出处| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git | +pix2pix.patch|https://pytorch.org/docs/stable/elastic/run.html |引用环境配置说明| +|开源代码引入|https://github.com/OmriKaduri/pytorch-CycleGAN-and-pix2pix.git |pix2pix_pth2onnx.py|https://pytorch.org/docs/stable/elastic/run.html |引用环境配置说明 | \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/gan/Pix2pixHD/README.md b/ACL_PyTorch/contrib/cv/gan/Pix2pixHD/README.md index af24c1db52..ac4d4d9da8 100644 --- a/ACL_PyTorch/contrib/cv/gan/Pix2pixHD/README.md +++ b/ACL_PyTorch/contrib/cv/gan/Pix2pixHD/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -53,22 +49,6 @@ Pix2PixHD作为pix2pix的改进版本,是一个经典的图像生成网络, | -------- | -------- | -------- | ------------ | | output | FLOAT32 | batchsize x 3 x 1024 x 2048 | NCHW | - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/cv/gan/StarGAN/README.md b/ACL_PyTorch/contrib/cv/gan/StarGAN/README.md index 191a6a2bc5..81270910e0 100755 --- a/ACL_PyTorch/contrib/cv/gan/StarGAN/README.md +++ b/ACL_PyTorch/contrib/cv/gan/StarGAN/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -57,24 +53,6 @@ StarGAN是 Yunjey Choi 等人于 17年11月 提出的一个模型。该模型可 | output1 | batchsize x 3 x 128 x 128 | RGB_FP32 | NCHW | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.17(NPU驱动固件版本为6.0.RC1) | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | Pytorch | 1.5.0 | - | - - - - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/cv/gan/StyleGAN2-ADA/README.md b/ACL_PyTorch/contrib/cv/gan/StyleGAN2-ADA/README.md index fb906b10a1..2336fbd989 100644 --- a/ACL_PyTorch/contrib/cv/gan/StyleGAN2-ADA/README.md +++ b/ACL_PyTorch/contrib/cv/gan/StyleGAN2-ADA/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -47,23 +43,6 @@ StyleGAN2-ADA是具有自适应鉴别器增强(ADA)的StyleGAN2,用有限 | -------- | -------- | -------- | ------------ | | output1 | FLOAT32 | batchsize x 3 x 512 x 512| NCHW | - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.8.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 @@ -226,7 +205,7 @@ StyleGAN2-ADA是具有自适应鉴别器增强(ADA)的StyleGAN2,用有限 可使用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/image_process/Cross-Scale-Non-Local-Attention/README.md b/ACL_PyTorch/contrib/cv/image_process/Cross-Scale-Non-Local-Attention/README.md index 0b2f007d23..6a470dc192 100644 --- a/ACL_PyTorch/contrib/cv/image_process/Cross-Scale-Non-Local-Attention/README.md +++ b/ACL_PyTorch/contrib/cv/image_process/Cross-Scale-Non-Local-Attention/README.md @@ -2,7 +2,6 @@ - [概述](#概述) - [输入输出数据](#输入输出数据) -- [推理环境](#推理环境) - [快速上手](#快速上手) - [获取源码](#获取源码) - [准备数据集](#准备数据集) @@ -33,21 +32,6 @@ | ----------- | ---------- | ----------- | ----------- | | output1 | FLOAT32 | NCHW | batch_size x 3 x 224 x 224 | - ----- -# 推理环境 - -- 该模型推理所需配套的软件如下: - - | 配套 | 版本 | 环境准备指导 | - | --------- | ------- | ---------- | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - - 说明:请根据推理卡型号与 CANN 版本选择相匹配的固件与驱动版本。 - - ---- # 快速上手 diff --git a/ACL_PyTorch/contrib/cv/image_process/DnCNN/READEME.md b/ACL_PyTorch/contrib/cv/image_process/DnCNN/READEME.md index aa4a277dc3..6afb260fe0 100644 --- a/ACL_PyTorch/contrib/cv/image_process/DnCNN/READEME.md +++ b/ACL_PyTorch/contrib/cv/image_process/DnCNN/READEME.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -50,24 +46,6 @@ DnCNN作为去噪神经网络非常出名,这个网络强调了residual learni | -------- | -------- | -------- | ------------ | | output1 | FLOAT32 | batchsize x 1 x 481 x 481 | NCHW | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 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.8.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 @@ -96,7 +74,7 @@ DnCNN作为去噪神经网络非常出名,这个网络强调了residual learni 执行data_preprocess.py脚本,完成预处理。 ``` - python3.7 data_preprocess.py ./DnCNN-PyTorch/data ISource INoisy + python3 data_preprocess.py ./DnCNN-PyTorch/data ISource INoisy ``` @@ -129,7 +107,7 @@ DnCNN作为去噪神经网络非常出名,这个网络强调了residual learni 运行DnCNN_pth2onnx.py脚本。 ``` - python3.7 DnCNN_pth2onnx.py net.pth DnCNN-S-15.onnx + python3 DnCNN_pth2onnx.py net.pth DnCNN-S-15.onnx ``` 获得DnCNN-S-15.onnx文件。 @@ -209,7 +187,7 @@ DnCNN作为去噪神经网络非常出名,这个网络强调了residual learni 调用postprocess.py脚本推理结果进行PSRN计算,结果会打印在屏幕上。 ``` - python3.7 postprocess.py ./output/subdir + python3 postprocess.py ./output/subdir ``` - 参数说明: @@ -221,9 +199,9 @@ DnCNN作为去噪神经网络非常出名,这个网络强调了residual learni 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python3.7 -m ais_bench --model=./DnCNN-S-15_bs{batch size}.om --loop=1000 --batchsize={batch size} + python3 -m ais_bench --model=./DnCNN-S-15_bs{batch size}.om --loop=1000 --batchsize={batch size} 示例 - python3.7 -m ais_bench --model=./DnCNN-S-15_bs1.om --loop=1000 --batchsize=1 + python3 -m ais_bench --model=./DnCNN-S-15_bs1.om --loop=1000 --batchsize=1 ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/cv/image_process/SRFlow/README.md b/ACL_PyTorch/contrib/cv/image_process/SRFlow/README.md index d15d454432..b2b2a0a116 100644 --- a/ACL_PyTorch/contrib/cv/image_process/SRFlow/README.md +++ b/ACL_PyTorch/contrib/cv/image_process/SRFlow/README.md @@ -2,7 +2,6 @@ - [概述](#概述) - [输入输出数据](#输入输出数据) -- [推理环境](#推理环境) - [快速上手](#快速上手) - [获取源码](#获取源码) - [准备数据集](#准备数据集) @@ -37,19 +36,6 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 | output-image | RGB_FP32 | NCHW | batchsize x 3 x 2048 x 2048 | 说明:目前该模型只支持转出 batchszie 为 1 的 OM 模型。 ----- -# 推理环境 - -- 该模型推理所需配套的软件如下: - - | 配套 | 版本 | 环境准备指导 | - | --------- | ------- | ---------- | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - - 说明:请根据推理卡型号与 CANN 版本选择相匹配的固件与驱动版本。 - ---- # 快速上手 @@ -58,7 +44,7 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 1. 安装推理过程所需的依赖 ```bash - pip install -r requirements.txt + pip3 install -r requirements.txt ``` 2. 获取开源仓源码 ```bash @@ -87,7 +73,7 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 2. 数据预处理 执行前处理脚本将原始数据转换为OM模型输入需要的bin文件。 ```bash - python srflow_preprocess.py -s ./datasets/div2k-validation-modcrop8-x8 -o ./prep_data + python3 srflow_preprocess.py -s ./datasets/div2k-validation-modcrop8-x8 -o ./prep_data ``` 参数说明: + -s/--source: 原始数据路径 @@ -108,7 +94,7 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 然后执行执行以下命令生成 ONNX 模型: ```bash - python srflow_pth2onnx.py --pth ./pretrained_models/SRFlow_DF2K_8X.pth --onnx srflow_df2k_x8.onnx + python3 srflow_pth2onnx.py --pth ./pretrained_models/SRFlow_DF2K_8X.pth --onnx srflow_df2k_x8.onnx ``` 参数说明: + --pth: 预训练权重文件路径 @@ -117,7 +103,7 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 2. ONNX 模型优化 使用 onnx-simplifier 简化 ONNX 模型: ```bash - python -m onnxsim ./srflow_df2k_x8.onnx ./srflow_df2k_x8_sim.onnx + python3 -m onnxsim ./srflow_df2k_x8.onnx ./srflow_df2k_x8_sim.onnx ``` 以上的命令中,`./srflow_df2k_x8.onnx`为原始ONXN模型,`./srflow_df2k_x8_sim.onnx`为优化后的ONNX模型。 @@ -176,7 +162,7 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 1. 对数据集推理 安装ais_bench推理工具。请访问[ais_bench推理工具](https://gitee.com/ascend/tools/tree/master/ais-bench_workload/tool/ais_bench)代码仓,根据readme文档进行工具安装。完成安装后,执行以下命令预处理后的数据进行推理。 ```bash - python -m ais_bench \ + python3 -m ais_bench \ --model ./srflow_df2k_x8_bs${bs}.om \ --input ./prep_data/bin/ \ --output ./ \ @@ -197,7 +183,7 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 + 为了避免测试过程因持续时间太长而受到干扰,建议通过纯推理的方式进行性能测试。 + 使用吞吐率作为性能指标,单位为 fps,反映模型在单位时间(1秒)内处理的样本数。 ```bash - python -m ais_bench --model ./srflow_df2k_x8_bs${bs}.om --batchsize ${bs} --loop 100 + python3 -m ais_bench --model ./srflow_df2k_x8_bs${bs}.om --batchsize ${bs} --loop 100 ``` 执行完纯推理命令,程序会打印出与性能相关的指标,找到以关键字 **[INFO] throughput** 开头的一行,行尾的数字即为 OM 模型的吞吐率。 @@ -205,7 +191,7 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 执行后处理脚本,根据推理结果计算OM模型的精度: ```bash - python srflow_postprocess.py \ + python3 srflow_postprocess.py \ --hr ./datasets/div2k-validation-modcrop8-gt/ \ --binres ./result_bs${bs} \ --save ./result_bs${bs}_save @@ -224,3 +210,7 @@ SRFlow是一种基于归一化流的超分辨率方法,具备比GAN更强的 | 芯片型号 | BatchSize | 数据集 | 精度 | 性能 | | --------- | --------- | ------ | --------------- | --------- | |Ascend310P3| 1 | DIV2K | avg_psnr=23.017 | 0.737 fps | + + +# 公网地址说明 +代码涉及公网地址参考 public_address_statement.md \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/image_process/SRFlow/public_address_statement.md b/ACL_PyTorch/contrib/cv/image_process/SRFlow/public_address_statement.md new file mode 100644 index 0000000000..66f52c20a4 --- /dev/null +++ b/ACL_PyTorch/contrib/cv/image_process/SRFlow/public_address_statement.md @@ -0,0 +1,3 @@ +| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 | +| ---- | ------------ | ------ | ------------------------------------ | -------- | +|开源代码引入|https://github.com/andreas128/SRFlow |srflow.patch |https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE |使用说明| \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/image_process/wdsr/README.md b/ACL_PyTorch/contrib/cv/image_process/wdsr/README.md index 468de1a5f9..fb8792fde3 100644 --- a/ACL_PyTorch/contrib/cv/image_process/wdsr/README.md +++ b/ACL_PyTorch/contrib/cv/image_process/wdsr/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -45,20 +43,6 @@ Wdsr是对EDSR进行改进,去除了冗余的卷积层,同时也改造了res | --------- | -------- | --------------------------- | ------------ | | out_image | RGB_FP32 | batchsize x 3 x 2040 x 2040 | 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/image_registration/superpoint/README.md b/ACL_PyTorch/contrib/cv/image_registration/superpoint/README.md index 0fb1937dcc..17ce6f9c04 100644 --- a/ACL_PyTorch/contrib/cv/image_registration/superpoint/README.md +++ b/ACL_PyTorch/contrib/cv/image_registration/superpoint/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section4622531142820) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -51,22 +49,6 @@ | output1 | FLOAT32 | 1 x 256 x 30 x 40 | NHCW | | output2 | FLOAT32 | 1 x 65 x 30 x 40 | NHCW | - - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 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.6.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 @@ -80,7 +62,7 @@ 2. 安装依赖 ``` - pip install -r requirements.txt + pip3 install -r requirements.txt ``` ## 准备数据集(解压命令参考tar –xvf \*.tar与 unzip \*.zip) @@ -102,7 +84,7 @@ 数据预处理在代码主目录将原始数据集转换为模型输入的数据。 ``` - python superpoint_preprocess.py --img_path $img_path --result_path $result_path + python3 superpoint_preprocess.py --img_path $img_path --result_path $result_path ``` 详见下表 @@ -126,7 +108,7 @@ 在代码主目录使用superpoint_pth2onnx.py导出onnx文件。 ``` - python superpoint_pth2onnx.py --model_path=$model_path --batch_size=$batch_size + python3 superpoint_pth2onnx.py --model_path=$model_path --batch_size=$batch_size ``` | 参数 | 说明 @@ -198,7 +180,7 @@ 2. 执行推理。 ``` - python -m ais_bench --model sp-${batchsize}.om --input ${bin_path} --output ${result_path} --batchsize ${batchsize} + python3 -m ais_bench --model sp-${batchsize}.om --input ${bin_path} --output ${result_path} --batchsize ${batchsize} ``` - 参数说明: @@ -216,7 +198,7 @@ 在代码主目录进行精度计算 ``` - python superpoint_postprocess.py --img_path=$config_path --result_path=$result_path + python3 superpoint_postprocess.py --img_path=$config_path --result_path=$result_path ``` | 参数 | 说明 | | -------- |---------------------------| @@ -227,7 +209,7 @@ 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python -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/image_retrieval/BLIP/readme.md b/ACL_PyTorch/contrib/cv/image_retrieval/BLIP/readme.md index c6a2306896..40973399f4 100644 --- a/ACL_PyTorch/contrib/cv/image_retrieval/BLIP/readme.md +++ b/ACL_PyTorch/contrib/cv/image_retrieval/BLIP/readme.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -89,23 +85,6 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 | -------- | -------- | -------- | ------------ | | image_feat | FLOAT32 | batchsize x 577 x 768 | 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.7.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 @@ -154,7 +133,7 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 执行BLIP_preprocess.py脚本,完成预处理。 ``` - python BLIP_preprocess.py \ + python3 BLIP_preprocess.py \ --coco_path ./coco2014 \ --save_bin_path ./coco2014_bin ``` @@ -187,7 +166,7 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 在`BLIP`工作目录下通过运行以下命令获取onnx模型。 ``` - python BLIP_pth2onnx.py --pth_path ./model_base_retrieval_coco.pth + python3 BLIP_pth2onnx.py --pth_path ./model_base_retrieval_coco.pth ``` - 参数说明: @@ -279,17 +258,17 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 mkdir coco2014_infer/image_feat mkdir coco2014_infer/text_embed - python -m ais_bench \ + python3 -m ais_bench \ --model ./BLIP_image_bs${batchsize}.om \ --input ./coco2014_bin/img/ \ --output ./coco2014_infer/image_embed - python -m ais_bench \ + python3 -m ais_bench \ --model ./BLIP_image_feat_bs${batchsize}.om \ --input ./coco2014_bin/img/ \ --output ./coco2014_infer/image_feat - python -m ais_bench \ + python3 -m ais_bench \ --model ./BLIP_text_bs${batchsize}.om \ --input ./coco2014_bin/ids/,./coco2014_bin/mask/ \ --output ./coco2014_infer/text_embed @@ -307,7 +286,7 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 执行后处理脚本BLIP_postprocess.py`,参考命令如下: ``` - python BLIP_postprocess.py \ + python3 BLIP_postprocess.py \ --text_embed_path ./coco2014_infer/text_embed/${specific_dir} \ --image_embed_path ./coco2014_infer/image_embed/${specific_dir} \ --image_feat_path ./coco2014_infer/image_feat/${specific_dir} \ @@ -329,7 +308,7 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python -m ais_bench --model=${om_model_path} --loop=100 --batchsize=${batch_size} + python3 -m ais_bench --model=${om_model_path} --loop=100 --batchsize=${batch_size} ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/cv/pose_estimation/3DMPPE-ROOTNET/README.md b/ACL_PyTorch/contrib/cv/pose_estimation/3DMPPE-ROOTNET/README.md index b58de2a612..89bd58a43f 100644 --- a/ACL_PyTorch/contrib/cv/pose_estimation/3DMPPE-ROOTNET/README.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/3DMPPE-ROOTNET/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -52,22 +50,6 @@ | -------- | -------------- | -------- | ------------ | | output | batchsize x 3 | FLOAT32 | ND | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.16(NPU驱动固件版本为5.1.RC2) | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 5.1.RC2 | - - | Python | 3.7.5 | - - - - # 快速上手 ## 获取源码 @@ -99,7 +81,7 @@ 3. 安装依赖。 ``` - pip install -r requirements.txt + pip3 install -r requirements.txt ``` ## 准备数据集 @@ -122,7 +104,7 @@ 执行3DMPPE-ROOTNET_preprocess.py脚本,完成预处理。 ``` - python 3DMPPE-ROOTNET_preprocess.py --img_path=./MuPoTS/MultiPersonTestSet --ann_path=./MuPoTS/MuPoTS-3D.json --save_path_image=data_image_bs1 --save_path_cam=data_cam_bs1 --inference_batch_siz=1 + python3 3DMPPE-ROOTNET_preprocess.py --img_path=./MuPoTS/MultiPersonTestSet --ann_path=./MuPoTS/MuPoTS-3D.json --save_path_image=data_image_bs1 --save_path_cam=data_cam_bs1 --inference_batch_siz=1 ``` - 参数说明: @@ -149,7 +131,7 @@ 运行“3DMPPE-ROOTNET_pth2onnx.py”脚本。 ``` - python 3DMPPE-ROOTNET_pth2onnx.py snapshot_6.pth.tar 3DMPPE-ROOTNET.onnx + python3 3DMPPE-ROOTNET_pth2onnx.py snapshot_6.pth.tar 3DMPPE-ROOTNET.onnx ``` - 参数说明: @@ -218,7 +200,7 @@ 执行命令 ``` - python -m ais_bench --device 0 --batchsize 1 --model 3DMPPE-ROOTNET_bs1.om --input "data_image_bs1,data_cam_bs1" --output out_bs1 + python3 -m ais_bench --device 0 --batchsize 1 --model 3DMPPE-ROOTNET_bs1.om --input "data_image_bs1,data_cam_bs1" --output out_bs1 ``` - 参数说明: @@ -236,7 +218,7 @@ 运行后处理脚本“3DMPPE-ROOTNET _postprocess.py”。 ``` - python 3DMPPE-ROOTNET_postprocess.py --img_path=MuPoTS/MultiPersonTestSet --ann_path=MuPoTS/MuPoTS-3D.json --input_path=out_bs1 --result_file=result_bs1 + python3 3DMPPE-ROOTNET_postprocess.py --img_path=MuPoTS/MultiPersonTestSet --ann_path=MuPoTS/MuPoTS-3D.json --input_path=out_bs1 --result_file=result_bs1 ``` - 参数说明: - --img_path :数据集路径。 @@ -250,7 +232,7 @@ 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python -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} ``` - 参数说明: - --model:om模型的路径 diff --git a/ACL_PyTorch/contrib/cv/pose_estimation/DEKR/README.md b/ACL_PyTorch/contrib/cv/pose_estimation/DEKR/README.md index 9637923c75..ad51e9b648 100644 --- a/ACL_PyTorch/contrib/cv/pose_estimation/DEKR/README.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/DEKR/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -50,23 +48,6 @@ DEKR采用的是自底向上的范式,准确地回归关键点位置需要学 | output1 | FLOAT32 | batchsize x 18 x 128 x 192;
batchsize x 18 x 128 x 128;
batchsize x 18 x 192 x 128;
batchsize x 18 x 128 x 256;
batchsize x 18 x 256 x 128 | NCHW | | output2 | FLOAT32 | batchsize x 34 x 128 x 192;
batchsize x 34 x 128 x 128;
batchsize x 34 x 192 x 128;
batchsize x 34 x 128 x 256;
batchsize x 34 x 256 x 128 | NCHW | - - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 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/pose_estimation/HRNet/README.md b/ACL_PyTorch/contrib/cv/pose_estimation/HRNet/README.md index 8274cda7fb..e7d9e87a11 100644 --- a/ACL_PyTorch/contrib/cv/pose_estimation/HRNet/README.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/HRNet/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -57,22 +55,6 @@ | -------- | -------- | -------- | ------------ | | output1 | 1 x 1000 | FLOAT32 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 5.1.RC2 | - | -| onnx | 1.9.0 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.8.0 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 @@ -111,7 +93,7 @@ 执行imagenet_torch_preprocess.py脚本,完成预处理。 ``` - python3.7 imagenet_torch_preprocess.py hrnet ${raw_dataset_path}/ILSVRC2012_img_val ${dataset_path} + python3 imagenet_torch_preprocess.py hrnet ${raw_dataset_path}/ILSVRC2012_img_val ${dataset_path} ``` - 参数说明: - hrnet:模型名称 @@ -143,7 +125,7 @@ 运行hrnet_pth2onnx.py脚本。 ``` - python3.7 hrnet_pth2onnx.py --cfg ./HRNet-Image-Classification/experiments/cls_hrnet_w18_sgd_lr5e-2_wd1e-4_bs32_x100.yaml --input hrnet_w18.pth --output hrnet_w18.onnx + python3 hrnet_pth2onnx.py --cfg ./HRNet-Image-Classification/experiments/cls_hrnet_w18_sgd_lr5e-2_wd1e-4_bs32_x100.yaml --input hrnet_w18.pth --output hrnet_w18.onnx ``` - 参数说明: @@ -212,7 +194,7 @@ b. 执行推理。 ``` - python3.7 -m ais_bench --model ${om_model_path} --input ${dataset_path} --output ${result_path} --outfmt TXT --batchsize ${batch_size} + python3 -m ais_bench --model ${om_model_path} --input ${dataset_path} --output ${result_path} --outfmt TXT --batchsize ${batch_size} ``` - 参数说明: @@ -231,7 +213,7 @@ 调用脚本与数据集标签val\_label.txt比对,可以获得Accuracy数据,结果保存在result.json中。 ``` - python3.7 imagenet_acc_eval.py ${result_path} ${val_label_path}/val_label.txt ${output_path} result.json + python3 imagenet_acc_eval.py ${result_path} ${val_label_path}/val_label.txt ${output_path} result.json ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/cv/pose_estimation/HigherHRNet/README.md b/ACL_PyTorch/contrib/cv/pose_estimation/HigherHRNet/README.md index 9c555d5e44..48d433b274 100644 --- a/ACL_PyTorch/contrib/cv/pose_estimation/HigherHRNet/README.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/HigherHRNet/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -60,20 +58,6 @@ | output1 | FLOAT32 | batchsize x 17 x h/4 x w/41 x 1000 | NCHW | | output2 | FLOAT32 | batchsize x 17 x h/2 x w/2 | NCHW | -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 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.8.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 diff --git a/ACL_PyTorch/contrib/cv/pose_estimation/MSPN/README.md b/ACL_PyTorch/contrib/cv/pose_estimation/MSPN/README.md index 927f09a5c5..26389d852e 100644 --- a/ACL_PyTorch/contrib/cv/pose_estimation/MSPN/README.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/MSPN/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -50,25 +48,6 @@ | -------- | -------- | -------- | ------------ | | output | FLOAT32 | batchsize x 3 x 256 x 192 | NCHW | - - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 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/pose_estimation/PoseC3D/README.md b/ACL_PyTorch/contrib/cv/pose_estimation/PoseC3D/README.md index 18e44f080a..e715937478 100644 --- a/ACL_PyTorch/contrib/cv/pose_estimation/PoseC3D/README.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/PoseC3D/README.md @@ -2,7 +2,6 @@ - [概述](#概述) - [输入输出数据](#输入输出数据) -- [推理环境](#推理环境) - [快速上手](#快速上手) - [获取源码](#获取源码) - [准备数据集](#准备数据集) @@ -35,21 +34,6 @@ PoseC3D 是一种基于 3D-CNN 的骨骼行为识别框架,同时具备良好 | ------- | --------- | ------------ | ----------- | | - | FLOAT32 | (bs*20) x 51 | ND | - ----- -# 推理环境 - -- 该模型推理所需配套的软件如下: - - | 配套 | 版本 | 环境准备指导 | - | --------- | ------- | ---------- | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.8.13 | - | - - 说明:请根据推理卡型号与 CANN 版本选择相匹配的固件与驱动版本。 - - ---- # 快速上手 @@ -57,12 +41,12 @@ PoseC3D 是一种基于 3D-CNN 的骨骼行为识别框架,同时具备良好 1. 安装推理过程所需的依赖 ```bash - pip install -r requirements.txt + pip3 install -r requirements.txt ``` 2. 获取开源仓源码 ```bash git clone -b v0.24.1 https://github.com/open-mmlab/mmaction2.git - pip install -v -e mmaction2 + pip3 install -v -e mmaction2 ``` ## 准备数据集 @@ -95,7 +79,7 @@ PoseC3D 是一种基于 3D-CNN 的骨骼行为识别框架,同时具备良好 2. 数据预处理 执行前处理脚本将原始数据转换为推理工具支持的bin文件。 ```bash - python posec3d_preprocess.py \ + python3 posec3d_preprocess.py \ --frame_dir ./mmaction2/data/hmdb51/rawframes/ \ --ann_file ./mmaction2/data/hmdb51/hmdb51.pkl \ --output_dir ./prep_data @@ -118,7 +102,7 @@ PoseC3D 是一种基于 3D-CNN 的骨骼行为识别框架,同时具备良好 执行mmaction官方提供的转ONNX脚本,生成ONNX模型: ```bash - python mmaction2/tools/deployment/pytorch2onnx.py \ + python3 mmaction2/tools/deployment/pytorch2onnx.py \ ./mmaction2/configs/skeleton/posec3d/slowonly_kinetics400_pretrained_r50_u48_120e_hmdb51_split1_keypoint.py \ ./slowonly_kinetics400_pretrained_r50_u48_120e_hmdb51_split1_keypoint-76ffdd8b.pth \ --shape ${bs} 20 17 48 56 56 \ @@ -179,7 +163,7 @@ PoseC3D 是一种基于 3D-CNN 的骨骼行为识别框架,同时具备良好 1. 对数据集推理 该离线模型使用ais_infer作为推理工具,请参考[**安装文档**](https://gitee.com/ascend/tools/tree/master/ais-bench_workload/tool/ais_bench#%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85)安装推理后端包aclruntime与推理前端包ais_bench。完成安装后,执行以下命令预处理后的数据进行推理。 ```bash - python -m ais_bench \ + python3 -m ais_bench \ --model ./posec3d_bs${bs}.om \ --input ./prep_data/bin/ \ --output ./ \ @@ -200,7 +184,7 @@ PoseC3D 是一种基于 3D-CNN 的骨骼行为识别框架,同时具备良好 + 为了避免测试过程因持续时间太长而受到干扰,建议通过纯推理的方式进行性能测试。 + 使用吞吐率作为性能指标,单位为 fps,反映模型在单位时间(1秒)内处理的样本数。 ```bash - python -m ais_bench --model ./posec3d_bs${bs}.om --batchsize ${bs} --loop 100 + python3 -m ais_bench --model ./posec3d_bs${bs}.om --batchsize ${bs} --loop 100 ``` 执行完纯推理命令,程序会打印出与性能相关的指标,找到以关键字 **[INFO] throughput** 开头的一行,行尾的数字即为 OM 模型的吞吐率。 @@ -208,7 +192,7 @@ PoseC3D 是一种基于 3D-CNN 的骨骼行为识别框架,同时具备良好 执行后处理脚本,根据推理结果计算OM模型的精度指标: ```bash - python posec3d_postprocess.py \ + python3 posec3d_postprocess.py \ --infer_results ./result_bs${bs} \ --label_file ./prep_data/hmdb51_label.txt ``` diff --git a/ACL_PyTorch/contrib/cv/pose_estimation/TransPose/README.md b/ACL_PyTorch/contrib/cv/pose_estimation/TransPose/README.md index a948bdb422..09c1d913dc 100644 --- a/ACL_PyTorch/contrib/cv/pose_estimation/TransPose/README.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/TransPose/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -51,23 +47,6 @@ TransPose是一种基于CNN特征提取器、Transformer编码器和预测头的 | -------- | -------- | -------- | ------------ | | output1 | FLOAT32 | batchsize x 17 x 64 x 48 | 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.6.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 @@ -264,4 +243,8 @@ TransPose是一种基于CNN特征提取器、Transformer编码器和预测头的 | 310P3 | 8 | COCO2017 | AP: 73.7% | 485.39 | | 310P3 | 16 | COCO2017 | AP: 73.7% | 458.66 | | 310P3 | 32 | COCO2017 | AP: 73.7% | 437.97 | -| 310P3 | 64 | COCO2017 | AP: 73.7% | 475.99 | \ No newline at end of file +| 310P3 | 64 | COCO2017 | AP: 73.7% | 475.99 | + + +# 公网地址说明 +代码涉及公网地址参考 public_address_statement.md \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/pose_estimation/TransPose/public_address_statement.md b/ACL_PyTorch/contrib/cv/pose_estimation/TransPose/public_address_statement.md new file mode 100644 index 0000000000..d66e40fa11 --- /dev/null +++ b/ACL_PyTorch/contrib/cv/pose_estimation/TransPose/public_address_statement.md @@ -0,0 +1,9 @@ +| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 | +| ---- | ------------ | ------ | ------------------------------------ | -------- | +|开源代码引入|https://github.com/yangsenius/TransPose.git |TransPose.patch |Bin Xiao (Bin.Xiao@microsoft.com) |邮箱地址| +|开源代码引入|https://github.com/yangsenius/TransPose.git |TransPose.patch |Hanbin Dai (daihanbin.ac@gmail.com) |邮箱地址| +|开源代码引入|https://github.com/yangsenius/TransPose.git |TransPose.patch |Bin Xiao (Bin.Xiao@microsoft.com) |邮箱地址| +|开源代码引入|https://github.com/yangsenius/TransPose.git |TransPose.patch |Hanbin Dai (daihanbin.ac@gmail.com) |邮箱地址| +|开源代码引入|https://github.com/yangsenius/TransPose.git |TransPose.patch |Feng Zhang (zhangfengwcy@gmail.com) |邮箱地址| +|开源代码引入|https://github.com/yangsenius/TransPose.git |transpose_r.py |Sen Yang (yangsenius@seu.edu.cn) |邮箱地址| +|开源代码引入|https://github.com/yangsenius/TransPose.git |transpose_r.py |https://github.com/facebookresearch/detr/blob/master/models/transformer.py |说明源码出处| \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/pose_estimation/UniFormer/readme.md b/ACL_PyTorch/contrib/cv/pose_estimation/UniFormer/readme.md index 8582b9c94f..67e9f3b559 100755 --- a/ACL_PyTorch/contrib/cv/pose_estimation/UniFormer/readme.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/UniFormer/readme.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -55,23 +51,6 @@ UniFormer 提出了一种整合 3D 卷积和时空自注意力机制的 Transfor | output1 | FLOAT32 | batchsize x 17 x 64 x 48 | ND | - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.3 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.8 | - | - | PyTorch | 1.8.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 @@ -92,7 +71,7 @@ UniFormer 提出了一种整合 3D 卷积和时空自注意力机制的 Transfor 2. 安装依赖。 ``` - pip install -r requirements.txt + pip3 install -r requirements.txt ``` ## 准备数据集 @@ -114,7 +93,7 @@ UniFormer 提出了一种整合 3D 卷积和时空自注意力机制的 Transfor 执行uniformer_preprocess.py脚本,完成预处理。 ``` - python uniformer_preprocess.py --dataset=./coco --bin=pre_data + python3 uniformer_preprocess.py --dataset=./coco --bin=pre_data ``` - 参数说明: @@ -142,7 +121,7 @@ UniFormer 提出了一种整合 3D 卷积和时空自注意力机制的 Transfor 运行pytorch2onnx.py脚本。 ``` - python UniFormer/pose_estimation/tools/pytorch2onnx.py \ + python3 UniFormer/pose_estimation/tools/pytorch2onnx.py \ UniFormer/pose_estimation/exp/top_down_256x192_global_base/config.py \ ./top_down_256x192_global_base.pth \ --output-file ./uniformer_dybs.onnx @@ -209,7 +188,7 @@ UniFormer 提出了一种整合 3D 卷积和时空自注意力机制的 Transfor 2. 执行推理。 ``` - python -m ais_bench --model=uniformer_bs${bs}.om --input=./pre_data --output=./ --output_dirname=./result --batchsize=${batch_size} + python3 -m ais_bench --model=uniformer_bs${bs}.om --input=./pre_data --output=./ --output_dirname=./result --batchsize=${batch_size} ``` - 参数说明: @@ -227,7 +206,7 @@ UniFormer 提出了一种整合 3D 卷积和时空自注意力机制的 Transfor 调用脚本uniformer_postprocess.py ``` - python uniformer_postprocess.py --dataset=coco --bin=result + python3 uniformer_postprocess.py --dataset=coco --bin=result ``` - 参数说明: @@ -242,7 +221,7 @@ UniFormer 提出了一种整合 3D 卷积和时空自注意力机制的 Transfor 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python -m ais_bench --model=uniformer_bs${bs}.om --loop=100 --batchsize=${batch_size} + python3 -m ais_bench --model=uniformer_bs${bs}.om --loop=100 --batchsize=${batch_size} ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/cv/pose_estimation/VideoPose3D/README.md b/ACL_PyTorch/contrib/cv/pose_estimation/VideoPose3D/README.md index 9ff9969087..6487766b31 100755 --- a/ACL_PyTorch/contrib/cv/pose_estimation/VideoPose3D/README.md +++ b/ACL_PyTorch/contrib/cv/pose_estimation/VideoPose3D/README.md @@ -1,7 +1,6 @@ # VideoPose3D 模型推理指导 - [概述](#概述) -- [推理环境](#推理环境) - [快速上手](#快速上手) - [获取源码](#获取源码) - [准备数据集](#准备数据集) @@ -41,19 +40,6 @@ VideoPose3D 是一个基于时间维度上膨胀卷积的高效全卷积网络 注:输入、输出数据的格式中,第一位N=2,是因为VideoPose3D在推理阶段采取了test-time data augmentation。它的数据是人体姿态,因此正向推理一遍,左右镜像后再推理一遍。将两遍结果融合后,得到最终结果,因此N=2,因为它表示正、反两组数据。 --- -# 推理环境 - -- 该模型离线推理使用 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 | - | - ---- - # 快速上手 ## 获取源码 @@ -66,7 +52,7 @@ VideoPose3D 是一个基于时间维度上膨胀卷积的高效全卷积网络 2. 执行以下命令安装所需的依赖 ```shell - pip install -r requirements.txt + pip3 install -r requirements.txt ``` 3. 克隆开源仓并修改源码 @@ -107,7 +93,7 @@ VideoPose3D 是一个基于时间维度上膨胀卷积的高效全卷积网络 2. 数据预处理 运行数据预处理脚本,将原始数据转换为符合模型输入要求的bin文件。 ```shell - python vp3d_preprocess.py -d vp3d/Human3.6M/ -s vp3d/prep_dataset/ + python3 vp3d_preprocess.py -d vp3d/Human3.6M/ -s vp3d/prep_dataset/ ``` 参数说明: + -d, --dataset: 原始数据验证集(.npz)所在路径。 @@ -124,7 +110,7 @@ VideoPose3D 是一个基于时间维度上膨胀卷积的高效全卷积网络 step2 导出 .onnx 文件 ``` - python vp3d_pth2onnx.py -m vp3d/model_best.bin -o vp3d/vp3d.onnx + python3 vp3d_pth2onnx.py -m vp3d/model_best.bin -o vp3d/vp3d.onnx ``` 参数说明: + -m, --model: 预训练权重所在路径 @@ -213,7 +199,7 @@ VideoPose3D 是一个基于时间维度上膨胀卷积的高效全卷积网络 执行后处理脚本,根据推理结果与 groudtruth 计算 OM 模型的准确率: ```shell - python vp3d_postprocess.py --preprocess-data vp3d/prep_dataset --infer-results vp3d/infer_results/2022_09_25-07_41_01/ + python3 vp3d_postprocess.py --preprocess-data vp3d/prep_dataset --infer-results vp3d/infer_results/2022_09_25-07_41_01/ ``` 参数说明: diff --git a/ACL_PyTorch/contrib/cv/quality_enhancement/ADNet/README.md b/ACL_PyTorch/contrib/cv/quality_enhancement/ADNet/README.md index 42826f0023..c263883922 100644 --- a/ACL_PyTorch/contrib/cv/quality_enhancement/ADNet/README.md +++ b/ACL_PyTorch/contrib/cv/quality_enhancement/ADNet/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -63,22 +61,6 @@ | -------- | -------- | ------------------------- | ------------ | | output1 | FLOAT32 | batchsize x 1 x 321 x 481 | NCHW | - - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| :------------------------------------------------------------: | :-------: | :------------------------------------------------------------: | -| 固件与驱动 | 1.0.16 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 5.1.RC2 | - | -| Python | 3.7.5 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/cv/quality_enhancement/SRGAN/README.md b/ACL_PyTorch/contrib/cv/quality_enhancement/SRGAN/README.md index fd9fb32e26..b1f64b6ad9 100644 --- a/ACL_PyTorch/contrib/cv/quality_enhancement/SRGAN/README.md +++ b/ACL_PyTorch/contrib/cv/quality_enhancement/SRGAN/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -52,23 +48,6 @@ | -------- | -------- | -------- | ------------ | | output | FLOAT32 | batchsize x 3 x 280 x 280 | NCHW | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/cv/segmentation/3D_HRNet/README.md b/ACL_PyTorch/contrib/cv/segmentation/3D_HRNet/README.md index 3ad6febf0c..214c94faa7 100644 --- a/ACL_PyTorch/contrib/cv/segmentation/3D_HRNet/README.md +++ b/ACL_PyTorch/contrib/cv/segmentation/3D_HRNet/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -44,20 +42,6 @@ | output1 | batch_size x 19 x 256 x 512 | FLOAT32 | NCHW | | output2 | batch_size x 19 x 256 x 512 | FLOAT32 | NCHW | -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 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.0+ | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 -- Gitee