FlowNet 中caffe数据处理层解读 —— type: "Silence" ; type: "Eltwise" layer ; type: "D

“Silence”层的作用:
如果没有这一层,则如果某个变量在后续没有被用到,就会被打印出来。silcence层将使得这个变量不被打印
 

layer {
  name: "SilenceUnused1"
  type: "Silence"
  bottom: "unused1"
}

 

下面一层 type: "Eltwise" layer的作用是,将图像的取值从0~255变为0~1

layer {
  name: "Eltwise1"
  type: "Eltwise"
  bottom: "blob0"
  top: "blob3"
  eltwise_param {
    operation: SUM
    coeff: 0.00392156862745098
  }
}

接下来,  type: "DataAugmentation" , type: "GenerateAugmentationParameters", type: "FlowAugmentation" :

type: "DataAugmentation" 为对输入的数据进行扩增,有两种输入扩增要求的方式,一是在layer中指明:

layer {
  name: "img0s_aug"
  type: "DataAugmentation"
  bottom: "blob3"
  top: "img0_aug"
  top: "blob6"
  augmentation_param {
    max_multiplier: 1
    augment_during_test: false
    recompute_mean: 1000
    mean_per_pixel: false
    translate {
      rand_type: "uniform_bernoulli"
      exp: false
      mean: 0
      spread: 0.4
      prob: 1.0
    }
    rotate {
      rand_type: "uniform_bernoulli"
      exp: false
      mean: 0
      spread: 0.4
      prob: 1.0
    }
    zoom {
      rand_type: "uniform_bernoulli"
      exp: true
      mean: 0.2
      spread: 0.4
      prob: 1.0
    }
    squeeze {
      rand_type: "uniform_bernoulli"
      exp: true
      mean: 0
      spread: 0.3
      prob: 1.0
    }
    lmult_pow {
      rand_type: "uniform_bernoulli"
      exp: true
      mean: -0.2
      spread: 0.4
      prob: 1.0
    }
    lmult_mult {
      rand_type: "uniform_bernoulli"
      exp: true
      mean: 0.0
      spread: 0.4
      prob: 1.0
    }
    lmult_add {
      rand_type: "uniform_bernoulli"
      exp: false
      mean: 0
      spread: 0.03
      prob: 1.0
    }
    sat_pow {
      rand_type: "uniform_bernoulli"
      exp: true
      mean: 0
      spread: 0.4
      prob: 1.0
    }
    sat_mult {
      rand_type: "uniform_bernoulli"
      exp: true
      mean: -0.3
      spread: 0.5
      prob: 1.0
    }
    sat_add {
      rand_type: "uniform_bernoulli"
      exp: false
      mean: 0
      spread: 0.03
      prob: 1.0
    }
    col_pow {
      rand_type: "gaussian_bernoulli"
      exp: true
      mean: 0
      spread: 0.4
      prob: 1.0
    }
    col_mult {
      rand_type: "gaussian_bernoulli"
      exp: true
      mean: 0
      spread: 0.2
      prob: 1.0
    }
    col_add {
      rand_type: "gaussian_bernoulli"
      exp: false
      mean: 0
      spread: 0.02
      prob: 1.0
    }
    ladd_pow {
      rand_type: "gaussian_bernoulli"
      exp: true
      mean: 0
      spread: 0.4
      prob: 1.0
    }
    ladd_mult {
      rand_type: "gaussian_bernoulli"
      exp: true
      mean: 0.0
      spread: 0.4
      prob: 1.0
    }
    ladd_add {
      rand_type: "gaussian_bernoulli"
      exp: false
      mean: 0
      spread: 0.04
      prob: 1.0
    }
    col_rotate {
      rand_type: "uniform_bernoulli"
      exp: false
      mean: 0
      spread: 1
      prob: 1.0
    }
    crop_width: 448
    crop_height: 320
    chromatic_eigvec: 0.51
    chromatic_eigvec: 0.56
    chromatic_eigvec: 0.65
    chromatic_eigvec: 0.79
    chromatic_eigvec: 0.01
    chromatic_eigvec: -0.62
    chromatic_eigvec: 0.35
    chromatic_eigvec: -0.83
    chromatic_eigvec: 0.44
    noise {
      rand_type: "uniform_bernoulli"
      exp: false
      mean: 0.03
      spread: 0.03
      prob: 1.0
    }
  }
}

二是,借助另一层的参数:

layer {
  name: "img1s_aug"
  type: "DataAugmentation"
  bottom: "blob4"
  bottom: "blob7"  #通过 Image 0的扩张函数来获得同样的参数
  top: "img1_aug"
  augmentation_param {
    max_multiplier: 1
    augment_during_test: false
    recompute_mean: 1000
    mean_per_pixel: false
    crop_width: 448
    crop_height: 320
    chromatic_eigvec: 0.51
    chromatic_eigvec: 0.56
    chromatic_eigvec: 0.65
    chromatic_eigvec: 0.79
    chromatic_eigvec: 0.01
    chromatic_eigvec: -0.62
    chromatic_eigvec: 0.35
    chromatic_eigvec: -0.83
    chromatic_eigvec: 0.44
  }
}

type: "GenerateAugmentationParameters":生成适合于当前图片的变换参数 

type: "FlowAugmentation" :按照图像的变换,对flow也进行相应的变换

 

上一篇:spreajs笔记


下一篇:在线表格