From 8a7b85ec24f155e5ccba5b696a7bd7151e21f99b Mon Sep 17 00:00:00 2001 From: jiangzhenguang Date: Wed, 24 Feb 2021 16:10:58 +0800 Subject: [PATCH] amend deeplabv3 export.py --- model_zoo/official/cv/deeplabv3/README.md | 2 +- model_zoo/official/cv/deeplabv3/README_CN.md | 2 +- model_zoo/official/cv/deeplabv3/export.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/model_zoo/official/cv/deeplabv3/README.md b/model_zoo/official/cv/deeplabv3/README.md index bbd9949b83d..1f253a10472 100644 --- a/model_zoo/official/cv/deeplabv3/README.md +++ b/model_zoo/official/cv/deeplabv3/README.md @@ -496,7 +496,7 @@ Note: There OS is output stride, and MS is multiscale. | Loss Function | Softmax Cross Entropy | | Outputs | probability | | Loss | 0.0065883575 | -| Speed | 60 ms/step(1pc, s16)
480 ms/step(8pcs, s16)
244 ms/step (8pcs, s8) | +| Speed | 60 fps(1pc, s16)
480 fps(8pcs, s16)
244 fps (8pcs, s8) | | Total time | 8pcs: 706 mins | | Parameters (M) | 58.2 | | Checkpoint for Fine tuning | 443M (.ckpt file) | diff --git a/model_zoo/official/cv/deeplabv3/README_CN.md b/model_zoo/official/cv/deeplabv3/README_CN.md index 4a2c52c54fd..a5e221a7ed3 100644 --- a/model_zoo/official/cv/deeplabv3/README_CN.md +++ b/model_zoo/official/cv/deeplabv3/README_CN.md @@ -510,7 +510,7 @@ python ${train_code_path}/eval.py --data_root=/PATH/TO/DATA \ | 损失函数 | Softmax交叉熵 | | 输出 | 概率 | | 损失 | 0.0065883575 | -| 速度 | 31毫秒/步(单卡,s8)
234毫秒/步(8卡,s8) | +| 速度 | 31 帧数/秒(单卡,s8)
234 帧数/秒(8卡,s8) | | 微调检查点 | 443M (.ckpt文件) | | 脚本 | [链接](https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/deeplabv3) | diff --git a/model_zoo/official/cv/deeplabv3/export.py b/model_zoo/official/cv/deeplabv3/export.py index 7bbbf772397..d194546d876 100644 --- a/model_zoo/official/cv/deeplabv3/export.py +++ b/model_zoo/official/cv/deeplabv3/export.py @@ -17,7 +17,7 @@ import argparse import numpy as np from mindspore import Tensor, context, load_checkpoint, load_param_into_net, export - +from eval import BuildEvalNetwork from src.nets import net_factory parser = argparse.ArgumentParser(description='checkpoint export') @@ -43,6 +43,7 @@ if __name__ == '__main__': network = net_factory.nets_map['deeplab_v3_s16']('eval', args.num_classes, 16, True) else: network = net_factory.nets_map['deeplab_v3_s8']('eval', args.num_classes, 8, True) + network = BuildEvalNetwork(network) param_dict = load_checkpoint(args.ckpt_file) # load the parameter into net