-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/vl feat compliance3 #133
Open
griwodz
wants to merge
34
commits into
develop
Choose a base branch
from
fix/vlFeatCompliance3
base: develop
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
0b75276
[popsift] improve docs and options
ed60e19
[bugfix] fix bug in L2 normalization
b13d259
[cosmetic] improve normalize_histogram
2956630
[popsift] change orientation computation to get closer to VLFeat
7be0e89
[popsift] add VLFeat-like descriptor extraction
5a295bb
[popsift] vlfeat descriptor area corrected
f815fbb
[popsift] speedup vlfeat descriptor
bb901d7
[popsift] configuration to ignore edge and peak thresholds
b1b4b92
[popsift] use ManagedMemory for ExtremaCounters and buffers
9a21d43
[popsift] simplify grid filtering with managed mem
41a34fd
[popsift] update demo prog usage for new grid filter
c21d399
[popsift] move InitialExtremum to own file, clean up
79de1d5
[popsift] simplify extrema prefix sum in ExtremaCounters
7840b89
[testing] scripted comparison with vlfeat
45247e7
[testing] more flexible mode comparison script
9ed7e69
[popsift] introduce CUDA cooperative groups
46c63a6
[testing] minor speed improvements by manually finding min1/min2
9e8fc3e
Merge branch 'feature/compareScripts' into test
b08231c
Merge branch 'wip/managedMemDescriptors' into test
030da06
[debug] moved kernels out of namespace to make profiling possible
004685e
Merge branch 'develop' into mergeBase
116eb25
[feature] FeaturesDev::matchAndReturn gives you brute-forced matches …
c992910
[demo] popsift-match changed for CPU-size match printing
a893f43
[popsift] use CPU-side sorting in filtergrid
9f78dc5
[filtergrid] allow case 1x1 filter grid
eb92700
[filtergrid] generalize prefix sum of initial extrema count
60def0e
[filtergrid] detailed debugging added
bb41846
[cuda] found the filtergrid bug
752e88b
[cuda] remove the filtergrid debug output
b804c05
[thrust] use thrust by default in filtergrid
1e074cf
merged develop
ed12e2c
[thrust] add include apparently required by some
f9ba274
[doc] update changelog
simogasp 604295a
[doc] fix changelog
simogasp File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
* Copyright 2021, University of Oslo | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
#include "common_opt.h" | ||
|
||
// #include <popsift/common/device_prop.h> | ||
// #include <popsift/features.h> | ||
// #include <popsift/popsift.h> | ||
// #include <popsift/sift_config.h> | ||
// #include <popsift/version.hpp> | ||
|
||
// #include <boost/filesystem.hpp> | ||
|
||
// #include <cmath> | ||
// #include <cstdlib> | ||
// #include <fstream> | ||
// #include <iomanip> | ||
// #include <iostream> | ||
// #include <list> | ||
// #include <sstream> | ||
// #include <stdexcept> | ||
#include <string> | ||
|
||
using namespace std; | ||
using namespace boost::program_options; | ||
|
||
void option_init_parameters( popsift::Config& config, options_description& parameters ) | ||
{ | ||
parameters.add_options() | ||
("octaves", | ||
value<int>(&config.octaves)->default_value(config.getOctaves()), | ||
"Number of octaves") | ||
("levels", | ||
value<int>(&config.levels)->default_value(config.getLevels()), | ||
"Number of levels per octave") | ||
("sigma", | ||
value<float>()->notifier([&](float f) { config.setSigma(f); })->default_value(config.getSigma()), | ||
"Initial sigma value") | ||
("threshold", | ||
value<float>()->notifier([&](float f) { config.setThreshold(f); })->default_value(config.getThreshold()), | ||
popsift::Config::getPeakThreshUsage().c_str() ) | ||
("edge-threshold", | ||
value<float>()->notifier([&](float f) { config.setEdgeLimit(f); })->default_value(config.getEdgeLimit()), | ||
popsift::Config::getEdgeThreshUsage().c_str() ) | ||
("edge-limit", | ||
value<float>()->notifier([&](float f) { config.setEdgeLimit(f); }), | ||
"synonym to --edge-threshold" ) | ||
("downsampling", | ||
value<float>()->notifier([&](float f) { config.setDownsampling(f); })->default_value(config.getDownsampling()), | ||
"Downscale width and height of input by 2^N") | ||
("initial-blur", | ||
value<float>()->notifier([&](float f) {config.setInitialBlur(f); })->default_value(config.getInitialBlur()), | ||
"Assume initial blur, subtract when blurring first time"); | ||
} | ||
|
||
void option_init_modes( popsift::Config& config, options_description& modes ) | ||
{ | ||
modes.add_options() | ||
( "gauss-mode", | ||
value<std::string>()->notifier([&](const std::string& s) { config.setGaussMode(s); }), | ||
popsift::Config::getGaussModeUsage() ) | ||
// "Choice of span (1-sided) for Gauss filters. Default is VLFeat-like computation depending on sigma. " | ||
// "Options are: vlfeat, relative, relative-all, opencv, fixed9, fixed15" | ||
( "desc-mode", | ||
value<std::string>()->notifier([&](const std::string& s) { config.setDescMode(s); }), | ||
popsift::Config::getDescModeUsage() ) | ||
( "popsift-mode", | ||
bool_switch()->notifier([&](bool b) { if(b) config.setMode(popsift::Config::PopSift); }), | ||
"During the initial upscale, shift pixels by 1. In extrema refinement, steps up to 0.6, do not reject points when reaching max iterations, " | ||
"first contrast threshold is .8 * peak thresh. Shift feature coords octave 0 back to original pos.") | ||
( "vlfeat-mode", | ||
bool_switch()->notifier([&](bool b) { if(b) config.setMode(popsift::Config::VLFeat); }), | ||
"During the initial upscale, shift pixels by 1. That creates a sharper upscaled image. " | ||
"In extrema refinement, steps up to 0.6, levels remain unchanged, " | ||
"do not reject points when reaching max iterations, " | ||
"first contrast threshold is .8 * peak thresh.") | ||
( "opencv-mode", | ||
bool_switch()->notifier([&](bool b) { if(b) config.setMode(popsift::Config::OpenCV); }), | ||
"During the initial upscale, shift pixels by 0.5. " | ||
"In extrema refinement, steps up to 0.5, " | ||
"reject points when reaching max iterations, " | ||
"first contrast threshold is floor(.5 * peak thresh). " | ||
"Computed filter width are lower than VLFeat/PopSift") | ||
( "direct-scaling", | ||
bool_switch()->notifier([&](bool b) { if(b) config.setScalingMode(popsift::Config::ScaleDirect); }), | ||
"Direct each octave from upscaled orig instead of blurred level.") | ||
( "norm-multi", | ||
value<int>()->notifier([&](int i) {config.setNormalizationMultiplier(i); }), | ||
"Multiply the descriptor by pow(2,<int>).") | ||
( "norm-mode", | ||
value<std::string>()->notifier([&](const std::string& s) { config.setNormMode(s); }), | ||
popsift::Config::getNormModeUsage() ) | ||
( "root-sift", | ||
bool_switch()->notifier([&](bool b) { if(b) config.setNormMode(popsift::Config::RootSift); }), | ||
"synonym to --norm-mode=RootSift" ) | ||
( "filter-max-extrema", | ||
value<int>()->notifier([&](int f) {config.setFilterMaxExtrema(f); }), | ||
"Approximate max number of extrema.") | ||
( "filter-grid", | ||
value<int>()->notifier([&](int f) {config.setFilterGridSize(f); }), | ||
"Grid edge length for extrema filtering (ie. value 4 leads to a 4x4 grid)") | ||
( "filter-sort", | ||
value<std::string>()->notifier([&](const std::string& s) {config.setFilterSorting(s); }), | ||
popsift::Config::getFilterGridModeUsage() ); | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright 2021, University of Oslo | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
#pragma once | ||
|
||
#include <boost/program_options.hpp> | ||
|
||
#include <popsift/sift_conf.h> | ||
|
||
void option_init_parameters( popsift::Config& config, | ||
boost::program_options::options_description& parameters ); | ||
void option_init_modes( popsift::Config& config, | ||
boost::program_options::options_description& modes ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a problem with your changes but it would be better to add an
else
branch in the check for the file to exist at line 246 below:so that the program exits if the input does not exist