mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 05:24:11 +03:00
Fix logical errors caused by code formatting
This commit is contained in:
parent
1dee548dbc
commit
e27a94ae0b
@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
|
||||
DETECTOR_KEY = "axengine"
|
||||
|
||||
supported_models = {
|
||||
ModelTypeEnum.yologeneric: "frigate-yolov9-tiny",
|
||||
ModelTypeEnum.yologeneric: "frigate-yolov9-.*$",
|
||||
}
|
||||
|
||||
model_cache_dir = os.path.join(MODEL_CACHE_DIR, "axengine_cache/")
|
||||
@ -38,9 +38,7 @@ class Axengine(DetectionApi):
|
||||
self.height = config.model.height
|
||||
self.width = config.model.width
|
||||
model_path = config.model.path or "frigate-yolov9-tiny"
|
||||
|
||||
model_props = self.parse_model_input(model_path)
|
||||
|
||||
self.session = axe.InferenceSession(model_props["path"])
|
||||
|
||||
def __del__(self):
|
||||
@ -51,6 +49,7 @@ class Axengine(DetectionApi):
|
||||
model_props["preset"] = True
|
||||
|
||||
model_matched = False
|
||||
|
||||
for model_type, pattern in supported_models.items():
|
||||
if re.match(pattern, model_path):
|
||||
model_matched = True
|
||||
|
||||
Loading…
Reference in New Issue
Block a user