From c0c9099616086354baada180b45b09a57fb137e2 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 16 Sep 2025 14:55:46 -0600 Subject: [PATCH] Catch bird classification resize error --- frigate/data_processing/real_time/bird.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frigate/data_processing/real_time/bird.py b/frigate/data_processing/real_time/bird.py index ed2496b90..848860230 100644 --- a/frigate/data_processing/real_time/bird.py +++ b/frigate/data_processing/real_time/bird.py @@ -128,7 +128,11 @@ class BirdRealTimeProcessor(RealTimeProcessorApi): ] 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) self.interpreter.set_tensor(self.tensor_input_details[0]["index"], input)