You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ,
Thanks for releasing your excellent work.
I would like to directly use the results of stage 1 training, without the further stages.
I attempted to get the output using the following
prototxt = 'DeconvNet_inference_deploy.prototxt'
caffemodel = 'snapshot/stage_1_train_iter_6000.caffemodel'
net = caffe.Net(prototxt,caffemodel)
im = Image.open(imagename)
im = im.resize(dims,Image.ANTIALIAS)
in_ = np.array(im, dtype=np.float32)
in_ = in_[:,:,::-1]
in_ -= np.array((104.0,116.7,122.7))
in_ = in_.transpose((2,0,1))
net.blobs['data'].reshape(1, *in_.shape)
net.blobs['data'].data[...] = in_
# run net and take argmax for prediction
net.forward()
out = net.blobs['seg-score'].data[0].argmax(axis=0)
result = Image.fromarray(out.astype(np.uint8))
result.save(outname)
but so far get only images with all pixels = 0
Is there something else I need to do ? This script, with minor changes, works for the fcn segmentations
The text was updated successfully, but these errors were encountered:
Hi ,
Thanks for releasing your excellent work.
I would like to directly use the results of stage 1 training, without the further stages.
I attempted to get the output using the following
but so far get only images with all pixels = 0
Is there something else I need to do ? This script, with minor changes, works for the fcn segmentations
The text was updated successfully, but these errors were encountered: