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: Is there an object detection example code for TDA4VM?

Part Number: TDA4VM

Hi,

Is there an object detection example code for TDA4VM?

I already run the Vision Apps demo (./run_app_tidl_avp2.sh) and now want to run example code of object detection.

Could you let me know where I can download the example code and some documents for that?

I want to edit the code with a little of modifications before using my detection code.

Thank you in advance.

Best regards,

Yongcheon.

  • Hi Yongcheon,

    can you check if this helps:

    Regards,

    Yordan

  • Hello Yordan,

    I am also interested in this question, and I think that the answer proposed is outdated, and apparently the object detection configs do not exist anymore in the new SDK, and the app_tidl demo app is for image classification only. Is my understanding correct or am I missing something?

    Does any alternative solution exist to test object detection networks on Linux? otherwise, is it possible to alter the app_tidl_avp so it can run only one object detection network? Thanks.

    Regards,

    Youcef.

  • Yes we do have it, but unfortunately not part of PSDKRA 6.2, we should be including this in the next version in May.

    But meanwhile, I can share the standalone object-detection application via CDDS on your respective accounts.

    Regards,
    Shyam

  • Hi,

    I have the CDDS account. Could you share the object-detection application via CDDS?

    Thank you in advance.

    Regards,

    Yongcheon.

  • Hi Yongcheon,

    I have uploaded the standalone app in CDDS please try it and let us know.

    Regards,
    Shyam

  • Hi Shyam,

    Thank you for uploading the apps.

    I tried them, but I got the error message.

    command :

    $  /opt/vision_apps/vx_app_tidl_od.out  --cfg  app_od.cfg

    error :

    File could not be opened

    Of course, I copied 'test_data' to 'vision_apps' directory,

    and compared 'start_frame' and 'num_frames' with the number of yuv files in 'tidl_demo_images' directory.

    I printed out the path of the input yuv file when I run the 'od' app,

    and the path has no problem. (ex. /opt/vision_apps/test_data/psdkra/tidl_demo_images/0000000488.yuv)

    Could you help?

    (There was no error when I did 'avp2' app.)

    Best regards,

    Yongcheon.

  • You may have to copy the app_od.cfg to /opt/vision_apps folder as well. Can you please check if you have app_od.cfg?

    Regards,
    Shyam

  • Yes, I manually copied the app_od.cfg file to /opt/vision_apps of the microSD card.

    I also checked the paths in the app_od.cfg file, and there was no problem.

    Regards,

    Yongcheon.

  • Can you also confirm if vx_app_tidl_od.out is copied to the same location? Basically, the make linux_fs_install_sd should copy these files.

    You can keep a copy of app_od.cfg and run_app_tidl_od.sh under vision_apps/basic_demos/app_linux_fs_files.

    If vx_app_tidl_od.out is not copied then its possible that its not built. Can you please confirm?

    Also please provide a screenshot of the UART console when you see the error.

    Regards,
    Shyam

  • The files you mentioned are located in /opt/vision_apps.

    (vx_app_tidl_od.out, app_od.cfg, run_app_tidl_od.sh)

    vx_app_tidl_od.out was copied by 'make linux_fs_install_sd' command.

    app_od.cfg was manually copied from host PC ($PSDKRA_PATH/vision_apps/apps/dl_demos/app_tidl_od/confg/app_od.cfg).

    run_app_tidl_od.sh was created by me. It contains '/opt/vison_apps/vx_app_tidl_od.out --cfg app_od.cfg'.

    I attach error message screenshot.

    I printed out the input file path and you can see that the sentence "input_file_path = /opt/vision_apps/test_data/psdkra/tidl_demo_images/0000000100.yuv".

    Regards,

    Yongcheon.

  • Yongcheon,

    For some reason, I am unable to see the images that you've attached. I guess they didn't come through.

    Not sure if I have shared the images under tidl_demo_images, the number should start from 0000000500.yuv

    Also you can convert your images in NV12 format using ffmpeg and number them sequentially Eg. 0000000500.yuv, 0000000501.yuv, 0000000502.yuv etc.

    Regards,
    Shyam

  • Dear,

    I copied the test image data '0000000001.yuv' ~ '0000000999.yuv' contained in 'test_data_06_01_01',

    and '0000000100.yuv'  ~ '0000000499.yuv', '0000001900.yuv' ~ '0000002299.yuv' from ' test_data_06_02_00'.

    Also, I edited the app_od.cfg file to change the number of start frame.

     

    I found the 'readScalerInput' function has the error message "File could not be opened".

    I cannot understand why the OD app cannot find the input file which can be found in AVP2 app.

  • Yongcheon can you print the file_name like below in readScalerInput and check what its trying to open?

    printf("File could not be opened %s \n", file_name);

    Regards,
    Shyam

  • Hello again,

    I gave the new files a test today, and I run by the same error (File could not be opened), and I was able to solve it by doing two things:

    1/ Adding "input_file_list" parameter that is missing in the app_od.cfg file, the parameter should point to a names.txt file or equivalent, that contains the list of the input files names (like in app_oc.cfg).

    2/ You have to create the output folder, because the program does not create it automatically (mkdir app_tidl_od_out).

    This should solve your problem.

  • The app_tidl_od was designed to work like the AVP demos which accept a list of "sequentially numbered" input frames in NV12 format. But if you were able to get it to work like app_tidl please go ahead.

    Yes none of the demos create output folder on its own, they have to be created by the user before running the demo.

    Regards,
    Shyam

  • Yes indeed, app_tidl_od does not require a names.txt file, so the first point I mentioned is irrelevant. What caused the problem is just the fact that there was no output folder.

    Regards,

    Youcef.

  • Thank you for sharing your solution.

    I cannot test now because of the other project, but I believe your solution will resolve my problem.

    Thank you, Youcef and Shyam, and I close this issue.

    Regards,

    Yongcheon.