dongwu92 / AutoPortraitMatting

Tensorflow implementation of Automatic Portrait Matting on paper "Automatic Portrait Segmentation for Image Stylization"
Apache License 2.0
478 stars 151 forks source link

running with FCN.py, but the result not so good #13

Open xhsoldier opened 7 years ago

xhsoldier commented 7 years ago

This is my predicted matting. Any suggestions?

pre1

michaelhuang74 commented 7 years ago

@xhsoldier Hi, is it possible to share the trained ckpt file? Thanks.

MLjian commented 6 years ago

你好,我最近在做抠图的作业,可以请教一下么

twinsyssy1018 commented 5 years ago

你好,我跑的fcn.py 出来的结果怎么是这样的呢? 我的fcn.py里改成下面的get_image() 直接imread 图像了,没有使用loadmat 不知道是不是这个原因 pre0

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