diff --git a/ACL_PyTorch/built-in/audio/CosyVoice/README.md b/ACL_PyTorch/built-in/audio/CosyVoice/README.md index 1265ca94a6cfd5b81ee5c1eeddf6f5d5857a61c5..a835df476aabf8b45e127e17631346270688118b 100755 --- a/ACL_PyTorch/built-in/audio/CosyVoice/README.md +++ b/ACL_PyTorch/built-in/audio/CosyVoice/README.md @@ -39,6 +39,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/audio/CosyVoice + ``` 1. 获取`PyTorch`源码 ``` diff --git a/ACL_PyTorch/built-in/audio/Paraformer/README.md b/ACL_PyTorch/built-in/audio/Paraformer/README.md index 4808977d0010cfacfa671c466c47555deda1e200..e7c0d7b618436d03fb707c5e746ce696ce0ea2d2 100644 --- a/ACL_PyTorch/built-in/audio/Paraformer/README.md +++ b/ACL_PyTorch/built-in/audio/Paraformer/README.md @@ -36,10 +36,16 @@ Paraformer是阿里达摩院语音团队提出的一种高效的非自回归端 # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/audio/Paraformer + ``` 1. 安装依赖 ```bash - pip3 install -r ../requirements.txt + pip3 install -r requirements.txt ``` 2. 获取模型仓源码 diff --git a/ACL_PyTorch/built-in/audio/SenseVoice/README_onnx.md b/ACL_PyTorch/built-in/audio/SenseVoice/README_onnx.md index 7d73bdc26757965f4be139a8d3b813622c7b8884..0ec56a6047623be7822a57fc26d073364edf105d 100755 --- a/ACL_PyTorch/built-in/audio/SenseVoice/README_onnx.md +++ b/ACL_PyTorch/built-in/audio/SenseVoice/README_onnx.md @@ -40,6 +40,12 @@ SenseVoice作为一款专注于高精度多语言语音识别的模型,其独 # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/audio/SenseVoice + ``` 1. 获取`Pytorch`源码 ``` @@ -94,7 +100,7 @@ source /usr/local/Ascend/ascend-toolkit/set_env.sh ``` -atc --framework=5 --soc_version=${soc_version} --model ./SenseVoiceSmall/model_md.onnx --output SenseVoice --input_shape="speech:1,-1,560;speech_lengths:1;language:1;textnorm:1" +atc --framework=5 --soc_version=Ascend${soc_version} --model ./SenseVoiceSmall/model_md.onnx --output SenseVoice --input_shape="speech:1,-1,560;speech_lengths:1;language:1;textnorm:1" ``` 在当前目录下生成动态模型SenseVoice_{arch}.om diff --git a/ACL_PyTorch/built-in/cv/FCENet_for_PyTorch/readme.md b/ACL_PyTorch/built-in/cv/FCENet_for_PyTorch/readme.md index 64b7196534c63c183b8bbc960bd52b5e1112cf08..22b91e6c32351807d82be61157e8b2a7c45939a4 100644 --- a/ACL_PyTorch/built-in/cv/FCENet_for_PyTorch/readme.md +++ b/ACL_PyTorch/built-in/cv/FCENet_for_PyTorch/readme.md @@ -77,7 +77,7 @@ FCENet,使用傅里叶变换来得到文本的包围框,该方法在弯曲 ## 准备数据集 1. 获取原始数据集 - 本模型需要icdar2015数据集,数据集请参考开源代码仓方式获取。获取icdar2015数据集,放到mmocr的data文件夹内,放置顺序如下。 + 本模型需要icdar2015数据集,数据集请参考开源代码仓方式获取。获取icdar2015数据集,新建mmocr/data路径并将数据集放到该路径内内,放置顺序如下。 ``` ├── icdar2015 │ ├── imgs @@ -104,7 +104,7 @@ FCENet,使用傅里叶变换来得到文本的包围框,该方法在弯曲 然后执行执行以下命令生成 ONNX 模型: ```bash - python3 ./pytorch2onnx.py + python3 ./pytorch2onnx.py \ ./mmocr/configs/textdet/fcenet/fcenet_r50_fpn_1500e_icdar2015.py \ ./fcenet_r50_fpn_1500e_icdar2015_20211022-daefb6ed.pth \ det \ @@ -172,7 +172,7 @@ FCENet,使用傅里叶变换来得到文本的包围框,该方法在弯曲 该离线模型使用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 python3 -m ais_bench \ - --model ./fcenet_bs${batch_size} \ + --model ./fcenet_bs${batch_size}.om \ --input ./preprocessed_imgs/ \ --output ./result \ --outfmt TXT \ @@ -192,7 +192,7 @@ FCENet,使用傅里叶变换来得到文本的包围框,该方法在弯曲 + 为了避免测试过程因持续时间太长而受到干扰,建议通过纯推理的方式进行性能测试。 + 使用吞吐率作为性能指标,单位为 fps,反映模型在单位时间(1秒)内处理的样本数。 ```bash - python3 -m ais_bench --model ./fcenet_bs${batch_size} --batchsize ${batch_size} + python3 -m ais_bench --model ./fcenet_bs${batch_size}.om --batchsize ${batch_size} ``` 执行完纯推理命令,程序会打印出与性能相关的指标,找到以关键字 **[INFO] throughput** 开头的一行,行尾的数字即为 OM 模型的吞吐率。 diff --git a/ACL_PyTorch/built-in/cv/GLIP/README.md b/ACL_PyTorch/built-in/cv/GLIP/README.md index 9ac213ab4fd3c09a55094df627f119728e11db27..a450f968771df99d9f1c3f45e243e42e98300d51 100644 --- a/ACL_PyTorch/built-in/cv/GLIP/README.md +++ b/ACL_PyTorch/built-in/cv/GLIP/README.md @@ -71,6 +71,13 @@ CLIP和ALIGN在大规模图像-文本对上进行跨模态对比学习,可以 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/cv/GLIP + ``` + 1. 获取源码。 ``` @@ -83,7 +90,7 @@ CLIP和ALIGN在大规模图像-文本对上进行跨模态对比学习,可以 2. 安装依赖。 ``` - pip3 install -r requirements.txt + pip3 install -r requirement.txt ``` 3. 打补丁。 diff --git a/ACL_PyTorch/built-in/cv/GLIP/requirement.txt b/ACL_PyTorch/built-in/cv/GLIP/requirement.txt index cfe91108dbe48650960781fbe54e7e1a28499dbe..15874dc5b65c7445bc0daf067275a39a9e35eaca 100644 --- a/ACL_PyTorch/built-in/cv/GLIP/requirement.txt +++ b/ACL_PyTorch/built-in/cv/GLIP/requirement.txt @@ -1,7 +1,7 @@ onnx torch==1.13.1 tqdm==4.62.3 -pycocotools==2.07 +pycocotools==2.0.7 pyacl==1.0.0 torchvision==0.14.1 timm==0.6.13 diff --git a/ACL_PyTorch/built-in/cv/GroundingDINO/README.md b/ACL_PyTorch/built-in/cv/GroundingDINO/README.md index 89260cab1f0ee4e77d767a460b635f256feb815d..a912428a95bfe0ad2d3ccf6d66a7c7f4b74722d7 100644 --- a/ACL_PyTorch/built-in/cv/GroundingDINO/README.md +++ b/ACL_PyTorch/built-in/cv/GroundingDINO/README.md @@ -39,6 +39,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/cv/GroundingDINO + ``` 1. 获取开源模型源码 ``` diff --git a/ACL_PyTorch/built-in/cv/InternImage_detection_for_Pytorch/README.md b/ACL_PyTorch/built-in/cv/InternImage_detection_for_Pytorch/README.md index 0247c4740800caff2131f641e16ed10a43b75a35..c88ab9d58949a2af018ae37a4c94c1a5d2fba43f 100755 --- a/ACL_PyTorch/built-in/cv/InternImage_detection_for_Pytorch/README.md +++ b/ACL_PyTorch/built-in/cv/InternImage_detection_for_Pytorch/README.md @@ -65,7 +65,7 @@ InternImage使用公共数据集COCO进行推理 2. 获取模型仓**InternImage**源码和依赖仓**mmdet**源码 ``` - git clone https://github.com/open-mmlab/mmdet.git + git clone https://github.com/open-mmlab/mmdetection.git git clone https://github.com/OpenGVLab/InternImage.git cd mmdetection git reset --hard cfd5d3a985b0249de009b67d04f37263e11cdf3d diff --git a/ACL_PyTorch/built-in/cv/InternImage_detection_for_Pytorch/requirement.txt b/ACL_PyTorch/built-in/cv/InternImage_detection_for_Pytorch/requirement.txt index 8ddcce8ef92d9e6830cfc1a0dda4ce152c7da7e1..bd2ca640411410c43cd6799fe3a23aa6996ea328 100755 --- a/ACL_PyTorch/built-in/cv/InternImage_detection_for_Pytorch/requirement.txt +++ b/ACL_PyTorch/built-in/cv/InternImage_detection_for_Pytorch/requirement.txt @@ -4,7 +4,6 @@ tqdm torchvision==0.13.0 mmcv==2.1.0 timm==0.6.11 -mmdet==3.0.0 mmengine==0.10.6 opencv-python termcolor diff --git a/ACL_PyTorch/built-in/cv/MGN_for_Pytorch/README.md b/ACL_PyTorch/built-in/cv/MGN_for_Pytorch/README.md index 51831211ed6d45d92fd3aaaccbe2f172c6c8fb30..324b4a37e82a1089de191efaae0878d4abb3bbb6 100644 --- a/ACL_PyTorch/built-in/cv/MGN_for_Pytorch/README.md +++ b/ACL_PyTorch/built-in/cv/MGN_for_Pytorch/README.md @@ -60,11 +60,16 @@ MGN网络是一种多分支深度网络架构的特征识别网络,由一个 # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/cv/MGN_for_Pytorch + ``` 1. 获取源码。 ``` - cd ./ReId-MGN-master git clone https://github.com/GNAYUOHZ/ReID-MGN.git ./MGN patch -R MGN/data.py < module.patch ``` diff --git a/ACL_PyTorch/built-in/cv/MuseTalk/README.md b/ACL_PyTorch/built-in/cv/MuseTalk/README.md index 61f16295c2ccd76652bd52e0f0f391aff7bbad80..9f813493bb48716540b6a03e6f1a99857e4d43a9 100644 --- a/ACL_PyTorch/built-in/cv/MuseTalk/README.md +++ b/ACL_PyTorch/built-in/cv/MuseTalk/README.md @@ -35,6 +35,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/cv/MuseTalk + ``` 1. 获取开源模型源码 ``` diff --git a/ACL_PyTorch/built-in/cv/SAM/README.md b/ACL_PyTorch/built-in/cv/SAM/README.md index 56d5fb23ab44398f5952e1d2fe4ae7bebc2cc354..d5a94032a98abad8629cd155eb34bce764a1d543 100644 --- a/ACL_PyTorch/built-in/cv/SAM/README.md +++ b/ACL_PyTorch/built-in/cv/SAM/README.md @@ -73,6 +73,8 @@ SAM 首先会自动分割图像中的所有内容,但是如果你需要分割 ### 3.1 获取源码 ``` +git clone https://gitee.com/ascend/ModelZoo-PyTorch.git +cd ModelZoo-PyTorch/ACL_PyTorch/built-in/cv/SAM git clone https://github.com/facebookresearch/segment-anything.git cd segment-anything git reset --hard 6fdee8f2727f4506cfbbe553e23b895e27956588 diff --git a/ACL_PyTorch/built-in/cv/ViTDet_for_Pytorch/README.md b/ACL_PyTorch/built-in/cv/ViTDet_for_Pytorch/README.md index a96e7e5c495facbb12c2cf6c6f6f6baa10c9fd19..5a3c36024fd4371bdd0fc5feacc281e2459569e9 100755 --- a/ACL_PyTorch/built-in/cv/ViTDet_for_Pytorch/README.md +++ b/ACL_PyTorch/built-in/cv/ViTDet_for_Pytorch/README.md @@ -83,9 +83,9 @@ ViTDet使用公共数据集COCO进行推理 3. 转移文件位置 ``` - mv mmengine.patch mmengine/mmengine/ - mv mmdet.patch mmdetection/mmdet/ - mv infer.py mmdetection/ + cp mmengine.patch mmengine/mmengine/ + cp mmdet.patch mmdetection/ + cp infer.py mmdetection/ ``` 4. 更换当前路径并打补丁,修改完mmseg源码后进行安装 diff --git a/ACL_PyTorch/built-in/embedding/bge-m3/README.md b/ACL_PyTorch/built-in/embedding/bge-m3/README.md index e139c5ebc24b4ec09405a81a80ee9a52ace5aa6b..6290df26b85ccddc55cff1988101ce1f060187c6 100644 --- a/ACL_PyTorch/built-in/embedding/bge-m3/README.md +++ b/ACL_PyTorch/built-in/embedding/bge-m3/README.md @@ -29,6 +29,13 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/embedding/bge-m + ``` + 1. 获取开源模型源码和权重(可选) > 如果您的设备可以方便的直接从hugging-hub下载权重和代码,则不需要执行这一步 ``` diff --git a/ACL_PyTorch/built-in/embedding/bge-reranker-v2-m3/README.md b/ACL_PyTorch/built-in/embedding/bge-reranker-v2-m3/README.md index e554011c5a544b14d0785b104228d8ab2a020d00..c215e5ceb8c8c53464ae9a227a3fed448a5ca386 100644 --- a/ACL_PyTorch/built-in/embedding/bge-reranker-v2-m3/README.md +++ b/ACL_PyTorch/built-in/embedding/bge-reranker-v2-m3/README.md @@ -29,6 +29,13 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/embedding/bge-reranker-v2-m3 + ``` + 1. 获取开源模型源码和权重(可选) > 如果您的设备可以方便的直接从hugging-hub下载权重和代码,则不需要执行这一步 ``` diff --git a/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-code/README.md b/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-code/README.md index 2a4d24e7f85cde62f91dadbc68e97c9ee34f87a3..a36416d312e58be3f8c7b6a1f5371d76d48945d0 100644 --- a/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-code/README.md +++ b/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-code/README.md @@ -38,6 +38,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-code + ``` 1. 获取开源模型源码和权重(可选) > 如果您的设备可以方便的直接从hugging-hub下载权重和代码,则不需要执行这一步 diff --git a/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-zh/README.md b/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-zh/README.md index 0e91701736fb333e23ffd9503738186b639aacd0..ccd3826fc5891318b062039da2cc37d5e51c1b79 100644 --- a/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-zh/README.md +++ b/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-zh/README.md @@ -38,6 +38,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/embedding/jina-embeddings-v2-base-zh + ``` 1. 获取开源模型源码和权重(可选) > 如果您的设备可以方便的直接从hugging-hub下载权重和代码,则不需要执行这一步 diff --git a/ACL_PyTorch/built-in/foundation_models/Chinese_CLIP/README.md b/ACL_PyTorch/built-in/foundation_models/Chinese_CLIP/README.md index 6de0c186b416979b60371aafdcb591ff5f2d8096..05538e637e92fe25ea2cae5f062aff0f8ee41384 100644 --- a/ACL_PyTorch/built-in/foundation_models/Chinese_CLIP/README.md +++ b/ACL_PyTorch/built-in/foundation_models/Chinese_CLIP/README.md @@ -73,7 +73,7 @@ Chinese_CLIP为CLIP模型的中文版本,使用大规模中文数据进行训 ```shell git clone https://gitee.com/ascend/ModelZoo-PyTorch.git - cd ModelZoo-PyTorch/ACL_PyTorch/built-in/foundation/Chinese-CLIP + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/foundation_models/Chinese_CLIP ``` 2. 获取第三方源码。 diff --git a/ACL_PyTorch/built-in/foundation_models/DiT/README.md b/ACL_PyTorch/built-in/foundation_models/DiT/README.md index 2850b7f8bd0786945a3d7ba4fac1e5b476bc0137..aa230fd5a787e67affc997328ae79e59f652666e 100644 --- a/ACL_PyTorch/built-in/foundation_models/DiT/README.md +++ b/ACL_PyTorch/built-in/foundation_models/DiT/README.md @@ -71,6 +71,12 @@ latent_size = image_size // 8 # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/foundation_models/DiT + ``` 1. 获取源码。 diff --git a/ACL_PyTorch/built-in/foundation_models/stable_diffusion/README.md b/ACL_PyTorch/built-in/foundation_models/stable_diffusion/README.md index e8f2fb832a1109174c5d8b68653cb72000255992..7b4f7d78e0531df5dd0fd7b355516049dcbc299e 100755 --- a/ACL_PyTorch/built-in/foundation_models/stable_diffusion/README.md +++ b/ACL_PyTorch/built-in/foundation_models/stable_diffusion/README.md @@ -62,6 +62,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/foundation_models/stable_diffusion + ``` 1. 安装依赖。 ```bash diff --git a/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl/README.md b/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl/README.md index 9ba1da8313b7c12577527fe3f78310e87aaddd02..c0c6356c4cda98d5afec19a9c6dc2b21e93d3813 100644 --- a/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl/README.md +++ b/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl/README.md @@ -60,6 +60,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl + ``` 1. 安装依赖。 ```bash diff --git a/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl_refiner/README.md b/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl_refiner/README.md index 960633a6d10415260e64f92e3e46d6fa7c2ed429..a9bd9eed5f5e620372fd56478af4d26e769eaafe 100644 --- a/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl_refiner/README.md +++ b/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl_refiner/README.md @@ -58,6 +58,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/built-in/foundation_models/stable_diffusionxl_refiner + ``` 1. 安装依赖。 ```bash diff --git a/ACL_PyTorch/contrib/audio/wav2lip_ID100400/README.md b/ACL_PyTorch/contrib/audio/wav2lip_ID100400/README.md index 3211007e1ce0390283dd63e795cf11e0663278fa..bfe51c10d1841c6e1d0946686c7f7d1568e4a813 100644 --- a/ACL_PyTorch/contrib/audio/wav2lip_ID100400/README.md +++ b/ACL_PyTorch/contrib/audio/wav2lip_ID100400/README.md @@ -68,6 +68,12 @@ # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/contrib/audio/wav2lip_ID100400 + ``` 1. 获取源码。 @@ -142,17 +148,17 @@ 1. 获取权重文件。 - [wav2lip模型预训练pth权重文件](https://iiitaphyd-my.sharepoint.com/:u:/g/personal/radrabha_m_research_iiit_ac_in/Eb3LEzbfuKlJiR600lQWRxgBIY27JZg80f7V9jtMfbNDaQ?e=TBFBVW),将获取的权重文件放在当前工作路径下。 + [wav2lip模型预训练pth权重文件](https://huggingface.co/numz/wav2lip_studio/blob/main/Wav2lip/wav2lip.pth),将获取的权重文件放在当前工作路径下。 2. 导出onnx文件。 - 1. 使用pth2onnx.py脚本。 + 1. 使用wav2lip_pth2onnx.py脚本。 - 运行pth2onnx.py脚本。 + 运行wav2lip_pth2onnx.py脚本。 ``` batch_size=72 - python3 pth2onnx.py --checkpoint_path ./wav2lip.pth --onnx_dir ./ -batch_size ${batch_size} + python3 wav2lip_pth2onnx.py --checkpoint_path ./wav2lip.pth --onnx_dir ./ --batch_size ${batch_size} ``` 获得wav2lip.onnx文件。 @@ -186,7 +192,7 @@ 3. 执行ATC命令。 ``` - atc --model=./wav2lip_bs72.onnx --framework=5 --output=./wav2lip_bs72--input_format=ND --input_shape="input1:72,1,80,16;input2:72,6,96,96" --log=debug --soc_version=Ascend${chip_name} + atc --model=./wav2lip_bs72.onnx --framework=5 --output=./wav2lip_bs72 --input_format=ND --input_shape="input1:72,1,80,16;input2:72,6,96,96" --log=debug --soc_version=Ascend${chip_name} ``` - 参数说明: @@ -231,7 +237,7 @@ 调用wav2lip_postprocess.py脚本合成完整视频的文件。 ``` - python3 wav2lip_postprocess.py --om_pred mels_0.bin --frames ./inputs/frames.bin --coords ./inputs/coords.bin --outfile ./results/result_voice.mp4 --audio ./testdata/audio.mp3 + python3 wav2lip_postprocess.py --om_pred ${om_output_path} --frames ./inputs/frames.bin --coords ./inputs/coords.bin --outfile ./results/result_voice.mp4 --audio ./testdata/audio.mp3 ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/cv/detection/FCENet/readme.md b/ACL_PyTorch/contrib/cv/detection/FCENet/readme.md index a5307dee69af2d108a89a39f9956339ac40db0e0..b5ca284160423fad30bed2dc28b3362672aa9459 100644 --- a/ACL_PyTorch/contrib/cv/detection/FCENet/readme.md +++ b/ACL_PyTorch/contrib/cv/detection/FCENet/readme.md @@ -58,6 +58,12 @@ FCENet,使用傅里叶变换来得到文本的包围框,该方法在弯曲 # 快速上手 ## 安装 +- 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/contrib/cv/detection/FCENet + ``` - 安装推理过程所需的依赖 ```bash diff --git a/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd/README.md b/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd/README.md index 848f3daa9215ec8d157ab6d886e11a4b7996f645..4879cc843635887c83cbdc4be5db8b6dd97db81c 100644 --- a/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd/README.md +++ b/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd/README.md @@ -64,6 +64,12 @@ PSENet([Shape Robust Text Detection with Progressive Scale Expansion Network](ht # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd + ``` 1. 获取源码。 @@ -89,12 +95,12 @@ PSENet([Shape Robust Text Detection with Progressive Scale Expansion Network](ht 1. 获取原始数据集。(解压命令参考tar –xvf \*.tar与 unzip \*.zip) - IICDAR 2015 数据集包含1000张训练图像和500张测试图像。参考PaddleOCR数据集数据处理方式,ICDAR 2015 数据集可以点击链接进行下载,本模型需下载Test Set Images(43.3MB)。 + ICDAR 2015 数据集包含1000张训练图像和500张测试图像。参考PaddleOCR数据集数据处理方式,ICDAR 2015 数据集可以点击[链接](https://aistudio.baidu.com/datasetdetail/46088)进行下载,本模型需下载Test Set Images(43.3MB)。 将数据集`ch4_test_images.zip`放在工作目录下,通过以下命令创建`train_data/icdar2015/ch4_test_images`路径,并通过以下命令进行解压保存并获取标签文件。 ``` mkdir -p ./train_data/icdar2015/ch4_test_images/ - unzip -d ./train_data/icdar2015/ch4_test_images/ ch4_test_images.zip + unzip -d ch4_test_images.zip ./train_data/icdar2015/ch4_test_images/ wget -P ./train_data/icdar2015/ https://paddleocr.bj.bcebos.com/dataset/test_icdar2015_label.txt ``` @@ -166,7 +172,7 @@ PSENet([Shape Robust Text Detection with Progressive Scale Expansion Network](ht 运行后获得PSENet_ResNet50_vd_dybs.onnx文件。 2. 优化onnx模型。 - 请访问[auto-optimizer优化工具](https://gitee.com/ascend/msadvisor/tree/master/auto-optimizer)代码仓,根据readme文档进行工具安装。 + 请访问[auto-optimizer优化工具](https://gitee.com/ascend/msit/blob/master/msit/README.md)代码仓,根据readme文档进行benchmark和surgeon工具安装。 运行modify_onnx.py脚本优化onnx模型,优化点为:Resize算子按Paddle定义参数导出的onnx模型有精度问题,因此将按PyTorch定义重新构造Resize参数。 diff --git a/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd/requirements.txt b/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd/requirements.txt index 40499b7911b8157de446c2f3ba453deb7c1eade5..04c3268a5fdf005792b243898f24d1f9197175c3 100644 --- a/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd/requirements.txt +++ b/ACL_PyTorch/contrib/cv/detection/PSENet_ResNet50_vd/requirements.txt @@ -19,4 +19,6 @@ lxml premailer openpyxl attrdict -sympy \ No newline at end of file +sympy +onnxsim +protobuf==3.20.3 \ No newline at end of file diff --git a/ACL_PyTorch/contrib/cv/image_retrieval/BLIP/readme.md b/ACL_PyTorch/contrib/cv/image_retrieval/BLIP/readme.md index b002bfde7f2cf44016baec1a814dd5f952909221..2e0e9cb47cdaa5ffb8506697446cf3df7a3db57c 100644 --- a/ACL_PyTorch/contrib/cv/image_retrieval/BLIP/readme.md +++ b/ACL_PyTorch/contrib/cv/image_retrieval/BLIP/readme.md @@ -109,6 +109,12 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 # 快速上手 ## 获取源码 +1. 获取本仓源码 + + ``` + git clone https://gitee.com/ascend/ModelZoo-PyTorch.git + cd ModelZoo-PyTorch/ACL_PyTorch/contrib/cv/image_retrieval/BLIP + ``` 1. 获取源码。 @@ -173,7 +179,7 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 1. 获取权重文件。 - 训练权重链接为:https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_base_retrieval_coco.pth。 + 训练权重链接为:https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_base_retrieval_coco.pth 在`BLIP`工作目录下可通过以下命令获取训练权重并转为推理模型。 @@ -248,7 +254,7 @@ BLIP模型为一种新的Vision-Language Pre-training框架,它可以灵活地 --input_format=ND \ --input_shape="text_ids:${batchsize},35;text_atten_mask:${batchsize},35" \ --log=error \ - --soc_version=Ascend${chip_name} + --soc_version=Ascend${chip_name} \ --op_precision_mode=op_precision.ini ```