Ground Truth resizing in semantic segmentation

176 views
Skip to first unread message

Carlos Treviño

unread,
Jul 16, 2015, 1:01:19 PM7/16/15
to caffe...@googlegroups.com
Does anybody know how to do a proper image resizing for the ground truth dataset? I made mine 4 times smaller but the current RGB values don't match with the original ones.

Etienne Perot

unread,
Jul 17, 2015, 5:28:23 AM7/17/15
to caffe...@googlegroups.com
Hello Carlos!

I'm trying to achieve the same thing using hdf5. I'm planning to use caffe network to make forward from my source blob (rgb images) to conv5 which is the last layer i will keep intact. After you have adapted the source blob shape to caffe network (let say caffenet), you can just measure the conv5 blob shape :

#Adapt Shape to your image

nnet.blobs['data'].reshape(1,3,h,w)

nnet.transformer = caffe.io.Transformer({'data': nnet.blobs['data'].data.shape})


#Print the layer blob shape

for k,v in net.blobs.items():

    print (k, v.data.shape)


Then you should be able to simple resize your segmentation ground truth, to the size of last convolutional layer of your network, right?

Reply all
Reply to author
Forward
0 new messages