SAM3.1 is failing in the propagate_in_video() function. Here is the full error trace:
outputs_per_frame = self.propagate_in_video(self.predictor, session_id) File "sam3_1.py", line 19, in propagate_in_video for response in predictor.handle_stream_request( File "/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 40, in generator_context response = gen.send(None) File "/sam3/sam3/model/sam3_base_predictor.py", line 104, in handle_stream_request yield from self.propagate_in_video( File "/sam3/sam3/model/sam3_base_predictor.py", line 304, in propagate_in_video for frame_idx, outputs in self.model.propagate_in_video( File "/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 40, in generator_context response = gen.send(None) File "/sam3/sam3/model/sam3_multiplex_tracking.py", line 2315, in propagate_in_video yield from super().propagate_in_video( File "/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 40, in generator_context response = gen.send(None) File "/sam3/sam3/model/sam3_multiplex_tracking.py", line 351, in propagate_in_video out = self._run_single_frame_inference( File "/sam3/sam3/model/sam3_multiplex_tracking.py", line 620, in _run_single_frame_inference ) = self._det_track_one_frame( File "/sam3/sam3/model/sam3_multiplex_base.py", line 447, in _det_track_one_frame return self._det_track_one_frame_impl( File "/sam3/sam3/model/sam3_multiplex_base.py", line 527, in _det_track_one_frame_impl self.run_tracker_propagation( File "/sam3/sam3/model/sam3_multiplex_base.py", line 810, in run_tracker_propagation self._propogate_tracker_one_frame_local_gpu( File "/sam3/sam3/model/sam3_multiplex_base.py", line 1715, in _propogate_tracker_one_frame_local_gpu for out in self.tracker.propagate_in_video( File "/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 40, in generator_context response = gen.send(None) File "/sam3/sam3/model/video_tracking_multiplex_demo.py", line 3410, in propagate_in_video raise RuntimeError("No points are provided; please add points first") RuntimeError: No points are provided; please add points first
I'm confused as to what is causing this error. I don't get this error for any of the other videos I'm testing. I am testing the SAM3.1 detection and tracking on a video sampled at 1 FPS which causes the error, but when I sample at 2 FPS, I don't get the error. Does this happen whenever there are no points associated with a bounding box? Why would a detection not have an associated bounding box? Is it failing to associate the current bounding boxes with previous track ids?
Here is the code where the error originates:
@torch.inference_mode() def propagate_in_video( self, inference_state, start_frame_idx, max_frame_num_to_track, reverse, tqdm_disable=False, obj_ids=None, run_mem_encoder=True, ): """Propagate the input points across frames to track in the entire video.""" # NOTE: This is a copy from the parent class, except that we return object scores as well. output_dict = inference_state["output_dict"] consolidated_frame_inds = inference_state["consolidated_frame_inds"] if obj_ids is not None: raise NotImplementedError( "Per-object tracking yet for batched inference if not implemented." ) obj_ids = inference_state["obj_ids"] batch_size = self._get_obj_num(inference_state) if len(output_dict["cond_frame_outputs"]) == 0: raise RuntimeError("No points are provided; please add points first")
SAM3.1 is failing in the propagate_in_video() function. Here is the full error trace:
outputs_per_frame = self.propagate_in_video(self.predictor, session_id) File "sam3_1.py", line 19, in propagate_in_video for response in predictor.handle_stream_request( File "/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 40, in generator_context response = gen.send(None) File "/sam3/sam3/model/sam3_base_predictor.py", line 104, in handle_stream_request yield from self.propagate_in_video( File "/sam3/sam3/model/sam3_base_predictor.py", line 304, in propagate_in_video for frame_idx, outputs in self.model.propagate_in_video( File "/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 40, in generator_context response = gen.send(None) File "/sam3/sam3/model/sam3_multiplex_tracking.py", line 2315, in propagate_in_video yield from super().propagate_in_video( File "/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 40, in generator_context response = gen.send(None) File "/sam3/sam3/model/sam3_multiplex_tracking.py", line 351, in propagate_in_video out = self._run_single_frame_inference( File "/sam3/sam3/model/sam3_multiplex_tracking.py", line 620, in _run_single_frame_inference ) = self._det_track_one_frame( File "/sam3/sam3/model/sam3_multiplex_base.py", line 447, in _det_track_one_frame return self._det_track_one_frame_impl( File "/sam3/sam3/model/sam3_multiplex_base.py", line 527, in _det_track_one_frame_impl self.run_tracker_propagation( File "/sam3/sam3/model/sam3_multiplex_base.py", line 810, in run_tracker_propagation self._propogate_tracker_one_frame_local_gpu( File "/sam3/sam3/model/sam3_multiplex_base.py", line 1715, in _propogate_tracker_one_frame_local_gpu for out in self.tracker.propagate_in_video( File "/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 40, in generator_context response = gen.send(None) File "/sam3/sam3/model/video_tracking_multiplex_demo.py", line 3410, in propagate_in_video raise RuntimeError("No points are provided; please add points first") RuntimeError: No points are provided; please add points firstI'm confused as to what is causing this error. I don't get this error for any of the other videos I'm testing. I am testing the SAM3.1 detection and tracking on a video sampled at 1 FPS which causes the error, but when I sample at 2 FPS, I don't get the error. Does this happen whenever there are no points associated with a bounding box? Why would a detection not have an associated bounding box? Is it failing to associate the current bounding boxes with previous track ids?
Here is the code where the error originates:
@torch.inference_mode() def propagate_in_video( self, inference_state, start_frame_idx, max_frame_num_to_track, reverse, tqdm_disable=False, obj_ids=None, run_mem_encoder=True, ): """Propagate the input points across frames to track in the entire video.""" # NOTE: This is a copy from the parent class, except that we return object scores as well. output_dict = inference_state["output_dict"] consolidated_frame_inds = inference_state["consolidated_frame_inds"] if obj_ids is not None: raise NotImplementedError( "Per-object tracking yet for batched inference if not implemented." ) obj_ids = inference_state["obj_ids"] batch_size = self._get_obj_num(inference_state) if len(output_dict["cond_frame_outputs"]) == 0: raise RuntimeError("No points are provided; please add points first")