From 6c47194e6e54635ac187eda44687e23b206261f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=90=AA?= <956513066@qq.com> Date: Mon, 7 Nov 2022 08:08:30 +0000 Subject: [PATCH 1/9] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20ACL=5FTensorF?= =?UTF-8?q?low/contrib/cv/edsr=20=E4=B8=BA=20ACL=5FTensorFlow/contrib/cv/e?= =?UTF-8?q?dsr=5Ffor=5FACL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contrib/cv/{edsr => edsr_for_ACL}/.keep | 0 .../contrib/cv/{edsr => edsr_for_ACL}/README.md | 0 .../contrib/cv/{edsr => edsr_for_ACL}/ckpt2pb.py | 0 .../contrib/cv/{edsr => edsr_for_ACL}/edsr.py | 0 .../contrib/cv/{edsr => edsr_for_ACL}/run.py | 0 .../contrib/cv/{edsr => edsr_for_ACL}/testpic.bin | Bin 6 files changed, 0 insertions(+), 0 deletions(-) rename ACL_TensorFlow/contrib/cv/{edsr => edsr_for_ACL}/.keep (100%) rename ACL_TensorFlow/contrib/cv/{edsr => edsr_for_ACL}/README.md (100%) rename ACL_TensorFlow/contrib/cv/{edsr => edsr_for_ACL}/ckpt2pb.py (100%) rename ACL_TensorFlow/contrib/cv/{edsr => edsr_for_ACL}/edsr.py (100%) rename ACL_TensorFlow/contrib/cv/{edsr => edsr_for_ACL}/run.py (100%) rename ACL_TensorFlow/contrib/cv/{edsr => edsr_for_ACL}/testpic.bin (100%) diff --git a/ACL_TensorFlow/contrib/cv/edsr/.keep b/ACL_TensorFlow/contrib/cv/edsr_for_ACL/.keep similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr/.keep rename to ACL_TensorFlow/contrib/cv/edsr_for_ACL/.keep diff --git a/ACL_TensorFlow/contrib/cv/edsr/README.md b/ACL_TensorFlow/contrib/cv/edsr_for_ACL/README.md similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr/README.md rename to ACL_TensorFlow/contrib/cv/edsr_for_ACL/README.md diff --git a/ACL_TensorFlow/contrib/cv/edsr/ckpt2pb.py b/ACL_TensorFlow/contrib/cv/edsr_for_ACL/ckpt2pb.py similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr/ckpt2pb.py rename to ACL_TensorFlow/contrib/cv/edsr_for_ACL/ckpt2pb.py diff --git a/ACL_TensorFlow/contrib/cv/edsr/edsr.py b/ACL_TensorFlow/contrib/cv/edsr_for_ACL/edsr.py similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr/edsr.py rename to ACL_TensorFlow/contrib/cv/edsr_for_ACL/edsr.py diff --git a/ACL_TensorFlow/contrib/cv/edsr/run.py b/ACL_TensorFlow/contrib/cv/edsr_for_ACL/run.py similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr/run.py rename to ACL_TensorFlow/contrib/cv/edsr_for_ACL/run.py diff --git a/ACL_TensorFlow/contrib/cv/edsr/testpic.bin b/ACL_TensorFlow/contrib/cv/edsr_for_ACL/testpic.bin similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr/testpic.bin rename to ACL_TensorFlow/contrib/cv/edsr_for_ACL/testpic.bin -- Gitee From e78f5f992578a2fc3a0ee40eb9fd0d22f623c3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=90=AA?= <956513066@qq.com> Date: Mon, 7 Nov 2022 08:09:22 +0000 Subject: [PATCH 2/9] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20ACL=5FTensorF?= =?UTF-8?q?low/contrib/cv/mnasnet=20=E4=B8=BA=20ACL=5FTensorFlow/contrib/c?= =?UTF-8?q?v/MnasNet=5Ffor=5FACL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contrib/cv/{mnasnet => MnasNet_for_ACL}/.keep | 0 .../cv/{mnasnet => MnasNet_for_ACL}/README.md | 0 .../cv/{mnasnet => MnasNet_for_ACL}/ckpt2pb.py | 0 .../contrib/cv/{mnasnet => MnasNet_for_ACL}/pic.bin | Bin 4 files changed, 0 insertions(+), 0 deletions(-) rename ACL_TensorFlow/contrib/cv/{mnasnet => MnasNet_for_ACL}/.keep (100%) rename ACL_TensorFlow/contrib/cv/{mnasnet => MnasNet_for_ACL}/README.md (100%) rename ACL_TensorFlow/contrib/cv/{mnasnet => MnasNet_for_ACL}/ckpt2pb.py (100%) rename ACL_TensorFlow/contrib/cv/{mnasnet => MnasNet_for_ACL}/pic.bin (100%) diff --git a/ACL_TensorFlow/contrib/cv/mnasnet/.keep b/ACL_TensorFlow/contrib/cv/MnasNet_for_ACL/.keep similarity index 100% rename from ACL_TensorFlow/contrib/cv/mnasnet/.keep rename to ACL_TensorFlow/contrib/cv/MnasNet_for_ACL/.keep diff --git a/ACL_TensorFlow/contrib/cv/mnasnet/README.md b/ACL_TensorFlow/contrib/cv/MnasNet_for_ACL/README.md similarity index 100% rename from ACL_TensorFlow/contrib/cv/mnasnet/README.md rename to ACL_TensorFlow/contrib/cv/MnasNet_for_ACL/README.md diff --git a/ACL_TensorFlow/contrib/cv/mnasnet/ckpt2pb.py b/ACL_TensorFlow/contrib/cv/MnasNet_for_ACL/ckpt2pb.py similarity index 100% rename from ACL_TensorFlow/contrib/cv/mnasnet/ckpt2pb.py rename to ACL_TensorFlow/contrib/cv/MnasNet_for_ACL/ckpt2pb.py diff --git a/ACL_TensorFlow/contrib/cv/mnasnet/pic.bin b/ACL_TensorFlow/contrib/cv/MnasNet_for_ACL/pic.bin similarity index 100% rename from ACL_TensorFlow/contrib/cv/mnasnet/pic.bin rename to ACL_TensorFlow/contrib/cv/MnasNet_for_ACL/pic.bin -- Gitee From e0512e5d68e83a479f8e73f906ffe0cb97f812d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=90=AA?= <956513066@qq.com> Date: Mon, 7 Nov 2022 08:10:01 +0000 Subject: [PATCH 3/9] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20ACL=5FTensorF?= =?UTF-8?q?low/contrib/cv/edsr=5Ffor=5FACL=20=E4=B8=BA=20ACL=5FTensorFlow/?= =?UTF-8?q?contrib/cv/EDSR=5Ffor=5FACL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contrib/cv/{edsr_for_ACL => EDSR_for_ACL}/.keep | 0 .../cv/{edsr_for_ACL => EDSR_for_ACL}/README.md | 0 .../cv/{edsr_for_ACL => EDSR_for_ACL}/ckpt2pb.py | 0 .../cv/{edsr_for_ACL => EDSR_for_ACL}/edsr.py | 0 .../cv/{edsr_for_ACL => EDSR_for_ACL}/run.py | 0 .../cv/{edsr_for_ACL => EDSR_for_ACL}/testpic.bin | Bin 6 files changed, 0 insertions(+), 0 deletions(-) rename ACL_TensorFlow/contrib/cv/{edsr_for_ACL => EDSR_for_ACL}/.keep (100%) rename ACL_TensorFlow/contrib/cv/{edsr_for_ACL => EDSR_for_ACL}/README.md (100%) rename ACL_TensorFlow/contrib/cv/{edsr_for_ACL => EDSR_for_ACL}/ckpt2pb.py (100%) rename ACL_TensorFlow/contrib/cv/{edsr_for_ACL => EDSR_for_ACL}/edsr.py (100%) rename ACL_TensorFlow/contrib/cv/{edsr_for_ACL => EDSR_for_ACL}/run.py (100%) rename ACL_TensorFlow/contrib/cv/{edsr_for_ACL => EDSR_for_ACL}/testpic.bin (100%) diff --git a/ACL_TensorFlow/contrib/cv/edsr_for_ACL/.keep b/ACL_TensorFlow/contrib/cv/EDSR_for_ACL/.keep similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr_for_ACL/.keep rename to ACL_TensorFlow/contrib/cv/EDSR_for_ACL/.keep diff --git a/ACL_TensorFlow/contrib/cv/edsr_for_ACL/README.md b/ACL_TensorFlow/contrib/cv/EDSR_for_ACL/README.md similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr_for_ACL/README.md rename to ACL_TensorFlow/contrib/cv/EDSR_for_ACL/README.md diff --git a/ACL_TensorFlow/contrib/cv/edsr_for_ACL/ckpt2pb.py b/ACL_TensorFlow/contrib/cv/EDSR_for_ACL/ckpt2pb.py similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr_for_ACL/ckpt2pb.py rename to ACL_TensorFlow/contrib/cv/EDSR_for_ACL/ckpt2pb.py diff --git a/ACL_TensorFlow/contrib/cv/edsr_for_ACL/edsr.py b/ACL_TensorFlow/contrib/cv/EDSR_for_ACL/edsr.py similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr_for_ACL/edsr.py rename to ACL_TensorFlow/contrib/cv/EDSR_for_ACL/edsr.py diff --git a/ACL_TensorFlow/contrib/cv/edsr_for_ACL/run.py b/ACL_TensorFlow/contrib/cv/EDSR_for_ACL/run.py similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr_for_ACL/run.py rename to ACL_TensorFlow/contrib/cv/EDSR_for_ACL/run.py diff --git a/ACL_TensorFlow/contrib/cv/edsr_for_ACL/testpic.bin b/ACL_TensorFlow/contrib/cv/EDSR_for_ACL/testpic.bin similarity index 100% rename from ACL_TensorFlow/contrib/cv/edsr_for_ACL/testpic.bin rename to ACL_TensorFlow/contrib/cv/EDSR_for_ACL/testpic.bin -- Gitee From d0f48d282734fef5b24e6555e68963b981bd4c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=90=AA?= <956513066@qq.com> Date: Mon, 7 Nov 2022 08:11:40 +0000 Subject: [PATCH 4/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=20Fpointnet=5Ffor=5FA?= =?UTF-8?q?CL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/.keep diff --git a/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/.keep b/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 5d5298d88a01c4a476e1e26fd620522347e3d82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=90=AA?= <956513066@qq.com> Date: Mon, 7 Nov 2022 08:12:56 +0000 Subject: [PATCH 5/9] add ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张安琪 <956513066@qq.com> --- .../contrib/cv/ Fpointnet_for_ACL/README.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md diff --git a/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md b/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md new file mode 100644 index 000000000..1c5f74376 --- /dev/null +++ b/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md @@ -0,0 +1,89 @@ +# ATC EDSR + + +- references: + + ["Enhanced Deep Residual Networks for Single Image Super-Resolution"](https://arxiv.org/abs/1707.02921) + + +- training model: + + [EDSR_ID1263_for_TensorFlow](https://gitee.com/ascend/ModelZoo-TensorFlow/tree/master/TensorFlow/contrib/cv/EDSR_ID1263_for_TensorFlow) + + +# 1. ckpt to pb + +download **ckpt** and use **ckpt2pb.py** process ckpt to pb. + + **Note** :Before the model transformation, the **run.py** and **edsr.py** files in the training code need to be replaced with those in the current directory. + +[ckpt](https://pan.baidu.com/s/17vlOrwXbygdce8l8OHErCA) +Password:x0j4 + +# 2. pb to om +Command: +``` +atc --model=./edsr.pb --framework=3 --input_shape="LR:1,48,48,3" --output=./edsr --soc_version=Ascend310 +``` +[Pb](https://pan.baidu.com/s/1vxU_Q3qorOlPvDJYQ9tTsw) +Password:1wbo + +[OM](https://pan.baidu.com/s/1QeQSRdckigMAbBRnXooRJA) +Password:djqe + +# 3. compile msame +Reference to https://gitee.com/ascend/tools/tree/master/msame, compile **msame** + +Compile msame command: +```bash +. /home/HwHiAiUser/Ascend/ascend-toolkit/set_env.sh +export DDK_PATH=/home/HwHiAiUser/Ascend/ascend-toolkit/latest +export NPU_HOST_LIB=/home/HwHiAiUser/Ascend/ascend-toolkit/latest/runtime/lib64/stub +cd $HOME/AscendProjects/tools/msame/ +./build.sh g++ $HOME/AscendProjects/tools/msame/out + +``` + +# 4. inference +Inference command: +```bash +cd $HOME/AscendProjects/tools/msame/out +model_path=/home/HwHiAiUser/AscendProjects/EDSR/edsr.om +input_path=/home/HwHiAiUser/AscendProjects/EDSR/testpic.bin +output_path=/home/HwHiAiUser/AscendProjects/EDSR/output +./msame --model ${model_path} --input ${input_path} --output ${output_path} --outfmt TXT +``` + + + +Part of **Inference sys output**: +```bash +[INFO] acl init success +[INFO] open device 0 success +[INFO] create context success +[INFO] create stream success +[INFO] get run mode success +[INFO] load model ./edsr.om success +[INFO] create model description success +[INFO] get input dynamic gear count success +[INFO] create model output success +./output/2022113_15_10_1_472972 +[INFO] start to process file:./testpic.bin +[INFO] model execute success +Inference time: 20.962ms +[INFO] get max dynamic batch size success +[INFO] output data success +Inference average time: 20.962000 ms +[INFO] destroy model input success +[INFO] unload model success, model Id is 1 +[INFO] Execute sample success +[INFO] end to destroy stream +[INFO] end to destroy context +[INFO] end to reset device is 0 +[INFO] end to finalize acl +``` +[Inference Result](https://pan.baidu.com/s/1PrIrKap_V0C_qe_bLNC7bA) +Password:y2ic + + + -- Gitee From 0ffc58d7170043f6ab2acc3b8aa2c95359b97fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=90=AA?= <956513066@qq.com> Date: Mon, 7 Nov 2022 08:17:18 +0000 Subject: [PATCH 6/9] update ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张安琪 <956513066@qq.com> --- .../contrib/cv/ Fpointnet_for_ACL/README.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md b/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md index 1c5f74376..ea2fff180 100644 --- a/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md +++ b/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md @@ -3,27 +3,25 @@ - references: - ["Enhanced Deep Residual Networks for Single Image Super-Resolution"](https://arxiv.org/abs/1707.02921) + ["Frustum PointNets for 3D Object Detection from RGB-D Data"](https://arxiv.org/pdf/1711.08488.pdf) - training model: - [EDSR_ID1263_for_TensorFlow](https://gitee.com/ascend/ModelZoo-TensorFlow/tree/master/TensorFlow/contrib/cv/EDSR_ID1263_for_TensorFlow) + [Fpointnet_ID1470_for_TensorfFow](https://gitee.com/ascend/ModelZoo-TensorFlow/tree/master/TensorFlow/contrib/cv/Fpointnet_ID1470_for_TensorfFow) # 1. ckpt to pb download **ckpt** and use **ckpt2pb.py** process ckpt to pb. - **Note** :Before the model transformation, the **run.py** and **edsr.py** files in the training code need to be replaced with those in the current directory. - [ckpt](https://pan.baidu.com/s/17vlOrwXbygdce8l8OHErCA) Password:x0j4 # 2. pb to om Command: ``` -atc --model=./edsr.pb --framework=3 --input_shape="LR:1,48,48,3" --output=./edsr --soc_version=Ascend310 +atc --input_shape="Placeholder:32,1024,4;Placeholder_1:32,3;Placeholder_3:32,3;Placeholder_9:32,512,2" --input_format=ND --output="fpointnet" --soc_version=Ascend310 --framework=3 --model="./fpointnet.pb" --log=info ``` [Pb](https://pan.baidu.com/s/1vxU_Q3qorOlPvDJYQ9tTsw) Password:1wbo @@ -48,10 +46,9 @@ cd $HOME/AscendProjects/tools/msame/ Inference command: ```bash cd $HOME/AscendProjects/tools/msame/out -model_path=/home/HwHiAiUser/AscendProjects/EDSR/edsr.om -input_path=/home/HwHiAiUser/AscendProjects/EDSR/testpic.bin -output_path=/home/HwHiAiUser/AscendProjects/EDSR/output -./msame --model ${model_path} --input ${input_path} --output ${output_path} --outfmt TXT +model_path=/home/HwHiAiUser/AscendProjects/Fpointnet/fpointnet.om +output_path=/home/HwHiAiUser/AscendProjects/Fpointnet/output +./msame --model ${model_path} --output ${output_path} ``` -- Gitee From aa23253189a459c7151ded0d17d1fb8021b58454 Mon Sep 17 00:00:00 2001 From: zhang-anqi11 <956513066@qq.com> Date: Mon, 7 Nov 2022 16:28:50 +0800 Subject: [PATCH 7/9] new --- .../.keep | 0 .../README.md | 0 .../contrib/cv/Fpointnet_for_ACL/ckpt2pb.py | 58 +++++++++++++++++++ 3 files changed, 58 insertions(+) rename ACL_TensorFlow/contrib/cv/{ Fpointnet_for_ACL => Fpointnet_for_ACL}/.keep (100%) rename ACL_TensorFlow/contrib/cv/{ Fpointnet_for_ACL => Fpointnet_for_ACL}/README.md (100%) create mode 100644 ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/ckpt2pb.py diff --git a/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/.keep b/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/.keep similarity index 100% rename from ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/.keep rename to ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/.keep diff --git a/ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md b/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md similarity index 100% rename from ACL_TensorFlow/contrib/cv/ Fpointnet_for_ACL/README.md rename to ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md diff --git a/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/ckpt2pb.py b/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/ckpt2pb.py new file mode 100644 index 000000000..cb9e16699 --- /dev/null +++ b/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/ckpt2pb.py @@ -0,0 +1,58 @@ +import tensorflow as tf +from tensorflow.python.framework import graph_util +from tensorflow.core.protobuf.rewriter_config_pb2 import RewriterConfig + +tf.compat.v1.disable_eager_execution() + +def freeze_graph(input_checkpoint,output_graph): + + # 指定输出的节点名称,该节点名称必须是原模型中存在的节点 + output_node_names = "Squeeze_1,add_2" + saver = tf.train.import_meta_graph(input_checkpoint + '.meta', clear_devices=True) + + with tf.Session() as sess: + saver.restore(sess, input_checkpoint) #恢复图并得到数据 + graph_def = tf.get_default_graph().as_graph_def(add_shapes=True) + node_list = [n.name for n in graph_def.node] + for node in node_list: + print("node_name", node) + + for node in graph_def.node: + if node.op == 'Placeholder' and node.name == 'Placeholder_8': + print(node) + node.op = 'Const' + node.attr["value"].CopyFrom(tf.AttrValue(tensor=tf.make_tensor_proto(False, tf.bool))) + del node.attr['shape'] + + if node.op == 'PyFunc' and node.name == 'PyFunc': + print(node) + node.op = 'Placeholder' + node.name = 'Placeholder_9' + shape = tf.TensorShape([32,None,2]) + node.attr["shape"].CopyFrom(tf.AttrValue(shape=shape.as_proto())) + dtype = tf.dtypes.as_dtype("int32") + node.attr["dtype"].CopyFrom(tf.AttrValue(type=dtype.as_datatype_enum)) + node.input.remove('Squeeze_1') + del node.attr['Tin'] + del node.attr['Tout'] + del node.attr['token'] + del node.attr['_output_shapes'] + print(node) + + if node.op == 'GatherNd' and node.name == 'GatherNd': + node.input.remove('PyFunc') + node.input.append('Placeholder_9') + print(node) + + output_graph_def = graph_util.convert_variables_to_constants( # 模型持久化,将变量值固定 + sess=sess, + input_graph_def=graph_def,# 等于:sess.graph_def + output_node_names=output_node_names.split(","))# 如果有多个输出节点,以逗号隔开 + + with tf.gfile.GFile(output_graph, "wb") as f: #保存模型 + f.write(output_graph_def.SerializeToString()) #序列化输出 + print("%d ops in the final graph." % len(output_graph_def.node)) #得到当前图有几个操作节点 + +input_checkpoint='./model.ckpt' +out_pb_path='fpointnet.pb' +freeze_graph(input_checkpoint, out_pb_path) -- Gitee From 43a50c3f6f702dcec4f49acdfe576554061f6794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=90=AA?= <956513066@qq.com> Date: Mon, 7 Nov 2022 08:30:40 +0000 Subject: [PATCH 8/9] update ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张安琪 <956513066@qq.com> --- ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md b/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md index ea2fff180..7eefb4ea2 100644 --- a/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md +++ b/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md @@ -15,8 +15,8 @@ download **ckpt** and use **ckpt2pb.py** process ckpt to pb. -[ckpt](https://pan.baidu.com/s/17vlOrwXbygdce8l8OHErCA) -Password:x0j4 +[ckpt](https://pan.baidu.com/s/1U7qJ4cYOokd8cRAmeezxHg) +Password:ms1m # 2. pb to om Command: -- Gitee From c09247aa20cbc6d6c1990a709685e509c47b16cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=90=AA?= <956513066@qq.com> Date: Mon, 7 Nov 2022 08:40:03 +0000 Subject: [PATCH 9/9] update ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张安琪 <956513066@qq.com> --- .../contrib/cv/Fpointnet_for_ACL/README.md | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md b/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md index 7eefb4ea2..e62c8792e 100644 --- a/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md +++ b/ACL_TensorFlow/contrib/cv/Fpointnet_for_ACL/README.md @@ -1,4 +1,4 @@ -# ATC EDSR +# ATC Fpointnet - references: @@ -23,11 +23,11 @@ Command: ``` atc --input_shape="Placeholder:32,1024,4;Placeholder_1:32,3;Placeholder_3:32,3;Placeholder_9:32,512,2" --input_format=ND --output="fpointnet" --soc_version=Ascend310 --framework=3 --model="./fpointnet.pb" --log=info ``` -[Pb](https://pan.baidu.com/s/1vxU_Q3qorOlPvDJYQ9tTsw) -Password:1wbo +[Pb](https://pan.baidu.com/s/1UzZkdb_1rkEOdNwWx50JFw) +Password:z8ml -[OM](https://pan.baidu.com/s/1QeQSRdckigMAbBRnXooRJA) -Password:djqe +[OM](https://pan.baidu.com/s/1Q-GDPUCVJ6-ZyuC7Xp_QEw) +Password:zzls # 3. compile msame Reference to https://gitee.com/ascend/tools/tree/master/msame, compile **msame** @@ -47,7 +47,7 @@ Inference command: ```bash cd $HOME/AscendProjects/tools/msame/out model_path=/home/HwHiAiUser/AscendProjects/Fpointnet/fpointnet.om -output_path=/home/HwHiAiUser/AscendProjects/Fpointnet/output +output_path=/home/HwHiAiUser/AscendProjects/Fpointnet ./msame --model ${model_path} --output ${output_path} ``` @@ -60,17 +60,16 @@ Part of **Inference sys output**: [INFO] create context success [INFO] create stream success [INFO] get run mode success -[INFO] load model ./edsr.om success +[INFO] load model ./fpointnet.om success [INFO] create model description success [INFO] get input dynamic gear count success [INFO] create model output success -./output/2022113_15_10_1_472972 -[INFO] start to process file:./testpic.bin +.//2022117_16_37_5_559775 [INFO] model execute success -Inference time: 20.962ms +Inference time: 29.151ms [INFO] get max dynamic batch size success [INFO] output data success -Inference average time: 20.962000 ms +Inference average time: 29.151000 ms [INFO] destroy model input success [INFO] unload model success, model Id is 1 [INFO] Execute sample success @@ -79,8 +78,7 @@ Inference average time: 20.962000 ms [INFO] end to reset device is 0 [INFO] end to finalize acl ``` -[Inference Result](https://pan.baidu.com/s/1PrIrKap_V0C_qe_bLNC7bA) -Password:y2ic + -- Gitee