diff options
author | Leonard Kugis <leonard@kug.is> | 2023-03-22 04:41:34 +0100 |
---|---|---|
committer | Leonard Kugis <leonard@kug.is> | 2023-03-22 04:41:34 +0100 |
commit | c8c21ad8d357a7c9870b3e22fed8fdbc086aa3d9 (patch) | |
tree | fcc82e30293c1a35cf9b4e4f5aed3064af5958ea /file-tagger.py | |
parent | 9a1555f4dad58facef163ca486980143a0dd4c91 (diff) |
Coverting image to RGB before detecting
Diffstat (limited to 'file-tagger.py')
-rw-r--r-- | file-tagger.py | 4 |
1 files 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: |