增加一些打印
This commit is contained in:
@@ -165,9 +165,11 @@ class VideoFacePrisonBiz(BaseFaceBiz):
|
|||||||
# 检查是否在冷却期内
|
# 检查是否在冷却期内
|
||||||
if person_id in self.person_cooldown:
|
if person_id in self.person_cooldown:
|
||||||
if current_time <= self.person_cooldown[person_id]:
|
if current_time <= self.person_cooldown[person_id]:
|
||||||
|
print(f"{person_id} in cooldown")
|
||||||
# 还在冷却期内,忽略此人
|
# 还在冷却期内,忽略此人
|
||||||
return False, None
|
return False, None
|
||||||
else:
|
else:
|
||||||
|
print(f"{person_id} cooldown expired, remove")
|
||||||
# 冷却期结束,删除记录
|
# 冷却期结束,删除记录
|
||||||
del self.person_cooldown[person_id]
|
del self.person_cooldown[person_id]
|
||||||
|
|
||||||
@@ -183,7 +185,10 @@ class VideoFacePrisonBiz(BaseFaceBiz):
|
|||||||
self.person_cooldown[person_id] = current_time + self.cooldown_seconds
|
self.person_cooldown[person_id] = current_time + self.cooldown_seconds
|
||||||
# 清空该人员的匹配记录
|
# 清空该人员的匹配记录
|
||||||
del self.person_tracking[person_id]
|
del self.person_tracking[person_id]
|
||||||
|
print(f"{person_id} passed")
|
||||||
return True, person_id
|
return True, person_id
|
||||||
|
else:
|
||||||
|
print(f"{person_id} not enough matches, count: {len(recent_matches)}")
|
||||||
|
|
||||||
return False, None
|
return False, None
|
||||||
|
|
||||||
@@ -210,6 +215,7 @@ class VideoFacePrisonBiz(BaseFaceBiz):
|
|||||||
|
|
||||||
# 查找最佳匹配
|
# 查找最佳匹配
|
||||||
best_name, similarity = self.find_best_match(face.embedding)
|
best_name, similarity = self.find_best_match(face.embedding)
|
||||||
|
# print(f"best_name: {best_name}, similarity: {similarity}")
|
||||||
is_match = best_name is not None and similarity >= self.similarity_threshold
|
is_match = best_name is not None and similarity >= self.similarity_threshold
|
||||||
|
|
||||||
# 新增:判断是否已经通过
|
# 新增:判断是否已经通过
|
||||||
|
|||||||
Reference in New Issue
Block a user