diff --git a/matlab/src/KeypointOrientations/GHHPooling/getOrientations_GHHPooling.m b/matlab/src/KeypointOrientations/GHHPooling/getOrientations_GHHPooling.m deleted file mode 100755 index 161fa61..0000000 --- a/matlab/src/KeypointOrientations/GHHPooling/getOrientations_GHHPooling.m +++ /dev/null @@ -1,130 +0,0 @@ -%%% getOrientations_GHHPooling.m --- -%% -%% Filename: getOrientations_GHHPooling.m -%% Description: -%% Author: Kwang Moo Yi, Yannick Verdie -%% Maintainer: Yannick Verdie -%% Created: Thu Jul 7 11:25:58 2016 (+0200) -%% Version: -%% Package-Requires: () -%% URL: -%% Doc URL: -%% Keywords: -%% Compatibility: -%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% -%%% Commentary: -%% -%% -%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% -%%% Change Log: -%% -%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Copyright (C), EPFL Computer Vision Lab. -%% -%%% Code: - - -function [feat] = getOrientations_GHHPooling(img_info, kp_file_name, p) - global sRoot; - - rootFolder = sRoot; - if isfield(p,'rootFolder') - rootFolder = p.rootFolder; - end - - - param_nameKp = p.optionalParametersKpName; - param_nameOrient = p.optionalParametersOrientName; - name_method = strsplit(mfilename,'_'); - name_method = name_method{end}; - - if isfield(p,'optionalParametersParamDir') - parameters_dir_name = p.optionalParametersParamDir; - else - parameters_dir_name = 'parameters'; - end - - % here reject to run if we don't have param dir - if (~exist([rootFolder, '/src/KeypointOrientations/', name_method, '/', parameters_dir_name], 'dir')) - feat = []; - % display(['not exist ', rootFolder, '/src/KeypointOrientations/', name_method, '/', parameters_dir_name]); - return; - end - - %here reject some kp - if (~(strcmp(kp_file_name,'SIFT') || strcmp(kp_file_name,'SIFTFIXED')) ) - feat = []; - % display(['skipping orientation estimation for method ' kp_file_name']); - return; - end - - - - - out = [img_info.full_feature_prefix, '_', kp_file_name, '_keypoints_', name_method, ... - '_oriented-', param_nameKp, '-', param_nameOrient, '-txt']; - if ~exist(out, 'file') - out2 = [img_info.full_feature_prefix, '_SIFT_keypoints_', name_method, ... - '_oriented-', param_nameKp, '-', param_nameOrient, '-txt']; - if exist(out2, 'file') && strcmp(kp_file_name,'SIFTFIXED') - copyfile(out2,out); - else - in_img = img_info.image_name; - in_img = strrep(in_img, 'image_gray', 'image_color'); - in_kp = [img_info.full_feature_prefix '_' kp_file_name '_keypoints-' param_nameKp '-txt']; - if ~exist(in_kp, 'file') - in_kp - error('the keypoints do not exist, abort'); - end - - config_file_full_name = [rootFolder, '/src/KeypointOrientations/', name_method, '/', parameters_dir_name, '/', ... - param_nameOrient, '.config']; - - %% Estimate Orientations Here - %backup feature - [feat_old, ~, ~] = loadFeatures(in_kp); - - retry_cnt = 0; - status = 1; - while status ~= 0 - - % Instead of moving to the python directory, launch a subshell which goes to - % python directory and executes. Insert Cuda things here, - % if you want to use cuda - VENV = getenv('VIRTUAL_ENV'); - if ~strcmpi(VENV, '') - % Run the python script to test and get keypoints - prefix = ['LD_LIBRARY_PATH=' VENV '/lib/']; - else - % Run the python script to test and get keypoints - prefix = ['LD_LIBRARY_PATH=']; - end - com = ['(cd ' rootFolder '/../../learn-orientation-release/python-code/;' prefix '; OMP_NUM_THREADS=1 python runSingleTestWithFiles.py ' in_img ... - ' ' in_kp ' ' config_file_full_name ' ' out ')']; - [status, result] = system(com); - - % Also, let's just use single thread... - - % If we have an error from python execution, retry five times and spit error as the error might just be from theano compile issues... - if status ~= 0 - retry_cnt = retry_cnt + 1; - if retry_cnt >= 5 - display(result); - error('error in python execution!'); - end - end - end - end - end - - [feat, ~, ~] = loadFeatures(out); - -end - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% getOrientations_GHHPooling.m ends here diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360.config b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360.config deleted file mode 100755 index df20e41..0000000 --- a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360.config +++ /dev/null @@ -1,77 +0,0 @@ -#-------------------------------------------------------------------------------------- -# Be careful as we do not use sophisticated parsing -# The parser will read until the semicolon -# -# types are defined as below -# ss: multiple strings separated with commas -# s: string -# b: boolean -# f: float -# d: int -#-------------------------------------------------------------------------------------- - -#-------------------------------------------------------------------------------------- -# Dataset parameters -ss: trainSetList = oxford/bark/,oxford/bikes/,oxford/boat/,oxford/graf/,oxford/leuven/,oxford/trees/,oxford/wall/,oxford/ubc/; # All the first images of oxford dataset is used for training -s: runType = CVPR16; # the network type -# b: bNormalizePatch = 0; # whether to do patch-wise normalization -# b: bFrontalLearn = 0; # frontal learn - -#-------------------------------------------------------------------------------------- -# Parameters for patch extraction -s: sDataType = Gray; # Input image type -f: fRatioScale = 4.0; # half_patch_width = fRatioScale/scale/4.0 -# f: fMinSize = 0.0; # use this size if smaller than this for each kp -# b: bPyramidLearn = 0; # whether to use pyramid learning - -# # Random rotations -# b: bNewRots = 1; # Enable rotations -# d: nAugmentedRotations = 8; # Number of random rotations to be augmented -# f: fAugmentRange = 180.0; # Range of the augmentation -# f: fAugmentCenterRandStrength = 180.0; # Strenth of the center randomness -# s: sAugmentCenterRandMethod = uniform; # Random method - -#-------------------------------------------------------------------------------------- -# Keypoint extraction parameters -s: sKpType = EdgeFociD; # the keypoint detector -s: sDescType = SIFT; # the descriptor type -# f: fMinKpSize = 0.0; # min allowed size of a kp -# f: fDupRange = 5.0; # Consider keypoints within these pixels as duplicates (training only) -# b: bNewCleanMethod = 1; # cleaning using the new method -# d: dMaxKeypointNum = 1000; # number of maximum keypoints to keep - -#-------------------------------------------------------------------------------------- -# Model parameters -s: modelType = DropoutCNNGHHH; # GHH or CNN -d: nPatchSize = 28; # 64 for CNN -d: num_siamese = 1; # we have three clones for -# f: fRatio = 0.0; # Parameter for WNN pair -s: mapping = Arctan; # CosSin mapping -b: bNormalizeInput = 1; # Normalize input to have zero mean and 1 std -d: nNumHiddenNode = 100; # Number of Hidden Nodes - -# #-------------------------------------------------------------------------------------- -# # Optimization parameters -# s: optimizer = Adam; # the optimizer type -# d: n_epochs = 100; # maximum number of epochs -# d: batch_size = 10; # batch size of SGD -# f: lr = 0.001; # ADAM -# f: beta1 = 0.9; # ADAM -# f: beta2 = 0.999; # ADAM -# f: epsilon = 1e-8; # ADAM -# f: decay = 0.95; # ADADELTA param - should be insensitive -# f: epsilon = 1e-8; # ADADELTA param - should be insensitive -# f: alpha_L2 = 0; # L2 regularisor weight -# f: lr_half_interval = 10.0; # Learning rate is decayed to half every this amount of epoch - -#-------------------------------------------------------------------------------------- -# GHH parameters (will not have effect when using CNN) -d: GHH_numSUM = 4; # number of sums in GHH -d: GHH_numMAX = 4; # number of maxes in GHH - -# #-------------------------------------------------------------------------------------- -# # Testing related parameters -# d: PCAdim = 200; # dimension of PCA for testing -# f: fOverlapThresh = 50.0; # overlap threshold for testing pairs - -#-------------------------------------------------------------------------------------- diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/input_mean.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/input_mean.npy deleted file mode 100755 index 4f5808f..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/input_mean.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/input_std.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/input_std.npy deleted file mode 100755 index fd384b1..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/input_std.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer0_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer0_W.npy deleted file mode 100755 index 755df3b..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer0_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer0_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer0_b.npy deleted file mode 100755 index 5fde16c..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer0_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer1_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer1_W.npy deleted file mode 100755 index 6a9cfb9..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer1_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer1_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer1_b.npy deleted file mode 100755 index b7c21f7..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer1_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer2_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer2_W.npy deleted file mode 100755 index a040993..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer2_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer2_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer2_b.npy deleted file mode 100755 index 422c05c..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer2_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer3_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer3_W.npy deleted file mode 100755 index 01c098a..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer3_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer3_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer3_b.npy deleted file mode 100755 index 090b268..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer3_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer4_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer4_W.npy deleted file mode 100755 index faf6cd0..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer4_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer4_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer4_b.npy deleted file mode 100755 index 95cd185..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift-360/layer4_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift.config b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift.config deleted file mode 100755 index ac75db1..0000000 --- a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift.config +++ /dev/null @@ -1,70 +0,0 @@ -#-------------------------------------------------------------------------------------- -# Be careful as we do not use sophisticated parsing -# The parser will read until the semicolon -# -# types are defined as below -# ss: multiple strings separated with commas -# s: string -# b: boolean -# f: float -# d: int -#-------------------------------------------------------------------------------------- - -#-------------------------------------------------------------------------------------- -# Dataset parameters -ss: trainSetList = oxford/bark/,oxford/bikes/,oxford/boat/,oxford/graf/,oxford/leuven/,oxford/trees/,oxford/wall/,oxford/ubc/; # All the first images of oxford dataset is used for training -s: runType = CVPR16; # the network type -# b: bNormalizePatch = 0; # whether to do patch-wise normalization -# b: bFrontalLearn = 0; # frontal learn - -#-------------------------------------------------------------------------------------- -# Parameters for patch extraction -s: sDataType = Gray; # Input image type -f: fRatioScale = 4.0; # half_patch_width = fRatioScale/scale/4.0 -# f: fMinSize = 0.0; # use this size if smaller than this for each kp -# b: bPyramidLearn = 0; # whether to use pyramid learning - -#-------------------------------------------------------------------------------------- -# Keypoint extraction parameters -s: sKpType = EdgeFociD; # the keypoint detector -s: sDescType = SIFT; # the descriptor type -# f: fMinKpSize = 0.0; # min allowed size of a kp -# f: fDupRange = 5.0; # Consider keypoints within these pixels as duplicates (training only) -# b: bNewCleanMethod = 1; # cleaning using the new method -# d: dMaxKeypointNum = 1000; # number of maximum keypoints to keep - -#-------------------------------------------------------------------------------------- -# Model parameters -s: modelType = DropoutCNNGHHH; # GHH or CNN -d: nPatchSize = 28; # 64 for CNN -d: num_siamese = 1; # we have three clones for -# f: fRatio = 0.0; # Parameter for WNN pair -s: mapping = Arctan; # CosSin mapping -b: bNormalizeInput = 1; # Normalize input to have zero mean and 1 std -d: nNumHiddenNode = 100; # Number of Hidden Nodes - -# #-------------------------------------------------------------------------------------- -# # Optimization parameters -# s: optimizer = Adam; # the optimizer type -# d: n_epochs = 100; # maximum number of epochs -# d: batch_size = 10; # batch size of SGD -# f: lr = 0.001; # ADAM -# f: beta1 = 0.9; # ADAM -# f: beta2 = 0.999; # ADAM -# f: epsilon = 1e-8; # ADAM -# f: decay = 0.95; # ADADELTA param - should be insensitive -# f: epsilon = 1e-8; # ADADELTA param - should be insensitive -# f: alpha_L2 = 0; # L2 regularisor weight -# f: lr_half_interval = 10.0; # Learning rate is decayed to half every this amount of epoch - -#-------------------------------------------------------------------------------------- -# GHH parameters (will not have effect when using CNN) -d: GHH_numSUM = 4; # number of sums in GHH -d: GHH_numMAX = 4; # number of maxes in GHH - -# #-------------------------------------------------------------------------------------- -# # Testing related parameters -# d: PCAdim = 200; # dimension of PCA for testing -# f: fOverlapThresh = 40.0; # overlap threshold for testing pairs - -#-------------------------------------------------------------------------------------- diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/input_mean.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/input_mean.npy deleted file mode 100755 index 4912489..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/input_mean.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/input_std.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/input_std.npy deleted file mode 100755 index 1cbfef9..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/input_std.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer0_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer0_W.npy deleted file mode 100755 index 8d65736..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer0_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer0_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer0_b.npy deleted file mode 100755 index 8037269..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer0_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer1_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer1_W.npy deleted file mode 100755 index b36c412..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer1_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer1_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer1_b.npy deleted file mode 100755 index e934144..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer1_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer2_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer2_W.npy deleted file mode 100755 index eda1463..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer2_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer2_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer2_b.npy deleted file mode 100755 index a80abf8..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer2_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer3_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer3_W.npy deleted file mode 100755 index 3171de8..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer3_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer3_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer3_b.npy deleted file mode 100755 index f127b39..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer3_b.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer4_W.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer4_W.npy deleted file mode 100755 index 79fefe6..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer4_W.npy and /dev/null differ diff --git a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer4_b.npy b/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer4_b.npy deleted file mode 100755 index 3d44a3d..0000000 Binary files a/matlab/src/KeypointOrientations/GHHPooling/prelearned/efsift/layer4_b.npy and /dev/null differ