变频器集成以及增加点动控制(0209)

This commit is contained in:
2026-02-09 11:36:37 +08:00
parent 88dfc53b9d
commit d6ad01274a
45 changed files with 7161 additions and 1578 deletions

View File

@ -54,28 +54,29 @@ def run_stable_classification_loop():
# ---------------------------
result = classify_single_image(frame, model_path, roi_file)
class_id = result["class_id"]
class_name = result["class"]
score = result["score"]
print(f"[FRAME] {class_name} | conf={score:.3f}")
if score>0.8:
# ---------------------------
# 稳定判断
# ---------------------------
stable_class_id = judge.update(class_id)
# ---------------------------
# 稳定判断
# ---------------------------
stable_class_id = judge.update(class_id)
if stable_class_id is not None:
_ret=CLASS_NAMES[stable_class_id]
if _ret is None:
print("-------当前类别为:为空,继续等待稳定------")
continue
if _ret=="模具车1" or _ret=="模具车2":
break
print(f"当前类别为:{_ret},继续等待稳定...")
else:
print("当前类别为:为空,继续等待稳定...")
if stable_class_id is not None:
_ret=CLASS_NAMES[stable_class_id]
if _ret is None:
print("-------当前类别为:为空,继续等待稳定------")
continue
if _ret=="模具车1" or _ret=="模具车2":
break
print(f"当前类别为:{_ret},继续等待稳定...")
else:
print("当前类别为:为空,继续等待稳定...")
time.sleep(0.1)
finally:
if cap is not None: