Skip to content

Conversation

griwodz
Copy link
Member

@griwodz griwodz commented Aug 13, 2024

Description

All of PopSift's earlier descriptors were created by reading the Lowe paper again and again, attempting to understand how the descriptors should be implemented. We still believe that we followed the letter of the text, but apparently not the spirit.

Both Changchang Wu's implementation and VLFeat compute the descriptors differently. Furthermore, VLFeat's descriptors are rotated by a quarter circle compared to Changchang Wu's. This descriptor follows the VLFeat interpretation because it is the one that has been used by default in AliceVision.

Features list

  • Extract descriptors in the same way as VLFeat

Implementation remarks

At this point, the default PopSift behaviour is still to use our old interpretation. It is faster but obviously not exactly in the spirit off Lowe's idea. If this PR is accepted, should the default be vlfeat for compatibility reasons?

@griwodz griwodz added type:feature prio:major in progress cuda issues related to cuda versions labels Aug 13, 2024
@griwodz griwodz self-assigned this Aug 13, 2024
@griwodz griwodz force-pushed the dev/vlfeat-like-descriptor branch 2 times, most recently from be5729d to da9cc32 Compare August 15, 2024 05:57
@griwodz griwodz marked this pull request as draft August 15, 2024 08:30
@griwodz griwodz force-pushed the dev/vlfeat-like-descriptor branch from da9cc32 to 08939e0 Compare January 14, 2025 14:26
@griwodz
Copy link
Member Author

griwodz commented Aug 26, 2025

@simogasp Could we please revisit this one? The develop-branch descriptor extractors work quite well if PopSift is used for everything, but this PR is about creating SIFT descriptors with better vlFeat-compatibility.

@simogasp simogasp requested a review from Copilot August 26, 2025 10:12
Copilot

This comment was marked as outdated.

@simogasp
Copy link
Member

Ok I didn't see you already removed nvtx here.
What is the status of this one?
I don't have a machine to run the tests, the last time I had one I think there were some issues running the script tests.

Maybe we can merge the nvtx PR #162 , worst case scenario we can rebase and remove the commit abef1d4 from this one and then if you think that the PR is good enough etc we can merge this one. What do you think?

@simogasp simogasp added this to the v0.10 milestone Aug 26, 2025
@griwodz
Copy link
Member Author

griwodz commented Aug 26, 2025

@simogasp I took out the test scripts and proposed making test scripts that actually work as a project for bachelor students. ;-)

I built this on top #162 because at that time, it was impossible to compile the same code on Tegra (ARM with integrated GPU) and Intel/Windows. Reintroducing NVTX3 in #168 should not be a challenge, there are no NVTX calls inside the different descriptor alternatives.

@simogasp simogasp marked this pull request as ready for review August 26, 2025 14:56
@simogasp simogasp requested a review from Copilot August 26, 2025 14:59
@simogasp simogasp force-pushed the dev/vlfeat-like-descriptor branch from a188916 to 157fe70 Compare August 26, 2025 14:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new VLFeat-compliant feature descriptor to PopSift, implementing descriptor extraction that follows VLFeat's interpretation of the SIFT algorithm rather than PopSift's original implementation based on Lowe's paper. The change aims to improve compatibility with AliceVision, which uses VLFeat descriptors by default.

Key changes:

  • Adds a new VLFeat_Desc descriptor mode that distributes gradient weights across up to 8 histogram bins
  • Removes NVTX profiling code and dependencies throughout the codebase
  • Refactors command-line help text for descriptor modes into a centralized function

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/popsift/s_desc_vlfeat.cu New VLFeat-compliant descriptor implementation with GPU kernel
src/popsift/s_desc_vlfeat.h Header file declaring VLFeat descriptor functions
src/popsift/sift_conf.h Adds VLFeat_Desc enum and usage documentation function
src/popsift/sift_conf.cu Implements VLFeat mode parsing and centralized usage text
src/popsift/sift_desc.cu Integrates VLFeat descriptor into main processing pipeline
src/popsift/s_gradiant.h Adds optimized gradient computation for 32-thread blocks
Multiple files Removes NVTX profiling code and dependencies
Application files Updates to use centralized descriptor mode help text

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


get_gradiant32( mod, th, base_x, pix_y, layer_tex, level );

mod /= 2.0f; // Our mod is double that of vlfeat. Huh.
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment 'Huh.' is unclear and unprofessional. Consider explaining why the gradient magnitude needs to be halved or reference the specific difference between PopSift and VLFeat implementations.

Copilot uses AI. Check for mistakes.

else if( text == "vlfeat" )
setDescMode( Config::VLFeat_Desc );
else
POP_FATAL( "specified descriptor extraction mode must be one of loop, grid or igrid" );
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message is outdated and doesn't include all available modes. It should list all valid options: loop, iloop, grid, igrid, notile, vlfeat.

Copilot uses AI. Check for mistakes.

@simogasp simogasp changed the title [WIP] Adding a VLFeat-compliant feature descriptor Adding a VLFeat-compliant feature descriptor Aug 26, 2025
@simogasp
Copy link
Member

Good if you can propose the project to a student! It would be good to make it in python so it could be easily run on all platforms.

I merged the #162, this is rebased wrt the new develop. There are some minor remarks by Copilot about the error messages; I don't know if they are correct. If you want to fix them, then I think we are good to merge.

Carsten Griwodz and others added 2 commits August 29, 2025 09:24
@griwodz griwodz force-pushed the dev/vlfeat-like-descriptor branch from f98bc4a to bf754cf Compare August 29, 2025 07:24
@simogasp
Copy link
Member

@griwodz are we good to merge?
(Copilot has abandoned us, limits reached 🤣 )

@simogasp simogasp self-requested a review August 29, 2025 11:51
@griwodz
Copy link
Member Author

griwodz commented Aug 29, 2025

Yes, this is definitely ready for merging. Rebased to develop and the last check showed consistent results.

@griwodz
Copy link
Member Author

griwodz commented Aug 29, 2025

Oh, I must still update the changelog.

@griwodz
Copy link
Member Author

griwodz commented Aug 29, 2025

Good if you can propose the project to a student! It would be good to make it in python so it could be easily run on all platforms.

I merged the #162, this is rebased wrt the new develop. There are some minor remarks by Copilot about the error messages; I don't know if they are correct. If you want to fix them, then I think we are good to merge.

Agreed. Unfortunately, I didn't get anyone this semester, either. Testing with CMake is apparently not exciting enough. Separate test code written in Python may be easier to sell.

@simogasp simogasp merged commit cf2d0e8 into develop Aug 29, 2025
5 of 6 checks passed
@simogasp simogasp deleted the dev/vlfeat-like-descriptor branch August 29, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants