mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 14:45:25 +03:00
Move the check for a change in active status into the code block protected by a false positive check.
This commit is contained in:
parent
8a762994be
commit
8de74f0b2f
@ -166,9 +166,8 @@ class TrackedObject:
|
|||||||
if self.computed_score > self.top_score:
|
if self.computed_score > self.top_score:
|
||||||
self.top_score = self.computed_score
|
self.top_score = self.computed_score
|
||||||
self.false_positive = self._is_false_positive()
|
self.false_positive = self._is_false_positive()
|
||||||
if not self.active == self.is_active():
|
# Hold previous active state for checking further down.
|
||||||
# State transition between stationary/active.
|
previously_active = self.active
|
||||||
significant_change = True
|
|
||||||
self.active = self.is_active()
|
self.active = self.is_active()
|
||||||
|
|
||||||
if not self.false_positive:
|
if not self.false_positive:
|
||||||
@ -254,7 +253,9 @@ class TrackedObject:
|
|||||||
if self.obj_data["attributes"] != obj_data["attributes"]:
|
if self.obj_data["attributes"] != obj_data["attributes"]:
|
||||||
significant_change = True
|
significant_change = True
|
||||||
|
|
||||||
|
# if the state changed between stationary and active
|
||||||
|
if previously_active != self.active:
|
||||||
|
significant_change = True
|
||||||
|
|
||||||
# update at least once per minute
|
# update at least once per minute
|
||||||
if self.obj_data["frame_time"] - self.previous["frame_time"] > 60:
|
if self.obj_data["frame_time"] - self.previous["frame_time"] > 60:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user