13 Star 61 Fork 279

Ascend/ModelZoo-TensorFlow

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

English|中文

SegdecNet Inference for Tensorflow

This repository provides a script and recipe to Inference of the SegdecNet model.

Notice

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'

Quick Start Guide

1. Clone the respository

git clone https://gitee.com/ascend/ModelZoo-TensorFlow.git
cd Modelzoo-TensorFlow/ACL_TensorFlow/contrib/cv/SegdecNet_for_ACL

2. Download and preprocess the dataset

  1. Download the KolektorSDD Validation dataset by yourself.

  2. You should split the dataset into three folds to perform 3-fold cross validation.split

  3. Images Preprocess:

cd scripts
bash run_preprocess.sh

The images bin files is stored in output/images/ The labels bin files is stored in output/labels/

3. Offline Inference

Convert pb to om.

  • configure the env

    Please follow the guide to set the envs

  • convert pb to om

    pb download link

    atc --model=./output/SEGDEC-NET_tf.pb --framework=3 --output=./output/SEGDEC-NET_tf --output_type=FP32 --soc_version=Ascend310 --input_shape="images:1,1408,512,1" --log=info
    
  • Build the program

    cd ../
    bash build.sh
    
  • Run the program:

    cd scripts
    bash benchmark_tf.sh
    
  • Postprocess:

    bash run_postprocess.sh
    

Performance

Result

Our result was obtained by running the applicable inference script. To achieve the same results, follow the steps in the Quick Start Guide.

Inference accuracy results

model AP of CPU AP of NPU
SegdecNet 0.9536 0.9528

Reference

[1] https://github.com/skokec/segdec-net-jim2019

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ascend/ModelZoo-TensorFlow.git
git@gitee.com:ascend/ModelZoo-TensorFlow.git
ascend
ModelZoo-TensorFlow
ModelZoo-TensorFlow
master

Search