|
|
@@ -1048,11 +1048,12 @@ class AsyncCoordinator(Coordinator):
|
|
|
if self._paired_saver is None:
|
|
|
return
|
|
|
|
|
|
- # 过滤有效人员(置信度 >= 阈值)
|
|
|
+ # 过滤有效人员(必须是 person 且置信度 >= 阈值)
|
|
|
person_threshold = DETECTION_CONFIG.get('person_threshold', 0.8)
|
|
|
valid_persons = []
|
|
|
for det in tracked:
|
|
|
- if det.confidence >= person_threshold:
|
|
|
+ # 只处理 class_name 为 person 的目标,排除安全帽、反光衣等
|
|
|
+ if det.class_name == 'person' and det.confidence >= person_threshold:
|
|
|
valid_persons.append(det)
|
|
|
|
|
|
if not valid_persons:
|