From 91d37cebe63ae3e3591ee7d9f5b674ab63cdd15b Mon Sep 17 00:00:00 2001 From: semnisem Date: Wed, 20 Nov 2024 03:10:34 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EB=B3=80=EA=B2=BD=20=EC=9D=B8=ED=8E=98?= =?UTF-8?q?=EC=9D=B8=ED=8C=85=20=EB=B0=A9=EC=8B=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AIProcessor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/AIProcessor.py b/app/AIProcessor.py index fbbe80b..fc80705 100644 --- a/app/AIProcessor.py +++ b/app/AIProcessor.py @@ -118,7 +118,12 @@ def segment_from_boxes(self, image, bbox, save_path=None): return masks_np def inpainting(self, image, mask_total): - inpainted_image = cv2.inpaint(image.copy(), mask_total, 10, cv2.INPAINT_TELEA) + # inpainted_image = cv2.inpaint(image.copy(), mask_total, 10, cv2.INPAINT_TELEA) + print(mask_total.shape) # (1893, 1577) with 0 or 255 + # print(image.shape) # (1893, 1577, 3) + + inpainted_image = image.copy() + inpainted_image[mask_total == 255] = [255, 255, 255] final_image = cv2.convertScaleAbs(inpainted_image, alpha=1.5, beta=10) # cv2.imwrite('test_images/inpainted_init.png', inpainted_image) # cv2.imwrite('test_images/inpainted_final.png', final_image)