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: OD module using external pd_weights failed

Part Number: TDA3XEVM

Tool/software: TI-RTOS

Hello 

I  use a external PD weights to detect the person in a video? then the output of OD module is so  wired as follow:

1. what the TI_OD_OutArgs struct pd_config member numDetected = 512,   what's mean?  all the numDetected of pdStats is 512.

2. The object num is 8, but the last two(#6, #7) list is zeros;

3.  Run a little time, the error happen like this:

     [DSP1 ] 64.662142 s: Assertion @ Line: 539 in objectdetection/objectClassificationLink_algPlugin.c: pInputObjectList->numObjects < TI_OD_MAX_NUM_OBJECTS : failed !!!
     [DSP1 ] 64.662477 s: Assertion @ Line: 539 in objectdetection/objectClassificationLink_algPlugin.c: pInputObjectList->numObjects < TI_OD_MAX_NUM_OBJECTS : failed !!!

Then the display turn blue!

Could someone help me???

  • Couple of questions to help understand your problem better
    1. How did you trained the external weights? Did you use the TI ACF jacinto training framework?
    2. Whats the classifier structure you kept, Like number of trees and tree structure
    3. Are you able to run in your setup the use case with TI provided weights?

    Thanks,
    With Regards,
    Pramod
  • Regarding yuor specific questions:
    1. numDetected: Please refer User guide 5.1.11.8 TI_OD_Stats and Figure 1. Baiscally numDetcted is number of objectes detected by first Detector stage (refer figure 1) and then other 2 variables indicate the refined number of objects after each stage
    2. Having 8 but last 2 list being 0 is something has to be looked at by your test case, its difficult to comment on this
    3. Rgearding error. If you have very busy scene or if your model detects lot of false positive then this can happen as we support maximum 32 objects to be detected in a scene. Please refer the macro TI_OD_MAX_NUM_OBJECTS defined in iobjdet_ti.h file

    Thanks,
    With Regards,
    Pramod
  • 1. Yes I use the TI ACF jacinto training framework;
    2. For debug this problem, I even used the AcfJacintoInriaDetector.descriptor just from the TI ACF jacinto source code
    3. Yes The demo can running well use the pd_adaboost_weights.bin in the dir of "C:\PROCESSOR_SDK_VISION_03_02_00_00\ti_components\algorithms\REL.200.V.OD.C66X.00.06.02.00\200.V.OD.C66X.00.06\modules\ti_object_detection\test\testvecs\input"

    BUT when use the AdaboostTableGen.exe to transform the AcfJacintoInriaDetector.descriptor just from the TI ACF jacinto to pd_adaboost_weights.bin, and then replace the pd_adaboost_weights.bin , It is failed?

    The different of two pd_adaboost_weights.bin is the size; the pd_adaboost_weights.bin in the dir of "C:\PROCESSOR_SDK_VISION_03_02_00_00\ti_components\algorithms\REL.200.V.OD.C66X.00.06.02.00\200.V.OD.C66X.00.06\modules\ti_object_detection\test\testvecs\input" is 40KB, and the pd_adaboost_weights.bin from the AcfJacintoInriaDetector.descriptor is just the 24KB with 10640 elements

    where should I pay attention to when putting this elements to input buffer of LIB function?
  • PSDK-Vision uses default weights which is built-in part of the OD libraray. If you have to supply weights externally please take a look at ti_components\algorithms\REL.200.V.OD.C66X.00.06.02.00\200.V.OD.C66X.00.06\modules\ti_object_detection\test\src\object_detection_tb.c

    You will basically have to allocate additional buffers in PSDK-Vision to enable this feature,
    File to modify (just like how its done in test bench) is vision_sdk\apps\src\rtos\alg_plugins\objectdetection\objectDetectionLink_algPlugin.c
  • I see that you rejected this answer. Can you please confirm that you tried this approach?
  • Hi Shyam Jagannathan

    I THINK you do not notice my question.
    I do all the step as your said; I use the pd_adaboost_weights.bin provided in ti_components\algorithms\REL.200.V.OD.C66X.00.06.02.00\200.V.OD.C66X.00.06\modules\ti_object_detection\test\ as external model input . The demo of Object Detection CAN run well.

    BUT When replace the pd_adaboost_weights.bin which was generated by the tool AdaboostTableGen.exe. The input file is AcfJacintoInriaDetector.descriptor from the TI ACF jacinto source code. I don't change any information.
    It is not work..
  • Could you use the try the steps two test the ObjectDetection demo?
    1. use the AdaboostTableGen.exe to transform the AcfJacintoInriaDetector.descriptor to pd_adaboost_weights.bin
    2. use this pd_adaboost_weights.bin as external input model for OD alg_plugin
    3. running the ObjectDetection demo
    All files provided by TI

    I follow the steps , but it can not success. I need your support
  • Sorry, I missed your question.

    ACF Jacinto writes descriptor in two formats, Compact and Cascade. AcfJacintoInriaDetector.descriptor is written in "Compact" format which is not accepted by AdaboostTableGen.exe. When you retrain using ACF Jacinto, please write the descriptor in "Cascade" format. This format will be accepted.

    So in ACF Jacinto, when you call acfSaveDescriptor() pass the 3rd argument as false which will write the descriptor in "Cascade" format.

    Hope this helps.
  • Thank you
    AS Luke Lin' s suggesting
    This is problem had been solved!!