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.

RTOS/TDA3XEVM: Input image format for TIDL

Part Number: TDA3XEVM

Tool/software: TI-RTOS

Hi,

 I would like to know the format of input image TIDL v1.01 with DSP/EVE.

 In my understanding, there are two input image data, one for test application in DSP/EVE and one for importing models in PC.

 The Importing models  seem to correspond to JPEG and PNG besides 8bit RGB raw format, but does the test application support other than 8bit RGB?

Best regards,

Kenshow

  • Hi ,

    Test application also supports other than 8bit RGB similar to importing models.

    Please refer to config files in "ti_dl\test\testvecs\config\infer" folder.

    Thanks,
    Praveen
  • Hi Praveen,

    Really?

    I tried to use jpg and .png files, but I could not get the result correctly.
    In order to use a file other than RGB format, do I need to describe something in the TIDL config file in addition to specifying the file?

    Best regards,
    Kenshow 

     

  • Yes, please set "rawImage = 0", and set proper value to "preProcType" based on your input. Please refer to "tidl_image_preproc.c" file for all supported preProcType values.

    Thanks,
    Praveen
  • Hi Praveen,

     I checked setting of preProcType =0~4 for jpg image.  However, I could not get the result correctly.

     In "ti_dl\test\testvecs\config\infer" folder is not helpful. All inData uses y, the jpg file is commented out in TIDL config file, and its jpg data is not in the "input" folder. Also, preProcType is not well understood from the program. So, I need the explanation for the parameters.

    Best regards,
    Kenshow

     

  • Hi Kenshow,
    Refer the users guide section "3.7 Input and Output Data Formats" for the buffer formats.

    Regarding input feature elements type/format, The input has to be same type as the one used during traing the net. We have created few pre-processing used by our test cases. This pre-processing code is part of test bench, you can modify and re-build this to match the input used during the training of your net (Or use raw input which uncompressed and pre-processed). If the input used during the training is float then it has to be converted to fixed point and inform the scale factor to import tool.
  • Hi kumar,

    "3.7 Input and Output Data Formats" is not described about file format.
    I am using the input data that is converted from .y file to .jpg file to check this issue. I am using sample image data in "testvecs\input" folder, and it is the same size as the same image.

    Best regards,
    Kenshow
  • Hi Kenshow,

    I am not sure if understand your question.
    This simple steps below you can follow,
    1. Importing models can take JPEG or any encoded formats (but we may need to specify preProcType for encoded formats) and rawData. As Kumar explained, you can modify preProcType code and re-build this to match the input used during the training of your net. preProcType 0 to 4 defined are specific to test cases used by us.
    2. Test application can take input similar to above JPEG or rawData, also you can use the "trace_dump_0.y" generated in above import step and specify "rawImage = 1"

    Please let me know for any questions

    Thanks,
    Praveen
  • Hi Praveen,

    My question is whether image of JPEG or any encoded formats can use at TIDL running on DSP/EVE. It is not when importing TIDL.
    It seems that readImage() function in tidl_image_preproc.c is not used on DSP or EVE.

    Thanks,
    Kenshow
  • Hi Kenshow,

    Yes, both import tool and TIDL running on EVE/DSP core can take input image of JPEG or any encoded formats. I am giving an example to show this, please use attached import and infer files both uses encoded png file with preProcType  = 3.

    1. tidl_import_j11_cifar.txt file is import config file to run in import tool and output is in "tidl_import_log.txt"

    2. tidl_config_j11_cifar.txt file is infer file to run on EVE/DSP and output is in "tidl_infer_log.txt".

    So, you can see that both are taking encoded images as inputs and gives the same correct output.

    Hope this clarifies this question.

    Thanks,

    Praveen

    tidl_import_j11_cifar.txt
    # Default - 0
    randParams         = 0 
    
    # 0: Caffe, 1: TensorFlow, Default - 0
    modelType          = 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      = 25
    
    numParamBits       = 8
    # 0 : 8bit Unsigned, 1 : 8bit Signed Default - 1
    inElementType      = 0
    
    inputNetFile       = "..\..\test\testvecs\config\caffe_jacinto_models\trained\image_classification\cifar10_jacintonet11v2\sparse\deploy.prototxt"
    inputParamsFile    = "..\..\test\testvecs\config\caffe_jacinto_models\trained\image_classification\cifar10_jacintonet11v2\sparse\cifar10_jacintonet11v2_iter_64000.caffemodel"
    outputNetFile      = "..\..\test\testvecs\config\tidl_models\tidl_net_cifar_jacintonet11v2.bin"
    outputParamsFile   = "..\..\test\testvecs\config\tidl_models\tidl_param_cifar_jacintonet11v2.bin"
    
    preProcType  = 3
    sampleInData = "..\..\test\testvecs\input\00002.png"
    tidlStatsTool = "..\quantStatsTool\eve_test_dl_algo.out.exe"
    

    tidl_import_log.txt
    Caffe Network File : ..\..\test\testvecs\config\caffe_jacinto_models\trained\image_classification\cifar10_jacintonet11v2\sparse\deploy.prototxt
    Caffe Model File   : ..\..\test\testvecs\config\caffe_jacinto_models\trained\image_classification\cifar10_jacintonet11v2\sparse\cifar10_jacintonet11v2_iter_64000.caffemodel
    TIDL Network File  : ..\..\test\testvecs\config\tidl_models\tidl_net_cifar_jacintonet11v2.bin
    TIDL Model File    : ..\..\test\testvecs\config\tidl_models\tidl_param_cifar_jacintonet11v2.bin
    Name of the Network : jacintonet11v2_deploy
    Num Inputs :               1
     Num of Layer Detected :  17
      0, TIDL_DataLayer                , data                                      0,  -1 ,  1 ,   x ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  0 ,       0 ,       0 ,       0 ,       0 ,       1 ,       3 ,
        32 ,      32 ,         0 ,
      1, TIDL_BatchNormLayer           , data/bias                                 1,   1 ,  1 ,   0 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  1 ,       1 ,       3 ,      32 ,      32 ,       1 ,       3 ,
        32 ,      32 ,      3072 ,
      2, TIDL_ConvolutionLayer         , conv1a                                    1,   1 ,  1 ,   1 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  2 ,       1 ,       3 ,      32 ,      32 ,       1 ,      32 ,
        32 ,      32 ,   2457600 ,
      3, TIDL_ConvolutionLayer         , conv1b                                    1,   1 ,  1 ,   2 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  3 ,       1 ,      32 ,      32 ,      32 ,       1 ,      32 ,
        32 ,      32 ,   2359296 ,
      4, TIDL_PoolingLayer             , pool1                                     1,   1 ,  1 ,   3 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  4 ,       1 ,      32 ,      32 ,      32 ,       1 ,      32 ,
        32 ,      32 ,     32768 ,
      5, TIDL_ConvolutionLayer         , res2a_branch2a                            1,   1 ,  1 ,   4 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  5 ,       1 ,      32 ,      32 ,      32 ,       1 ,      64 ,
        32 ,      32 ,  18874368 ,
      6, TIDL_ConvolutionLayer         , res2a_branch2b                            1,   1 ,  1 ,   5 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  6 ,       1 ,      64 ,      32 ,      32 ,       1 ,      64 ,
        16 ,      16 ,   9437184 ,
      7, TIDL_ConvolutionLayer         , res3a_branch2a                            1,   1 ,  1 ,   6 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  7 ,       1 ,      64 ,      16 ,      16 ,       1 ,     128 ,
        16 ,      16 ,  18874368 ,
      8, TIDL_ConvolutionLayer         , res3a_branch2b                            1,   1 ,  1 ,   7 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  8 ,       1 ,     128 ,      16 ,      16 ,       1 ,     128 ,
        16 ,      16 ,   9437184 ,
      9, TIDL_PoolingLayer             , pool3                                     1,   1 ,  1 ,   8 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  9 ,       1 ,     128 ,      16 ,      16 ,       1 ,     128 ,
        16 ,      16 ,     32768 ,
     10, TIDL_ConvolutionLayer         , res4a_branch2a                            1,   1 ,  1 ,   9 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 10 ,       1 ,     128 ,      16 ,      16 ,       1 ,     256 ,
        16 ,      16 ,  75497472 ,
     11, TIDL_ConvolutionLayer         , res4a_branch2b                            1,   1 ,  1 ,  10 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 11 ,       1 ,     256 ,      16 ,      16 ,       1 ,     256 ,
         8 ,       8 ,  37748736 ,
     12, TIDL_ConvolutionLayer         , res5a_branch2a                            1,   1 ,  1 ,  11 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 12 ,       1 ,     256 ,       8 ,       8 ,       1 ,     512 ,
         8 ,       8 ,  75497472 ,
     13, TIDL_ConvolutionLayer         , res5a_branch2b                            1,   1 ,  1 ,  12 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 13 ,       1 ,     512 ,       8 ,       8 ,       1 ,     512 ,
         8 ,       8 ,  37748736 ,
     14, TIDL_PoolingLayer             , pool5                                     1,   1 ,  1 ,  13 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 14 ,       1 ,     512 ,       8 ,       8 ,       1 ,       1 ,
         1 ,     512 ,     32768 ,
     15, TIDL_InnerProductLayer        , fc10                                      1,   1 ,  1 ,  14 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 15 ,       1 ,       1 ,       1 ,     512 ,       1 ,       1 ,
         1 ,      10 ,      5120 ,
     16, TIDL_SoftMaxLayer             , prob                                      1,   1 ,  1 ,  15 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 16 ,       1 ,       1 ,       1 ,      10 ,       1 ,       1 ,
         1 ,      10 ,        10 ,
    Total Giga Macs : 0.2880
            1 file(s) copied.
    
    Processing config file .\tempDir\qunat_stats_config.txt !
      0, TIDL_DataLayer                ,  0,  -1 ,  1 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  0 ,    0 ,    0 ,    0 ,    0 ,    1 ,    3 ,   32 ,   32 ,
      1, TIDL_BatchNormLayer           ,  1,   1 ,  1 ,  0 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  1 ,    1 ,    3 ,   32 ,   32 ,    1 ,    3 ,   32 ,   32 ,
      2, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  1 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  2 ,    1 ,    3 ,   32 ,   32 ,    1 ,   32 ,   32 ,   32 ,
      3, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  2 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  3 ,    1 ,   32 ,   32 ,   32 ,    1 ,   32 ,   32 ,   32 ,
      4, TIDL_PoolingLayer             ,  1,   1 ,  1 ,  3 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  4 ,    1 ,   32 ,   32 ,   32 ,    1 ,   32 ,   32 ,   32 ,
      5, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  4 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  5 ,    1 ,   32 ,   32 ,   32 ,    1 ,   64 ,   32 ,   32 ,
      6, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  5 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  6 ,    1 ,   64 ,   32 ,   32 ,    1 ,   64 ,   16 ,   16 ,
      7, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  6 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  7 ,    1 ,   64 ,   16 ,   16 ,    1 ,  128 ,   16 ,   16 ,
      8, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  7 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  8 ,    1 ,  128 ,   16 ,   16 ,    1 ,  128 ,   16 ,   16 ,
      9, TIDL_PoolingLayer             ,  1,   1 ,  1 ,  8 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  9 ,    1 ,  128 ,   16 ,   16 ,    1 ,  128 ,   16 ,   16 ,
     10, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  9 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 10 ,    1 ,  128 ,   16 ,   16 ,    1 ,  256 ,   16 ,   16 ,
     11, TIDL_ConvolutionLayer         ,  1,   1 ,  1 , 10 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 11 ,    1 ,  256 ,   16 ,   16 ,    1 ,  256 ,    8 ,    8 ,
     12, TIDL_ConvolutionLayer         ,  1,   1 ,  1 , 11 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 12 ,    1 ,  256 ,    8 ,    8 ,    1 ,  512 ,    8 ,    8 ,
     13, TIDL_ConvolutionLayer         ,  1,   1 ,  1 , 12 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 13 ,    1 ,  512 ,    8 ,    8 ,    1 ,  512 ,    8 ,    8 ,
     14, TIDL_PoolingLayer             ,  1,   1 ,  1 , 13 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 14 ,    1 ,  512 ,    8 ,    8 ,    1 ,    1 ,    1 ,  512 ,
     15, TIDL_InnerProductLayer        ,  1,   1 ,  1 , 14 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 15 ,    1 ,    1 ,    1 ,  512 ,    1 ,    1 ,    1 ,   10 ,
     16, TIDL_SoftMaxLayer             ,  1,   1 ,  1 , 15 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 16 ,    1 ,    1 ,    1 ,   10 ,    1 ,    1 ,    1 ,   10 ,
     17, TIDL_DataLayer                ,  0,   1 , -1 , 16 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  0 ,    1 ,    1 ,    1 ,   10 ,    0 ,    0 ,    0 ,    0 ,
    Layer ID    ,inBlkWidth  ,inBlkHeight ,inBlkPitch  ,outBlkWidth ,outBlkHeight,outBlkPitch ,numInChs    ,numOutChs   ,numProcInChs,numLclInChs ,numLclOutChs,numProcItrs ,numAccItrs  ,numHorBlock ,numVe
    rBlock ,inBlkChPitch,outBlkChPitc,alignOrNot
          2           40           36           40           32           32           32            3           32            3            1            8            1            3            1
     1         1440         1024            1
          3           40           34           40           32           32           32            8            8            8            4            8            1            2            1
     1         1360         1024            1
          5           40           34           40           32           32           32           32           64           32            6            8            1            6            1
     1         1360         1024            1
          6           40           34           40           32           32           32           16           16           16            6            8            1            3            1
     1         1360         1024            1
          7           24           18           24           16           16           16           64          128           64            8            8            1            8            1
     1          432          256            1
          8           24           18           24           16           16           16           32           32           32            8            8            1            4            1
     1          432          256            1
         10           24           18           24           16           16           16          128          256          128            8            8            1           16            1
     1          432          256            1
         11           24           18           24           16           16           16           64           64           64            8            8            1            8            1
     1          432          256            1
         12           24           10           24           16            8           16          256          512          256            8            8            1           32            1
     1          240          128            1
         13           24           10           24           16            8           16          128          128          128            8            8            1           16            1
     1          240          128            1
    
    Processing Frame Number : 0
    
     Layer    1 : Max PASS : -2147483648 :    63492 Out Q :      260 ,   128498, TIDL_BatchNormLayer  , PASSED  #MMACs =     0.00,     0.00,     0.00, Sparsity :   0.00, 100.00
     Layer    2 : Max PASS : -2147483648 :    38651 Out Q :    26217 ,    38803, TIDL_ConvolutionLayer, PASSED  #MMACs =     2.46,     1.08,     1.23, Sparsity :  50.00,  55.88
     Layer    3 : Max PASS : -2147483648 :    32808 Out Q :    22458 ,    32937, TIDL_ConvolutionLayer, PASSED  #MMACs =     2.36,     0.63,     0.72, Sparsity :  69.27,  73.39
     Layer    4 :TIDL_PoolingLayer,     PASSED  #MMACs =     0.03,     0.00,     0.03, Sparsity :   0.00, 100.00
     Layer    5 : Max PASS : -2147483648 :    67273 Out Q :    39641 ,    67537, TIDL_ConvolutionLayer, PASSED  #MMACs =    18.87,     3.72,     4.32, Sparsity :  77.13,  80.30
     Layer    6 : Max PASS : -2147483648 :    53823 Out Q :    34582 ,    54034, TIDL_ConvolutionLayer, PASSED  #MMACs =     9.44,     2.79,     3.10, Sparsity :  67.10,  70.46
     Layer    7 : Max PASS : -2147483648 :    78138 Out Q :    49556 ,    78444, TIDL_ConvolutionLayer, PASSED  #MMACs =    18.87,     3.65,     4.04, Sparsity :  78.61,  80.65
     Layer    8 : Max PASS : -2147483648 :    54857 Out Q :    50981 ,    55072, TIDL_ConvolutionLayer, PASSED  #MMACs =     9.44,     2.39,     2.59, Sparsity :  72.57,  74.65
     Layer    9 :TIDL_PoolingLayer,     PASSED  #MMACs =     0.03,     0.00,     0.03, Sparsity :   0.00, 100.00
     Layer   10 : Max PASS : -2147483648 :    70951 Out Q :    55813 ,    71229, TIDL_ConvolutionLayer, PASSED  #MMACs =    75.50,    13.44,    15.01, Sparsity :  80.12,  82.20
     Layer   11 : Max PASS : -2147483648 :    49221 Out Q :    56622 ,    49414, TIDL_ConvolutionLayer, PASSED  #MMACs =    37.75,     7.04,     7.82, Sparsity :  79.28,  81.35
     Layer   12 : Max PASS : -2147483648 :    47933 Out Q :    55075 ,    48121, TIDL_ConvolutionLayer, PASSED  #MMACs =    75.50,     6.40,     7.68, Sparsity :  89.83,  91.52
     Layer   13 : Max PASS : -2147483648 :    34993 Out Q :    11992 ,    35130, TIDL_ConvolutionLayer, PASSED  #MMACs =    37.75,     3.20,     3.75, Sparsity :  90.07,  91.51
     Layer   14 : Max PASS : -2147483648 :   357952 Out Q :    34992 ,   359356, TIDL_PoolingLayer,     PASSED  #MMACs =     0.00,     0.00,     0.00, Sparsity :   0.00, 100.00
     Layer   15 : Max PASS : -2147483648 :   221030 Out Q :     2860 ,   445541, TIDL_InnerProductLayer,     PASSED  #MMACs =     0.00,     0.00,     0.00, Sparsity :   0.00, 100.00
     Layer   16 :-------Max Index    8 : 255 ------- #MMACs =     0.00,     0.00,     0.00, Sparsity :   0.00, 100.00
    End of config list found !
    Press any key to continue . . .

    tidl_config_j11_cifar.txt
    rawImage    = 0
    numFrames   = 1
    preProcType  = 3
    inData   = ..\testvecs\input\00002.png
    traceDumpBaseName   = ".\trace_dump_"
    outData   = ".\stats_tool_out.bin"
    updateNetWithStats   = 0
    netBinFile     = "..\..\test\testvecs\config\tidl_models\tidl_net_cifar_jacintonet11v2.bin"
    paramsBinFile        = "..\..\test\testvecs\config\tidl_models\tidl_param_cifar_jacintonet11v2.bin"
    

    tidl_infer_log.txt
    Processing config file C:\Praveen\KlocWork\Code_Merge_Jun2018\dsp_apps\modules\ti_dl\test\testvecs\config\infer\tidl_config_j11_cifar.txt !
      0, TIDL_DataLayer                ,  0,  -1 ,  1 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  0 ,    0 ,    0 ,    0 ,    0 ,    1 ,    3 ,   32 ,   32 ,
      1, TIDL_BatchNormLayer           ,  1,   1 ,  1 ,  0 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  1 ,    1 ,    3 ,   32 ,   32 ,    1 ,    3 ,   32 ,   32 ,
      2, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  1 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  2 ,    1 ,    3 ,   32 ,   32 ,    1 ,   32 ,   32 ,   32 ,
      3, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  2 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  3 ,    1 ,   32 ,   32 ,   32 ,    1 ,   32 ,   32 ,   32 ,
      4, TIDL_PoolingLayer             ,  1,   1 ,  1 ,  3 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  4 ,    1 ,   32 ,   32 ,   32 ,    1 ,   32 ,   32 ,   32 ,
      5, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  4 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  5 ,    1 ,   32 ,   32 ,   32 ,    1 ,   64 ,   32 ,   32 ,
      6, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  5 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  6 ,    1 ,   64 ,   32 ,   32 ,    1 ,   64 ,   16 ,   16 ,
      7, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  6 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  7 ,    1 ,   64 ,   16 ,   16 ,    1 ,  128 ,   16 ,   16 ,
      8, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  7 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  8 ,    1 ,  128 ,   16 ,   16 ,    1 ,  128 ,   16 ,   16 ,
      9, TIDL_PoolingLayer             ,  1,   1 ,  1 ,  8 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  9 ,    1 ,  128 ,   16 ,   16 ,    1 ,  128 ,   16 ,   16 ,
     10, TIDL_ConvolutionLayer         ,  1,   1 ,  1 ,  9 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 10 ,    1 ,  128 ,   16 ,   16 ,    1 ,  256 ,   16 ,   16 ,
     11, TIDL_ConvolutionLayer         ,  1,   1 ,  1 , 10 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 11 ,    1 ,  256 ,   16 ,   16 ,    1 ,  256 ,    8 ,    8 ,
     12, TIDL_ConvolutionLayer         ,  1,   1 ,  1 , 11 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 12 ,    1 ,  256 ,    8 ,    8 ,    1 ,  512 ,    8 ,    8 ,
     13, TIDL_ConvolutionLayer         ,  1,   1 ,  1 , 12 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 13 ,    1 ,  512 ,    8 ,    8 ,    1 ,  512 ,    8 ,    8 ,
     14, TIDL_PoolingLayer             ,  1,   1 ,  1 , 13 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 14 ,    1 ,  512 ,    8 ,    8 ,    1 ,    1 ,    1 ,  512 ,
     15, TIDL_InnerProductLayer        ,  1,   1 ,  1 , 14 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 15 ,    1 ,    1 ,    1 ,  512 ,    1 ,    1 ,    1 ,   10 ,
     16, TIDL_SoftMaxLayer             ,  1,   1 ,  1 , 15 ,  x ,  x ,  x ,  x ,  x ,  x ,  x , 16 ,    1 ,    1 ,    1 ,   10 ,    1 ,    1 ,    1 ,   10 ,
     17, TIDL_DataLayer                ,  0,   1 , -1 , 16 ,  x ,  x ,  x ,  x ,  x ,  x ,  x ,  0 ,    1 ,    1 ,    1 ,   10 ,    0 ,    0 ,    0 ,    0 ,
    Layer ID    ,inBlkWidth  ,inBlkHeight ,inBlkPitch  ,outBlkWidth ,outBlkHeight,outBlkPitch ,numInChs    ,numOutChs   ,numProcInChs,numLclInChs ,numLclOutChs,numProcItrs ,numAccItrs  ,numHorBlock ,numVe
    rBlock ,inBlkChPitch,outBlkChPitc,alignOrNot
          2           40           36           40           32           32           32            3           32            3            1            8            1            3            1
     1         1440         1024            1
          3           40           34           40           32           32           32            8            8            8            4            8            1            2            1
     1         1360         1024            1
          5           40           34           40           32           32           32           32           64           32            6            8            1            6            1
     1         1360         1024            1
          6           40           34           40           32           32           32           16           16           16            6            8            1            3            1
     1         1360         1024            1
          7           24           18           24           16           16           16           64          128           64            8            8            1            8            1
     1          432          256            1
          8           24           18           24           16           16           16           32           32           32            8            8            1            4            1
     1          432          256            1
         10           24           18           24           16           16           16          128          256          128            8            8            1           16            1
     1          432          256            1
         11           24           18           24           16           16           16           64           64           64            8            8            1            8            1
     1          432          256            1
         12           24           10           24           16            8           16          256          512          256            8            8            1           32            1
     1          240          128            1
         13           24           10           24           16            8           16          128          128          128            8            8            1           16            1
     1          240          128            1
    
    Processing Frame Number : 0
    
     Layer    1 : Max PASS :    63492 :    63492 Out Q :      260 ,   128498, TIDL_BatchNormLayer  , PASSED  #MMACs =     0.00,     0.00,     0.00, Sparsity :   0.00, 100.00
     Layer    2 : Max PASS :    38651 :    38651 Out Q :    26217 ,    38803, TIDL_ConvolutionLayer, PASSED  #MMACs =     2.46,     1.08,     1.23, Sparsity :  50.00,  55.88
     Layer    3 : Max PASS :    32808 :    32808 Out Q :    22458 ,    32937, TIDL_ConvolutionLayer, PASSED  #MMACs =     2.36,     0.63,     0.72, Sparsity :  69.27,  73.39
     Layer    4 :TIDL_PoolingLayer,     PASSED  #MMACs =     0.03,     0.00,     0.03, Sparsity :   0.00, 100.00
     Layer    5 : Max PASS :    67273 :    67273 Out Q :    39641 ,    67537, TIDL_ConvolutionLayer, PASSED  #MMACs =    18.87,     3.72,     4.32, Sparsity :  77.13,  80.30
     Layer    6 : Max PASS :    53823 :    53823 Out Q :    34582 ,    54034, TIDL_ConvolutionLayer, PASSED  #MMACs =     9.44,     2.79,     3.10, Sparsity :  67.10,  70.46
     Layer    7 : Max PASS :    78138 :    78138 Out Q :    49556 ,    78444, TIDL_ConvolutionLayer, PASSED  #MMACs =    18.87,     3.65,     4.04, Sparsity :  78.61,  80.65
     Layer    8 : Max PASS :    54857 :    54857 Out Q :    50981 ,    55072, TIDL_ConvolutionLayer, PASSED  #MMACs =     9.44,     2.39,     2.59, Sparsity :  72.57,  74.65
     Layer    9 :TIDL_PoolingLayer,     PASSED  #MMACs =     0.03,     0.00,     0.03, Sparsity :   0.00, 100.00
     Layer   10 : Max PASS :    70951 :    70951 Out Q :    55813 ,    71229, TIDL_ConvolutionLayer, PASSED  #MMACs =    75.50,    13.44,    15.01, Sparsity :  80.12,  82.20
     Layer   11 : Max PASS :    49221 :    49221 Out Q :    56622 ,    49414, TIDL_ConvolutionLayer, PASSED  #MMACs =    37.75,     7.04,     7.82, Sparsity :  79.28,  81.35
     Layer   12 : Max PASS :    47933 :    47933 Out Q :    55075 ,    48121, TIDL_ConvolutionLayer, PASSED  #MMACs =    75.50,     6.40,     7.68, Sparsity :  89.83,  91.52
     Layer   13 : Max PASS :    34993 :    34993 Out Q :    11992 ,    35130, TIDL_ConvolutionLayer, PASSED  #MMACs =    37.75,     3.20,     3.75, Sparsity :  90.07,  91.51
     Layer   14 : Max PASS :   357952 :   357952 Out Q :    34992 ,   359356, TIDL_PoolingLayer,     PASSED  #MMACs =     0.00,     0.00,     0.00, Sparsity :   0.00, 100.00
     Layer   15 : Max PASS :   221030 :   221030 Out Q :     2860 ,   445541, TIDL_InnerProductLayer,     PASSED  #MMACs =     0.00,     0.00,     0.00, Sparsity :   0.00, 100.00
     Layer   16 :-------Max Index    8 : 255 ------- #MMACs =     0.00,     0.00,     0.00, Sparsity :   0.00, 100.00
    End of config list found !
    Press any key to continue . . .

  • Hi Praveen,

    Thank you for the kind support.
    I'll check and report them.

    Best Regards
    Kenshow
  • Hi Praveen,

    I checked "tidl_image_preproc.c" file you pointed out, again.
    The reading image file uses openCV function, however, In DSP and EVE do not use it.

    Therefore, I think TIDL on DSP/EVE can not use files such as jpg and png, but what do you think?

    Best regards,
    Kenshow
  • Hi Kenshow,

    What do you mean by " The reading image file uses openCV function, however, In DSP and EVE do not use it." .

    >> The reading image file uses openCV function, however, In DSP and EVE do not use it.
    This is not true because, you can see from "tidl_config_j11_cifar.txt" file attached in previous post.. which runs on DSP/EVE uses the png input..

    rawImage = 0
    numFrames = 1
    preProcType = 3
    inData = ..\testvecs\input\00002.png
    traceDumpBaseName = ".\trace_dump_"
    outData = ".\stats_tool_out.bin"
    updateNetWithStats = 0
    netBinFile = "..\..\test\testvecs\config\tidl_models\tidl_net_cifar_jacintonet11v2.bin"
    paramsBinFile = "..\..\test\testvecs\config\tidl_models\tidl_param_cifar_jacintonet11v2.bin"


    Thanks,
    Praveen
  • Hi Praveen,

    I'm sorry for the late reply.

    In my understanding, the compressed data such as JPEG run DL after being decompressed. Is this wrong?
    In the case of DSP or EVE, the input image file is being read without being decompressed as it is. I think that it is impossible to obtain a correct result.

    Thanks,
    Kenshow
  • Hi Kenshow,

    The compressed data such as JPEG runs on import tool after being decompressed. Also, this decompressed data(trace_dump_0) will also be stored as part of traces (output) in import tool.
    So, we can use this decompressed dumped file as input to run on DSP or EVE cores.

    Thanks,
    Praveen
  • Hi Praveen,

    In other words, is it impossible to execute TIDL directly with jpg and png files on DSP / EVE?
    Those files need to decompress the images before running it.

    Best Regards,
    Kenshow
  • Kenshow,

     Your understanding is right for sample test application provided in TIDL package. 

    You can run the decompression algorithm (Outside TIDL for example in A15 or M3) and pass the raw image to TIDL library.

    refer TIDL VSDK OD and segmentation uses case which decodes H264 video and passes the decoded images to TIDl. Similarly;y you can decode JPEG image pass it TIDL as input.