From f35013cd8edbf85a06b07b47ccb810b0bb247ffc Mon Sep 17 00:00:00 2001 From: vmalefioudakis Date: Wed, 23 Oct 2024 23:08:46 +0300 Subject: [PATCH] update inference_loop.py --- GANDLF/data/patch_miner/opm/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/GANDLF/data/patch_miner/opm/utils.py b/GANDLF/data/patch_miner/opm/utils.py index 61d43a1e4..de5d2182d 100644 --- a/GANDLF/data/patch_miner/opm/utils.py +++ b/GANDLF/data/patch_miner/opm/utils.py @@ -345,7 +345,6 @@ def patch_artifact_check( bool: Whether the patch is valid or not. """ # patch_size = config["patch_size"] - img= cv2.cvtColor(img,cv2.COLOR_BGRA2BGR) patch_hsv = cv2.cvtColor(img, cv2.COLOR_RGB2HSV) count_white_pixels = np.sum(np.logical_and.reduce(img > intensity_thresh, axis=2)) percent_pixels = count_white_pixels / (patch_size[0] * patch_size[1])