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.

Calibration tool usage for TILD import process for KERAS frozen files

"tidl_model_import.out.exe" tool is used (together with a config file) when converting Keras optimized frozen files (.pb) to network and parameter files which are compliant to TILD. "eve_test_dl_algo.out.exe" tool is also used together with an "sampleInData" for calibration. My question is what should be calibration image? It is clear that it is for calibration but is it really necessary? What is being calibrated?

  • The calibration images are first few frames in the input video.

    Import tool does calibration of dynamic quantization process by finding out ranges of activations for each layer. This is accomplished by invoking simulation (using eve_test_dl_algo.out.exe ) which estimates initial values important for quantization process. These values are later updated on per frame basis, assuming strong temporal correlation between input frames.

    Also, refer to FAQ 24 in the TIDL user guide for more details.

  • Thank you for your explanation, "The calibration images are first few frames in the input video. " But i have still some unclear points. How can I find proper image if the stream comes from a camera which is not definite? What will happen if I point to an inconvenient image with "sampleInData"? What will be the effect? As I know quantization is a kind of digitizing process. Why is quantization is required for each layer? Is it completely about activation functions, for example layers such as RELU? Thanks
  • Hi,

    As I mentioned above TIDL assumes that "sampleInData" is temporally correlated with input stream, otherwise the quantization output may not be correct and hence TIDL will give correct results in this case. So, calibration images used in import should be temporally similar to the actual input used in the inference.

    TIDL import tool will estimate the min/max ranges for the various layers using the images used for import tool, and these ranges will be used in the actual inference for quantization, and hence this assumption.

     Thanks,

    Praveen