fix(aiot): 降低YOLO置信度阈值(0.5→0.4)减少离岗误报
人员在岗但检测置信度低于0.5被过滤,导致算法误判"无人"触发离岗告警。 将默认阈值降至0.4,同步更新环境变量默认值。 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,7 +117,7 @@ class InferenceConfig:
|
|||||||
input_width: int = 480
|
input_width: int = 480
|
||||||
input_height: int = 480
|
input_height: int = 480
|
||||||
batch_size: int = 1
|
batch_size: int = 1
|
||||||
conf_threshold: float = 0.5
|
conf_threshold: float = 0.4
|
||||||
nms_threshold: float = 0.45
|
nms_threshold: float = 0.45
|
||||||
device_id: int = 0
|
device_id: int = 0
|
||||||
fp16_mode: bool = True
|
fp16_mode: bool = True
|
||||||
@@ -273,7 +273,7 @@ class Settings:
|
|||||||
input_width=int(os.getenv("INPUT_WIDTH", "480")),
|
input_width=int(os.getenv("INPUT_WIDTH", "480")),
|
||||||
input_height=int(os.getenv("INPUT_HEIGHT", "480")),
|
input_height=int(os.getenv("INPUT_HEIGHT", "480")),
|
||||||
batch_size=int(os.getenv("BATCH_SIZE", "4")),
|
batch_size=int(os.getenv("BATCH_SIZE", "4")),
|
||||||
conf_threshold=float(os.getenv("CONF_THRESHOLD", "0.5")),
|
conf_threshold=float(os.getenv("CONF_THRESHOLD", "0.4")),
|
||||||
nms_threshold=float(os.getenv("NMS_THRESHOLD", "0.45")),
|
nms_threshold=float(os.getenv("NMS_THRESHOLD", "0.45")),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user