Caffe fully convolutional cnn - how to use crop parameters

I am trying to train a fully convolutional network for my problem. I am using the implementation of https://github.com/shelhamer/fcn.berkeleyvision.org . I have different image sizes.

  • I'm not sure how to set the Offset option in the Crop layer.
  • What are the default values ​​for Offset?
  • How to use this option to crop images in the center?
+4
source share
1 answer

, blob. A B, blob T.

A -> 32 x 3 x 224 x 224
B -> 32 x m x n x p

T -> 32 x m x n x p

, docs:

Blob , Blob, .

, axis = 1, 1, 2, 3. axis = 2, T 32 x 3 x n x p. , -1, , .. 3 .

offset, $​​CAFFE_ROOT/src/caffe/proto/caffe.proto( 630), offset, , , . .

, Caffe , m . , . , . 10, m , 10 10+m-1 ( m). ( axis, ? 1, 2, 3). , - , , ( 3). , ,

blob 32 x 3 x 224 x 224, 32 x 3 x 32 x 64, :

layer {
  name: "T"
  type: "Crop"
  bottom: "A"
  bottom: "B"
  top: "T"
  crop_param {
      axis: 2
      offset: 96
      offset: 80
  }
}
+7

Source: https://habr.com/ru/post/1649153/


All Articles