This is the result.
Below is my steps to use tidl_model_import.out to get the bin file:
Step 1: get the onnx file from https://github.com/onnx/models/blob/main/vision/object_detection_segmentation/yolov3/model/yolov3-10.onnx.
Step 2: get the prototxt file and the below code is my prototxt file:
name: "yolo_v3"
tidl_yolo {
name: "yolo_v3"
in_width: 416
in_height: 416
#10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326
yolo_param {
input: "convolution_output"
anchor_width: 10
anchor_width: 16
anchor_width: 33
anchor_height: 13
anchor_height: 30
anchor_height: 23
}
yolo_param {
input: "convolution_output1"
anchor_width: 30
anchor_width: 62
anchor_width: 59
anchor_height: 61
anchor_height: 45
anchor_height: 119
}
yolo_param {
input: "convolution_output2"
anchor_width: 116
anchor_width: 156
anchor_width: 373
anchor_height: 90
anchor_height: 198
anchor_height: 326
}
detection_output_param {
num_classes: 80
share_location: true
background_label_id: -1
nms_param {
nms_threshold: 0.45
top_k: 200
}
code_type: CENTER_SIZE
keep_top_k: 100
confidence_threshold: 0.15
}
}
Step 3: get the txt file which will be use in the next step:
modelType = 2
numParamBits = 8
numFeatureBits = 8
quantizationStyle = 3
#quantizationStyle = 2
inputNetFile = "yolov3-10.onnx"
outputNetFile = "../bin_model/tidl_net_yolo3.bin"
outputParamsFile = "../bin_model/tidl_io_yolo3_"
inDataNorm = 1
inMean = 0 0 0
inScale = 0.003921568627 0.003921568627 0.003921568627
inDataFormat = 1
inWidth = 416
inHeight = 416
inNumChannels = 3
numFrames = 1
inData = " ./tidl_j7_08_00_00_10/ti_dl/test/testvecs/config/detection_list.txt"
perfSimConfig = ./tidl_j7_08_00_00_10/ti_dl/test/testvecs/config/import/device_config.cfg
inElementType = 0
#outDataNamesList = "convolution_output,convolution_output1,convolution_output2"
#metaArchType = 4
metaArchType = -1
metaLayersNamesList = "tidl_import_yolo3_metaarch.prototxt"
postProcType = 2
Step 4: using an linux pc device to convert the model:
./out/tidl_model_import.out /home/zhj/ti_rtos/onnx_model/tidl_import_yolov3_onnx.txt
step4 successfully convert the onnx and prototxt to the bin file but the test image has a really bad result.
Could you help me with this problem?
Best regards,
Ligen