Part Number:TDA2
Tool/software: TI-RTOS
Hi guys,
I have been studying TIDL for a while and after getting some good understanding on it now I am adding a new object detector into TIDL_OD example.
TIDL_OD implemented SSD detection method but I removed SSD from it and added a Yolo V2 like detector on the base network.
So now I got the output tensor from it whose size is [1 x 40 x 18 x 32] and I need to parse those blob to come up with coordinates of bounding boxes.
The real problem is that I need to convert those numbers into floating values. So I dig into some threads discussing this issues.
In the end, the conclusion is two piece of information. one from User Guide of TIDL and one from this web site. Here is the answer.
----
10. What is Q format of output?
The output is 8 bit fixed point representation with the scaling factor. The 8 bit value can be divided by scaling factor to get the floating point value. The scaling factor (in Q8 format) is available in dataQ of (sTIDL_DataParams_t). Import tool also prints this information for sampledata as “Out Q : X”.
Related E2E query : e2e.ti.com/.../642684
----
But when I print out the following variables from net structure right after running TIDL algorithm. It shows all zeros on dataQ fields. (sTIDL_DataParams_t).
From the source code, vision_sdk/apps/src/rtos/alg_plugins/tidl/tidlLink_algPlugin.c
At the function AlgorithmLink_tidlProcess(), I added the following printing lines:
i from 0 to 28 , since I have 28 layers.
Vps_printf("net->TIDLLayers[%d].outData[%d].dataQ = %d\n", i, 0, net->TIDLLayers[i].outData[0].dataQ);
Vps_printf("net->TIDLLayers[%d].inData[%d].dataQ = %d\n", i, 0, net->TIDLLayers[i].inData[0].dataQ);
I need to know that dataQ value to calculate a scale factor to convert those 8bit quantized values into floating values.
Can you help me on how I can get those dataQ values for my last convolutional layer?
And if I run a statical tool called quantStatTool (exe binary), it print out the Out Q values, basically how you to print those Out Q values?
Thanks in advance!