Trainable Weka Segmentation RF Capabilities Test With Fail

Hi,

I am trying to use the TWS plugin to segment a large image 100 MB but error like this comes up:

java.lang.ArrayIndexOutOfBoundsException: 29
	weka.filters.supervised.instance.Resample.createSubsample(Resample.java:527)
	weka.filters.supervised.instance.Resample.batchFinished(Resample.java:507)
	weka.filters.Filter.useFilter(Filter.java:694)
	trainableSegmentation.WekaSegmentation.balanceTrainingData(WekaSegmentation.java:3221)
	trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:4613)
	trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1456)

	at weka.filters.supervised.instance.Resample.createSubsample(Resample.java:527)
	at weka.filters.supervised.instance.Resample.batchFinished(Resample.java:507)
	at weka.filters.Filter.useFilter(Filter.java:694)
	at trainableSegmentation.WekaSegmentation.balanceTrainingData(WekaSegmentation.java:3221)
	at trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:4613)
	at trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1456)
java.lang.NullPointerException
	weka.core.Capabilities.test(Capabilities.java:1208)
	weka.core.Capabilities.testWithFail(Capabilities.java:1506)
	hr.irb.fastRandomForest.FastRandomForest.buildClassifier(FastRandomForest.java:584)
	trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:4630)
	trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1456)

	at weka.core.Capabilities.test(Capabilities.java:1208)
	at weka.core.Capabilities.testWithFail(Capabilities.java:1506)
	at hr.irb.fastRandomForest.FastRandomForest.buildClassifier(FastRandomForest.java:584)
	at trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:4630)
	at trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1456)
java.lang.ArrayIndexOutOfBoundsException: 29
	weka.filters.supervised.instance.Resample.createSubsample(Resample.java:527)
	weka.filters.supervised.instance.Resample.batchFinished(Resample.java:507)
	weka.filters.Filter.useFilter(Filter.java:694)
	trainableSegmentation.WekaSegmentation.balanceTrainingData(WekaSegmentation.java:3221)
	trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:4613)
	trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1456)

	at weka.filters.supervised.instance.Resample.createSubsample(Resample.java:527)
	at weka.filters.supervised.instance.Resample.batchFinished(Resample.java:507)
	at weka.filters.Filter.useFilter(Filter.java:694)
	at trainableSegmentation.WekaSegmentation.balanceTrainingData(WekaSegmentation.java:3221)
	at trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:4613)
	at trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1456)
java.lang.NullPointerException
	weka.core.Capabilities.test(Capabilities.java:1208)
	weka.core.Capabilities.testWithFail(Capabilities.java:1506)
	hr.irb.fastRandomForest.FastRandomForest.buildClassifier(FastRandomForest.java:584)
	trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:4630)
	trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1456)

	at weka.core.Capabilities.test(Capabilities.java:1208)
	at weka.core.Capabilities.testWithFail(Capabilities.java:1506)
	at hr.irb.fastRandomForest.FastRandomForest.buildClassifier(FastRandomForest.java:584)
	at trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:4630)
	at trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1456)

Thank you very much.
Regards,
Adomika

Hello @adomika ,

Can you provide more information about your experiment? Namely:

  1. Your machine specifications.
  2. Number and parameters of your selected features.
  3. Type of input image.
  4. Output of the Log window.

Also, it would be great if you can upload your image somewhere I can access it so I can reproduce this behavior.

Finally, have you tried training with a cropped version of the input image?

Hi Ignacio,

I do not have the log anymore because i just closed the GUI and trained again. It is working now but I’m not sure why it happened. Anyways, I’m not sure if you will be able to replicate the error but here is the link for the image, classifier and training data: https://drive.google.com/open?id=0Bx8K497TWSxEWGFyLXJ3Vm96dFU.

Here are the details of my computer:

  1. Machine specs:
    OS Name Microsoft Windows 10 Education
    Version 10.0.14393 Build 14393
    OS Manufacturer Microsoft Corporation
    System Name B2034
    System Manufacturer Dell Inc.
    System Model Precision Tower 7910
    System Type x64-based PC
    System SKU 0619
    Processor Intel® Xeon® CPU E5-2650 v3 @ 2.30GHz, 2301 Mhz, 10 Core(s), 20 Logical Processor(s)
    Processor Intel® Xeon® CPU E5-2650 v3 @ 2.30GHz, 2301 Mhz, 10 Core(s), 20 Logical Processor(s)
    BIOS Version/Date Dell Inc. A17, 2017-02-28
    SMBIOS Version 2.8
    Embedded Controller Version 255.255
    BIOS Mode UEFI
    BaseBoard Manufacturer Dell Inc.
    Installed Physical Memory (RAM) 256 GB
    Total Physical Memory 256 GB
    Available Physical Memory 174 GB
    Total Virtual Memory 294 GB
    Available Virtual Memory 208 GB
1 Like

PS. Thank you very much.
Regards,
Adomika

1 Like

Thank you, @adomika. I have just found a bug in the “Neighbors” features thanks to your data.

Working on it!

Done. Please, go ahead and update the plugin to the latest released version (3.2.8).

That being said, I recommend you to split your test images into smaller pieces to save some memory and features calculation time.

1 Like

Thanks ignacio. That was quick!
Regards,
Adomika

1 Like