4.1.3.1. Release Introduction

4.1.3.1.1. Model Quantification Example Package: horizon_model_convert_sample

Note

The OE package does not contain the calibration dataset and the original model for the sample by default, you need to execute 00_init.sh in the corresponding sample folder to get the model and calibration dataset for the current sample.

After the original model and dataset for all samples are acquired, the contents of the model conversion sample package are shown below:

horizon_model_convert_sample/
├── 01_common
│   ├── calibration_data
│   ├── data -> /data/horizon_x3/data
│   ├── model_zoo -> ../../../model_zoo/
│   ├── python
│   ├── README.md
│   └── test_data
├── 02_preq_examples
│   ├── 01_fcos_efficientnetb0
│   ├── 02_fcos_efficientnetb1
│   ├── 03_fcos_efficientnetb2
│   ├── det_evaluate.py
│   └── det_inference.py
├── 03_classification
│   ├── 01_mobilenet
│   ├── 02_googlenet
│   ├── 03_resnet18
│   ├── 04_mobilenet_onnx
│   ├── 05_efficientnet_lite0_onnx
│   ├── 06_efficientnet_lite1_onnx
│   ├── 07_efficientnet_lite2_onnx
│   ├── 08_efficientnet_lite3_onnx
│   ├── 09_efficientnet_lite4_onnx
│   ├── cls_evaluate.py
│   └── cls_inference.py
├── 04_detection
│   ├── 01_yolov2_darknet19
│   ├── 02_yolov3_darknet53
│   ├── 03_yolov5s
│   ├── 04_ssd_mobilenetv1
│   ├── 05_efficientdetd0
│   ├── 06_centernet_resnet50
│   ├── 07_fcos_efficientnetb0
│   ├── det_evaluate.py
│   └── det_inference.py
├── 05_miscellaneous
│   ├── 01_lenet_gray
│   ├── 02_resnet50_feature
│   ├── 03_vector_diff
│   ├── 04_multi_input_example
│   ├── 07_model_verifier
│   ├── 08_model_info
│   ├── 09_mobilenet_bgr
│   ├── 10_mobilenet_yuv444
│   ├── cls_inference.py
│   ├── det_evaluate.py
│   └── det_inference.py
├── 06_custom_op
│   └── mapper
├── 07_segmentation
│   ├── 01_unet_mobilenet
│   ├── 02_deeplabv3plus_efficientnetb0
│   ├── 03_fastscnn_efficientnetb0
│   ├── seg_evaluate.py
│   └── seg_inference.py
└── data_preprocess.py

Main contents in the sample package:

Common Algorithm Model Samples

Common algorithmic model samples are those in the 02_preq_examples/, 03_classification/, 04_detection/, and 07_segmentation/ folders.

The main goal of these algorithm model samples is to help you:

  • experiences model conversion process

  • experiences accuracy evaluation of model conversion

  • experiences model conversion results

Other Algorithm Model Samples

Other algorithm model samples are those in the 05_miscellaneous and 06_custom_op/ folders.

  • 05_miscellaneous , miscellaneous examples that guide the user to use some of the other content provided by the D-Robotics algorithm toolchain. For example: how to use the D-Robotics model conversion tool to enable rgb-data-trained models to accept yuv data at runtime. 03_vector_diff helps you understand how to troubleshoot problems using the vec_diff tool by a sample.

  • 06_custom_op/ is an example of a custom OP for users to help them understand how to add the functionality of custom operators if the model contains operators that are not supported by the toolchain.

Note

Samples in this section will be updated on an irregular basis and are intended to answers frequently asked questions.

4.1.3.1.2. Model Release: model_zoo

model_zoo contains two paths: mapper and runtime. The mapper path contains the models (floating point models in ONNX or Caffe format) to be used by the PTQ and QAT schemes for model conversion. The fcos_efficientnetb0, fcos_efficientnetb1 and fcos_efficientnetb2 are QAT models and the rest are PTQ models. The runtime path contains the bin models that you will use for embedded runtime development.

Only the model releases to be used for the PTQ example are shown here.

├── classification
│   ├── efficientnasnet
│   │    ├── efficientnasnet-m.onnx
│   │    ├── efficientnasnet.onnx
│   │    └── efficientnasnet-s.onnx
│   ├── efficientnet_lite_onnx
│   │    ├── efficientnet_lite0_fp32.onnx
│   │    ├── efficientnet_lite1_fp32.onnx
│   │    ├── efficientnet_lite2_fp32.onnx
│   │    ├── efficientnet_lite3_fp32.onnx
│   │    └── efficientnet_lite4_fp32.onnx
│   ├── googlenet
│   │    └── googlenet.onnx
│   ├── mobilenet
│   │    ├── mobilenet.caffemodel
│   │    ├── mobilenet_deploy.prototxt
│   │    ├── mobilenet_v2.caffemodel
│   │    └── mobilenet_v2_deploy.prototxt
│   ├── mobilenet_onnx
│   │    └── mobilenetv2.onnx
│   ├── resnet18
│   │    ├── resnet18.caffemodel
│   │    └── resnet18_deploy.prototxt
│   ├── resnet50
│   │    ├── resnet_50.caffemodel
│   │    └── resnet_50_deploy.prototxt
│   ├── se_resnet_gray_onnx
│   │    └── se_resnet_gray.onnx
│   └── vargnet
│       └── vargconvnet.onnx
├── ustom_op
│   └── custom_op.onnx
├── etection
│   ├── centernet
│   │    ├── centernet_resnet101_coco.onnx
│   │    └── centernet_resnet50.onnx
│   ├── efficientdetd0
│   │    └── efficientdet_nhwc.onnx
│   ├── fcos_efficientnetb0
│   │    ├── fcos_effb0.onnx
│   │    ├── fcos_efficientnetb0.onnx
│   │    └── fcos.onnx
│   ├── fcos_efficientnetb3
│   │    └── fcos_effb3.onnx
│   ├── fcos_resnet50
│   │    └── fcos_resnet50.onnx
│   ├── fcos_resnext101
│   │    └── fcos_resnext101.onnx
│   ├── ssd_mobilenetv1
│   │    ├── mobilenet_iter_73000.caffemodel
│   │    └── MobileNetSSD_deploy.prototxt
│   ├── yolov2_darknet19
│   │    ├── README.md
│   │    ├── yolov2.caffemodel
│   │    └── yolov2_transposed.prototxt
│   ├── yolov3_darknet53
│   │    ├── README.md
│   │    ├── yolov3.caffemodel
│   │    └── yolov3_transposed.prototxt
│   ├── yolov3_vargdarknet
│   │    └── yolov3_vargdarknet53.onnx
│   ├── yolov4
│   │    └── yolov4_efficientnetb0.onnx
│   └── yolov5_onnx_optimized
│       ├── YOLOv5l.onnx
│       ├── YOLOv5m.onnx
│       ├── YOLOv5s.onnx
│       └── YOLOv5x.onnx
├── other
│   ├── fcos_efficientnetb0
│   │    └── fcos_efficientnetb0_qat.onnx
│   ├── lenet
│   │    ├── lenet_iter_100000.caffemodel
│   │    └── lenet_train_test.prototxt
│   ├── mobilenetv2_three_inputs
│   │    ├── mobilenetv2_three_inputs.caffemodel
│   │    └── mobilenetv2_three_inputs.prototxt
│   ├── multi_type
│   │    └── original_float_model.onnx
│   ├── resizer_model
│   │    └── resizer_model.onnx
│   └── resnet50_feature
│       ├── resnet50_feature.caffemodel
│       ├── resnet50_feature_deploy.prototxt
│       ├── resnet50_pre.caffemodel
│       └── resnet50_pre.prototxt
├── preq_examples
│   └── fcos_efficientnet
│       ├── fcos_eff_b0.onnx
│       ├── fcos_eff_b2.onnx
│       ├── fcos_eff_b3.onnx
│       ├── fcos_efficientnetb0_mscoco.onnx
│       ├── fcos_efficientnetb1_mscoco.onnx
│       └── fcos_efficientnetb2_mscoco.onnx
└── segmentation
    ├── deeplabv3plus_efficientnetb0
    │    ├── deeplabv3_cityscapes_dila1248_permute.onnx
    │    ├── deeplabv3plus_efficientnetb0_float.onnx
    │    └── deeplabv3plus_efficientnetb0.onnx
    ├── deeplabv3plus_efficientnetm
    │    ├── deeplabv3plus_efficientnetm1.onnx
    │    └── deeplabv3plus_efficientnetm2.onnx
    ├── fastscnn_efficientnetb0
    │    └── fastscnn_efficientnetb0.onnx
    ├── mobilenet_unet
    │    └── tf_unet_trained.onnx
    └── unet_mobilenet
        └── tf_unet_trained.onnx

Attention

This directory tree is a complete structure display, in fact the OE package does not contain all the models directly.

The next section will introduce you the algorithm model samples.