Ask Your Question
1

Why is FREAK so slow?

asked 2012-12-18 08:56:27 -0600

Hugo Teixeira gravatar image

Hello,

I'm developing an Android app that requires object recognition. I built a PC desktop version where I use FREAK as a descriptor extractor and it provided very satisfying results. However, in my Android app, FREAK is incredibly slow. No matter which feature detector I use FREAK requires at least 6 seconds to extract. I find this very weird since ORB requires less than 1 second (also as a descriptor extractor) and BRIEF requires even less. Even SIFT and SURF as extractors are faster. I've seen topics here where people commented that FREAK speed was not as good as expected but nobody mentioned such huge difference in execution time. Is this normal or am I doing something wrong? If I am what could it be? Thank you

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
3

answered 2013-02-06 05:57:27 -0600

jav_rock gravatar image

In my application The times are more or less like this in the PC:

detection 1ms
extractor with FREAK 80ms
matching 20ms

FREAK is still slower than I expected even if I only create the object once. It doesn't change that much for android as I use native JNI libraries.

I think if you are getting times of 6 seconds for detection you may have a LOT of things wrong. Check all memory leaks, size of of frames you are processing, check that you create objects once (detector, extractor, matcher). Put timers just for the process of freak extraction to see the real time.

edit flag offensive delete link more

Comments

2

+1 for "you may have a LOT of things wrong" Definitely, it's not FREAK, and it's not a single issue

sammy gravatar imagesammy ( 2013-02-06 08:54:39 -0600 )edit

I think the problem is the memory allocation during the extractor.compute(img_mat, keypoints1, descriptors1) function. If I call it twice, the second time is much faster, even if I change the img_mat to a completely different image. Now I achieve speed of ~200ms with FAST and less than 10ms with ORB and STAR

Hugo Teixeira gravatar imageHugo Teixeira ( 2013-02-13 08:11:13 -0600 )edit
1

answered 2012-12-18 10:30:03 -0600

SR gravatar image

Make sure you create the FREAK object once in advance before you call it.

edit flag offensive delete link more
0

answered 2012-12-18 10:05:47 -0600

Geppertm gravatar image

Hi, can you give more details. Like which detector you use. My experience is that the detector requires the most time. Using Windows FREAK is faster then SIFT or Surf. Maybe there´s a issue in the implementation of the Android version. Otherwise the reason could be tha FREAK uses floating point descriptors, like SIFT and SURF.

edit flag offensive delete link more

Comments

Hey. I've tried detection with FAST, ORB and STAR. In all of them it takes over 6s

Hugo Teixeira gravatar imageHugo Teixeira ( 2012-12-19 12:20:57 -0600 )edit

But the execution time I measure concerns only the extracting. Keypoint detection execution time is very fast in all three I used

Hugo Teixeira gravatar imageHugo Teixeira ( 2012-12-20 03:28:49 -0600 )edit

How much Keypoints did you get?

Geppertm gravatar imageGeppertm ( 2012-12-20 05:53:42 -0600 )edit

Depends on the image but FAST always gives me more than 1000, ORB between 430 and 460 and STAR less than 100. FAST detection takes between 25 and 35 ms, ORB 90-115 ms and STAR 115-120 ms

Hugo Teixeira gravatar imageHugo Teixeira ( 2012-12-21 08:28:34 -0600 )edit

Question Tools

Stats

Asked: 2012-12-18 08:56:27 -0600

Seen: 4,138 times

Last updated: Feb 06 '13