Tengine is developed by OPEN AI LAB. This project meet the demand of fast and efficient deployment of deep learning neural network models on embedded devices. In order to achieve cross-platform deployment in many AIoT applications, this project is based on the original Tengine project using C language for reconstruction, and deep frame tailoring for the characteristics of limited embedded device resources.
Here takes yolov3 of the darknet framework as an example to demonstrate how to convert yolov3 to tmfile.
Get SDK
The tengine SDK source code repository is on github of khadas
1 2 3 4
$ mkdir workspace && cd workspace $ git clone https://github.com/khadas/tengine_khadas_sdk.git $ cd tengine_khadas_sdk && ls docs tengine_tools
docs : Usage and documentation including conversion and quantification
tengine_toos : Use for transform and quantify models
Convert and Quant
Get yolov3 original file
Before starting the conversion and quantification, get the weights file and cfg file of yolov3
Version : v1.2, 15:15:47 Jun 22 2021 Status : uint8, per-layer, asymmetric Input model : ../convert_tool/yolov3.tmfile Output model: yolov3_u8.tmfile Calib images: /home/yan/data/git/npu/datesets/tengine_test_datasets_100/ Scale file : NULL Algorithm : MIN MAX Dims : 3 416 416 Mean : 0.000 0.000 0.000 Scale : 0.004 0.004 0.004 BGR2RGB : ON Center crop : OFF Letter box : 416 416 YOLOv5 focus: OFF Thread num : 4