Hello,
I have images of tumor sections, and I’m attempting to use trainable weka segmentation to build a model to segment a full image.
Parts of different images are annotated by manual reviewers and stored as xml. The images are 15040 x 18040 size. The approach I’m taking is to construct an image stack, feed it as input to a segmentator, and then use AddExample API to add rois to each slice along with their class.
After reading the docs, I had a few questions on whether I’m doing it right or can be improved.
- When should AddClass be called? I see that number of classes by default returned by segmentor.getNumOfClasses() is 2. It remains 2 even after AddExample method has been called with other class ids. My code is something like:
// construct list of polygonROI from xml for a slice
segmentator.addExample(annotation_id, polyROIs[j], slice_index);
segmentator.setClassLabel(annotation_id, annotation_name);
Should I call AddClass just before this or after this?
Totally I have 16 classes. Not all classes appear in each image. To simplify book keeping can I call AddClass 14 times beforehand?
-
I’m running out of memory (172GB limit) even on one slice. The stack showed Hessian feature compute. Since the annotations are small (400x400 size), I was expecting it will not have issues but are some features like Hessian processing the full image?
-
At the moment I am processing just one image i.e. only one slice. I have disabled all features except min,max,median,variance. Yet the script seems to hang for a long time after emitting this line:
Updating features of slice number 1…
It eventually finished with this output:
Feature stack array is now updated (1 slice(s) with 29 features(s), took 799528ms).
I’m curious as to how it got 29 features since I’ve disabled except for 5. -
What is a featurestack - is it rows of feature vectors (that is Instances right)? It has a Show method so I was confused if it is some kind of image or just rows of computed features.
Thank you,
Darshat Shah