AutoPortraitMatting
AutoPortraitMatting copied to clipboard
running with FCN.py, but the result not so good
This is my predicted matting. Any suggestions?
@xhsoldier Hi, is it possible to share the trained ckpt file? Thanks.
你好,我最近在做抠图的作业,可以请教一下么
你好,我跑的fcn.py 出来的结果怎么是这样的呢? 我的fcn.py里改成下面的get_image() 直接imread 图像了,没有使用loadmat
不知道是不是这个原因

def get_image(img_name):
imat=sio.imread(img_name)
nimat = np.array(imat, dtype=np.float)
org_mat = np.zeros(nimat.shape, dtype=np.float)
h, w, _ = nimat.shape
for i in range(h):
for j in range(w):
org_mat[i][j][0] = (nimat[i][j][2] -104.008)/255.
org_mat[i][j][1] = (nimat[i][j][1] - 116.669)/255.
org_mat[i][j][2] = (nimat[i][j][0] - 122.675)/255.
return org_mat,imat