quantombone / exemplarsvm

Ensemble of Exemplar-SVMs for Object Detection and Beyond
http://www.cs.cmu.edu/~tmalisie/projects/iccv11/index.html
MIT License
430 stars 155 forks source link

Bug in esvm_detect #62

Open rosenfeldamir opened 12 years ago

rosenfeldamir commented 12 years ago

in line 291 of esvm_detect pyrN = cellfun... is calculated for the number of HOGS that fit inside each level of the pyramid. however, the prod of a negative size will be positive, which leads to zeros at the end of the matrix X. Later, offsets(2,bb) is referenced, which may be out of range since size(offsets,2) < size(X,2).

instead of : pyr_N = cellfun(@(x)prod([size(x,1) size(x,2)] -S+1),t.hog); it should be: pyr_N = cellfun(@(x)prod(max(0,[size(x,1) size(x,2)] -S+1)),t.hog);

-Amir

quantombone commented 12 years ago

Thanks Amir for catching this!

I might have already fixed this issue in my development branch as I've refactored a lot of things. I haven't pushed any changes into the main branch because people started using it and I don't have enough time to always make sure it is stable.

I've been slow on replying because I stopped having github email me notifications and they've changed their interface a bit (so it took me a few days to notice I have notifications pending!)

quantombone commented 12 years ago

Hey Amir, do you know how to do pull requests in github? The idea is that you can for my code, fix your own fork. Then if you think that your fix is worthy of spreading to my master branch, you submit a pull request. I believe that way you get credited with the bugfix/extension and it helps everybody out.

I would love to part-take in more forking, branching, etc. The catch is that you have to perform the pull requests with one fix at a time, so that I can clearly see what you changed. Let me know if you're interested in doing things this way.

rosenfeldamir commented 12 years ago

Hi Tomasz, I'm not really familiar with how to work with github. I'll take the time to get acquainted to it if I find more stuff that I'd like to change. For the meantime, I don't mind if I don't get credit (or blame..) for this change.

Cheers, -Amir

On Fri, Aug 10, 2012 at 10:24 AM, Tomasz Malisiewicz < notifications@github.com> wrote:

Hey Amir, do you know how to do pull requests in github? The idea is that you can for my code, fix your own fork. Then if you think that your fix is worthy of spreading to my master branch, you submit a pull request. I believe that way you get credited with the bugfix/extension and it helps everybody out.

I would love to part-take in more forking, branching, etc. The catch is that you have to perform the pull requests with one fix at a time, so that I can clearly see what you changed. Let me know if you're interested in doing things this way.

— Reply to this email directly or view it on GitHubhttps://github.com/quantombone/exemplarsvm/issues/62#issuecomment-7635877.