From c8c21ad8d357a7c9870b3e22fed8fdbc086aa3d9 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Wed, 22 Mar 2023 04:41:34 +0100 Subject: Coverting image to RGB before detecting --- file-tagger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file-tagger.py b/file-tagger.py index 0cf1f76..a8bf3ef 100644 --- a/file-tagger.py +++ b/file-tagger.py @@ -67,7 +67,7 @@ def walk(args): if mime_type.split("/")[0] == "image": logger.debug("File is image") img = cv2.imread(file_path) - #img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) + img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) if args["predict_images"]: logger.info("Predicting image tags ...") tags_predict = set() @@ -96,7 +96,7 @@ def walk(args): while(True): # For GUI inputs (rotate, ...) logger.debug("Showing image GUI ...") img_show = image_resize(img, width=args["gui_image_length"]) if img.shape[1] > img.shape[0] else image_resize(img, height=args["gui_image_length"]) - img_show = cv2.cvtColor(img_show, cv2.COLOR_BGR2RGB) + #img_show = cv2.cvtColor(img_show, cv2.COLOR_BGR2RGB) ret = GuiImage(i, file_path, img_show, tags).loop() tags = set(ret[1]).difference({''}) if ret[0] == GuiImage.RETURN_ROTATE_90_CLOCKWISE: -- cgit v1.2.1