Login  Register

Re: Creating DataSet after building classification with Trainable Weka Segmentation

Posted by Ignacio Arganda-Carreras on Aug 23, 2014; 10:29am
URL: http://imagej.273.s1.nabble.com/Creating-DataSet-after-building-classification-with-Trainable-Weka-Segmentation-tp5009283p5009314.html

Hello again, Marcelo!


> 1. For the stack image sequence, it works. Just one question abt it, do i
> have to load in all the same dimension images? Coz some images are not in
> the
> same size.
>
>
Unfortunately the plugin only takes stacks, so all the images should be of
the same size.

A solution would be to

1. load one image and call the plugin
2. do the training and save the traces (as ARFF)
3. exit the plugin
4. load the second image and call the plugin
5. load the ARFF file you just save
6. train with the new traces

The old traces will be taken into account as soon as you load the ARFF file.


>
> 2. This one I don't readily get it. First I train 15 images and it save to
> data-train.arff,. I check the arff file and it got 119 attributes with 4867
> instances, which the last attribute is the classification. Then now, I got
> another 10 images, and I want to know if i use the previous training data
> to
> build up a Tree or whatever, will it correctly classification this 10
> images. So first, I want to extract the 118 attributes(-1 for the
> classification attribute) from the 10 images. I open the 10 images in Fiji,
> and open the TWS, in the TWS, I "Load Data" and open the data-train.arff.
> Then, what shall I do to turn the 10 images into 10 instances with 118
> attribute ARFF file ?
>

You almost got it! This is what you have to do:

1. save the information from the 15 images you loaded in the plugin as
data-train.arff
2. exit the plugin
3. open the test images as a stack and call the plugin
4. trace some pixels for all classes you have (you must have exactly the
same classes as before)
5. "save data" as "data-test.arff"
6. click on the Weka button
7. launch the Weka explorer
8. in the explorer, open the training arff file
9. click on classify and choose the classifier you want (the equivalent to
the plugin is a hr.irb.fastRandomForest.FastRandomForest with numTrees =
200 trees and numFeatures = 2).
10. select as test the data-test.arff you saved and run the classification

ignacio


>
>
> thanks.
>
> Regards,
> Marcelo
>
>
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/Creating-DataSet-after-building-classification-with-Trainable-Weka-Segmentation-tp5009283p5009313.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.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