mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-26 00:27:40 +03:00
Catch bird classification resize error
This commit is contained in:
parent
975c8485f9
commit
c0c9099616
@ -128,7 +128,11 @@ class BirdRealTimeProcessor(RealTimeProcessorApi):
|
|||||||
]
|
]
|
||||||
|
|
||||||
if input.shape != (224, 224):
|
if input.shape != (224, 224):
|
||||||
input = cv2.resize(input, (224, 224))
|
try:
|
||||||
|
input = cv2.resize(input, (224, 224))
|
||||||
|
except Exception:
|
||||||
|
logger.warning("Failed to resize image for bird classification")
|
||||||
|
return
|
||||||
|
|
||||||
input = np.expand_dims(input, axis=0)
|
input = np.expand_dims(input, axis=0)
|
||||||
self.interpreter.set_tensor(self.tensor_input_details[0]["index"], input)
|
self.interpreter.set_tensor(self.tensor_input_details[0]["index"], input)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user