What is the order of averages in Caffe train.prototxt?

In my Caffe, 'train.prototxt'I am doing some input conversion, for example:

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

Now I want to save a modified version of my input images so that certain areas of the image are set to these averages. It is rational that after an average subtraction these regions are set to 0. However, I do not know what the order of the channels is expected in such a prototxt file, and I could not find it in the code. Does anyone now have the above 3 values ​​in RGB or BGR?

(I'm not sure, since caffe uses opencv inside, which stores images in an unusual BGR format)

+4
source share
1 answer

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

[Average] BGR values ​​for historical reasons - the initial preparation of lmdb CaffeNet was done with image processing using OpenCV, which defaults to the BGR order.

+6
source

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


All Articles