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

How to speed up model Inference? #95

Open
whuhx opened this issue May 29, 2023 · 3 comments
Open

How to speed up model Inference? #95

whuhx opened this issue May 29, 2023 · 3 comments
Labels
Feature request New feature or request help wanted Extra attention is needed

Comments

@whuhx
Copy link

whuhx commented May 29, 2023

Description

In my experiment, it takes 49 hours to infer an image with a size of 50000×50000. How to speed up?

sam. generate(
image, mask, batch=True, foreground=True, erosion_kernel=None, mask_multiplier=255
)

@mishagrol
Copy link

@whuhx hello! Do you utilize CPU or GPU ?

You may devide your initial image into blocks and run parallel

@giswqs
Copy link
Member

giswqs commented Jun 2, 2023

It should not take that long with a GPU. You will need a large GPU to handle large images. Try out the SamGeo batch mode for large images.

@giswqs giswqs added help wanted Extra attention is needed Feature request New feature or request labels Jun 15, 2023
@satas12825
Copy link

I have tried to run the model with GPU on docker nothing error but when I monitor the usage of GPU they seem like no one is using GPU, how can I know if my model using GPU to calculate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants