mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-24 23:57:41 +03:00
Fix
This commit is contained in:
parent
85bff61776
commit
620db568b0
@ -133,9 +133,9 @@ class CustomStateClassificationProcessor(RealTimeProcessorApi):
|
|||||||
x:x2,
|
x:x2,
|
||||||
]
|
]
|
||||||
|
|
||||||
if input.shape != (224, 224):
|
if frame.shape != (224, 224):
|
||||||
try:
|
try:
|
||||||
input = cv2.resize(input, (224, 224))
|
frame = cv2.resize(frame, (224, 224))
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warning("Failed to resize image for state classification")
|
logger.warning("Failed to resize image for state classification")
|
||||||
return
|
return
|
||||||
@ -258,11 +258,11 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
|
|||||||
x:x2,
|
x:x2,
|
||||||
]
|
]
|
||||||
|
|
||||||
if input.shape != (224, 224):
|
if frame.shape != (224, 224):
|
||||||
try:
|
try:
|
||||||
input = cv2.resize(input, (224, 224))
|
frame = cv2.resize(frame, (224, 224))
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warning("Failed to resize image for object classification")
|
logger.warning("Failed to resize image for state classification")
|
||||||
return
|
return
|
||||||
|
|
||||||
input = np.expand_dims(crop, axis=0)
|
input = np.expand_dims(crop, axis=0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user