Forums - FastCV working not fast

6 posts / 0 new
Last post
FastCV working not fast
scottjohnson01987
Join Date: 10 Nov 15
Posts: 3
Posted: Mon, 2015-11-16 09:07
Hi,

I have downloaded FastCV 1.2.2 FastCV for Linux from here:
https://developer.qualcomm.com/software/fast-cv-sdk/tools

And I have use it in Ubuntu OS with Snapdragon S600,
Project has been successfully builded and run. But speed of function too slow
the same as my own implementation of function (which works on CPU)

How to make it fast?
 
  • Up0
  • Down0
amiya.ray
Join Date: 25 Jul 16
Posts: 3
Posted: Thu, 2016-08-04 06:30

I have tested 2d convolution using fastCV1.7.1 on arm64 with multithreading. It seems much slower (5x) than OpenCV 3.1. Any clue what may be wrong here?

 

 

  • Up0
  • Down0
jeff4s Moderator
Join Date: 4 Nov 12
Posts: 106
Posted: Thu, 2016-08-04 11:14

Did you first use fcvSetOperationMode(FASTCV_OP_CPU_PERFORMANCE) before calling other APIs? What APIs are you using by the way?

Cheers,

-Jeff

 

  • Up0
  • Down0
amiya.ray
Join Date: 25 Jul 16
Posts: 3
Posted: Fri, 2016-08-05 02:11

Thanks for the reply. I missed to set operation type. Strangely, even with setting FAST_OP_CPU_PERFOMANCE, I get similar time as before (5x slower than Opening on Exynos). I am comparing fcvFilterCorrNxNu8f32 with OpenCV in filter2d. On snapdragon, FastCV is 3x slower.

 

BR, Ray

  • Up0
  • Down0
jeff4s Moderator
Join Date: 4 Nov 12
Posts: 106
Posted: Fri, 2016-08-05 11:07

Hi,

What device did you use to run FastCV on? Please note that if it's not Snapdragon based there's not much benefit of FastCV acceleration even though you get the same functionality. Also please make sure to do the comparison on same device so that it's run on same CPU with same clock etc.

What's the image dimension and kernel size by the way?

Cheers,

-Jeff

  • Up0
  • Down0
amiya.ray
Join Date: 25 Jul 16
Posts: 3
Posted: Mon, 2016-08-08 20:20
Thanks for the email.
 
Image size 640x480, 1 channel, Exynos, 64bit
----------------
- OpenCV (filter2D) time 0.015sec
- FastCV (fcvFilterCorrNxNu8f32 with initialization fcvSetOperationMode(FASTCV_OP_CPU_PERFORMANCE)) : 0.05sec
(time for deep copy to FastCV input buffer, and copy of output buffer to OpenCV Mat not included)
 
Image size 640x480, 3 channels, Exynos, 64bit
----------------
- OpenCV time 0.033sec (supports 3 channel input Mat)
- FastCV 0.13sec (split input to 3 channel, multi-thread processing, merge result channels)
- FastCV 0.11sec (process 3 channel Mat data)
 
On Snapdragon MSM8996, FastCV code is generally 40% faster than Exynos. When I get Snapdragon board next time, I would share its timings. But, in general, FastCV seems slower than OpenCV for 2D filtering. 
 
Kindly guide how to use FastCV for efficient processing. Any guess / estimate, how much speedup is expected if filtering is done using Hexagon DSP?
 
Thanks, 
Ray
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.