This commit is contained in:
2025-07-27 10:20:25 -07:00
parent 1e9c42adbd
commit ee330fa322

View File

@@ -227,6 +227,11 @@ class SAM2StreamingProcessor:
frame_shape = self.frame_buffer[-1]['frame'].shape frame_shape = self.frame_buffer[-1]['frame'].shape
return np.zeros((frame_shape[0], frame_shape[1]), dtype=np.uint8) 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: def _propagate_existing_objects(self) -> np.ndarray:
"""Propagate existing objects without adding new detections""" """Propagate existing objects without adding new detections"""
if not self.object_ids or not self.frame_buffer: if not self.object_ids or not self.frame_buffer: