Closed xuanhan863 closed 5 years ago
Hi xuanhan863, facing the same issue, did you found any solution?
Same here! Did either of you find a solution for this?
python3 eval.py ./unet-gan-matting-master/scripts/data/input/0_0.jpg ./unet-gan-matting-master/scripts/data/matting/target/0.png ./unet-gan-matting-master/scripts/data/output --checkpoint -1
this gives some results
Hello! alpha = cv2.split(foreground)[3] change to alpha = cv2.split(foreground)[2].
It seems that trimap image has to be an image which have an alpha channel. In my case, my trimap is a grayscale image, so I changed
alpha = cv2.split(foreground)[3]
to
alpha = foreground
I'm not sure that it is correct way, because output image is still not clean.
When I run the evaluation script with: python3 eval.py data/matting/input/107_0.jpg data/matting/trimap/107_trimap.jpg result.jpg --checkpoint -1
An IndexError occurs on eval.py line 48 : alpha = cv2.split(foreground)[3]