diff --git a/vr180_streaming/sam2_streaming_simple.py b/vr180_streaming/sam2_streaming_simple.py index 5c8fdb4..dd90454 100644 --- a/vr180_streaming/sam2_streaming_simple.py +++ b/vr180_streaming/sam2_streaming_simple.py @@ -227,6 +227,11 @@ class SAM2StreamingProcessor: frame_shape = self.frame_buffer[-1]['frame'].shape return np.zeros((frame_shape[0], frame_shape[1]), dtype=np.uint8) + except Exception as e: + print(f" Warning: Mask propagation failed: {e}") + frame_shape = self.frame_buffer[-1]['frame'].shape + return np.zeros((frame_shape[0], frame_shape[1]), dtype=np.uint8) + def _propagate_existing_objects(self) -> np.ndarray: """Propagate existing objects without adding new detections""" if not self.object_ids or not self.frame_buffer: