lmb-freiburg / Unet-Segmentation

The U-Net Segmentation plugin for Fiji (ImageJ)
https://lmb.informatik.uni-freiburg.de/resources/opensource/unet
GNU General Public License v3.0
87 stars 25 forks source link

Exception in thread "Thread-5" java.lang.IllegalArgumentException #75

Closed RuiyuRayWang closed 3 years ago

RuiyuRayWang commented 4 years ago

Hi, I'm trying to finetune a model lately. While the finetune module works perfectly fine on the sampledata/DIC-Erythrocytes provided by your website, it throws an exception on my own data once it starts:

Exception in thread "Thread-5" java.lang.IllegalArgumentException: n out of range: 2 at ij.ImagePlus.convertIndexToPosition(ImagePlus.java:1824) at de.unifreiburg.unet.TrainingSample.getROIPosition(TrainingSample.java:1656) at de.unifreiburg.unet.TrainingSample.createLabelsAndWeightBlobsFromRois(TrainingSample.java:1256) at de.unifreiburg.unet.TrainingSample.createLabelsAndWeightsBlobs(TrainingSample.java:195) at de.unifreiburg.unet.FinetuneJob.run(FinetuneJob.java:1983)

And the log window halts at: unet_exception

Info of my image: unet_exception_image

Any idea what might went wrong?

RuiyuRayWang commented 3 years ago

I figured it out myself. When I was labeling my data pictures I made a stack of two channels, in order to check the accuracy of my labeling. Reverting to labeling on single channel data resolved the problem.