mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 04:57:42 +03:00
Add hwnc
This commit is contained in:
parent
6645b158a3
commit
0ce2f6d411
@ -25,6 +25,7 @@ class PixelFormatEnum(str, Enum):
|
|||||||
class InputTensorEnum(str, Enum):
|
class InputTensorEnum(str, Enum):
|
||||||
nchw = "nchw"
|
nchw = "nchw"
|
||||||
nhwc = "nhwc"
|
nhwc = "nhwc"
|
||||||
|
hwnc = "hwnc"
|
||||||
|
|
||||||
|
|
||||||
class InputDTypeEnum(str, Enum):
|
class InputDTypeEnum(str, Enum):
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"""Object detection utilities."""
|
"""Object detection utilities."""
|
||||||
|
|
||||||
import threading
|
|
||||||
import queue
|
import queue
|
||||||
|
import threading
|
||||||
|
|
||||||
from numpy import ndarray
|
from numpy import ndarray
|
||||||
|
|
||||||
@ -71,3 +71,5 @@ def tensor_transform(desired_shape: InputTensorEnum):
|
|||||||
return None
|
return None
|
||||||
elif desired_shape == InputTensorEnum.nchw:
|
elif desired_shape == InputTensorEnum.nchw:
|
||||||
return (0, 3, 1, 2)
|
return (0, 3, 1, 2)
|
||||||
|
elif desired_shape == InputTensorEnum.hwnc:
|
||||||
|
return (1, 2, 0, 3)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user