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

Out-of-memory error in Nyul for large amounts of data #57

Open
sulaimanvesal opened this issue Mar 17, 2022 · 4 comments
Open

Out-of-memory error in Nyul for large amounts of data #57

sulaimanvesal opened this issue Mar 17, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@sulaimanvesal
Copy link

Hi,

Thank you for your nice package. I have a large set of training data (900 volume) and I was trying to use Nyul normalization (Sample-based) to standardize the intensity variations. However, I am getting memory error issue. I was wondering if you have any insight on how to use this normalization method in a batch-wise manner? or any other solution to tackle the memory error problem?

Best,

@jcreinhold
Copy link
Owner

Thanks for the feedback. I'm going to see if I can change the setup to only load the images when needed.

In the meantime, you can pick a large subset of the data (small enough to avoid the memory error), perform Nyul, save the standard scale, and reuse that scale on the remaining images. I'm fairly confident it'll be fine, but let me know if that doesn't work.

@jcreinhold jcreinhold changed the title MemoryError for Nyul Out-of-memory error in Nyul for large amounts of data Mar 17, 2022
@jcreinhold jcreinhold self-assigned this Mar 17, 2022
@jcreinhold jcreinhold added the bug Something isn't working label Mar 17, 2022
@jakubMitura14
Copy link

jakubMitura14 commented Jul 1, 2022

Hello I have the same problem, are there any new possibilities to avoid this problem?
for example i see that one can save nyul weights in npz - now one could do multiple npz files using sections of dataset and then average it somehow - is it good idea? can it be done?

@jcreinhold
Copy link
Owner

@jakubMitura14 Yes that can be done and is a reasonable idea. I don't have the time to fix this issue anytime soon. Just re-save the averaged histogram in the same format. Good luck!

@jakubMitura14
Copy link

Ok thanks! Just to be sure this are npz files so as far as I get it I can load it to numpy, and they need to have the same dimension hence by the average I can get element wise average ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants