Skip to content

Instantly share code, notes, and snippets.

@isikdogan
Created December 16, 2016 02:27
Show Gist options
  • Save isikdogan/0aae622ffae40a89a0f25ea7666f0ff9 to your computer and use it in GitHub Desktop.
Save isikdogan/0aae622ffae40a89a0f25ea7666f0ff9 to your computer and use it in GitHub Desktop.
name: "RivaNet"
layer {
name: "data"
type: "Data"
top: "data"
include {
phase: TRAIN
}
transform_param {
crop_size: 640
mean_value: 80
mean_value: 66
mean_value: 68
mean_value: 69
mean_value: 74
mean_value: 53
mean_value: 0
}
data_param {
source: "/run/media/leo/Leo_DB/train/data/"
batch_size: 1
backend: LMDB
}
}
layer {
name: "data"
type: "Data"
top: "data"
include {
phase: TEST
}
transform_param {
crop_size: 640
mean_value: 80
mean_value: 66
mean_value: 68
mean_value: 69
mean_value: 74
mean_value: 53
mean_value: 0
}
data_param {
source: "/run/media/leo/Leo_DB/test/data/"
batch_size: 1
backend: LMDB
}
}
# Slice ground truth
layer {
name: "slicer"
type: "Slice"
bottom: "data"
top: "landsat_scenes"
top: "ground_truth"
slice_param {
axis: 1
slice_point: 6
}
}
# Convolutional and Pooling Layers (Encoder)
layer {
name: "conv1"
type: "Convolution"
bottom: "landsat_scenes"
top: "conv1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 1
pad: 0
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu1"
type: "RELU"
bottom: "conv1"
top: "conv1"
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv2"
type: "Convolution"
bottom: "pool1"
top: "conv2"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu2"
type: "RELU"
bottom: "conv2"
top: "conv2"
}
layer {
name: "concat2"
type: "Concat"
bottom: "pool1"
bottom: "conv2"
top: "concat2"
concat_param {
axis: 1
}
}
layer {
name: "pool2"
type: "Pooling"
bottom: "concat2"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv3"
type: "Convolution"
bottom: "pool2"
top: "conv3"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu3"
type: "RELU"
bottom: "conv3"
top: "conv3"
}
layer {
name: "concat3"
type: "Concat"
bottom: "pool2"
bottom: "conv3"
top: "concat3"
concat_param {
axis: 1
}
}
layer {
name: "pool3"
type: "Pooling"
bottom: "concat3"
top: "pool3"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv4"
type: "Convolution"
bottom: "pool3"
top: "conv4"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu4"
type: "RELU"
bottom: "conv4"
top: "conv4"
}
layer {
name: "concat4"
type: "Concat"
bottom: "pool3"
bottom: "conv4"
top: "concat4"
concat_param {
axis: 1
}
}
layer {
name: "pool4"
type: "Pooling"
bottom: "concat4"
top: "pool4"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv5"
type: "Convolution"
bottom: "pool4"
top: "conv5"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu5"
type: "RELU"
bottom: "conv5"
top: "conv5"
}
layer {
name: "concat5"
type: "Concat"
bottom: "pool4"
bottom: "conv5"
top: "concat5"
concat_param {
axis: 1
}
}
layer {
name: "pool5"
type: "Pooling"
bottom: "concat5"
top: "pool5"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv6"
type: "Convolution"
bottom: "pool5"
top: "conv6"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu6"
type: "RELU"
bottom: "conv6"
top: "conv6"
}
layer {
name: "concat6"
type: "Concat"
bottom: "pool5"
bottom: "conv6"
top: "concat6"
concat_param {
axis: 1
}
}
layer {
name: "pool6"
type: "Pooling"
bottom: "concat6"
top: "pool6"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv7"
type: "Convolution"
bottom: "pool6"
top: "conv7"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu7"
type: "RELU"
bottom: "conv7"
top: "conv7"
}
# Upsampling Layers (Decoder)
layer {
name: "upsample7"
type: "Deconvolution"
bottom: "conv7"
top: "upsample7"
param { lr_mult: 0 }
convolution_param {
num_output: 16
group: 16
weight_filler: { type: "bilinear" }
bias_term: false
kernel_size: 4
stride: 2
pad: 1
}
}
layer {
name: "concat6d"
type: "Concat"
bottom: "upsample7"
bottom: "concat6"
top: "concat6d"
concat_param {
axis: 1
}
}
layer {
name: "conv6d"
type: "Convolution"
bottom: "concat6d"
top: "conv6d"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu6d"
type: "RELU"
bottom: "conv6d"
top: "conv6d"
}
layer {
name: "upsample6"
type: "Deconvolution"
bottom: "conv6d"
top: "upsample6"
param { lr_mult: 0 }
convolution_param {
num_output: 16
group: 16
weight_filler: { type: "bilinear" }
bias_term: false
kernel_size: 4
stride: 2
pad: 1
}
}
layer {
name: "concat5d"
type: "Concat"
bottom: "upsample6"
bottom: "concat5"
top: "concat5d"
concat_param {
axis: 1
}
}
layer {
name: "conv5d"
type: "Convolution"
bottom: "concat5d"
top: "conv5d"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu5d"
type: "RELU"
bottom: "conv5d"
top: "conv5d"
}
layer {
name: "upsample5"
type: "Deconvolution"
bottom: "conv5d"
top: "upsample5"
param { lr_mult: 0 }
convolution_param {
num_output: 16
group: 16
weight_filler: { type: "bilinear" }
bias_term: false
kernel_size: 4
stride: 2
pad: 1
}
}
layer {
name: "concat4d"
type: "Concat"
bottom: "upsample5"
bottom: "concat4"
top: "concat4d"
concat_param {
axis: 1
}
}
layer {
name: "conv4d"
type: "Convolution"
bottom: "concat4d"
top: "conv4d"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu4d"
type: "RELU"
bottom: "conv4d"
top: "conv4d"
}
layer {
name: "upsample4"
type: "Deconvolution"
bottom: "conv4d"
top: "upsample4"
param { lr_mult: 0 }
convolution_param {
num_output: 16
group: 16
weight_filler: { type: "bilinear" }
bias_term: false
kernel_size: 4
stride: 2
pad: 1
}
}
layer {
name: "concat3d"
type: "Concat"
bottom: "upsample4"
bottom: "concat3"
top: "concat3d"
concat_param {
axis: 1
}
}
layer {
name: "conv3d"
type: "Convolution"
bottom: "concat3d"
top: "conv3d"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu3d"
type: "RELU"
bottom: "conv3d"
top: "conv3d"
}
layer {
name: "upsample3"
type: "Deconvolution"
bottom: "conv3d"
top: "upsample3"
param { lr_mult: 0 }
convolution_param {
num_output: 16
group: 16
weight_filler: { type: "bilinear" }
bias_term: false
kernel_size: 4
stride: 2
pad: 1
}
}
layer {
name: "concat2d"
type: "Concat"
bottom: "upsample3"
bottom: "concat2"
top: "concat2d"
concat_param {
axis: 1
}
}
layer {
name: "conv2d"
type: "Convolution"
bottom: "concat2d"
top: "conv2d"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 3
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu2d"
type: "RELU"
bottom: "conv2d"
top: "conv2d"
}
layer {
name: "upsample2"
type: "Deconvolution"
bottom: "conv2d"
top: "upsample2"
param { lr_mult: 0 }
convolution_param {
num_output: 16
group: 16
weight_filler: { type: "bilinear" }
bias_term: false
kernel_size: 4
stride: 2
pad: 1
}
}
layer {
name: "concat1d"
type: "Concat"
bottom: "upsample2"
bottom: "conv1"
top: "concat1d"
concat_param {
axis: 1
}
}
layer {
name: "conv1d"
type: "Convolution"
bottom: "concat1d"
top: "conv1d"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 16
kernel_size: 1
pad: 0
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "elu1d"
type: "RELU"
bottom: "conv1d"
top: "conv1d"
}
# Score and Loss Layers
layer {
name: "score"
type: "Convolution"
bottom: "conv1d"
top: "score"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 5
kernel_size: 1
pad: 0
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.2
}
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "score"
bottom: "ground_truth"
top: "loss"
loss_param: {
weight_by_label_freqs: true
class_weighting: 0.061
class_weighting: 0.2
class_weighting: 2.0
class_weighting: 1.9
class_weighting: 1
}
}
layer {
name: "accuracy"
type: "Accuracy"
bottom: "score"
bottom: "ground_truth"
top: "accuracy"
top: "per_class_accuracy"
include {
phase: TEST
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment