What is the order of mean values in Caffe's train.prototxt?

谁说我不能喝 提交于 2019-12-06 06:39:27

问题


In my Caffe 'train.prototxt' I'm doing some input data transformation, like this:

  transform_param {
    mirror: true
    crop_size: 321
    mean_value: 104 # Red ?
    mean_value: 116 # Blue ? 
    mean_value: 122 # Green ? 
  }

Now I want to store a modified version of my input images such that certain image regions are set to those mean values. The rational is that those regions are then set to 0 during mean subtraction. However I don't know what the order of channels is that caffe expects in such a prototxt file and I couldn't look it up in the caffe code either.
Does someone now whether the 3 values given above are in RGB or BGR order?

(I'm not sure since caffe is using opencv internally which stores images in the unusual BGR format)


回答1:


https://groups.google.com/forum/#!topic/caffe-users/9opH6AW3Irw (answer by Evan Shelhamer):

[Mean] values are BGR for historical reasons -- the original CaffeNet training lmdb was made with image processing by OpenCV which defaults to BGR order.



来源:https://stackoverflow.com/questions/39306167/what-is-the-order-of-mean-values-in-caffes-train-prototxt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!