pitzer / siftgpu Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
A GPU implementation of David Lowe's Scale Invariant Feature Transform Changchang wu http://cs.unc.edu/~ccwu University of North Carolina at Chapel Hill 1. SIFT SIFTGPU is an implementation of SIFT for GPU. SiftGPU uses GPU to process pixels and features parallely in Gaussian pyramid construction, DoG keypoint detection and descriptor generation for SIFT. Compact feature list is efficiently build through a GPU/CPU mixed reduction. SIFTGPU is inspired by Andrea Vedaldi's sift++ and Sudipta N Sinha et al's GPU-SIFT. Many parameters of sift++ ( for example, number of octaves,number of DOG levels, edge threshold, etc) are available in SiftGPU. SIFTGPU also includes a GPU exhaustive/guided sift matcher SiftMatchGPU. It basically multiplies the descriptor matrix on GPU and find closest feature matches on GPU. GLSL/CUDA/CG implementations are all provided. NEW: The latest SIFTGPU also enables you to use Multi-GPUs and GPUS on different computers. Check doc/manual.pdf for more information. You can modify some marcros definition in SimpleSIFT.cpp and speed.cpp to enable the testing of the new functions. 2. Requirements The default implemntation uses GLSL, and it requires a GPU that has large memory and supports dynamic branching. For nVidia graphic cards, you can optionally use CG(require fp40) or CUDA implementation. You can try different implementations and to find out the fastest one for different image sizes and parameters. The GLSL version may not work on ATI now. They did compile sucessfully with ATI Catalyst 8.9, but not any more with 9.x versions. SiftGPU uses DevIl Image library, GLEW and GLUT. You'll need to make sure your system has all the dependening libraries. SiftGPU should be able to run on any operation system that supports the above libraries For windows system visual studio solution are provided as msvc/SiftGPU.dsw, msvc/SiftGPU.sln and msvc/SiftGPU_CUDA_Enabled.sln. Linux/Mac makefile is in folder Linux of the package. 3. Helps Use -help to get parameter information. Check /doc/manual.pdf for samples and explanations. In the vc workspace, there is a project called SimpleSIF that gives an example of simple SiftGPU usage. There are more examples of different ways of using SiftGPU in manual.pdf Check /doc/manual.pdf for help on the viewer.
I ran the SIFT GPU for a test image and for one of the features the descriptor value is greater than 255. The normalized feature descriptor also had value greater than 1.0.
Please help me?
As per my understanding, the features are normalized (lowe paper)....
Hi,
This is not an issue, but it's a question.
I heard somewhere that using SIFT match, we can do a first pass of pair matching using only the biggest features and the results are proportionnal to the end result. It can be used to optimize a little, because we can pair match with the 100 biggest elements for example and if the pair matching is bigger than X%, we do the feature amtching with all the feature of the 2 images.
(I'm not sure if this is understandable, sorry)
My question is, using Sift-GPU, how can I easily have the biggest features in an image?
Best regards,
Raphaël S.
Hi, I successfully run this code on Ubuntu 16.04 and I saved the result as a SIFT file which looks like:
5115 128
2.12 679.77 1.005 1.807
80 128 26 10 7 0 0 3 17 51 28 75 111 90 8 4 0 6 15 22
21 127 9 1 0 2 2 0 0 2 0 0 100 128 10 1 3 4 2 8
128 81 17 3 5 73 57 91 8 7 10 5 6 128 75 19 0 0 0 0
0 2 0 0 106 42 2 0 1 5 10 30 128 128 128 18 1 5 5 23
7 30 128 22 3 24 9 4 0 0 0 0 0 0 0 0 22 90 6 0
0 0 0 1 18 66 51 46 10 0 0 0 0 1 27 24 7 0 0 0
0 0 0 0 0 0 0 0
but I don't understand what it means, can you help me to explain it, thanks a lot!
Hello Pitzer,
Just trying to compile SiftGPU on a iMac (late 2013), with this error output after just running 'make':
Seems like errors in the code, but I guess the code worked elsewhere, so what is that I'm doing wrong?
~/R/SiftGPU $ make
mkdir -p build
mkdir -p bin
sed -i -e 's/\\/\//g' demos/*.bat
ar rcs bin/libsiftgpu.a build/FrameBufferObject.o build/GlobalUtil.o build/GLTexImage.o build/ProgramGLSL.o build/ProgramGPU.o build/ShaderMan.o build/SiftGPU.o build/SiftPyramid.o build/PyramidGL.o build/SiftMatch.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: bin/libsiftgpu.a(ProgramGPU.o) has no symbols
g++ -o bin/libsiftgpu.so build/FrameBufferObject.o build/GlobalUtil.o build/GLTexImage.o build/ProgramGLSL.o build/ProgramGPU.o build/ShaderMan.o build/SiftGPU.o build/SiftPyramid.o build/PyramidGL.o build/SiftMatch.o -lGLEW -framework GLUT -framework OpenGL -lIL -Iinclude - fPIC -L/usr/lib -L./bin -L./lib -Wall -Wno-deprecated -pthread -DWINDOW_PREFER_GLUT - L/Users/prb2pal/Development/Resources/lib -shared -fPIC
clang: warning: argument unused during compilation: '-pthread'
ld: warning: directory not found for option '-L./lib'
ld: warning: directory not found for option '-L/Users/prb2pal/Development/Resources/lib'
g++ -o bin/TestWinGlut src/TestWin/TestWinGlut.cpp src/TestWin/BasicTestWin.cpp bin/libsiftgpu.a -lGLEW -framework GLUT -framework OpenGL -lIL -Iinclude -fPIC -L/usr/lib -L./bin -L./lib -Wall -Wno-deprecated -pthread -DWINDOW_PREFER_GLUT -L/Users/prb2pal/Development/Resources/lib
In file included from src/TestWin/BasicTestWin.cpp:43:
In file included from src/TestWin/BasicTestWin.h:34:
src/TestWin/GLTransform.h:105:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
glTranslated(cx*es, cy*es, 0.0);
^~~~~~~~~~~~
translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
void translate(int dx, int dy, int dz =0)
^
src/TestWin/GLTransform.h:106:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
glTranslated(t[0] ,t[1] ,t[2]);
^~~~~~~~~~~~
translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
void translate(int dx, int dy, int dz =0)
^
src/TestWin/GLTransform.h:107:3: error: use of undeclared identifier 'glScaled'
glScaled(s,s,s);
^
src/TestWin/GLTransform.h:108:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
glTranslated(-cx, - cy, 0);
^~~~~~~~~~~~
translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
void translate(int dx, int dy, int dz =0)
^
src/TestWin/BasicTestWin.cpp:75:15: error: use of undeclared identifier 'GL_MODELVIEW'
glMatrixMode(GL_MODELVIEW);
^
src/TestWin/BasicTestWin.cpp:76:2: error: use of undeclared identifier 'glLoadIdentity'
glLoadIdentity();
^
src/TestWin/BasicTestWin.cpp:77:10: error: use of undeclared identifier 'GL_COLOR_BUFFER_BIT'
glClear(GL_COLOR_BUFFER_BIT);
^
src/TestWin/BasicTestWin.cpp:80:2: error: use of undeclared identifier 'glFlush'
glFlush();
^
src/TestWin/BasicTestWin.cpp:81:2: error: use of undeclared identifier 'glFinish'
glFinish();
^
src/TestWin/BasicTestWin.cpp:189:2: error: use of undeclared identifier 'glViewport'
glViewport(0, 0, w, h);
^
src/TestWin/BasicTestWin.cpp:190:18: error: use of undeclared identifier 'GL_PROJECTION'
glMatrixMode(GL_PROJECTION);
^
src/TestWin/BasicTestWin.cpp:191:5: error: use of undeclared identifier 'glLoadIdentity'
glLoadIdentity();
^
src/TestWin/BasicTestWin.cpp:192:2: error: use of undeclared identifier 'glOrtho'
glOrtho(0, w, h, 0,0,1);
^
src/TestWin/BasicTestWin.cpp:193:18: error: use of undeclared identifier 'GL_MODELVIEW'
glMatrixMode(GL_MODELVIEW);
^
src/TestWin/BasicTestWin.cpp:194:5: error: use of undeclared identifier 'glLoadIdentity'
glLoadIdentity();
^
15 errors generated.
Would you like to wrap any pointer data members with the class template “std::unique_ptr”?
An extra null pointer check is not needed in functions like the following.
Hello!
Thanks for your great work first!
I don't know why the detected keypoints are less than the keypoints detected by the VLFeat?
Can I change some parameters to increase the number of the detected keypoints?
Thank you very much!
Hi all!
I'm quite new in CMakeFiles and other so my question might be trivial. If yes, I'm sorry.
I'm working on VS2017, windows 7 (x64)and I'm trying to build SiftGPU.
Since I use VS, I used the sln project, and resolved all linking errors. Now it compiles fine, but when I try to execute simpleSIFT.cpp, it generate 2 errors :
"Unable to start 'E:......\msvc\SiftGPU....\bin\SifTGPU.dll' ", 'E:......\msvc\SiftGPU....\bin\SifTGPU.dll' is not a valid Win32 app.
What should I do?
Do I have to build the project with Cmake in order to make it works? :/
Thanks
how to calculate features' response value like SIFT in OpenCV?
Hi, pitzer.
I have tested your codes(cuda-based version) in Ubuntu 14.04 with cuda 7.5
I found the CPU utilization is very high.
Most of the Time, it is 100 % .
This would prevented my machine from doing any other CPU intensive jobs.
I found that this is an issue with the cuda runtime library.
The asynchronous Memcpy need occasionally call clock_gettime to query the states of the operation.
And I googled this: link
The link above says: cudaDeviceScheduleBlockingSync
turned out to be a solution.
Regards.
Line 3 of src/SiftGPU/CMakeLists.txt:
find_package(Glew)
is incorrect. It should be
find_package(GLEW)
Making this change lets me compile successfully in Ubuntu. It probably works in Windows even without this change, anyway.
This library have the function of keypoints extraction and matching, but how can i see the results? Or how can I display the results combine with OpenCV?
Could you give me some advice?
_sigma
is not released in destructor.
https://github.com/pitzer/SiftGPU/blob/master/src/SiftGPU/SiftGPU.cpp#L464
Hi,
when trying to compile this program I meet a problem:
src/SiftGPU/GLTexImage.cpp:47:23: fatal error: IL/il.h: No such file or directory
#include "IL/il.h"
ubuntu 14.04, with cuda installed.
i received an error from vs2017 with "nvcc is not a command and cmd exited 9009" but the i run nvcc successed by typing nvcc to my console.
SIFTGPU is very slow when the dll is finally released, it is very FreeLibrary
hello,thank you for your good job.
if i have a thread extract features and descriptors , and store in a vector.and another thread run features match work with the features in the vector. can this work?
i have try this ,and can not get a good result. does SiftGPU support this?
@pitzer , Thank You for making this package available.
Is there a way that this can be released with a MIT, Apache2 license, or some license which allows commercial use? COLMAP uses your feature extractor for parallel GPU processing and with the current license, I can use COLMAP, NerfStudio, and other Photogrammetry programs which are based upon COLMAP for personal / hobby use, however, I can not use it at work since doesn't specify that it can be used commercially. Do you know if such a change is possible? Or do you know the process of attaining a commercial license?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.