In my previous post <a href="http://sandbox.arrayfire.com/creating-a-simple-corner-detector-with-arrayfire/">Writing a Simple Corner Detector with ArrayFire</a>, I talked a little bit about the new features that we are working on for ArrayFire. Some of these new computer vision features will be available in the next release of ArrayFire, which will be out in just a few months.

For the next release, ArrayFire will have a complete set to start with feature tracking, combining the FAST feature detector [1] and ORB to extract descriptors [2], descriptor matching will be done with the Hamming function. We will also include a dedicated version of the Harris corner detector [3], even knowing we can fully write it using core ArrayFire functions, this implementation will be more straightforward and simpler to use, combined with a better performance.

For this post, I will share some of our current benchmarks for this new set of features. We compare the results of each of these functions to the OpenCV implementations, which is currently one of the best code references for computer vision.

The results shown below were all generated with an Intel Sandy Bridge 32 core processor and an NVIDIA Tesla K20C GPU. Software used is ArrayFire development version and OpenCV 2.4.9 with SSE and CUDA support.

<h3>Benchmarks</h3>

Note that the horizontal axes of all graphs are in logarithmic scale.

Below we see the benchmarks for the FAST feature detector. Note that we measure the speedup according to the number of features found, as FAST scales according to this characteristic.

<iframe height=371 width=600 src="//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1OqbdY8B8K7z6_trW2qB1lseDREGzVe7V1OJKsPnmUC4/gviz/chartiframe?oid=1883059785" seamless frameborder=0 scrolling=no></iframe>
Different from FAST, the ORB descriptor extractor scales according to the number of pixels of the input image, even though it relies on FAST to detect features.

<iframe height=371 width=600 src="//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1OqbdY8B8K7z6_trW2qB1lseDREGzVe7V1OJKsPnmUC4/gviz/chartiframe?oid=303245979" seamless frameborder=0 scrolling=no></iframe>

Finally, the Hamming matcher benchmarks are below. To perform this measurements, we used a set of 500 descriptors as the test descriptors (e.g., number of descriptors extracted from an image), being matched to a database containing 500 to 5 million descriptors, separated by a factor of 10.

<iframe height=371 width=600 src="//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1OqbdY8B8K7z6_trW2qB1lseDREGzVe7V1OJKsPnmUC4/gviz/chartiframe?oid=1730737789" seamless frameborder=0 scrolling=no></iframe>

<h3>Discussion</h3>

By looking at the previous graphs, the advantage of using GPUs for computer vision applications over CPUs is made very clear, as we can get speedups of more than 20 times for ORB and Hamming matching, and up to 10 times for the FAST features detector.

Comparing OpenCV's implementation of the algorithms for CUDA, we see that in almost all cases we are already at least a little bit faster (e.g., up to 1.3x speedup on ORB), but this is not the case for all samples. However, this is not yet the final version, we still have a lot of work to improve performance even more and to have everything working perfectly, with the same quality we always provide in each and every release. With this in mind, we can assure that these numbers will improve even more until these algorithm are made public.

If you can not wait until the release and want to get a taste of what is coming, please, contact us at <a href="mailto:sales@arrayfire.com">sales@arrayfire.com</a>, we will be happy to discuss on how you can get the latest features of ArrayFire before the release!

<h3>References</h3>

[1] Rosten, Edward, and Tom Drummond. "Machine learning for high-speed corner detection." Computer Vision–ECCV 2006. Springer Berlin Heidelberg, 2006. 430-443.
[2] Rublee, Ethan, et al. "ORB: an efficient alternative to SIFT or SURF." Computer Vision (ICCV), 2011 IEEE International Conference on. IEEE, 2011.
[3] Harris, Chris, and Mike Stephens. "A combined corner and edge detector." Alvey vision conference. Vol. 15. 1988.