Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TinySAM multimask_output parameter #9

Closed
Riley-livingston opened this issue Dec 28, 2023 · 1 comment
Closed

TinySAM multimask_output parameter #9

Riley-livingston opened this issue Dec 28, 2023 · 1 comment

Comments

@Riley-livingston
Copy link

Hello, I'm trying to use TinySAM with the output of RTMDet as bounding box prompts.

I came across the issue of the 'multimask_output' parameter in the 'predict' method of mask_predictor not being recognized. Is the name of this parameter different, or does it not need to be specified? I believe that it's by default set to True in the foundation model.

TypeError                              Traceback (most recent call last)
[<ipython-input-28-1a43b775f4cb>](https://localhost:8080/#) in <cell line: 50>()
     48 logging.basicConfig(level=logging.INFO)
     49 image_path = "/content/drive/MyDrive/YOLOv5_Images/4lqw42gnjq1c1.webp"  # Replace with your image path
---> 50 segment_and_display_objects(image_path, rtmdet_model, mask_predictor, threshold=0.5, mask_threshold=0.3)

[<ipython-input-28-1a43b775f4cb>](https://localhost:8080/#) in segment_and_display_objects(image_path, rtmdet_model, mask_predictor, threshold, mask_threshold)
     24         if score > threshold:
     25             mask_predictor.set_image(original_img_bgr)
---> 26             masks, _, _ = mask_predictor.predict(box=bbox, multimask_output=True)
     27 
     28             if len(masks) >= 3:

TypeError: SamPredictor.predict() got an unexpected keyword argument 'multimask_output'

@shuh15
Copy link
Collaborator

shuh15 commented Dec 29, 2023

Hi, the 'multimask_output' is True by default, there is no need to be specified. You can just remove 'multimask_output=True' in Line 26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants