From 9b7f36fec2074d879ae935666caccfb06ff6d08a Mon Sep 17 00:00:00 2001 From: Scott Register Date: Sun, 27 Jul 2025 09:23:15 -0700 Subject: [PATCH] bullshit --- vr180_streaming/sam2_streaming.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/vr180_streaming/sam2_streaming.py b/vr180_streaming/sam2_streaming.py index 3c22938..ccf3eb7 100644 --- a/vr180_streaming/sam2_streaming.py +++ b/vr180_streaming/sam2_streaming.py @@ -154,11 +154,28 @@ class SAM2StreamingProcessor: 'storage_device': self.device, # Keep everything on GPU 'offload_video_to_cpu': False, 'offload_state_to_cpu': False, - # Add some required SAM2 internal structures + # Add required SAM2 internal structures 'output_dict_per_obj': {}, 'temp_output_dict_per_obj': {}, 'frames': None, # We provide frames manually 'images': None, # We provide images manually + # Additional SAM2 tracking fields + 'frames_tracked_per_obj': {}, + 'obj_idx_to_id': {}, + 'obj_id_to_idx': {}, + 'click_inputs_per_obj': {}, + 'point_inputs_per_obj': {}, + 'mask_inputs_per_obj': {}, + 'output_dict': {}, + 'memory_bank': {}, + 'num_obj_tokens': 0, + 'max_obj_ptr_num': 16, # SAM2 default + 'multimask_output_in_sam': False, + 'use_multimask_token_for_obj_ptr': True, + 'max_inference_state_frames': -1, # No limit for streaming + 'image_feature_cache': {}, + 'cached_features': {}, + 'consolidated_frame_inds': {}, } # Initialize some constants that SAM2 expects