mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-31 16:12:19 +03:00
Compare commits
2
Commits
dev
...
138eaf4daa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
138eaf4daa | ||
|
|
0bda267a20 |
@@ -529,7 +529,7 @@ def get_optimized_runner(
|
|||||||
return OpenVINOModelRunner(model_path, device, model_type, **kwargs)
|
return OpenVINOModelRunner(model_path, device, model_type, **kwargs)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
not CudaGraphRunner.is_model_supported(model_type)
|
CudaGraphRunner.is_model_supported(model_type)
|
||||||
and providers[0] == "CUDAExecutionProvider"
|
and providers[0] == "CUDAExecutionProvider"
|
||||||
):
|
):
|
||||||
options[0] = {
|
options[0] = {
|
||||||
|
|||||||
@@ -407,6 +407,19 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
segment.last_detection_time = frame_time
|
segment.last_detection_time = frame_time
|
||||||
|
|
||||||
for object in activity.get_all_objects():
|
for object in activity.get_all_objects():
|
||||||
|
# Alert-level objects should always be added (they extend/upgrade the segment)
|
||||||
|
# Detection-level objects should only be added if:
|
||||||
|
# - The segment is a detection segment (matching severity), OR
|
||||||
|
# - The segment is an alert AND the object started before the alert ended
|
||||||
|
# (objects starting after will be in the new detection segment)
|
||||||
|
is_alert_object = object in activity.categorized_objects["alerts"]
|
||||||
|
|
||||||
|
if not is_alert_object and segment.severity == SeverityEnum.alert:
|
||||||
|
# This is a detection-level object
|
||||||
|
# Only add if it started during the alert's active period
|
||||||
|
if object["start_time"] > segment.last_alert_time:
|
||||||
|
continue
|
||||||
|
|
||||||
if not object["sub_label"]:
|
if not object["sub_label"]:
|
||||||
segment.detections[object["id"]] = object["label"]
|
segment.detections[object["id"]] = object["label"]
|
||||||
elif object["sub_label"][0] in self.config.model.all_attributes:
|
elif object["sub_label"][0] in self.config.model.all_attributes:
|
||||||
|
|||||||
Reference in New Issue
Block a user