yucornetto/MGMatting

Why the uncertainty is 1/255?

baorina opened this issue · 0 comments

Hi Qihang,

I have a question about uncertainty region computation. Why is pred<[1/255.0] as the uncertain region? How do you choose this value?

def get_unknown_tensor_from_pred(pred, rand_width=30, train_mode=True):
### pred: N, 1 ,H, W
N, C, H, W = pred.shape

pred = pred.data.cpu().numpy()
uncertain_area = np.ones_like(pred, dtype=np.uint8)
uncertain_area[pred<1.0/255.0] = 0
uncertain_area[pred>1-1.0/255.0] = 0