@Ashwani Rai, Thanks for your response. I have followed the procedure described by dennis-chen in the post
https://github.com/BVLC/caffe/issues/550
In create_imagenet.sh, I have passed --gray into convert_imageset as follow:
GLOG_logtostderr=1 $TOOLS/convert_imageset \
--resize_height=$RESIZE_HEIGHT \
--resize_width=$RESIZE_WIDTH \
--gray \
--shuffle \
$TRAIN_DATA_ROOT \
$DATA/Train.txt \
$EXAMPLE/train_lmdb
In deploy.prototext, I have used input dimensions as follow:
name: "CaffeNet"
input: "data"
input_dim: 10
input_dim: 1
input_dim: 227
input_dim: 227
Finally in the python classifier wrapper, I am creating network as follow:
net = caffe.Classifier(MODEL_FILE, PRETRAINED,
mean = np.load('out.npy').mean(1).mean(1),
raw_scale=255,
image_dims=(256,256))
But still it is not working, all images are classified into one class.