From a5f6c754def9994320e60cb7fd3755bcbcea241a Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 15 Apr 2025 06:52:12 -0600 Subject: [PATCH] Add hwcn --- frigate/detectors/detector_config.py | 1 + frigate/object_detection/util.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/frigate/detectors/detector_config.py b/frigate/detectors/detector_config.py index 29d589fcc5..d87405d089 100644 --- a/frigate/detectors/detector_config.py +++ b/frigate/detectors/detector_config.py @@ -26,6 +26,7 @@ class InputTensorEnum(str, Enum): nchw = "nchw" nhwc = "nhwc" hwnc = "hwnc" + hwcn = "hwcn" class InputDTypeEnum(str, Enum): diff --git a/frigate/object_detection/util.py b/frigate/object_detection/util.py index 4f31dfb75e..a4cab9f8e6 100644 --- a/frigate/object_detection/util.py +++ b/frigate/object_detection/util.py @@ -73,3 +73,5 @@ def tensor_transform(desired_shape: InputTensorEnum): return (0, 3, 1, 2) elif desired_shape == InputTensorEnum.hwnc: return (1, 2, 0, 3) + elif desired_shape == InputTensorEnum.hwcn: + return (1, 2, 3, 0)