From 344219fe52532737be14731213103b40045ac77e Mon Sep 17 00:00:00 2001 From: DanielWurgaft <47820844+DanielWurgaft@users.noreply.github.com> Date: Mon, 11 May 2020 09:45:02 +0300 Subject: [PATCH] Update eval.py --- eval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval.py b/eval.py index 19b6937..8984e0c 100644 --- a/eval.py +++ b/eval.py @@ -45,7 +45,7 @@ def generate_trimap(object_file): if foreground is None: return False print(foreground.shape) - alpha = cv2.split(foreground)[3] + alpha = cv2.split(foreground)[2] ratio = np.amin(np.divide(size, alpha.shape[0:2])) forground_size = np.floor(np.multiply(alpha.shape[0:2], ratio)).astype(int)