def add_fake_instances(im,gt,label=2):
y,x = np.where(gt==label)
if x.size==0:
return None,None
h,w,c = im.shape
img = im.copy()
mask = gt.copy()
'''first we just add mirrors'''
x3 = x
y3 = y
x3 = w-x3
mask[y3,x3] = label
img[y3,x3,...] = im[y,x,...]
return img,mask
ath...@ualberta.ca : you are absolutely right that very sparse signal will have trouble making it its way to the top, after all the downsampling & stride from the network ( around 32 for AlexNet). But I think it is possible to either : 1. remove some layers and relearn 2. use stitch-&-shift (or filter rarefaction as explained in fcn paper) 3. use skip layers at different pooling levels (so as to extract the fine grained structure) 4. use a deconvolution network 5. use a CRF as mentioned by Nicolas ... |