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
@@ -222,15 +222,13 @@
"image": "FLIR0150.jpg",
"detections": [...],
"faults": [{
"bbox": [...],
"confidence": 0.995,
"temp_max": 255.0,
"fault_status": "abnormal",
"fault_type": "hotspot"
}],
"summary": {
"status": "fault_detected",
"fault_count": 1,
"detection_count": 1,
"abnormal_count": 1
}
}