mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 22:25:24 +03:00
fixes to get frame names working
This commit is contained in:
parent
6588153a7e
commit
5d892e1112
@ -63,7 +63,9 @@ class PtzMotionEstimator:
|
||||
self.ptz_metrics["ptz_reset"].set()
|
||||
logger.debug(f"{config.name}: Motion estimator init")
|
||||
|
||||
def motion_estimator(self, detections, frame_name, frame_time, camera):
|
||||
def motion_estimator(
|
||||
self, detections, frame_name: str, frame_time: int, camera: str
|
||||
):
|
||||
# If we've just started up or returned to our preset, reset motion estimator for new tracking session
|
||||
if self.ptz_metrics["ptz_reset"].is_set():
|
||||
self.ptz_metrics["ptz_reset"].clear()
|
||||
|
||||
@ -480,6 +480,7 @@ class RecordingMaintainer(threading.Thread):
|
||||
if topic == DetectionTypeEnum.video:
|
||||
(
|
||||
camera,
|
||||
_,
|
||||
frame_time,
|
||||
current_tracked_objects,
|
||||
motion_boxes,
|
||||
|
||||
@ -285,7 +285,9 @@ class NorfairTracker(ObjectTracker):
|
||||
]
|
||||
self.match_and_update(frame_name, frame_time, detections=detections)
|
||||
|
||||
def match_and_update(self, frame_name, frame_time, detections):
|
||||
def match_and_update(
|
||||
self, frame_name: str, frame_time: float, detections: list[tuple]
|
||||
):
|
||||
norfair_detections = []
|
||||
|
||||
for obj in detections:
|
||||
|
||||
@ -591,7 +591,7 @@ def process_frames(
|
||||
|
||||
# if detection is disabled
|
||||
if not detect_config.enabled:
|
||||
object_tracker.match_and_update(frame_time, [])
|
||||
object_tracker.match_and_update(frame_name, frame_time, [])
|
||||
else:
|
||||
# get stationary object ids
|
||||
# check every Nth frame for stationary objects
|
||||
@ -715,7 +715,7 @@ def process_frames(
|
||||
if d[0] not in ALL_ATTRIBUTE_LABELS
|
||||
]
|
||||
# now that we have refined our detections, we need to track objects
|
||||
object_tracker.match_and_update(frame_time, tracked_detections)
|
||||
object_tracker.match_and_update(frame_name, frame_time, tracked_detections)
|
||||
# else, just update the frame times for the stationary objects
|
||||
else:
|
||||
object_tracker.update_frame_times(frame_name, frame_time)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user