模型贡献至Open model zoo(3)

模型贡献至Open model zoo(3)

3.mobilemnet-yolo-syg.md

文件作用

说明文档,作用同README
(1)Use Case and High-Level Description
与model.yml的description相同
(2)Conversion(未用)
检测:命令参考
保存模型的目录名:model-mobilenet-yolo
下载权重:
wget -O weights/mobilenet-yolo-syg.h5 XXXX
-O:下载并以指定的文件名保存
21-34下载转换所需补丁并转换
模型转换成TF:
python3 keras_to_tensorflow-master/keras_to_tensorflow.py --input_model=“weights/mobilenet-yolo-syg.h5” –
output_model=“weights/mobilenet-yolo-syg.pb”
(3)Specification

Metric Value
Type Detection
GFLOPs 65.984
MParams 61.922
Source framework Keras*

GFLOPs:24525195
MParams:12181862

Keras|TF计算模型的MParams参数量
操作
在train.py中主函数中
在这里插入图片描述
计算参数量
计算参数量

操作
修改yolo.py后运行yolo_image.py出现报告结束后ctrl+C
opts1 = tf.profiler.ProfileOptionBuilder.float_operation()# We use the Keras session graph in the call to the profiler.
FLOPs = tf.profiler.profile(graph=K.get_session().graph,
run_meta=run_meta, cmd=‘op’, options=opts1)
opts2 =
tf.profiler.ProfileOptionBuilder.trainable_variables_parameter()Params =
tf.profiler.profile(graph=K.get_session().graph,
run_meta=run_meta, cmd=‘op’, options=opts2)Y
print(“model FLOPs result is as follow:…”)print(FLOPs.total_float_ops)# Prints the “FLOPs” of the model.
print(“model Params result is as follow:…”)print(Params.total_parameters)# Prints the “Params” of the model
在这里插入图片描述

3.Accuracy

Metric Value
mAP 35.38%
COCO* mAP (0.5) 75.36%

通过accuracy chcker计算所得

4.Input

Original model

  • B - batch size
  • H - height
  • W - width
  • C - channel
    Channel order is RGB.
    Scale value - 255.
    输入图像通道的确定

Converted model

  • B - batch size
  • H - height
  • W - width
  • C - channel
    Channel order is BGR.

5.Output

Original model
method1
netron查看pb文件查找

result
name - separable_conv2d_22, shape - 1,52,52,42
12,16, 19,36, 40,28
name - separable_conv2d_30, shape - 1,26,26,42
36,75, 76,55, 72,146
name - separable_conv2d_38, shape - 1,13,13,42
3个输出层名字,同accuracy-checkl.yml中outputs一样。
shape和原模型pb输出一样,但注意调整channel顺序。
detection box的形式参考yolov3和模型代码
name - separable_conv2d_30/BiasAdd/YoloRegion,
shape - 1,42,26,26. The anchor values are 36,75, 76,55, 72,146.
separable_conv2d_38/BiasAdd/YoloRegion
shape - 1,42,13,13. The anchor values are 142,110, 192,243, 459,401

6.Legal Information

The original model is distributed under the following
license1:
license2:

猜你喜欢

转载自blog.csdn.net/m0_57273938/article/details/125371656