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

Add support for filtering objets by size #333

Merged
merged 1 commit into from
Oct 6, 2024
Merged

Add support for filtering objets by size #333

merged 1 commit into from
Oct 6, 2024

Conversation

giswqs
Copy link
Member

@giswqs giswqs commented Oct 6, 2024

This PR adds min_size and max_size params for removing small and large objects.

Before

sam2.generate(image, output="masks.tif", unique=True)

image

image

After

sam2.generate(image, output="masks.tif", min_size=1000, max_size=10000, unique=True)

image

image

Copy link

github-actions bot commented Oct 6, 2024

@github-actions github-actions bot temporarily deployed to pull request October 6, 2024 02:59 Inactive
@giswqs giswqs merged commit db8a155 into main Oct 6, 2024
10 checks passed
@giswqs giswqs deleted the mask-size branch October 6, 2024 03:05
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

Successfully merging this pull request may close these issues.

1 participant