English|中文
This repository provides a script and recipe to Inference of the Resnet50v1.5 model.
This sample only provides reference for you to learn the Ascend software stack and is not for commercial purposes.
Before starting, please pay attention to the following adaptation conditions. If they do not match, may leading in failure.
Conditions | Need |
---|---|
CANN Version | >=5.0.3 |
Chip Platform | Ascend310/Ascend310P3 |
3rd Party Requirements | Please follow the 'requirements.txt' |
git clone https://gitee.com/ascend/ModelZoo-TensorFlow.git
cd Modelzoo-TensorFlow/ACL_TensorFlow/built-in/cv/Resnet50v1.5_for_ACL
Download the ImageNet2012 Validation dataset by yourself. You can get the validation pictures(50000 JPEGS and a ILSVRC2012val-label-index.txt)
Put JPEGS to 'scripts/ILSVRC2012val' and label text to 'scripts/'
Images Preprocess:
cd scripts
mkdir input_bins
python3 resnet50v15_preprocessing.py ./ILSVRC2012val/ ./input_bins/
The jpegs pictures will be preprocessed to bin fils.
Convert pb to om.
configure the env
Please follow the guide to set the envs
convert pb to om
atc --model=resnet50v15_tf.pb --framework=3 --output=resnet50v15_tf_1batch --output_type=FP32 --soc_version=Ascend310 --input_shape="input_tensor:1,224,224,3" --insert_op_conf=resnet50v15_aipp.cfg --enable_small_channel=1 --log=info
Build the program
bash build.sh
Run the program:
cd scripts
bash benchmark_tf.sh
Our result was obtained by running the applicable inference script. To achieve the same results, follow the steps in the Quick Start Guide.
model | data | Top1/Top5 |
---|---|---|
offline Inference | 50000 images | 76.5 %/ 93.1% |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。