Sift on GPU

Jerome Kieffer google at terre-adelie.org
Tue Sep 10 08:23:27 EDT 2013


On Tue, 10 Sep 2013 09:43:24 +0200
Andreas Mueller <amueller at ais.uni-bonn.de> wrote:

> Hi Jerome.
> Have you benched against vl_feat.
> They have pretty optimized C code, and I think it would be very 
> interesting to see
> if you are faster. Their code is also BSD, btw.

Hello Andreas,

Thanks for the link.
This is the first time I use matlab ... so the comparison is likely to be unfair:

I = imread(fullfile(vl_root,'data','roofs1.jpg')) ;
t=cputime;[f,d] = vl_sift(single(rgb2gray(I))) ;e=cputime-t
e=0.9600

under python:
In [1]: import scipy.misc,sift
In [2]: img = scipy.misc.imread("roofs1.jpg")
In [3]: sift_gpu = sift.SiftPlan(template=img,devicetype="GPU")
In [4]: %timeit kp = sift_gpu.keypoints(img)
10 loops, best of 3: 87 ms per loop
In [5]: sift_cpu = sift.SiftPlan(template=img,devicetype="CPU") #selects Intel driver
In [6]: %timeit kp = sift_cpu.keypoints(img)
1 loops, best of 3: 216 ms per loop
In [7]: sift_cpu_amd = sift.SiftPlan(template=img,device=(1,0)) #selects AMD driver, computer specific
In [8]: %timeit kp = sift_cpu_amd.keypoints(img)
1 loops, best of 3: 225 ms per loop

The computer is a dual Intel(R) Xeon(R) CPU E5-2643 0 @ 3.30GHz (fast) but with a moderate graphics card Quadro 2000
On my GeForce Titan (GK110) I got:
10 loops, best of 3: 38.7 ms per loop


A rough and unfair comparison would say our code is 25x faster; but the
test has been made on a rather small image (640x478) which does not
allow the GPU to express it's speed. On the other hand if the could
would have run on my computer it would be worse (my CPU is only 2.2GHz).

You says vl_feet is optimized, it looks slower than the one from IPOL wrapped under python
https://github.com/kif/imageAlignment

In [9]: import feature
In [10]: %timeit feature.sift_keypoints(img.max(axis=-1))
1 loops, best of 3: 687 ms per loop

Comments are welcome.
Cheers,
-- 
Jerome Kieffer <google at terre-adelie.org>



More information about the scikit-image mailing list