Quantcast
Channel: How to set mean pixels for feedforward? caffe - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to set mean pixels for feedforward? caffe

$
0
0

I want to finetune VGG19 and it is working good. While training I am subtracting the mean pixels as

name: "VGG_ILSVRC_19_layer"
layer {
  name: "data"
  type: "Data"
  include {
    phase: TRAIN
  }
 transform_param {
    mean_value: 104
    mean_value: 117
    mean_value: 123
    mirror: false
 }
 data_param {
    source: "examples/VGG_finetune/train_lmdb"
    batch_size: 8
    backend: LMDB
  }
  top: "data"
  top: "label"
}

Now I need to feedforward through my finetuned network. If I look at this they are not specifying mean pixel value in deploy file.

Question:
How can I provide my network mean pixel value while feedforwarding?
My code for feedforward(loading network) is

net = caffe.Classifier(model_prototxt, model_trained,
                           mean=[104,117,123],
                           channel_swap=(2,1,0),
                           raw_scale=255,
                           image_dims=(224, 224))

Now I am not sure whether mean=(104,117,123) work or not because when I viewed source code of classifier then I came to know through comments in code that it only takes ndarray otherwise it give error.
How can I subtract mean pixels from input image?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images