From 26e9fd716cd6c4ceef8cb553db126976df3fec5b Mon Sep 17 00:00:00 2001 From: HeShiwen Date: Sun, 18 Feb 2024 14:44:08 +0800 Subject: [PATCH] Update infer_demo.py Fix the bug of result image color issue --- deploy/third_engine/demo_onnxruntime/infer_demo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/third_engine/demo_onnxruntime/infer_demo.py b/deploy/third_engine/demo_onnxruntime/infer_demo.py index a2b6de5286a..aa6d22a982b 100644 --- a/deploy/third_engine/demo_onnxruntime/infer_demo.py +++ b/deploy/third_engine/demo_onnxruntime/infer_demo.py @@ -172,6 +172,7 @@ def detect_folder(self, img_fold, result_path): srcimg = net.detect(img) save_path = str(result_path / img_path.name.replace(".png", ".jpg")) + srcimg = cv2.cvtColor(srcimg, cv2.COLOR_RGB2BGR) cv2.imwrite(save_path, srcimg)