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

FIJI crashes when trying to process my 32kx32k stitched dapi-stained nuclei TIF #245

Open
kitovyj opened this issue Jul 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@kitovyj
Copy link

kitovyj commented Jul 25, 2023

FIJI - everything is up to date, StarDist seems to be CPU mode.
The 1000x1000 pixels cropped image from the same data is processed ok with default parameters.
The 32kx32k original crashes with:

[INFO] No TF library found in T:\Apps\Fiji\Fiji.app\lib.
[INFO] Using default TensorFlow version from JAR: TF 1.15.0 CPU
[INFO] Loading TensorFlow model GenericNetwork_aea3be563cb56b8824f53a8c2382aaa5 from source file file:/C:/Users/Ivanenko/AppData/Local/Temp/stardist_model_1906261597537823478.zip
[INFO] Caching TensorFlow models to T:\Apps\Fiji\Fiji.app\models
[INFO] Shape of input tensor: [-1, -1, -1, 1]
[INFO] Shape of output tensor: [-1, -1, -1, 33]
[INFO] Normalize ..
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: -1066580635
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at de.csbdresden.csbdeep.commands.GenericCoreNetwork.run(GenericCoreNetwork.java:420)
at org.scijava.command.CommandModule.run(CommandModule.java:196)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1066580635
at net.imglib2.util.Util.quicksort(Util.java:412)
at net.imglib2.util.Util.quicksort(Util.java:432)
at net.imglib2.util.Util.quicksort(Util.java:432)
at net.imglib2.util.Util.quicksort(Util.java:432)
at net.imglib2.util.Util.quicksort(Util.java:432)
at net.imglib2.util.Util.quicksort(Util.java:404)
at de.csbdresden.csbdeep.normalize.HistogramPercentile.computePercentiles(HistogramPercentile.java:90)
at de.csbdresden.csbdeep.normalize.PercentileNormalizer.normalize(PercentileNormalizer.java:68)
at de.csbdresden.csbdeep.normalize.DefaultInputNormalizer.run(DefaultInputNormalizer.java:54)
at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:451)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
... 4 more
[INFO] CSBDeep plugin exit (took 40135 milliseconds)
[ERROR] Command errored: StarDist 2D
java.lang.NullPointerException
at de.csbdresden.stardist.StarDist2D.splitPrediction(StarDist2D.java:338)
at de.csbdresden.stardist.StarDist2D.run(StarDist2D.java:307)
at org.scijava.command.CommandModule.run(CommandModule.java:196)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)

Are there any limitations on the processed image size? Are there any possibilities to precisely segment such a large images?
I attach a small chunk of the entire image, the original is around 1Gb.

TileScan_001_Merging_RAW_ch00-smoothed-sigma-2-rolling-ball-50-final-1-zoomed-example-8bit

OS: Windows 10

@kitovyj kitovyj added the bug Something isn't working label Jul 25, 2023
@uschmidt83
Copy link
Member

FIJI - everything is up to date, StarDist seems to be CPU mode. The 1000x1000 pixels cropped image from the same data is processed ok with default parameters. The 32kx32k original crashes with:

...
[INFO] Normalize .. java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: -1066580635

Are there any limitations on the processed image size? Are there any possibilities to precisely segment such a large images? I attach a small chunk of the entire image, the original is around 1Gb.

Hi @kitovyj, the relevant error message here is java.lang.ArrayIndexOutOfBoundsException (see image.sc forum for many similar issues). The image size is too large für standard Java arrays, which are internally used for some things. It's a current limitation of the Fiji plugin and will likely remain.

For big images like this, I'd suggest using our Python package, specifically using model.predict_instances_big, which is made for working with large images (see example notebook).

Sorry for the late reply.

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

2 participants