NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Use cpu provider for embeddings models (#13806)
Nicolas Mowene44a9e892187
diff --git a/frigate/embeddings/functions/clip.py b/frigate/embeddings/functions/clip.pyindex 8a5a057750..a4e75a510d 100644--- a/frigate/embeddings/functions/clip.py+++ b/frigate/embeddings/functions/clip.py@@ -49,31 +49,11 @@ class Clip(OnnxClip):@staticmethoddef _load_model(path: str, silent: bool):- providers = []- options = []-- for provider in ort.get_available_providers():- if provider == "TensorrtExecutionProvider":- continue- elif provider == "OpenVINOExecutionProvider":- # TODO need to verify openvino works correctly- os.makedirs("/config/model_cache/openvino/ort", exist_ok=True)- providers.append(provider)- options.append(- {- "cache_dir": "/config/model_cache/openvino/ort",- "device_type": "GPU",- }- )- else:- providers.append(provider)- options.append({})+ providers = ["CPUExecutionProvider"]try:if os.path.exists(path):- return ort.InferenceSession(- path, providers=providers, provider_options=options- )+ return ort.InferenceSession(path, providers=providers)else:raise FileNotFoundError(errno.ENOENT,@@ -104,9 +84,7 @@ class Clip(OnnxClip):f.flush()# Finally move the temporary file to the correct locationtemporary_filename.rename(path)- return ort.InferenceSession(- path, providers=provider, provider_options=options- )+ return ort.InferenceSession(path, providers=providers)class ClipEmbedding(EmbeddingFunction):