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

CUDA out of memory #5

Open
alejoGT1202 opened this issue Oct 13, 2023 · 2 comments
Open

CUDA out of memory #5

alejoGT1202 opened this issue Oct 13, 2023 · 2 comments

Comments

@alejoGT1202
Copy link

I'm using this library in a server that has 4 GPU's with 16 GB each GPU. When I set the number to pre-annotated images to more than 8 the one GPU get's without memory making the process to crash.

Is this possible to run the process across multiple GPU's? If not what it's the optimal size from the annotated images that need to be used? Cause I've been resizing my images from 960 down to 448 and even with the low resolution I get the memory error. In which type of GPU is recommended to use this tool?

@adbcode
Copy link

adbcode commented Dec 4, 2023

Facing similar issues with much lower GPU resources (1x NVIDIA L4).

I have much more labeled data (in 100s) and would like to use them all.

Any way to limit the VRAM usage?

@nguyenthekhoig7
Copy link

I faced the same issue when running with just a extremely small dataset (7 images only), and it could not run on my decent 4GB vRAM GPU(I load the GroundedSAM model not SegGPT, but they all inherit from DetectionBaseModel, so same issue).

I read the code and seems that the way it works is that the code process all images into the RAM(in GPU in this case) at the same time to create a dataset, then the dataset will be saved, this exploded the memory.

If what I found was true, I'm gonna proceed to see if there is a way to process images in a serial way (or, in batches), in order to optimize memory usage for small GPU.

I appreciate any opinion and suggestion!

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