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

Error with large image #14

Open
niederle opened this issue Jul 27, 2021 · 1 comment
Open

Error with large image #14

niederle opened this issue Jul 27, 2021 · 1 comment

Comments

@niederle
Copy link

niederle commented Jul 27, 2021

Hi,
I tried to run the StarDist 2D plugin on a 5108x4308 16-bit tiff. Configuration has been like this
Screen Shot 2021-07-27 at 11 36 52
And this is the error message I got

[INFO] Reading available sites from https://imagej.net/
[INFO] Successfully retrieved OPTIONS.
[INFO] Successfully called PropFind, directory exists: .
[INFO] Successfully locked db.xml.gz.lock.
[INFO] Successfully uploaded to db.xml.gz.lock
[INFO] Successfully called PropFind, directory exists: plugins/Scripts/Plugins/Fiji-Tools-for-HCS/Automated_Microscope_Tools/.
[INFO] Successfully uploaded to plugins/Scripts/Plugins/Fiji-Tools-for-HCS/Automated_Microscope_Tools/Macro_CV7000_Make_Field_Montages.ijm-20210726111407
[INFO] Successfully moved  db.xml.gz.lock to db.xml.gz.
[INFO] No TF library found in /Applications/_MyApplications/Fiji.app/lib/.
[INFO] Using default TensorFlow version from JAR: TF 1.12.0 CPU
[INFO] Loading TensorFlow model GenericNetwork_aea3be563cb56b8824f53a8c2382aaa5 from source file file:/var/folders/r9/8yfyqn9n3dn2pzct7lz5p0rc0000gr/T/stardist_model_7482731542518190708.zip
[INFO] Caching TensorFlow models to /Applications/_MyApplications/Fiji.app/models
[INFO] Shape of input tensor: [-1, -1, -1, 1]
[INFO] Shape of output tensor: [-1, -1, -1, 33]
[INFO] Normalize .. 
[INFO] Dataset type: 32-bit signed float, converting to FloatType.
[INFO] Dataset dimensions: [5108, 4308]
[INFO] INPUT NODE: 
[INFO] Mapping of tensor input: 
[INFO]    datasetAxes:[X, Y]
[INFO]    nodeAxes:[(Time, -1), (Y, -1), (X, -1), (Channel, 1)]
[INFO]    mapping:[2, 1, 0, 3]
[INFO] OUTPUT NODE: 
[INFO] Mapping of tensor output: 
[INFO]    datasetAxes:[X, Y]
[INFO]    nodeAxes:[(Time, -1), (Y, -1), (X, -1), (Channel, 33)]
[INFO]    mapping:[2, 1, 0, 3]
[INFO] Complete input axes: [X, Y, Time, Channel]
[INFO] Tiling actions: [TILE_WITH_PADDING, TILE_WITH_PADDING, TILE_WITHOUT_PADDING, NO_TILING]
[INFO] Dividing image into 1 tile(s)..
[INFO] Size of single image tile: [5120, 4320, 1, 1]
[INFO] Final image tiling: [1, 1, 1, 1]
[INFO] Network input size: [5120, 4320, 1, 1]
[INFO] Processing tile 1..
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
	at de.csbdresden.csbdeep.network.DefaultModelExecutor.run(DefaultModelExecutor.java:110)
	at de.csbdresden.csbdeep.network.DefaultModelExecutor.run(DefaultModelExecutor.java:71)
	at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tileAndRunNetwork(GenericCoreNetwork.java:594)
	at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tryToTileAndRunNetwork(GenericCoreNetwork.java:567)
	at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:469)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	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:748)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
	at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1005)
	... 10 more
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1431)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at de.csbdresden.csbdeep.network.model.DefaultNetwork.call(DefaultNetwork.java:110)
	at de.csbdresden.csbdeep.network.model.DefaultNetwork.call(DefaultNetwork.java:51)
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
	... 4 more
Caused by: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at java.nio.Buffer.<init>(Buffer.java:199)
	at java.nio.ByteBuffer.<init>(ByteBuffer.java:281)
	at java.nio.ByteBuffer.<init>(ByteBuffer.java:289)
	at java.nio.MappedByteBuffer.<init>(MappedByteBuffer.java:89)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:162)
	at org.tensorflow.Tensor.buffer(Native Method)
	at org.tensorflow.Tensor.buffer(Tensor.java:573)
	at org.tensorflow.Tensor.writeTo(Tensor.java:487)
	at net.imagej.tensorflow.Tensors.imgFloat(Tensors.java:171)
	at net.imagej.tensorflow.Tensors.imgFloat(Tensors.java:262)
	at de.csbdresden.csbdeep.network.model.tensorflow.DatasetTensorFlowConverter.tensorToDataset(DatasetTensorFlowConverter.java:70)
	at de.csbdresden.csbdeep.network.model.tensorflow.TensorFlowNetwork.execute(TensorFlowNetwork.java:359)
	at de.csbdresden.csbdeep.network.model.DefaultNetwork.lambda$call$0(DefaultNetwork.java:102)
	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:748)
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
	at de.csbdresden.csbdeep.network.DefaultModelExecutor.run(DefaultModelExecutor.java:110)
	at de.csbdresden.csbdeep.network.DefaultModelExecutor.run(DefaultModelExecutor.java:71)
	at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tileAndRunNetwork(GenericCoreNetwork.java:594)
	at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tryToTileAndRunNetwork(GenericCoreNetwork.java:567)
	at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:469)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	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:748)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
	at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1005)
	... 10 more
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1431)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at de.csbdresden.csbdeep.network.model.DefaultNetwork.call(DefaultNetwork.java:110)
	at de.csbdresden.csbdeep.network.model.DefaultNetwork.call(DefaultNetwork.java:51)
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
	... 4 more
Caused by: java.lang.IllegalArgumentException: Negative capacity: -1375338496
	at java.nio.Buffer.<init>(Buffer.java:199)
	at java.nio.ByteBuffer.<init>(ByteBuffer.java:281)
	at java.nio.ByteBuffer.<init>(ByteBuffer.java:289)
	at java.nio.MappedByteBuffer.<init>(MappedByteBuffer.java:89)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:162)
	at org.tensorflow.Tensor.buffer(Native Method)
	at org.tensorflow.Tensor.buffer(Tensor.java:573)
	at org.tensorflow.Tensor.writeTo(Tensor.java:487)
	at net.imagej.tensorflow.Tensors.imgFloat(Tensors.java:171)
	at net.imagej.tensorflow.Tensors.imgFloat(Tensors.java:262)
	at de.csbdresden.csbdeep.network.model.tensorflow.DatasetTensorFlowConverter.tensorToDataset(DatasetTensorFlowConverter.java:70)
	at de.csbdresden.csbdeep.network.model.tensorflow.TensorFlowNetwork.execute(TensorFlowNetwork.java:359)
	at de.csbdresden.csbdeep.network.model.DefaultNetwork.lambda$call$0(DefaultNetwork.java:102)
	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:748)
[INFO] CSBDeep plugin exit (took 272559 milliseconds)
[ERROR] Module threw exception
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:124)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
	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:748)
@uschmidt83
Copy link
Member

I'm not sure what the problem is, maybe it is related to CSBDeep/CSBDeep_website#6?
I'd recommend to ask this at the image.sc forum, since there are more knowledgable Java/ImageJ/Fiji folks.

Sorry for the late reply.

Best,
Uwe

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

2 participants