Re: Memory Error When Converting to LAB Color Space.
It looks like it worked. I got the following output: Allocating # 0 Allocating # 1 Allocating # 2 Allocating # 3 Allocating # 4 Thank you, Mike Alonge On Thursday, October 2, 2014 3:50:17 PM UTC-7, Stefan van der Walt wrote:
Hi Michael
On Thu, Oct 2, 2014 at 7:17 PM, Michael Alonge <malo...@gmail.com <javascript:>> wrote:
I have an image that when initially loaded in RGB yields a memory error when converted to LAB via color.rgb2lab(image). I get the following error:
Just as a basic memory size check, can you please let me know whether the following script executes successfully?
import numpy as np shape = (5184, 3456, 3)
out = [] for i in range(5): print("Allocating #", i) out.append(np.zeros(shape, dtype=float).fill(1))
Thanks Stéfan
That was more of a test of re-allocation of memory (i.e. let's make sure there's no memory leaks), but there may be issues with total available memory. Although the original image is only 20 MB, that's in its compressed state. It's a bit more than twice that as uint8 (uncompressed state). And when converted to float (which is preferable so basic math doesn't go crazy without some hand-holding), it's closer to 400 MB. Combine that with the fact that the conversion ends up copying the image due to some simple operations, and you're looking at about 1.5 GB. (I haven't actually tried verifying the memory usage, so don't quote me on that). How much memory does your system have? Also, just as a check: Are you running 64-bit python (this is displayed when you start up the python interpreter.) On Thu, Oct 2, 2014 at 6:52 PM, Michael Alonge <malonge11@gmail.com> wrote:
It looks like it worked. I got the following output:
Allocating # 0 Allocating # 1 Allocating # 2 Allocating # 3 Allocating # 4
Thank you,
Mike Alonge On Thursday, October 2, 2014 3:50:17 PM UTC-7, Stefan van der Walt wrote:
Hi Michael
On Thu, Oct 2, 2014 at 7:17 PM, Michael Alonge <malo...@gmail.com> wrote:
I have an image that when initially loaded in RGB yields a memory error when converted to LAB via color.rgb2lab(image). I get the following error:
Just as a basic memory size check, can you please let me know whether the following script executes successfully?
import numpy as np shape = (5184, 3456, 3)
out = [] for i in range(5): print("Allocating #", i) out.append(np.zeros(shape, dtype=float).fill(1))
Thanks Stéfan
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
participants (2)
-
Michael Alonge
-
Tony Yu