Miscellaneous fixes (0.17 beta) (#21431)
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions

* Add shortSummary field to review summary to be used for notifications

* pull in current config version into default config

* fix crash when dynamically adding cameras

depending on where we are in the update loop, camera configs might not be updated yet and we are receiving detections already

* add no tracked objects and icon to explore summary view

* reset add camera wizard when closing and saving

* don't flash no exports icon while loading

* Improve handling of homekit config

* Increase prompt tokens reservation

* Adjust

* Catch event not found object detection

* Use thread lock for JinaV2 in onnxruntime

* remove incorrect embeddings process from memray docs

* only show transcribe button if audio event has video

* apply aspect ratio and margin constraints to path overlay in detail stream on mobile

improves a specific case where the overlay was not aligned with 4:3 cameras on mobile phones

* show metadata title as tooltip on icon hover in detail stream

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
Nicolas Mowen
2025-12-26 08:45:03 -06:00
committed by GitHub
co-authored by Josh Hawkins
parent e20b324e0a
commit 3c5eb1aee5
18 changed files with 102 additions and 25 deletions
+30 -2
View File
@@ -139,8 +139,31 @@ class ONNXModelRunner(BaseModelRunner):
ModelTypeEnum.dfine.value,
]
def __init__(self, ort: ort.InferenceSession):
@staticmethod
def is_concurrent_model(model_type: str | None) -> bool:
"""Check if model requires thread locking for concurrent inference.
Some models (like JinaV2) share one runner between text and vision embeddings
called from different threads, requiring thread synchronization.
"""
if not model_type:
return False
# Import here to avoid circular imports
from frigate.embeddings.types import EnrichmentModelTypeEnum
return model_type == EnrichmentModelTypeEnum.jina_v2.value
def __init__(self, ort: ort.InferenceSession, model_type: str | None = None):
self.ort = ort
self.model_type = model_type
# Thread lock to prevent concurrent inference (needed for JinaV2 which shares
# one runner between text and vision embeddings called from different threads)
if self.is_concurrent_model(model_type):
self._inference_lock = threading.Lock()
else:
self._inference_lock = None
def get_input_names(self) -> list[str]:
return [input.name for input in self.ort.get_inputs()]
@@ -150,6 +173,10 @@ class ONNXModelRunner(BaseModelRunner):
return self.ort.get_inputs()[0].shape[3]
def run(self, input: dict[str, Any]) -> Any | None:
if self._inference_lock:
with self._inference_lock:
return self.ort.run(None, input)
return self.ort.run(None, input)
@@ -576,5 +603,6 @@ def get_optimized_runner(
),
providers=providers,
provider_options=options,
)
),
model_type=model_type,
)