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.

TDA4VMXEVM: TDA4 model import probelm

Part Number: TDA4VMXEVM

Hi,

Env : VirtualBox , ubuntu (64bit)

Recently I try to import my caffe model , following the TI Deep Learning Library User Guide.

At the import phase , here's the import text file:

modelType          = 0
inputNetFile       = "../../test/testvecs/models/public/caffe/Model1.prototxt"
inputParamsFile    = "../../test/testvecs/models/public/caffe/Model1.caffemodel"
outputNetFile      = "../../test/testvecs/config/tidl_models/caffe/tidl_net.bin"
outputParamsFile   = "../../test/testvecs/config/tidl_models/caffe/tidl_param_"
inWidth = 256
inHeight = 192
inNumChannels = 3
inDataFormat = 1
resizeWidth = 256
resizeHeight = 192
inData = ../../test/testvecs/config/test.txt
postProcType = 0

According to the document inDataFormat = 1 (raw file).

If I want to use bmp file , which value inDataFormat should be set?

For inData the file content is

testvecs/input/aa.y testvecs/input/aa.y

"aa.y" is my raw image file with width = 256 , height = 192 ,channels=  3.

Segmentation_list.txt is like this:

testvecs/input/ti_lindau_I00000.jpg testvecs/input/ti_lindau_I00000.jpg

Here is the question : Why the jpg file is written twice?

Could you explain how the inData text file written?

Another question is after I run the import command , message showed in command line as below:

"Error in reading testvecs/input/aa.y testvecs/input/aa.y"

Neither original "airshow_mobilenet_256x256.y" files in the input folder and my raw image file showed the error message.

If I using the .bmp/.jpg file there is no error.

Do you have the document for details about inData?

The file imageNet_sample_val.txt

testvecs/input/airshow.jpg 895
testvecs/input/ti_lindau_I00000.jpg 557

The number follows .jpg = class_type?

Thank you.

  • Hi,

       Please find my answers inline(in BOLD) :

    According to the document inDataFormat = 1 (raw file). 

    <TI> Which document are you referring. inDataFormat takes the following values :

    TIDL_inDataFormatBGRPlanar = 0,
    TIDL_inDataFormatRGBPlanar = 1,
    TIDL_inDataFormatRGBMax = 2

    If I want to use bmp file , which value inDataFormat should be set?

    <TI> During import you can directly give the file as .bmp and files are read as per extension

    testvecs/input/ti_lindau_I00000.jpg testvecs/input/ti_lindau_I00000.jpg

    Here is the question : Why the jpg file is written twice?

    <TI> First file is used as input and second file is used as ground truth

    Could you explain how the inData text file written?

     

    Another question is after I run the import command , message showed in command line as below:

    "Error in reading testvecs/input/aa.y testvecs/input/aa.y"

    Neither original "airshow_mobilenet_256x256.y" files in the input folder and my raw image file showed the error message.

    If I using the .bmp/.jpg file there is no error.

    Do you have the document for details about inData?

    <TI> Can you explain what you mean here? inData contains the input tensor information. The way it is read is based on inFileFormat flag. Please refer userGuide "The List of Inference Configuration Parameters" section for details

    The file imageNet_sample_val.txt

    testvecs/input/airshow.jpg 895
    testvecs/input/ti_lindau_I00000.jpg 557

    The number follows .jpg = class_type?

    <TI> Yes

     

    Regards,

    Anshu

  • Thank you for your reply.

    I'm trying to import a segmentation caffe model , finding some example from the ..../test/testvecs/config/import/public/caffe folder.

    But seems no example for segmentation.

    Besides, how can I tell the text files in ti_dl/test/testvecs/config folder which of them are using as import data or inference data.

    Segmentation.bmp is the RGB image file.

    Segmentation_GT.bmp is the Ground truth.

    This is the file I using when imports model:

    test/input/segmentation.bmp test/input/segmentation.bmp

    And the text file when runs the PC_dsp_test_dl_algo.out:

    test/input/segmentation.bmp test/input/segmentation_GT.bmp

    Are the above text files setting correct or not?

    
    

  • Hi, 

    I've downloaded the deploy.prototxt and jsegnet.caffemodel from the link below:

    https://github.com/tidsp/caffe-jacinto-models/tree/caffe-0.17/trained/image_segmentation/cityscapes5_jsegnet21v2/sparse

    I wrote the tidl_import_jsegnet.txt.

    I got a message: 

    "Could not find argMaxOut in Model file !!!"

    So I removed the argMax layer in the prototxt and re-run the import.

    After import the model, I run PC_dsp_test_dl_algo.out.

    It gives the message:

    "Could not allocate memory for output .. Exiting"

    Then I've tried to ignore the message "Could not find argMaxOut in Model file !!!" ,and used the generated model to run PC_dsp_test_dl_algo.out.

    And I got the result below:

    The result seems strange.

    The attached .rar file contains the import , infer , prototxt,inData list , caffemodel, generated bin files , input and output images.

    Could you please help me to check the import and infer files?

    8203.Ref.rar

    Thank you.

  • Hi,

      We have not validated jSegnet in tidl 0.9 release. This network is validated on the upcoming release of TIDL (1.0), which should be soon available. Please wait for the new release.

    Regards,

    Anshu