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/PROCESSOR-SDK-AM57X: OpenCV DSP acceleration

Part Number: PROCESSOR-SDK-AM57X
Other Parts Discussed in Thread: AM5728

Tool/software: TI-RTOS

Hello,

I'm trying to evaluate performance of some OpenCV algorithms on AM5728, for both ARM and DSP. During the evaluation, I found that for cv::CascadeClassifier, performance on DSP is much lower than that on ARM.
Based on the details provided in http://www.ti.com/lsds/ti/processors/technology/libraries/open-cv-libraries.page, this behavior seems to be expected. 

I'm using Processor SDK v3.02.00.05 and the OpenCV libraries that come bundled with it. Is there an updated version of this algorithm implementation for DSP with better performance?
Also, can an OpenCL based implementation give the best performance possible on DSP (for any algorithm in general) with sufficient optimization? Or are there any other method/s that can give significantly better results?

Regards,
Manu

  • The RTOS team have been notified. They will respond here.
  • Manu,

    What member function in Cv Cascade Classifier are you running in your example?

    The OpenCL based C66x OpenCV implementation is already running on dual core DSP architecture. While there may be further room to optimize it using intrinsic, this is already optimized by the compiler. Please note the DSP is running at 1/2 the speed of the ARM cores.

    The beauty of the ARM+DSP implementation is that you can choose to offload a task to the DSP if there is sufficient lift in performance else you can choose to run the function on dual ARM architecture. The DSP usually performs better when there is lot of computation and a big chuck of data is being processed.

    Regards,
    Rahul
  • Hi Rahul,

    Thank you very much for the response.

    Rahul Prabhu said:

    What member function in Cv Cascade Classifier are you running in your example?

    I'm using detectMultiScale member function, if that is what you are asking. Also, I'm trying to run the algorithm for face detection.

    Rahul Prabhu said:

    The OpenCL based C66x OpenCV implementation is already running on dual core DSP architecture. While there may be further room to optimize it using intrinsic, this is already optimized by the compiler. Please note the DSP is running at 1/2 the speed of the ARM cores.

    The beauty of the ARM+DSP implementation is that you can choose to offload a task to the DSP if there is sufficient lift in performance else you can choose to run the function on dual ARM architecture.

    I agree. There is no doubt about the advantage of ARM+DSP implementation in OpenCV. My only goal here is to know if the performance can be improved further on DSP, and whether OpenCL itself imposes any limitation on the performance. Based on your explanation, I understand there is no such limitation in OpenCL. Please correct me if my understanding is wrong.

    Rahul Prabhu said:

    The DSP usually performs better when there is lot of computation and a big chuck of data is being processed.

    I understand that some algorithms perform better on ARM and some on DSP. The reason why I'm interested in cv::CascadeClassifier is because this algorithm on DSP is 10 times slower than the corresponding ARM implementation for some cases. So, does this mean that the performance limitation is due to nature of the algorithm itself (i.e. it cannot be efficiently optimized for DSP)? Or is it that the current implementation of cv::CascadeClassifier is not fully optimized for DSP but there is scope to further improve the performance?

    Regards,
    Manu