mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Add all albels count for cameras
This commit is contained in:
parent
3f8278c6a6
commit
150fc25fc9
@ -554,13 +554,22 @@ class CameraState:
|
|||||||
if not obj.false_positive
|
if not obj.false_positive
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# keep track of all labels detected for this camera
|
||||||
|
all_labels_count = 0
|
||||||
|
|
||||||
# report on detected objects
|
# report on detected objects
|
||||||
for obj_name, count in obj_counter.items():
|
for obj_name, count in obj_counter.items():
|
||||||
|
all_labels_count += count
|
||||||
|
|
||||||
if count != self.object_counts[obj_name]:
|
if count != self.object_counts[obj_name]:
|
||||||
self.object_counts[obj_name] = count
|
self.object_counts[obj_name] = count
|
||||||
for c in self.callbacks["object_status"]:
|
for c in self.callbacks["object_status"]:
|
||||||
c(self.name, obj_name, count)
|
c(self.name, obj_name, count)
|
||||||
|
|
||||||
|
# publish for all labels detected for this camera
|
||||||
|
for c in self.callbacks["object_status"]:
|
||||||
|
c(self.name, "all", all_labels_count)
|
||||||
|
|
||||||
# expire any objects that are >0 and no longer detected
|
# expire any objects that are >0 and no longer detected
|
||||||
expired_objects = [
|
expired_objects = [
|
||||||
obj_name
|
obj_name
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user