Open abhamedewar opened 3 months ago
https://github.com/roboflow/notebooks/blob/main/notebooks/how-to-segment-images-with-sam-2.ipynb
I found this tutorial that could be helpful.
The tutorial explains passing clicks/points to segment objects in the video frames. Is there a way to pass bounding box instead of clicks/points to track objects in the video frames?
I was working on this recently and found a solution. Use the SAM2ImagePredictor class from the sam2_image_predictor.py file to get a mask from the bounding box. Then initialize the SAM2 model with "add_new_mask" instead of "add_new_points". Everything else should work the same!
I'll try this. Thanks
The tutorial explains passing clicks/points to segment objects in the video frames. Is there a way to pass bounding box instead of clicks/points to track objects in the video frames?