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.

TDA4VM: Detection Network giving garbage output

Part Number: TDA4VM

Hi

I need to run one caffe squiznet d

afshan@afshan-virtual-machine:~/prjtools/ti-psdk-rtos-j721s2-08_00_04_04/tidl_j721s2_08_02_00_11/ti_dl/utils/tidlModelImport$ ./out/tidl_model_import.out ../../test/testvecs/config/import/magna/THA/F150_import_cfg.txt
Caffe Network File : ../../test/testvecs/models/magna/THA/F150_NA_HighRes_Fire3.prototxt  
Caffe Model File   : ../../test/testvecs/models/magna/THA/F150_NA_HighRes_Fire3.caffemodel  
TIDL Network File  : ../../test/testvecs/config/tidl_models/magna/THA/tidl_net_F150_NA_HighRes_Fire32.bin  
TIDL IO Info File  : ../../test/testvecs/config/tidl_models/magna/THA/tidl_io_F150_NA_HighRes_Fire32_  

Warning :: img_w & img_h or img_size is not provided as part of prior_box_param,    hence using img_w =  600 and img_h =  600 in prior box decoding
Warning :: img_w & img_h or img_size is not provided as part of prior_box_param,    hence using img_w =  600 and img_h =  600 in prior box decoding
Warning :: img_w & img_h or img_size is not provided as part of prior_box_param,    hence using img_w =  600 and img_h =  600 in prior box decoding
Warning :: img_w & img_h or img_size is not provided as part of prior_box_param,    hence using img_w =  600 and img_h =  600 in prior box decoding
Warning :: img_w & img_h or img_size is not provided as part of prior_box_param,    hence using img_w =  600 and img_h =  600 in prior box decoding
Warning :: img_w & img_h or img_size is not provided as part of prior_box_param,    hence using img_w =  600 and img_h =  600 in prior box decoding
Warning :: img_w & img_h or img_size is not provided as part of prior_box_param,    hence using img_w =  600 and img_h =  600 in prior box decoding
WARNING: Reshape layer only supports following with avg-pooling/inner product/ssd context.

~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /home/afshan/prjtools/ti-psdk-rtos-j721s2-08_00_04_04/tidl_j721s2_08_02_00_11/ti_dl/test/testvecs/config/tidl_models/magna/THA/F150_import_cfg.txt.qunat_stats_config.txt 
 ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

#    0 . .. T    3592.11  .... ..... ... .... .....
#    1 . .. T    3414.57  .... ..... ... .... .....
#    2 . .. T    2698.98  .... ..... ... .... .....
#    3 . .. T    2792.87  .... ..... ... .... .....
~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /home/afshan/prjtools/ti-psdk-rtos-j721s2-08_00_04_04/tidl_j721s2_08_02_00_11/ti_dl/test/testvecs/config/tidl_models/magna/THA/F150_import_cfg.txt.qunat_stats_config.txt 
 ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

#    0 . .. T    2063.63  .... ..... ... .... .....
#    1 . .. T    2052.69  .... ..... ... .... .....
#    2 . .. T    2047.78  .... ..... ... .... .....
#    3 . .. T    2074.05  .... ..... ... .... .....
 
 
 *****************   Calibration iteration number 0 completed ************************ 
 
 
 
INFO : Couldn't open perfSimConfig file: ../../test/testvecs/config/import/device_config.cfg , Skipping Performance Simulation 
WARNING: [TIDL_E_DATAFLOW_INFO_NULL] ti_cnnperfsim.out fails to allocate memory in MSMC. Please look into perfsim log. This model can only be used on PC emulation, it will get fault on target.
****************************************************
**          1 WARNINGS          0 ERRORS          **
****************************************************
afshan@afshan-virtual-machine:~/prjtools/ti-psdk-rtos-j721s2-08_00_04_04/tidl_j721s2_08_02_00_11/ti_dl/utils/tidlModelImport$ 
etection network.

The output is coming as garbage co-ordinates ( out of image size). Attaching the import log for your reference because i am not understanding why these warnings are coming in newer version of SDK.

RTOS SDK version: 8.0.4.4

TIDL version 8.02.00.11

Note:

My colleague was trying and debugging this issue( on older version of SDK) and had raised one thread for this, but we did not receive any response on it. Sharing it for your reference as the issue still exists

(TDA4VM: TIDL model import successful but output for detections is not as expected - Processors forum - Processors - TI E2E support forums)

Thanks 

Afshan Shaikh

  • This is for Stellantis MY24DT project.

    PS: Warning for perfSimConfig is gone now. but other log remains constant.
    Please let us know your thoughts on this issue ASAP.

    Thanks 

    Afshan

  • What is the image resolution you are trying ? it seems it is assuming 600x600 in prior box decoding. Please take note of the warning

    "Warning :: img_w & img_h or img_size is not provided as part of prior_box_param, hence using img_w = 600 and img_h = 600 in prior box decoding"

    Input imagesize is assumed as 600x600, and prior box sizes should be provided for this image resolution. Please check this. 

    Regards

    Deepak Poddar

  • Hi Deepak

    I dont think these warnings are having any issue on the output.

    I ran sample detection network from TI zoo i.e jdetNet and it also gave me same warnings. but irrespective of these 2 warnings( image width/heigh/size and Reshape warning), the output is coming correct.

    Now in my case, the detection is not happening properly, the bounding box values are coming out of the range of image height width.

    After debugging, by dumping layer wise input output tensor sizes, for tidl and on PC based model, we found for some particular layers the values of NCHW is getting swapped for TIDL as compared to PC based values., we tried changing the order in prototxt file but that is not making any change on output.

    We are not sure if this is the real issue.

    Its almost a block state for us, not sure how to debug. Please respond ASAP.

    Thanks and Regards

    Afshan Shaikh

  • Hi,

    From description it looks like prior box decoding is going wrong, and that typically happens when prior box sizes are not in sync with image resolution. 

    However you can isolate the problem first, weather problem is in detection layer or before that. Can you please run the model in float mode and check the tensor sizes and values just before the detection layer ? If the tensors going to detection layer looks good then we can doubt detection layer.

    Can you please provide some more information about kind of model used by you? Is there any close resemblance of your model in TI's model zoo? And what potential changes in your model can make your model to fail and model zoo model to work?

    Regards

    Deepak Poddar

  • If I set numParamBits=32 i.e for float then I get memory allocation doesnt happen, I get following error:

    WARNING: [TIDL_E_DATAFLOW_INFO_NULL] ti_cnnperfsim.out fails to allocate memory in MSMC. Please look into perfsim log. This model can only be used on PC emulation, it will get fault on target.

  • Its ok. float mode is meant for PC only. You can check on PC itself first to avoid any basic configuration issue.

    regards

    Deepak Poddar

  • Hi,

    Is this problem solved ?

    regards

    Deepak Poddar