fix: optimize diagnosis output format and fix inconsistency between fault_status and fault_type

1. 输出格式优化:
   - faults中移除冗余的bbox和confidence字段
   - summary中fault_count改名为detection_count

2. fault_status与fault_type逻辑统一:
   - normal状态时fault_type为'none',不再使用'suspect'
   - abnormal状态时才进行故障类型分类(hotspot/local_overheating/overheat)

3. 修复usage_example.py图像通道问题:
   - YOLO检测使用彩色图,温度提取时再转灰度图
This commit is contained in:
SkyLi
2026-03-27 12:03:48 +08:00
parent febd9eea8d
commit 085cbc9950
4 changed files with 16 additions and 17 deletions
+1 -3
View File
@@ -279,8 +279,6 @@ print(f"故障类型: {result['summary']['fault_types']}")
],
"faults": [
{
"bbox": [x1, y1, x2, y2],
"confidence": 0.995,
"temp_max": 255.0,
"temp_mean": 97.49,
"temp_std": 45.2,
@@ -290,7 +288,7 @@ print(f"故障类型: {result['summary']['fault_types']}")
],
"summary": {
"status": "fault_detected",
"fault_count": 1,
"detection_count": 1,
"abnormal_count": 1,
"fault_types": ["hotspot"]
}