mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
add sub_label to camera activity
This commit is contained in:
parent
af71b9fc66
commit
05e147989b
@ -739,12 +739,14 @@ class CameraState:
|
|||||||
|
|
||||||
if not obj.false_positive:
|
if not obj.false_positive:
|
||||||
label = object_type
|
label = object_type
|
||||||
|
sub_label = None
|
||||||
|
|
||||||
if obj.obj_data.get("sub_label"):
|
if obj.obj_data.get("sub_label"):
|
||||||
if obj.obj_data.get("sub_label")[0] in ALL_ATTRIBUTE_LABELS:
|
if obj.obj_data.get("sub_label")[0] in ALL_ATTRIBUTE_LABELS:
|
||||||
label = obj.obj_data["sub_label"][0]
|
label = obj.obj_data["sub_label"][0]
|
||||||
else:
|
else:
|
||||||
label = f"{object_type}-verified"
|
label = f"{object_type}-verified"
|
||||||
|
sub_label = obj.obj_data["sub_label"][0]
|
||||||
|
|
||||||
camera_activity["objects"].append(
|
camera_activity["objects"].append(
|
||||||
{
|
{
|
||||||
@ -754,6 +756,7 @@ class CameraState:
|
|||||||
"area": obj.obj_data["area"],
|
"area": obj.obj_data["area"],
|
||||||
"ratio": obj.obj_data["ratio"],
|
"ratio": obj.obj_data["ratio"],
|
||||||
"score": obj.obj_data["score"],
|
"score": obj.obj_data["score"],
|
||||||
|
"sub_label": sub_label,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user