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

crop_n_layers but do not segment anything other than the last layer #771

Open
summersonnn opened this issue Jul 1, 2024 · 0 comments
Open

Comments

@summersonnn
Copy link

Current config:

mask_generator = SamAutomaticMaskGenerator(
model = meta_sam,
points_per_side = 32,
pred_iou_thresh = 0.86,
stability_score_thresh = 0.92,
crop_n_layers = 2, # Each layer has (2**i)**2 boxes for the ith layer.
crop_n_points_downscale_factor = 1.2,
    )

I am working with very large satellite images which do not fit into GPU memory. For this purpose, I'd like to utilize crop_n_layers but even though it segments crops, it also tries to segment the original image as well as any layer. So, it again doesn't fit into the memory. Any help would be greatly appreciated.

What is better could be checking the crop size and if it's larger than a limit, skip the layer altogether.

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

1 participant