face prison biz新增参数
This commit is contained in:
@@ -44,6 +44,7 @@ class VideoFacePrisonBiz(BaseFaceBiz):
|
||||
self.detection_window_seconds = 2.0 # 检测窗口时间(秒)
|
||||
self.min_match_count = 5 # 最小匹配次数
|
||||
self.cooldown_seconds = 30 # 冷却时间(秒)
|
||||
self.escort_window_hours = 72 # 犯人带出窗口时间(小时)
|
||||
|
||||
# 跟踪数据结构
|
||||
self.person_tracking = {} # {person_id: [timestamp1, timestamp2, ...]}
|
||||
@@ -142,6 +143,24 @@ class VideoFacePrisonBiz(BaseFaceBiz):
|
||||
"""
|
||||
return self.cooldown_seconds
|
||||
|
||||
def set_escort_window_hours(self, escort_window_hours: int):
|
||||
"""
|
||||
设置犯人带出窗口时间
|
||||
|
||||
参数:
|
||||
escort_window_hours: 犯人带出窗口时间(小时)
|
||||
"""
|
||||
self.escort_window_hours = escort_window_hours
|
||||
|
||||
def get_escort_window_hours(self) -> int:
|
||||
"""
|
||||
获取犯人带出窗口时间
|
||||
|
||||
返回:
|
||||
犯人带出窗口时间(小时)
|
||||
"""
|
||||
return self.escort_window_hours
|
||||
|
||||
def _cleanup_old_records(self, current_time: float):
|
||||
"""
|
||||
清理过期的跟踪记录
|
||||
|
||||
Reference in New Issue
Block a user