mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 20:47: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):
|
||||
nchw = "nchw"
|
||||
nhwc = "nhwc"
|
||||
hwnc = "hwnc"
|
||||
|
||||
|
||||
class InputDTypeEnum(str, Enum):
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"""Object detection utilities."""
|
||||
|
||||
import threading
|
||||
import queue
|
||||
import threading
|
||||
|
||||
from numpy import ndarray
|
||||
|
||||
@ -71,3 +71,5 @@ def tensor_transform(desired_shape: InputTensorEnum):
|
||||
return None
|
||||
elif desired_shape == InputTensorEnum.nchw:
|
||||
return (0, 3, 1, 2)
|
||||
elif desired_shape == InputTensorEnum.hwnc:
|
||||
return (1, 2, 0, 3)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user