Apparent bug in 3D Structure feature in Trainable Weka

imagej
segmentation

#1

When I select the Structure feature in Trainable Weka 3D, the features produced are labelled “Structure_largest” and “Structure_smallest” (for each sigma and for integration scale 1 and 3). These appear to be the lst and 2nd of the 3 eigenvalues of the structure tensor (I compared to the output from ImageScience.computeEigenimages(sigma,intScale,image) ). That is, the feature labelled “Structure_smallest” should really be called “Structure_middle” (to be consistent with the Hessian features), and the real “Structure_smallest” is missing. It looks like one little bit of code that hasn’t been adapted from 2D to 3D.

This is not important for my work, just thought I should make a report.

Regards, James


#2

You are right. I will change that in the coming release. Thanks!


#3

Done! The bug is fixed in Trainable Weka Segmentation v3.2.22.


#4

Change of behavior of 3D Trainable in v 3.2.22:
Select a circular region as class 1, after training, the old version correctly plots the probability result as around 0.9 for the whole region. The new version only show probability along the edge area as 0.9 and has 0.4 for the center.
If we save the trained classifier and load again, for the same image, the probability result is around 0.5-0.8 while the old version shows as round 0.9 for the whole region.


#5

Hello @larry1,

Can you please send me an image to test?


#6

Please see the attached files testWEKA3d.zip
testWEKA3d.zip (2.4 MB)
The exact steps we took:

  1. Make the train window bigger and select Image -> Zoom -> Scale to Fit
  2. Screen shots of training:
  3. Result:

#7

Hello again, @larry1,

Did you set any specific calibration for your images? If not, there has been no change at all in the 3D feature calculation.

A few comments about your images:

  1. I would convert them to 8-bit since they are stored as RGB but there is no color information. This would speed up the feature calculation.
  2. Since your red class has many less samples than your green class, it is highly recommendable to set the “Balance classes” option in the Settings dialog.
  3. Use more features than just Mean and Variance. I got reasonable results adding for instance Difference of Gaussian, Minimum, Maximum and Median.

#8

No calibration. We tried multiple times and sometimes the results are uniform as expected. It seems random. About 50% of time.
1.I would convert them to 8-bit since they are stored as RGB but there is no color information. This would speed up the feature calculation.
Will try that.
2. Since your red class has many less samples than your green class, it is highly recommendable to set the “Balance classes” option in the Settings dialog.
Awesome, we were wondering about that. Thank you for the suggestion.
3.Use more features than just Mean and Variance. I got reasonable results adding for instance Difference of Gaussian, Minimum, Maximum and Median.
We did that and the old version does give good results. When we switched to the new version, we saw the ring-patten probability results.

Thank you for looking into it.