Code Monkey home page Code Monkey logo

Comments (4)

rayhou0710 avatar rayhou0710 commented on September 4, 2024

I feel you use the wrong '-arch=sm_35' to compile. Check your GPU and modify the Makefile accordingly.

from cudasift.

avcs2080 avatar avcs2080 commented on September 4, 2024

thanks for the reply.... the '-arch=sm_35' was set appropriately in the settings. I'm trying to implement your cuda kernels on a large dataset... so the kernels have to be called inside a loop. Ideally I'd avoid using cuda kernels inside a loop but I have no choice. I have solved the problem but the solution seems a little unusual. I had to strictly follow the following steps

here is how
img_1_host = cv::Mat::zeros(IMG_1_HOST.rows, IMG_1_HOST.cols,CV_32FC1); // STEP1
SiftData siftDataR; // STEP2
InitSiftData(siftDataR, 65535, true, true); // STEP3
CudaImage IMG_1_DEV;
// declaring cudaimage inside the loop solves the 'OUT OF MEMORY PROBLEM'
cv::cvtColor(IMG_1_HOST,img_1_host,CV_BGR2GRAY); // STEP4
img_1_host.convertTo(img_1_host,CV_32FC1); // STEP5
.......

from cudasift.

rremani avatar rremani commented on September 4, 2024

Hi @avcs2080 ,
I have got out of memory error when I try to MatchSiftData() of nearly 20000 features from each image. Does it related to memory allocation error.
Thanks

from cudasift.

avcs2080 avatar avcs2080 commented on September 4, 2024

@rremani
It is hard to say without looking at the code. did you initialize SiftData with 20000 values prior to using it i.e.
something like
SiftData siftDataA;
InitSiftData(siftDataA, 20000, true, true);
In my case, I had nested for loop as discussed above. When I declared CudaImage outside the nested loop, surprisingly I got out of memory error. Declaring it inside the loop somehow got rid of the error. I'm assuming the scope of the variable within the loop might have prevented it. Also, don't forget to free the memory at the bottom.

hope this helps

from cudasift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.