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.

TDA2EXEVM: same image got different results in TIDL

Part Number: TDA2EXEVM

I generated 10 same images, and got different results when runing TIDL File I/O Usecase(EVE).

My model is a regression model, the model only have conv and pool layer, BUT I can only get the right result in the first image.

I know you are working on ssd model, so if you have the similar issue?

Best Wishes

Zhang Qiang

  • Hi Zhang Qiang,

    We use the statistics collected from the previous process for quantizing the activation dynamically in the current processes. So, results we observe during the process will NOT be same (but similar) for same input images. We have validated this logic with semantic segmentation application on input video sequence,

    Thanks and Rgerads,

    Kumar.D

  • But I can only get right result in the first image, so how can I change some code to get the same result with first image for debuging my issue ?
    Thanks !
  • Hi Zhang Qiang,
    Can you please try with below create time parameters.

    createParams.quantHistoryParam1 = 0;
    createParams.quantHistoryParam2 = 0;
    createParams.quantMargin = 0;

    Thanks and Rgerads,
    Kumar.D
  • Hi Kumar,

    It worked, and I can get same result.
    When I run vedio, I can get better results but still not good.
    The model can run in caffe-jacinto very well without quantization, maybe 8bit quantization is not enough on the regression model ?

    Best Wishes
    Zhang Qiang
  • Can you try 10 or 12 bits for model parameter quantization and check the result.
    Please set "numParamBits = 10" in import config file for this

    Thanks and Rgerads,
    Kumar.D
  • The results are similar and not good, I used below create time parameters:

    createParams.quantHistoryParam1 = 0;
    createParams.quantHistoryParam2 = 0;
    createParams.quantMargin = 0;

    My config is below:

    # Default - 0
    randParams = 0

    # 0: Caffe, 1: TensorFlow, Default - 0
    modelType = 0

    # test sparse 0, dense 1
    conv2dKernelType = 0

    # 0: Fixed quantization By tarininng Framework, 1: Dyanamic quantization by TIDL, Default - 1
    quantizationStyle = 1

    # quantRoundAdd/100 will be added while rounding to integer, Default - 50
    quantRoundAdd = 50

    numParamBits = 8
    # 0 : 8bit Unsigned, 1 : 8bit Signed Default - 1
    inElementType = 0

    inputNetFile = "deploy_512x256_delete_layers.prototxt"
    inputParamsFile = "test2_jacinto_bn_iter_90000.caffemodel"

    outputNetFile = "NET.BIN"
    outputParamsFile = "PRM.BIN"

    rawSampleInData = 1

    numSampleInData = 100
    sampleInData = "frame_100"

    # tidlStatsTool =
    tidlStatsTool = "C:\PROCESSOR_SDK_VISION_03_02_00_00\ti_components\algorithms\REL.TIDL.01.00.00.00\modules\ti_dl\utils\quantStatsTool\eve_test_dl_algo.out.exe"
  • 1. If you are trying on video sequence with different frames, please use below create time parameters.


    createParams.quantHistoryParam1 = 10;
    createParams.quantHistoryParam2 = 10;
    createParams.quantMargin = 20

    2. If the above does not improve results, try with numParamBits =10

    Thanks and regards
    Kumar.D;
  • There is a bug in my code. when I fix it, the result is similar with caffe-jacinto.
    Now, when I set
    case A:
    createParams.quantHistoryParam1 = 10;
    createParams.quantHistoryParam2 = 10;
    createParams.quantMargin = 20;
    The result is wrong in few frame of the vedio, and then the result is better
    when I set
    case B:
    createParams.quantHistoryParam1 = 0;
    createParams.quantHistoryParam2 = 0;
    createParams.quantMargin = 0;
    The result is good

    case B is a little better than case A.

    Thanks !