mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-27 13:47:50 +02:00
Only try to import memryx SDK when memry detector is used (#19737)
This commit is contained in:
parent
5af8fbac51
commit
1636fee36a
@ -9,15 +9,6 @@ from queue import Queue
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
try:
|
||||
# from memryx import AsyncAccl # Import MemryX SDK
|
||||
from memryx import AsyncAccl
|
||||
except ModuleNotFoundError:
|
||||
raise ImportError(
|
||||
"MemryX SDK is not installed. Install it and set up MIX environment."
|
||||
)
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from typing_extensions import Literal
|
||||
|
||||
@ -55,6 +46,14 @@ class MemryXDetector(DetectionApi):
|
||||
|
||||
def __init__(self, detector_config):
|
||||
"""Initialize MemryX detector with the provided configuration."""
|
||||
try:
|
||||
# Import MemryX SDK
|
||||
from memryx import AsyncAccl
|
||||
except ModuleNotFoundError:
|
||||
raise ImportError(
|
||||
"MemryX SDK is not installed. Install it and set up MIX environment."
|
||||
)
|
||||
return
|
||||
|
||||
model_cfg = getattr(detector_config, "model", None)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user