diff --git a/vr180_streaming/sam2_streaming.py b/vr180_streaming/sam2_streaming.py index ccb16a4..2f06f95 100644 --- a/vr180_streaming/sam2_streaming.py +++ b/vr180_streaming/sam2_streaming.py @@ -144,7 +144,7 @@ class SAM2StreamingProcessor: 'temp_output_dict_per_obj': {}, 'consolidated_frame_inds': {}, 'tracking_has_started': False, - 'num_frames': video_info['frame_count'], + 'num_frames': video_info.get('total_frames', video_info.get('frame_count', 0)), 'video_height': video_info['height'], 'video_width': video_info['width'], 'device': self.device,