This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4AEN-Q1: Onnx2bin Compilation Issue

Part Number: TDA4AEN-Q1

Dear TI Engineer, 
   Hello, when I was using edgeai-tidl-tools (11_01) to convert the onnx model of the yolov5 network to a bin model, the code was set to perform quantization for 10 rounds. However, during the compilation process, it only quantized for 1 round and then displayed "Done!", but no valid bin file was generated. Could you please help me analyze the reason
(onnx2bin_data.rar The onnx2bin_data.rar in the attachment contains the compilation log, the onnx model and onnx2bin.py.)

    The quantitative configuration set is as follows:

COMPILE_OPTIONS = {
"artifacts_folder": ARTIFACTS_DIR,
"tensor_bits": 8, # 8-bit 量化 (速度最快)
"accuracy_level": 1, # 默认精度
"debug_level": 0,
"advanced_options:calibration_frames": 10, # 校准使用的图片数量
"advanced_options:calibration_iterations": 10,
}

The log of the compilation process is as follows:
13(2).jpg

  • Hello,
    We have received your post and the investigation will take some time.
    Thanks for your patience.

  • Hello, I added the configuration for the ONNX model in model_configs.py, and then ran the command "python3 onnxrt_ep.py -c -m tyrenet-v1". However, the compilation still ended after the first round of quantization and no final bin file was generated.  Looking forward to receiving your reply! 

    The additional configuration is as follows:
    # ========== Add:Tyre configration ==========
    "tyrenet-v1": create_model_config(
    task_type="detection",
    source=dict(
    infer_shape=True,
    ),
    preprocess=dict(
    resize=(640,640),
    crop=(640,640),
    data_layout="NCHW",
    resize_with_pad=True,
    reverse_channels=False,
    ),
    session=dict(
    session_name="onnxrt",
    model_path=os.path.join(models_base_path, "202632nano_best.onnx"),
    input_mean=[0, 0, 0],
    input_scale=[0.003921568627, 0.003921568627, 0.003921568627],
    input_optimization=True,
    ),
    postprocess=dict(),
    extra_info=dict(num_images=1, num_classes=2),
    runtime_options={
    'tensor_bits': 8,
    'accuracy_level': 1,
    'debug_level': 0,
    'advanced_options:calibration_frames': 1,
    'advanced_options:calibration_iterations': 2,
    }
    ),
    # ========== End:Tyre configration ==========