Posted by
Ignacio Arganda-Carreras on
May 30, 2013; 12:43pm
URL: http://imagej.273.s1.nabble.com/Re-how-to-load-label-data-in-trainable-weka-segmentation-GUI-tp5003142p5003157.html
Dear Shahab,
> Thank you for your reply. it worked for me :)
> would you please let me know if I can join the group to access all the other comments.
No problem. You can join the ImageJ list if you follow these
instructions:
http://rsbweb.nih.gov/ij/list.html
>
> Actually now I have another problem:
> when I want to open the weka GUI on my image stack consists of 100 images of EM data (ISBI 2013 challenge)
> it gives me the following error:
>
> (Fiji Is Just) ImageJ 1.47q; Java 1.6.0_24 [64-bit]; Linux 2.6.32-47-generic; 927MB of 934MB (99%)
>
> java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at ij.Command.runPlugIn(Command.java:148)
> at ij.Command.runCommand(Command.java:97)
> at ij.Executer.run(Executer.java:64)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.OutOfMemoryError: Java heap space
> at ij.process.TypeConverter.convertByteToFloat(TypeConverter.java:202)
> at ij.process.TypeConverter.convertToFloat(TypeConverter.java:177)
> at ij.process.ImageProcessor.convertToFloat(ImageProcessor.java:2101)
> at trainableSegmentation.FeatureStack.<init>(FeatureStack.java:258)
> at trainableSegmentation.WekaSegmentation.setTrainingImage(WekaSegmentation.java:321)
> at trainableSegmentation.Weka_Segmentation.run(Weka_Segmentation.java:1228)
> at ij.IJ.runUserPlugIn(IJ.java:194)
> at ij.IJ.runPlugIn(IJ.java:160)
> ... 7 more
>
> would you please let me know how I can handle that?
> how can I increase my heap space?
It seems you have only 1GB of RAM of that you're only reserving 1GB
for Fiji, is that correct?
The 2013 ISBI dataset is 100MB, so as soon as you add a large set of
features, you will run out of memory.
Solution: if you have access to a machine with more RAM, run the
experiments in that machine. If you already have more RAM memory but
don't know how to reserve it, have a look at how we do it in TrakEM2:
http://fiji.sc/TrakEM2#Running_fiji_for_heavy-duty.2C_memory-intensive.2C_high-performance_TrakEM2_tasksI hope this helps!
ignacio
>
> Best regards,
>
> ________________________________________
> From:
[hidden email] [
[hidden email]] On Behalf Of Ignacio Arganda-Carreras [
[hidden email]]
> Sent: Wednesday, May 29, 2013 3:18 PM
> To: Shahab Ensafi
> Cc: ImageJ Interest Group
> Subject: Re: how to load label data in trainable weka segmentation GUI?
>
> Dear Shahab,
>
> Thanks for your interest in the plugin. Let me answer you with copy to
> the ImageJ list, so anybody else with the same question can find the
> answer here.
>
>> I am using the weka segmentation GUI in Fiji.
>> would you please let me know how I can add my labels file (which is a binary image of my 2 class labels) in the software?
>> now I can just add labels manually using the 'add to' button. I have found out that in the java we can add it but it is not provided in the GUI if I am not wrong.
>
> There is no option to add directly the labels from the binary image
> because the GUI is designed for interactive learning. However, there's
> a workaround you can use:
>
> 1) click on your binary image and then on Edit > Selection > Create Selection.
> 2) click on the Trainable Weka Segmentation GUI and then on Edit >
> Selection > Restore Selection.
> 3) add that ROI to one of the classes.
> 4) click on your binary image and then on Edit > Selection > Make Inverse.
> 5) click on the Trainable Weka Segmentation GUI and then on Edit >
> Selection > Restore Selection.
> 6) add that ROI to the other class
>
> Then you'll be ready to train.
>
> Just a warning: adding the ROIs like may make things slow at the
> beginning of the training, since the program needs to check for every
> pixel if it's inside or outside the ROI.
>
> Let me know what you think.
>
> Best,
>
> ignacio
>
> --
> Ignacio Arganda-Carreras, Ph.D.
> Seung's lab, 46-5065
> Department of Brain and Cognitive Sciences
> Massachusetts Institute of Technology
> 43 Vassar St.
> Cambridge, MA 02139
> USA
>
> Phone: (001) 617-324-3747
> Website:
http://bioweb.cnb.csic.es/~iarganda/index_EN.html--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA
Phone: (001) 617-324-3747
Website:
http://bioweb.cnb.csic.es/~iarganda/index_EN.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html