From 88fc0f9f9b7fd3eb81c958ca41ed822cf3657c47 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期二, 22 四月 2025 15:50:22 +0800
Subject: [PATCH] refactor: 重构中药识别项目 分为onnx版和openvino版

---
 onnx/herb_ai.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/herb_ai.py b/onnx/herb_ai.py
similarity index 98%
rename from herb_ai.py
rename to onnx/herb_ai.py
index 66be1e8..261f04b 100644
--- a/herb_ai.py
+++ b/onnx/herb_ai.py
@@ -304,6 +304,12 @@
         width = cv2.getWindowImageRect("AICamera")[2]
         height = cv2.getWindowImageRect("AICamera")[3]
 
+        print("width", width, "height", height)
+
+        # 濡傛灉height灏忎簬1鍒欒祴鍊�100
+        if height < 1:
+            height = 100
+
         # 璋冩暣鍥惧儚澶у皬浠ラ�傚簲绐楀彛
         resized_frame = cv2.resize(draw_img, (width, height))
 
@@ -480,7 +486,7 @@
 
     load_identifier = IDENTIFIER("model/loading.onnx")
     hoister_position = IDENTIFIER("model/hl.onnx")
-    safety_detect = SAFETY_DETECT("model/safety_det.onnx")
+    safety_detect = SAFETY_DETECT("model/safety_det_.onnx")
     config = read_config()
     PCOPYDATASTRUCT = ctypes.POINTER(COPYDATASTRUCT)
 

--
Gitblit v1.9.3