InstanceView
that extends AbstractConvertedRandomAccessible< RealComposite< R >, Instance >
and a CompositeInstance
that wraps around RealComposite
that I can use for predictions using an existing classifier. I do not know, however, how to fill the RandomAccessibleInterval< R >
with features that are required for an existing classifier before passing it to my InstanceView
.
@iarganda I am trying to load a trained classifier, what am I doing wrong? Minimum working (or failing) example:
final WekaSegmentation seg = new WekaSegmentation();
final String cp = "/data/hanslovskyp/hk-test/ds-8/2017-02-21-7_40.model";
seg.loadClassifier( cp );
Output (stdout & error):
Field of view: max sigma = 16.0, min sigma = 0.0
Membrane thickness: 1, patch size: 19
Read class name: class 1
Read class name: class 2
Error while adjusting data!
java.lang.NullPointerException
trainableSegmentation.WekaSegmentation.adjustSegmentationStateToData(WekaSegmentation.java:4141)
trainableSegmentation.WekaSegmentation.loadClassifier(WekaSegmentation.java:712)
de.hanslovsky.zspacing.spark.experiments.mask.weka.Dummy.main(Dummy.java:12)
at trainableSegmentation.WekaSegmentation.adjustSegmentationStateToData(WekaSegmentation.java:4141)
at trainableSegmentation.WekaSegmentation.loadClassifier(WekaSegmentation.java:712)
at de.hanslovsky.zspacing.spark.experiments.mask.weka.Dummy.main(Dummy.java:12)
Trainable Weka Segmentation
plugin
this.featureStackArray.getEnabledFeatures()
and this.featureStackArray
is null
.
WekaSegmentation.java:4141
WekaSegmentation()
doesn't initialize featureStackArray
WekaSegmentation(ImagePlus)
constructor
ImagePlus
constructor or setTrainingImage
, will WekaSegmentation compute any features or does this happen only when I call applyClassifier
? I would like to avoid redundant or unncessary feature comptuations.