6.4.1. Release Introduction¶
6.4.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:
├── 01_common # This path contains the PTQ sample package generic script and data
| ├── calibration_data
| ├── data -> /data/horizon_x5/data/ # For storing soft links of the public datasets
| ├── model_zoo -> ../../../model_zoo # For storing soft links of the model releases
| ├── python
| ├── README.md
| ├── test_data
| └── tools
├── 02_preq_examples
| ├── 01_fcos_efficientnetb0
| ├── 02_fcos_efficientnetb2
| ├── 03_fcos_efficientnetb3
| ├── det_evaluate.py
| ├── det_inference.py
| ├── seg_evaluate.py
| └── seg_inference.py
├── 03_classification # Algorithm model sample
| ├── 01_mobilenet
| ├── 02_googlenet
| ├── 03_resnet18
| ├── 05_efficientnet_lite0_onnx
| ├── 06_efficientnet_lite1_onnx
| ├── 07_efficientnet_lite2_onnx
| ├── 08_efficientnet_lite3_onnx
| ├── 09_efficientnet_lite4_onnx
| ├── 10_vargconvnet
| ├── 11_efficientnasnet_m
| ├── 12_efficientnasnet_s
| ├── cls_evaluate.py
| └── cls_inference.py
├── 04_detection
| ├── 01_yolov2_darknet19
| ├── 02_yolov3_darknet53
| ├── 03_yolov5x
| ├── 04_ssd_mobilenetv1
| ├── 05_efficientdetd0
| ├── 06_centernet_resnet101
| ├── 07_fcos_efficientnetb0
| ├── 08_yolov4
| ├── 09_yolov3_vargdarknet
| ├── 10_fcos_resnet50
| ├── 11_fcos_resnext101
| ├── 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
| ├── 11_mobilenet_yuv444
| └── mis_inference.py
├── 06_custom_op
| └── mapper
├── 07_segmentation
| ├── 01_unet_mobilenet
| ├── 02_deeplabv3plus_efficientnetb0
| ├── 03_fastscnn_efficientnetb0
| ├── 04_deeplabv3plus_dilation1248
| ├── 05_deeplabv3plus_efficientnetm1
| ├── 06_deeplabv3plus_efficientnetm2
| ├── 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:
experience the model conversion process.
experience the accuracy evaluation of model conversion.
experience the model conversion results.
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_diffhelps you understand how to troubleshoot problems using thevec_difftool 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 from time to time to provide sample answers to frequently asked questions.
6.4.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_efficientnetb2, and fcos_efficientnetb3 are QAT models and the rest are PTQ models.
The runtime path contains the bin models that you will use for embedded runtime development.
Model releases to be used by PTQ and QAT examples are list below:
├── 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
├── custom_op
│ └── custom_op.onnx
├── detection
│ ├── 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
└── segmentation
├── deeplabv3plus_efficientnetb0
│ ├── deeplabv3_cityscapes_dila1248_permute.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.