Created
September 30, 2016 15:42
-
-
Save ducha-aiki/d5845147d000890a46fe4bf4b0b4a74c to your computer and use it in GitHub Desktop.
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
layer { | |
name: "data" | |
type: "Input" | |
top: "data" | |
input_param { shape: { dim: 2 dim: 1 dim: 65 dim: 65 } } | |
} | |
layer { | |
name: "Gx" | |
type: "Convolution" | |
bottom: "data" | |
top: "Gx" | |
param { | |
lr_mult: 0 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 1 | |
pad_h: 0 | |
pad_w: 1 | |
kernel_h: 1 | |
kernel_w: 3 | |
weight_filler { | |
type: "gaussian" | |
std: 0.05 | |
} | |
bias_term: false | |
} | |
} | |
layer { | |
name: "Gy" | |
type: "Convolution" | |
bottom: "data" | |
top: "Gy" | |
param { | |
lr_mult: 0 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 1 | |
pad_h: 1 | |
pad_w: 0 | |
kernel_h: 3 | |
kernel_w: 1 | |
weight_filler { | |
type: "gaussian" | |
std: 0.05 | |
} | |
bias_term: false | |
} | |
} | |
layer { | |
name: "Gx2" | |
type: "Power" | |
bottom: "Gx" | |
top: "Gx2" | |
power_param { | |
power: 2 | |
scale: 1 | |
shift: 0 | |
} | |
} | |
layer { | |
name: "Gy2" | |
type: "Power" | |
bottom: "Gy" | |
top: "Gy2" | |
power_param { | |
power: 2 | |
scale: 1 | |
shift: 0 | |
} | |
} | |
layer { | |
name: "Gx2_plus_Gy2" | |
top: "Gx2_plus_Gy2" | |
type: "Eltwise" | |
bottom: "Gx2" | |
bottom: "Gy2" | |
eltwise_param { | |
operation: SUM | |
} | |
} | |
layer { | |
name: "Magnitude" | |
type: "Power" | |
bottom: "Gx2_plus_Gy2" | |
top: "Magnitude" | |
power_param { | |
power: 0.5 | |
scale: 1 | |
shift: 0 | |
} | |
} | |
layer { | |
name: "Alpha" | |
top: "Alpha" | |
bottom: "Gx" | |
bottom: "Gy" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_atan2_layer' | |
# the layer name -- the class name in the module | |
layer: 'PythonAtan2Layer' | |
} | |
} | |
layer { | |
name: "Bin0_angleDiff" | |
type: "Power" | |
top: "Bin0_angleDiff" | |
bottom: "Alpha" | |
power_param { | |
shift: 0 | |
scale: 1 | |
} | |
} | |
layer { | |
name: "Bin1_angleDiff" | |
type: "Power" | |
top: "Bin1_angleDiff" | |
bottom: "Alpha" | |
power_param { | |
shift: -0.79 | |
scale: 1 | |
} | |
} | |
layer { | |
name: "Bin2_angleDiff" | |
type: "Power" | |
top: "Bin2_angleDiff" | |
bottom: "Alpha" | |
power_param { | |
shift: -1.57 | |
scale: 1 | |
} | |
} | |
layer { | |
name: "Bin3_angleDiff" | |
type: "Power" | |
top: "Bin3_angleDiff" | |
bottom: "Alpha" | |
power_param { | |
shift: -2.36 | |
scale: 1 | |
} | |
} | |
layer { | |
name: "Bin4_angleDiff" | |
type: "Power" | |
top: "Bin4_angleDiff" | |
bottom: "Alpha" | |
power_param { | |
shift: -3.14 | |
scale: 1 | |
} | |
} | |
layer { | |
name: "Bin5_angleDiff" | |
type: "Power" | |
top: "Bin5_angleDiff" | |
bottom: "Alpha" | |
power_param { | |
shift: -3.93 | |
scale: 1 | |
} | |
} | |
layer { | |
name: "Bin6_angleDiff" | |
type: "Power" | |
top: "Bin6_angleDiff" | |
bottom: "Alpha" | |
power_param { | |
shift: -4.71 | |
scale: 1 | |
} | |
} | |
layer { | |
name: "Bin7_angleDiff" | |
type: "Power" | |
top: "Bin7_angleDiff" | |
bottom: "Alpha" | |
power_param { | |
shift: -5.5 | |
scale: 1 | |
} | |
} | |
layer { | |
name: "CosBin0_angleDiff" | |
top: "CosBin0_angleDiff" | |
bottom: "Bin0_angleDiff" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_cos_layer' | |
# the layer name -- the class name in the module | |
layer: 'CosLayer' | |
} | |
} | |
layer { | |
name: "Magn_Proj_Bin0" | |
top: "Magn_Proj_Bin0" | |
type: "Eltwise" | |
bottom: "Magnitude" | |
bottom: "CosBin0_angleDiff" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
type: "ReLU" | |
top: "Bin0" | |
bottom: "Magn_Proj_Bin0" | |
name: "Bin0" | |
} | |
layer { | |
name: "CosBin1_angleDiff" | |
top: "CosBin1_angleDiff" | |
bottom: "Bin1_angleDiff" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_cos_layer' | |
# the layer name -- the class name in the module | |
layer: 'CosLayer' | |
} | |
} | |
layer { | |
name: "Magn_Proj_Bin1" | |
top: "Magn_Proj_Bin1" | |
type: "Eltwise" | |
bottom: "Magnitude" | |
bottom: "CosBin1_angleDiff" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
type: "ReLU" | |
top: "Bin1" | |
bottom: "Magn_Proj_Bin1" | |
name: "Bin1" | |
} | |
layer { | |
name: "CosBin2_angleDiff" | |
top: "CosBin2_angleDiff" | |
bottom: "Bin2_angleDiff" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_cos_layer' | |
# the layer name -- the class name in the module | |
layer: 'CosLayer' | |
} | |
} | |
layer { | |
name: "Magn_Proj_Bin2" | |
top: "Magn_Proj_Bin2" | |
type: "Eltwise" | |
bottom: "Magnitude" | |
bottom: "CosBin2_angleDiff" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
type: "ReLU" | |
top: "Bin2" | |
bottom: "Magn_Proj_Bin2" | |
name: "Bin2" | |
} | |
layer { | |
name: "CosBin3_angleDiff" | |
top: "CosBin3_angleDiff" | |
bottom: "Bin3_angleDiff" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_cos_layer' | |
# the layer name -- the class name in the module | |
layer: 'CosLayer' | |
} | |
} | |
layer { | |
name: "Magn_Proj_Bin3" | |
top: "Magn_Proj_Bin3" | |
type: "Eltwise" | |
bottom: "Magnitude" | |
bottom: "CosBin3_angleDiff" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
type: "ReLU" | |
top: "Bin3" | |
bottom: "Magn_Proj_Bin3" | |
name: "Bin3" | |
} | |
layer { | |
name: "CosBin4_angleDiff" | |
top: "CosBin4_angleDiff" | |
bottom: "Bin4_angleDiff" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_cos_layer' | |
# the layer name -- the class name in the module | |
layer: 'CosLayer' | |
} | |
} | |
layer { | |
name: "Magn_Proj_Bin4" | |
top: "Magn_Proj_Bin4" | |
type: "Eltwise" | |
bottom: "Magnitude" | |
bottom: "CosBin4_angleDiff" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
type: "ReLU" | |
top: "Bin4" | |
bottom: "Magn_Proj_Bin4" | |
name: "Bin4" | |
} | |
layer { | |
name: "CosBin5_angleDiff" | |
top: "CosBin5_angleDiff" | |
bottom: "Bin5_angleDiff" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_cos_layer' | |
# the layer name -- the class name in the module | |
layer: 'CosLayer' | |
} | |
} | |
layer { | |
name: "Magn_Proj_Bin5" | |
top: "Magn_Proj_Bin5" | |
type: "Eltwise" | |
bottom: "Magnitude" | |
bottom: "CosBin5_angleDiff" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
type: "ReLU" | |
top: "Bin5" | |
bottom: "Magn_Proj_Bin5" | |
name: "Bin5" | |
} | |
layer { | |
name: "CosBin6_angleDiff" | |
top: "CosBin6_angleDiff" | |
bottom: "Bin6_angleDiff" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_cos_layer' | |
# the layer name -- the class name in the module | |
layer: 'CosLayer' | |
} | |
} | |
layer { | |
name: "Magn_Proj_Bin6" | |
top: "Magn_Proj_Bin6" | |
type: "Eltwise" | |
bottom: "Magnitude" | |
bottom: "CosBin6_angleDiff" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
type: "ReLU" | |
top: "Bin6" | |
bottom: "Magn_Proj_Bin6" | |
name: "Bin6" | |
} | |
layer { | |
name: "CosBin7_angleDiff" | |
top: "CosBin7_angleDiff" | |
bottom: "Bin7_angleDiff" | |
type: "Python" | |
python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
module: 'python_cos_layer' | |
# the layer name -- the class name in the module | |
layer: 'CosLayer' | |
} | |
} | |
layer { | |
name: "Magn_Proj_Bin7" | |
top: "Magn_Proj_Bin7" | |
type: "Eltwise" | |
bottom: "Magnitude" | |
bottom: "CosBin7_angleDiff" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
type: "ReLU" | |
top: "Bin7" | |
bottom: "Magn_Proj_Bin7" | |
name: "Bin7" | |
} | |
layer { | |
name: "BinsConcat" | |
top: "BinsConcat" | |
type: "Concat" | |
bottom: "Bin0" | |
bottom: "Bin1" | |
bottom: "Bin2" | |
bottom: "Bin3" | |
bottom: "Bin4" | |
bottom: "Bin5" | |
bottom: "Bin6" | |
bottom: "Bin7" | |
} | |
#layer { | |
# name: "SIFT_before_norm" | |
# type: "Pooling" | |
# bottom: "BinsConcat" | |
# top: "SIFT_before_norm" | |
# pooling_param { | |
# pool: AVE | |
# kernel_size: 20 | |
# stride: 17 | |
# } | |
# } | |
layer { | |
name: "SIFT_before_norm1" | |
type: "Convolution" | |
bottom: "BinsConcat" | |
top: "SIFT_before_norm" | |
param { | |
lr_mult: 0 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 8 | |
group: 8 | |
kernel_size: 16 | |
stride: 16 | |
weight_filler { | |
type: "bilinear" | |
# std: 0.05 | |
} | |
bias_term: false | |
} | |
} | |
layer { | |
type: "Flatten" | |
bottom: "SIFT_before_norm" | |
top: "SIFT_before_norm_Flatten" | |
name: "SIFT_before_norm_Flatten" | |
} | |
# layer { | |
# | |
# name: "Clipped" | |
# type: "TanH" | |
# bottom: "SIFT_before_norm_Flatten" | |
# top: "Clipped" | |
# | |
# } | |
# layer { | |
# name: "Clipped" | |
# top: "Clipped" | |
# bottom: "SIFT_before_norm_Flatten" | |
# type: "Python" | |
# python_param { | |
# # the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
# module: 'python_clip_layer' | |
# param_str: '{"clip_at": 0.2 }' | |
# # the layer name -- the class name in the module | |
# layer: 'ClipLayer' | |
# } | |
#} | |
layer { | |
name: "Reduction1" | |
type: "Reduction" | |
bottom: "SIFT_before_norm_Flatten" | |
top: "Reduction1" | |
reduction_param { | |
operation: SUMSQ | |
axis: 1 | |
} | |
} | |
layer { | |
name: "Power1" | |
type: "Power" | |
bottom: "Reduction1" | |
top: "Power1" | |
power_param { | |
power: -0.5 | |
} | |
} | |
layer { | |
name: "Reshape1" | |
type: "Reshape" | |
bottom: "Power1" | |
top: "Reshape1" | |
reshape_param { | |
shape { | |
dim: 1 | |
} | |
axis: -1 | |
num_axes: 0 | |
} | |
} | |
layer { | |
name: "Tile1" | |
type: "Tile" | |
bottom: "Reshape1" | |
top: "Tile1" | |
tile_param { | |
axis: 1 | |
tiles: 128 | |
} | |
} | |
layer { | |
name: "l2NormedHist" | |
type: "Eltwise" | |
bottom: "SIFT_before_norm_Flatten" | |
bottom: "Tile1" | |
top: "l2NormedHist" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
layer { | |
name: "ClippedAgain" | |
type: "TanH" | |
bottom: "l2NormedHist" | |
top: "ClippedAgain" | |
} | |
#layer { | |
# name: "ClippedAgain" | |
# top: "ClippedAgain" | |
# bottom: "l2NormedHist" | |
# type: "Python" | |
# python_param { | |
# the module name -- usually the filename -- that needs to be in $PYTHONPATH | |
# module: 'python_clip_layer' | |
# param_str: '{"clip_at": 0.2 }' | |
# # the layer name -- the class name in the module | |
# layer: 'ClipLayer' | |
# } | |
#} | |
layer { | |
name: "Reduction2" | |
type: "Reduction" | |
bottom: "ClippedAgain" | |
top: "Reduction2" | |
reduction_param { | |
operation: SUMSQ | |
axis: 1 | |
} | |
} | |
layer { | |
name: "Power2" | |
type: "Power" | |
bottom: "Reduction2" | |
top: "Power2" | |
power_param { | |
power: -0.5 | |
} | |
} | |
layer { | |
name: "Reshape2" | |
type: "Reshape" | |
bottom: "Power2" | |
top: "Reshape2" | |
reshape_param { | |
shape { | |
dim: 1 | |
} | |
axis: -1 | |
num_axes: 0 | |
} | |
} | |
layer { | |
name: "Tile2" | |
type: "Tile" | |
bottom: "Reshape2" | |
top: "Tile2" | |
tile_param { | |
axis: 1 | |
tiles: 128 | |
} | |
} | |
layer { | |
name: "SIFT" | |
type: "Eltwise" | |
bottom: "ClippedAgain" | |
bottom: "Tile2" | |
top: "SIFT" | |
eltwise_param { | |
operation: PROD | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment