tensorflow / lucid

A collection of infrastructure and tools for research in neural network interpretability.
Apache License 2.0
4.65k stars 655 forks source link

save() doesn't support extremely large images #153

Open colah opened 5 years ago

colah commented 5 years ago

Due to an underlying bug in PIL (python-pillow/Pillow#1475), our present save implementation can't save very large images eg. (28800, 28800, 3) image. We may want to look into an alternate path way to saving large images at some point.

nbzxy1993 commented 5 years ago

Any possible ways to get around this overflow problem? I'm also having the same issue, when dealing with pathology images and using skimage.io.imsave.

ludwigschubert commented 5 years ago

It looks like there’s now a PR: https://github.com/python-pillow/Pillow/pull/3791

colah commented 5 years ago

Just following up on this, that PR was merged into master. We're now waiting for a new release of Pillow that we can update to -- they seem to have a pretty slow release cadence, so this may be a few months.

In the interim, you should be able to fix this problem by upgrading Pillow to HEAD.