地平线 AI 芯片工具链 - 02 快速开始
1. 前提条件2. 转换模型2.1 检验模型2.2 准备校准数据集2.3 编译 runtime 模型
3. 精度测试
1. 前提条件
地平线 AI 芯片工具链 - 01 配置安装
2. 转换模型
此处以 docker 版本工具链 …/horizon_x3_tc_1.1.19e/samples/04_detection/01_yolov2 为样例来说明
2.1 检验模型
将 x3-toolchain-1.1.19e.tar.gz 解压至 docker 挂载目录 horizon_x3_tc_1.1.19e ,并进入对应样例路径
执行 sh 01_check.sh 检验模型
hjw@ubuntu:~/x3_tc_1.1.19e$
export version
=1.1.19e
hjw@ubuntu:~/x3_tc_1.1.19e$ docker run -it --rm -v
`pwd`/data:/data/horizon_x3/data -v
`pwd`/horizon_x3_tc_
${version}:/horizon_x3_tc docker.hobot.cc/aitools/horizon_x3_tc:
${version}
[root@269cc9580aae /
]
[root@269cc9580aae /
]
[root@269cc9580aae mapper
]
01_check.sh 05_evaluate.sh data_transformer.py yolov2_config.yaml
02_preprocess.sh coco_classes.names inference.py
03_build.sh coco_evaluate.py README.cn.md
04_inference.sh coco_metric.py utils.py
[root@269cc9580aae mapper
]
[root@269cc9580aae mapper
]
cd $(dirname $0)
model_type
="caffe"
proto
="../../../01_common/modelzoo/mapper/detection/yolov2/yolov2.prototxt"
caffe_model
="../../../01_common/modelzoo/mapper/detection/yolov2/yolov2.caffemodel"
output
="./yolov2_checker.log"
hb_mapper checker --model-type
${model_type} \
--proto
${proto} --model
${caffe_model} \
--output
${output}
2021-01-05 19:57:45,081 INFO Start hb_mapper
....
2021-01-05 19:57:45,081 INFO hb_mapper version 1.1.35
2021-01-05 19:57:45,335 INFO Model type: caffe
2021-01-05 19:57:45,335 INFO output file: ./yolov2_checker.log
2021-01-05 19:57:45,335 INFO input names
[]
2021-01-05 19:57:45,335 INFO input shapes
{}
2021-01-05 19:57:45,336 INFO Begin model checking
....
2021-01-05 19:57:45,336 INFO
[Tue Jan 5 19:57:45 2021
] Start to Horizon NN Model Convert.
2021-01-05 19:57:45,336 INFO The input parameter is not specified, convert with default parameters.
2021-01-05 19:57:45,336 INFO The hbdk parameter is not specified, and the submodel will be compiled with the default parameter.
2021-01-05 19:57:45,336 INFO HorizonNN version: 0.8.4
2021-01-05 19:57:45,337 INFO HBDK version: 3.14.2
2021-01-05 19:57:45,337 INFO
[Tue Jan 5 19:57:45 2021
] Start to parse the caffe model.
2021-01-05 19:57:47,333 INFO Find 1 inputs
in the model:
2021-01-05 19:57:47,334 INFO Got input
'data' with shape
[1, 3, 608, 608
].
2021-01-05 19:58:00,198 INFO
[Tue Jan 5 19:58:00 2021
] End to parse the caffe model.
2021-01-05 19:58:00,199 INFO Model input names:
['data']
2021-01-05 19:58:00,434 INFO Saving the original float model: ./.hb_check/original_float_model.onnx.
2021-01-05 19:58:00,434 INFO
[Tue Jan 5 19:58:00 2021
] Start to optimize the model.
2021-01-05 19:58:02,694 INFO
[Tue Jan 5 19:58:02 2021
] End to optimize the model.
2021-01-05 19:58:03,006 INFO Saving the optimized model: ./.hb_check/optimized_float_model.onnx.
2021-01-05 19:58:03,006 INFO
[Tue Jan 5 19:58:03 2021
] Start to calibrate the model.
2021-01-05 19:58:04,997 INFO
[Tue Jan 5 19:58:04 2021
] End to calibrate the model.
2021-01-05 19:58:05,004 INFO
[Tue Jan 5 19:58:05 2021
] Start to quantize the model.
2021-01-05 19:58:12,002 INFO
[Tue Jan 5 19:58:11 2021
] End to quantize the model.
2021-01-05 19:58:14,577 INFO Saving the quantized model: ./.hb_check/quantized_model.onnx.
2021-01-05 19:58:14,577 INFO
[Tue Jan 5 19:58:14 2021
] Start to compile the model with march bernoulli2.
2021-01-05 19:58:18,056 INFO Compile submodel: full_yolov2_subgraph_0
2021-01-05 19:58:23,773 INFO hbdk-cc parameters:
{'optimize-level': 'O0',
'input-layout': 'NHWC',
'output-layout': 'NCHW'}
[==================================================] 100%
2021-01-05 19:58:25,935 INFO
[Tue Jan 5 19:58:25 2021
] End to compile the model with march bernoulli2.
2021-01-05 19:58:25,942 INFO The converted model node information:
====================================================
Node ON Subgraph Type
----------------------------------------------------
layer1_conv BPU id
(0
) HzSQuantizedConv
layer1_act BPU id
(0
) HzLeakyRelu
layer2_maxpool BPU id
(0
) HzQuantizedMaxPool
layer3_conv BPU id
(0
) HzSQuantizedConv
layer3_act BPU id
(0
) HzLeakyRelu
layer4_maxpool BPU id
(0
) HzQuantizedMaxPool
layer5_conv BPU id
(0
) HzSQuantizedConv
layer5_act BPU id
(0
) HzLeakyRelu
layer6_conv BPU id
(0
) HzSQuantizedConv
layer6_act BPU id
(0
) HzLeakyRelu
layer7_conv BPU id
(0
) HzSQuantizedConv
layer7_act BPU id
(0
) HzLeakyRelu
layer8_maxpool BPU id
(0
) HzQuantizedMaxPool
layer9_conv BPU id
(0
) HzSQuantizedConv
layer9_act BPU id
(0
) HzLeakyRelu
layer10_conv BPU id
(0
) HzSQuantizedConv
layer10_act BPU id
(0
) HzLeakyRelu
layer11_conv BPU id
(0
) HzSQuantizedConv
layer11_act BPU id
(0
) HzLeakyRelu
layer12_maxpool BPU id
(0
) HzQuantizedMaxPool
layer13_conv BPU id
(0
) HzSQuantizedConv
layer13_act BPU id
(0
) HzLeakyRelu
layer14_conv BPU id
(0
) HzSQuantizedConv
layer14_act BPU id
(0
) HzLeakyRelu
layer15_conv BPU id
(0
) HzSQuantizedConv
layer15_act BPU id
(0
) HzLeakyRelu
layer16_conv BPU id
(0
) HzSQuantizedConv
layer16_act BPU id
(0
) HzLeakyRelu
layer17_conv BPU id
(0
) HzSQuantizedConv
layer17_act BPU id
(0
) HzLeakyRelu
layer18_maxpool BPU id
(0
) HzQuantizedMaxPool
layer19_conv BPU id
(0
) HzSQuantizedConv
layer19_act BPU id
(0
) HzLeakyRelu
layer20_conv BPU id
(0
) HzSQuantizedConv
layer20_act BPU id
(0
) HzLeakyRelu
layer21_conv BPU id
(0
) HzSQuantizedConv
layer21_act BPU id
(0
) HzLeakyRelu
layer22_conv BPU id
(0
) HzSQuantizedConv
layer22_act BPU id
(0
) HzLeakyRelu
layer23_conv BPU id
(0
) HzSQuantizedConv
layer23_act BPU id
(0
) HzLeakyRelu
layer24_conv BPU id
(0
) HzSQuantizedConv
layer24_act BPU id
(0
) HzLeakyRelu
layer25_conv BPU id
(0
) HzSQuantizedConv
layer25_act BPU id
(0
) HzLeakyRelu
layer27_conv BPU id
(0
) HzSQuantizedConv
layer27_act BPU id
(0
) HzLeakyRelu
layer28_reorg BPU id
(0
) HzSpaceToDepth
layer29_concat BPU id
(0
) Concat
layer30_conv BPU id
(0
) HzSQuantizedConv
layer30_act BPU id
(0
) HzLeakyRelu
layer31_conv BPU id
(0
) HzSQuantizedConv
2021-01-05 19:58:25,952 INFO
[Tue Jan 5 19:58:25 2021
] End to Horizon NN Model Convert.
2021-01-05 19:58:25,975 INFO model deps info empty
2021-01-05 19:58:26,051 INFO End model checking
....
[root@269cc9580aae mapper
]
2.2 准备校准数据集
coco 数据集
从 coco 2017 val images 数据集(5000张图片) 中抽取50张,将其放置于 data/coco/calibration_data 中将 coco 2017 val images 数据集(5000张图片) 放置于 data/coco/coco_val2017/images 中将 coco 2017 train/val annotations 数据集 中 instances_val2017.json 放置于 data/coco/coco_val2017/annotations
data ├── coco │ ├── calibration_data │ └── coco_val2017 │ ├── images │ └── annotations
执行 sh 02_preprocess.sh 预处理校准数据集
[root@269cc9580aae mapper
]
[root@269cc9580aae mapper
]
write:./calibration_data_rgbp/000000001818.rgbp
write:./calibration_data_rgbp/000000005037.rgbp
write:./calibration_data_rgbp/000000003156.rgbp
write:./calibration_data_rgbp/000000000632.rgbp
write:./calibration_data_rgbp/000000003501.rgbp
write:./calibration_data_rgbp/000000004495.rgbp
write:./calibration_data_rgbp/000000001532.rgbp
write:./calibration_data_rgbp/000000001425.rgbp
write:./calibration_data_rgbp/000000001268.rgbp
write:./calibration_data_rgbp/000000000724.rgbp
write:./calibration_data_rgbp/000000001503.rgbp
write:./calibration_data_rgbp/000000004134.rgbp
write:./calibration_data_rgbp/000000001353.rgbp
write:./calibration_data_rgbp/000000002006.rgbp
write:./calibration_data_rgbp/000000000885.rgbp
write:./calibration_data_rgbp/000000001490.rgbp
write:./calibration_data_rgbp/000000001675.rgbp
write:./calibration_data_rgbp/000000001993.rgbp
write:./calibration_data_rgbp/000000001296.rgbp
write:./calibration_data_rgbp/000000002532.rgbp
write:./calibration_data_rgbp/000000002592.rgbp
write:./calibration_data_rgbp/000000005060.rgbp
write:./calibration_data_rgbp/000000000285.rgbp
write:./calibration_data_rgbp/000000003661.rgbp
write:./calibration_data_rgbp/000000000776.rgbp
write:./calibration_data_rgbp/000000003845.rgbp
write:./calibration_data_rgbp/000000004395.rgbp
write:./calibration_data_rgbp/000000000802.rgbp
write:./calibration_data_rgbp/000000002923.rgbp
write:./calibration_data_rgbp/000000002149.rgbp
write:./calibration_data_rgbp/000000000785.rgbp
write:./calibration_data_rgbp/000000003553.rgbp
write:./calibration_data_rgbp/000000002299.rgbp
write:./calibration_data_rgbp/000000002157.rgbp
write:./calibration_data_rgbp/000000001584.rgbp
write:./calibration_data_rgbp/000000003255.rgbp
write:./calibration_data_rgbp/000000004765.rgbp
write:./calibration_data_rgbp/000000002685.rgbp
write:./calibration_data_rgbp/000000001000.rgbp
write:./calibration_data_rgbp/000000002261.rgbp
write:./calibration_data_rgbp/000000004795.rgbp
write:./calibration_data_rgbp/000000002431.rgbp
write:./calibration_data_rgbp/000000003934.rgbp
write:./calibration_data_rgbp/000000002473.rgbp
write:./calibration_data_rgbp/000000000139.rgbp
write:./calibration_data_rgbp/000000001761.rgbp
write:./calibration_data_rgbp/000000005001.rgbp
write:./calibration_data_rgbp/000000000872.rgbp
write:./calibration_data_rgbp/000000002587.rgbp
write:./calibration_data_rgbp/000000002153.rgbp
[root@269cc9580aae mapper
]
2.3 编译 runtime 模型
执行 sh 03_build.sh
[root@269cc9580aae mapper
]
[root@269cc9580aae mapper
]
cd $(dirname $0)
config_file
="./yolov2_config.yaml"
model_type
="caffe"
hb_mapper makertbin --config
${config_file} \
--model-type
${model_type}
2021-01-05 20:14:06,626 INFO Start hb_mapper
....
2021-01-05 20:14:06,627 INFO hb_mapper version 1.1.35
2021-01-05 20:14:06,878 INFO norm_types
[i
]: data_scale
2021-01-05 20:14:06,883 INFO Working dir: /horizon_x3_tc/horizon_x3_tc_1.1.19e/samples/04_detection/01_yolov2/mapper/model_output
2021-01-05 20:14:06,883 INFO Start Model Convert
....
2021-01-05 20:14:06,902 INFO call build params:
{'march': 'bernoulli2',
'debug_mode': False,
'save_model': True,
'name_prefix': 'yolov2',
'input_dict': {'data': {'input_shape': [1, 3, 608, 608
],
'expected_input_type': 'YUV444_128',
'original_input_type': 'RGB',
'scales': array
([0.00392157
], dtype
=float32
)}},
'cali_dict': {'calibration_type': 'max',
'calibration_loader': {'data': <horizon_nn.data.loader.TransformLoader object at 0x7f0673169e80
>},
'per_channel': False,
'max_percentile': 1.0
},
'hbdk_dict': {'compile_mode': 'latency',
'debug': False,
'optimize_level': 'O3',
'input_source': {'data': 'ddr'}},
'layer_dict': {'run_on_cpu': []}}
2021-01-05 20:14:06,913 INFO
[Tue Jan 5 20:14:06 2021
] Start to Horizon NN Model Convert.
2021-01-05 20:14:06,914 INFO Parsing the input parameter:
{'data': {'input_shape': [1, 3, 608, 608
],
'expected_input_type': 'YUV444_128',
'original_input_type': 'RGB',
'scales': array
([0.00392157
], dtype
=float32
)}}
2021-01-05 20:14:06,915 INFO Parsing the calibration parameter
2021-01-05 20:14:10,571 INFO Parsing the hbdk parameter:
{'compile_mode': 'latency',
'debug': False,
'optimize_level': 'O3',
'input_source': {'data': 'ddr'}}
2021-01-05 20:14:10,571 INFO HorizonNN version: 0.8.4
2021-01-05 20:14:10,571 INFO HBDK version: 3.14.2
2021-01-05 20:14:10,571 INFO
[Tue Jan 5 20:14:10 2021
] Start to parse the caffe model.
2021-01-05 20:14:11,073 INFO Find 1 inputs
in the model:
2021-01-05 20:14:11,073 INFO Got input
'data' with shape
[1, 3, 608, 608
].
2021-01-05 20:14:22,686 INFO
[Tue Jan 5 20:14:22 2021
] End to parse the caffe model.
2021-01-05 20:14:22,686 INFO Model input names:
['data']
2021-01-05 20:14:22,687 INFO Create a preprocessing operator
for input_name data with means
=None, std
=[254.99998492
], original_input_layout
=NCHW, color convert from
'RGB' to
'YUV_BT601_Full_Range'.
2021-01-05 20:14:23,432 INFO Saving the original float model: yolov2_original_float_model.onnx.
2021-01-05 20:14:23,432 INFO
[Tue Jan 5 20:14:23 2021
] Start to optimize the model.
2021-01-05 20:14:25,290 INFO
[Tue Jan 5 20:14:25 2021
] End to optimize the model.
2021-01-05 20:14:25,584 INFO Saving the optimized model: yolov2_optimized_float_model.onnx.
2021-01-05 20:14:25,585 INFO
[Tue Jan 5 20:14:25 2021
] Start to calibrate the model.
2021-01-05 20:14:28,446 INFO number of calibration data samples: 50
2021-01-05 20:14:29,722 INFO Run calibration model with max method.
2021-01-05 20:14:59,853 INFO
[Tue Jan 5 20:14:59 2021
] End to calibrate the model.
2021-01-05 20:14:59,870 INFO
[Tue Jan 5 20:14:59 2021
] Start to quantize the model.
2021-01-05 20:15:27,370 INFO
[Tue Jan 5 20:15:27 2021
] End to quantize the model.
2021-01-05 20:15:30,061 INFO Saving the quantized model: yolov2_quantized_model.onnx.
2021-01-05 20:15:30,062 INFO
[Tue Jan 5 20:15:30 2021
] Start to compile the model with march bernoulli2.
2021-01-05 20:15:33,542 INFO Compile submodel: full_yolov2_subgraph_0
2021-01-05 20:15:38,708 INFO hbdk-cc parameters:
{'optimize-level': 'O3',
'input-source': 'ddr',
'optimize-target': 'fast',
'input-layout': 'NHWC',
'output-layout': 'NCHW'}
[==================================================] 100%
2021-01-05 20:21:45,644 INFO
[Tue Jan 5 20:21:45 2021
] End to compile the model with march bernoulli2.
2021-01-05 20:21:45,654 INFO The converted model node information:
================================================================================================================
Node ON Subgraph Type Cosine Similarity Threshold
----------------------------------------------------------------------------------------------------------------
HZ_PREPROCESS_FOR_data BPU id
(0
) HzSQuantizedPreprocess 0.999904 127.000000
layer1_conv BPU id
(0
) HzSQuantizedConv 0.999957 1.000310
layer1_act BPU id
(0
) HzLeakyRelu 0.993816 38.727009
layer2_maxpool BPU id
(0
) HzQuantizedMaxPool 0.995494 38.727009
layer3_conv BPU id
(0
) HzSQuantizedConv 0.997018 38.727009
layer3_act BPU id
(0
) HzLeakyRelu 0.994916 33.580658
layer4_maxpool BPU id
(0
) HzQuantizedMaxPool 0.995335 33.580658
layer5_conv BPU id
(0
) HzSQuantizedConv 0.993110 33.580658
layer5_act BPU id
(0
) HzLeakyRelu 0.987786 22.527147
layer6_conv BPU id
(0
) HzSQuantizedConv 0.985274 22.527147
layer6_act BPU id
(0
) HzLeakyRelu 0.985933 22.644796
layer7_conv BPU id
(0
) HzSQuantizedConv 0.983193 22.644796
layer7_act BPU id
(0
) HzLeakyRelu 0.980228 22.220913
layer8_maxpool BPU id
(0
) HzQuantizedMaxPool 0.981524 22.220913
layer9_conv BPU id
(0
) HzSQuantizedConv 0.987644 22.220913
layer9_act BPU id
(0
) HzLeakyRelu 0.982711 18.648270
layer10_conv BPU id
(0
) HzSQuantizedConv 0.979838 18.648270
layer10_act BPU id
(0
) HzLeakyRelu 0.976971 26.217741
layer11_conv BPU id
(0
) HzSQuantizedConv 0.988161 26.217741
layer11_act BPU id
(0
) HzLeakyRelu 0.969465 24.669504
layer12_maxpool BPU id
(0
) HzQuantizedMaxPool 0.972906 24.669504
layer13_conv BPU id
(0
) HzSQuantizedConv 0.989212 24.669504
layer13_act BPU id
(0
) HzLeakyRelu 0.971055 25.214985
layer14_conv BPU id
(0
) HzSQuantizedConv 0.980438 25.214985
layer14_act BPU id
(0
) HzLeakyRelu 0.967223 48.604774
layer15_conv BPU id
(0
) HzSQuantizedConv 0.983990 48.604774
layer15_act BPU id
(0
) HzLeakyRelu 0.973406 23.097227
layer16_conv BPU id
(0
) HzSQuantizedConv 0.972314 23.097227
layer16_act BPU id
(0
) HzLeakyRelu 0.962230 30.672972
layer17_conv BPU id
(0
) HzSQuantizedConv 0.989551 30.672972
layer17_act BPU id
(0
) HzLeakyRelu 0.966523 17.830013
layer18_maxpool BPU id
(0
) HzQuantizedMaxPool 0.967287 17.830013
layer19_conv BPU id
(0
) HzSQuantizedConv 0.989564 17.830013
layer19_act BPU id
(0
) HzLeakyRelu 0.966291 19.672581
layer20_conv BPU id
(0
) HzSQuantizedConv 0.983017 19.672581
layer20_act BPU id
(0
) HzLeakyRelu 0.954309 44.510929
layer21_conv BPU id
(0
) HzSQuantizedConv 0.986802 44.510929
layer21_act BPU id
(0
) HzLeakyRelu 0.962350 19.806606
layer22_conv BPU id
(0
) HzSQuantizedConv 0.987774 19.806606
layer22_act BPU id
(0
) HzLeakyRelu 0.954916 40.297977
layer23_conv BPU id
(0
) HzSQuantizedConv 0.982765 40.297977
layer23_act BPU id
(0
) HzLeakyRelu 0.954036 102.635376
layer24_conv BPU id
(0
) HzSQuantizedConv 0.975377 102.635376
layer24_act BPU id
(0
) HzLeakyRelu 0.953382 20.620070
layer25_conv BPU id
(0
) HzSQuantizedConv 0.973774 20.620070
layer25_act BPU id
(0
) HzLeakyRelu 0.950670 21.336279
layer27_conv BPU id
(0
) HzSQuantizedConv 0.972409 17.830013
layer27_act BPU id
(0
) HzLeakyRelu 0.975326 21.336279
layer28_reorg BPU id
(0
) HzSpaceToDepth 0.975326 21.336279
layer29_concat BPU id
(0
) Concat 0.957121 21.336279
layer30_conv BPU id
(0
) HzSQuantizedConv 0.959965 21.336279
layer30_act BPU id
(0
) HzLeakyRelu 0.943919 17.508619
layer31_conv BPU id
(0
) HzSQuantizedConv 0.946703 17.508619
2021-01-05 20:21:45,655 INFO The quantify model output:
================================
Node CosineSimilarity
--------------------------------
layer31_conv 0.946703
2021-01-05 20:21:45,673 INFO
[Tue Jan 5 20:21:45 2021
] End to Horizon NN Model Convert.
2021-01-05 20:21:45,694 INFO start convert to *.bin file
....
2021-01-05 20:21:45,910 INFO
2021-01-05 20:21:45,910 INFO ----------- dependency info ------------
2021-01-05 20:21:45,910 INFO hbdk version: 3.14.2
2021-01-05 20:21:45,911 INFO hbdk runtime version: 3.9.9
2021-01-05 20:21:45,911 INFO horizon_nn version: 0.8.4
2021-01-05 20:21:45,911 INFO horizon rt version:
2021-01-05 20:21:45,911 INFO -------- model parameters info ---------
2021-01-05 20:21:45,911 INFO caffe_model: /horizon_x3_tc/horizon_x3_tc_1.1.19e/samples/01_common/modelzoo/mapper/detection/yolov2/yolov2.caffemodel
2021-01-05 20:21:45,911 INFO prototxt: /horizon_x3_tc/horizon_x3_tc_1.1.19e/samples/01_common/modelzoo/mapper/detection/yolov2/yolov2.prototxt
2021-01-05 20:21:45,911 INFO onnx_model:
2021-01-05 20:21:45,912 INFO layer_out_dump: False
2021-01-05 20:21:45,912 INFO output_layout: NHWC
2021-01-05 20:21:45,912 INFO -------- input_parameters info ---------
2021-01-05 20:21:45,912 INFO -------- input info
: data -------
2021-01-05 20:21:45,912 INFO --input_name
: data
2021-01-05 20:21:45,912 INFO --input_type_rt
: yuv444_128
2021-01-05 20:21:45,912 INFO --input_type_train
: rgbp
2021-01-05 20:21:45,913 INFO --norm_type
: data_scale
2021-01-05 20:21:45,913 INFO --input_shape
: 1x3x608x608
2021-01-05 20:21:45,913 INFO ----------------------------------
2021-01-05 20:21:45,913 INFO -------- calibration parameters info ---------
2021-01-05 20:21:45,913 INFO preprocess_on: False
2021-01-05 20:21:45,913 INFO calibration_type: max
2021-01-05 20:21:45,914 INFO per_channel: False
2021-01-05 20:21:45,914 INFO max_percentile: 1.0
2021-01-05 20:21:45,914 INFO ------------ compiler_parameters info -------------
2021-01-05 20:21:45,914 INFO compile_mode: latency
2021-01-05 20:21:45,914 INFO debug: False
2021-01-05 20:21:45,914 INFO optimize_level: O3
2021-01-05 20:21:45,914 INFO input_source:
{'data': 'ddr'}
2021-01-05 20:21:45,915 INFO
2021-01-05 20:21:45,996 INFO Convert to runtime bin
file sucessfully
!
2021-01-05 20:21:45,996 INFO End Model Convert
[root@269cc9580aae mapper
]
3. 精度测试
执行如下命令
export PARALLEL_PROCESS_NUM
=4
sh 05_evaluate.sh
执行结果如下
Loading and preparing results
...
DONE
(t
=0.22s
)
creating index
...
index created
!
Running per image evaluation
...
Evaluate annotation
type *bbox*
DONE
(t
=14.37s
).
Accumulating evaluation results
...
DONE
(t
=2.53s
).
====== Summary bbox metrics
======
Average Precision
(AP
) @
[ IoU
=0.50:0.95
| area
= all
| maxDets
=100
] = 0.219
Average Precision
(AP
) @
[ IoU
=0.50
| area
= all
| maxDets
=100
] = 0.404
Average Precision
(AP
) @
[ IoU
=0.75
| area
= all
| maxDets
=100
] = 0.213
Average Precision
(AP
) @
[ IoU
=0.50:0.95
| area
= small
| maxDets
=100
] = 0.051
Average Precision
(AP
) @
[ IoU
=0.50:0.95
| area
=medium
| maxDets
=100
] = 0.251
Average Precision
(AP
) @
[ IoU
=0.50:0.95
| area
= large
| maxDets
=100
] = 0.379
Average Recall
(AR
) @
[ IoU
=0.50:0.95
| area
= all
| maxDets
= 1
] = 0.200
Average Recall
(AR
) @
[ IoU
=0.50:0.95
| area
= all
| maxDets
= 10
] = 0.276
Average Recall
(AR
) @
[ IoU
=0.50:0.95
| area
= all
| maxDets
=100
] = 0.278
Average Recall
(AR
) @
[ IoU
=0.50:0.95
| area
= small
| maxDets
=100
] = 0.061
Average Recall
(AR
) @
[ IoU
=0.50:0.95
| area
=medium
| maxDets
=100
] = 0.310
Average Recall
(AR
) @
[ IoU
=0.50:0.95
| area
= large
| maxDets
=100
] = 0.483
person 29.2
bicycle 17.2
car 15.6
motorcycle 28.2
airplane 35.0
bus 41.5
train 44.9
truck 16.7
boat 10.9
traffic light 7.4
fire hydrant 41.0
stop sign 38.4
parking meter 38.8
bench 14.9
bird 15.0
cat 45.6
dog 37.2
horse 41.5
sheep 23.2
cow 26.0
elephant 43.2
bear 55.6
zebra 46.9
giraffe 49.7
backpack 6.5
umbrella 18.5
handbag 5.6
tie 14.5
suitcase 22.5
frisbee 25.0
skis 6.8
snowboard 12.4
sports ball 9.2
kite 10.4
baseball bat 14.5
baseball glove 13.3
skateboard 29.7
surfboard 14.4
tennis racket 23.6
bottle 11.1
wine glass 12.6
cup 14.1
fork 14.0
knife 4.0
spoon 4.4
bowl 17.4
banana 11.4
apple 9.2
sandwich 25.2
orange 19.8
broccoli 13.1
carrot 6.0
hot dog 16.9
pizza 32.0
donut 23.0
cake 14.8
chair 14.9
couch 30.5
potted plant 15.3
bed 24.4
dining table 16.9
toilet 37.0
tv 39.2
laptop 39.0
mouse 29.4
remote 6.6
keyboard 25.4
cell phone 18.3
microwave 34.1
oven 25.6
toaster 2.4
sink 16.5
refrigerator 30.8
book 3.7
clock 26.4
vase 16.9
scissors 18.9
teddy bear 25.7
hair drier 7.2
toothbrush 3.2
====== MeanAP @ IoU
=[0.50,0.95
for bbox
======
21.9
Loading and preparing results
...
DONE
(t
=0.12s
)
creating index
...
index created
!
Running per image evaluation
...
Evaluate annotation
type *bbox*
DONE
(t
=13.94s
).
Accumulating evaluation results
...
DONE
(t
=2.53s
).
===REPORT-START
{MAPPER-EVAL
}===
[IoU
=0.50:0.95
] = 0.219
[IoU
=0.50
] = 0.404
===REPORT-END
{MAPPER-EVAL
}===
02:35:45