The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

problem with segments and local features in image processing

kersorkersor Member Posts: 26 Maven
edited November 2018 in Help
hello all,

i'm trying to build a model that has input data set 15 pictures of mammography that has tumor.I would like to classify them,so when i test an another picture to classify it as "photo with cancer" or "photo without cancer",

Fisrtly, i tried with the segment feature extractor and tried to do something like the examples in the IMMI - Rapidminer 5 Image Mining Extension.My problem is that although the segmets are guite good, it hasn't good performance(in the same photos).What can i do to increase the performance,i tried everything.

Secondly i tried with the local feature extractor(with fitness mask) but also i have not good performance although i tried all different parameters(window step,prob white,prob black).The examples set visualize(with modvis) is guite good for me but when i tried in another process to clasify the same picture the cancer local features are irrelevant.any help it woyld be appreciated.If everyone wants a picture to test it just le me know

The code with the segments is: i cant posts the codes cause i exceed the maximum allowed length what can i do?


Answers

  • radoneradone RapidMiner Certified Expert, Member Posts: 74 Guru
    Hi kersor,
    to your questions:
    1) what kind of performance problem do you have? You might try limit minimal segment size, reduce number of computed features and many more.
    2) About the second issue - please check trainable segmentation: http://splab.cz/ts

    Best,
    Radim
  • kersorkersor Member Posts: 26 Maven
    1)About my problem with the segment feature extractor: i tried all the differnet parameters,i put different segment size etc.In the class cancer(the segments that i  choose with statistical region mergin as tumor) it can't find almost anything,that i mean with bad performance.

    2)with the local feature extractor the  procces is similar to the examples in the immi extension with different parameters.

    Any idea to post my xml code to see what exactly i mean and to attach some pictures,because  exceeds the maximum allowed length and i cant post it?

  • kersorkersor Member Posts: 26 Maven
    Hi Radim,i checked the trainable segmentation and i have a question on it if you can answer it.i trained each one of the 15 photos with trainable segmentastion (beacause the multiple image opener didn't work) and then, i union  the example set of each photo to one exampels set(IN AN EXCEL FILE).The new example set has really good performace(90%++) Now i want to how can i apply the model to a new photo(that hasn't fitness).my xml code is here but i know i miss something cause the ? in the confidence in prediction.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.2.006">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.2.006" expanded="true" name="Process">
        <process expanded="true" height="476" width="692">
          <operator activated="true" class="read_excel" compatibility="5.2.006" expanded="true" height="60" name="Read Excel" width="90" x="45" y="75">
            <parameter key="excel_file" value="D:\Μεταπτυχιακό\Διπλωματική\Union_of_all_examples.xls"/>
            <parameter key="imported_cell_range" value="A1:F8904"/>
            <parameter key="first_row_as_names" value="false"/>
            <list key="annotations">
              <parameter key="0" value="Name"/>
            </list>
            <list key="data_set_meta_data_information">
              <parameter key="0" value="att0.true.integer.attribute"/>
              <parameter key="1" value="att1.true.integer.attribute"/>
              <parameter key="2" value="att2.true.integer.attribute"/>
              <parameter key="3" value="att3.true.integer.attribute"/>
              <parameter key="4" value="att4.true.integer.attribute"/>
              <parameter key="5" value="decision.true.binominal.label"/>
            </list>
          </operator>
          <operator activated="true" class="x_validation" compatibility="5.2.006" expanded="true" height="112" name="Validation" width="90" x="246" y="30">
            <process expanded="true" height="413" width="330">
              <operator activated="true" class="decision_tree" compatibility="5.2.006" expanded="true" height="76" name="Decision Tree" width="90" x="137" y="65"/>
              <connect from_port="training" to_op="Decision Tree" to_port="training set"/>
              <connect from_op="Decision Tree" from_port="model" to_port="model"/>
              <portSpacing port="source_training" spacing="0"/>
              <portSpacing port="sink_model" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
            <process expanded="true" height="413" width="330">
              <operator activated="true" class="apply_model" compatibility="5.2.006" expanded="true" height="76" name="Apply Model" width="90" x="45" y="75">
                <list key="application_parameters"/>
              </operator>
              <operator activated="true" class="performance" compatibility="5.2.006" expanded="true" height="76" name="Performance" width="90" x="179" y="75"/>
              <connect from_port="model" to_op="Apply Model" to_port="model"/>
              <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
              <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
              <connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
              <portSpacing port="source_model" spacing="0"/>
              <portSpacing port="source_test set" spacing="0"/>
              <portSpacing port="source_through 1" spacing="0"/>
              <portSpacing port="sink_averagable 1" spacing="0"/>
              <portSpacing port="sink_averagable 2" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="imageprocessing:open_image" compatibility="1.4.001" expanded="true" height="60" name="Open Gray-scale Image" width="90" x="45" y="165">
            <parameter key="filename" value="D:\Μεταπτυχιακό\Διπλωματική\filtered-images\11.jpg"/>
            <parameter key="set_mask" value="false"/>
            <parameter key="fitness" value="D:\Μεταπτυχιακό\Διπλωματική\filtered-images-fitness\11.jpg"/>
          </operator>
          <operator activated="true" class="multiply" compatibility="5.2.006" expanded="true" height="166" name="Multiply" width="90" x="45" y="300"/>
          <operator activated="true" class="imageprocessing:gaussian_blur" compatibility="1.4.001" expanded="true" height="60" name="Gaussian Blur (2)" width="90" x="447" y="390">
            <parameter key="strength" value="4.0"/>
          </operator>
          <operator activated="true" breakpoints="after" class="imageprocessing:poi_generator" compatibility="1.4.001" expanded="true" height="60" name="Point of interest generator" width="90" x="179" y="165">
            <parameter key="Points count" value="1500"/>
            <list key="Points Table"/>
          </operator>
          <operator activated="true" class="imageprocessing:contrast_adjuster" compatibility="1.4.001" expanded="true" height="60" name="contrast_adjuster" width="90" x="246" y="345"/>
          <operator activated="true" class="imageprocessing:gaussian_blur" compatibility="1.4.001" expanded="true" height="60" name="Gaussian Blur (3)" width="90" x="313" y="165"/>
          <operator activated="true" class="imageprocessing:gaussian_blur" compatibility="1.4.001" expanded="true" height="60" name="Gaussian Blur" width="90" x="313" y="255"/>
          <operator activated="true" class="imageprocessing:trainable_segmentation" compatibility="1.4.001" expanded="true" height="184" name="Trainable segmentation" width="90" x="447" y="120">
            <parameter key="assign_label" value="by point label"/>
            <process expanded="true" height="422" width="692">
              <operator activated="true" class="numerical_to_binominal" compatibility="5.2.006" expanded="true" height="76" name="Numerical to Binominal" width="90" x="112" y="75">
                <parameter key="attribute_filter_type" value="single"/>
                <parameter key="attribute" value="label"/>
                <parameter key="include_special_attributes" value="true"/>
                <parameter key="min" value="255.0"/>
                <parameter key="max" value="255.0"/>
              </operator>
              <operator activated="true" class="decision_tree" compatibility="5.2.006" expanded="true" height="76" name="Decision Tree (2)" width="90" x="313" y="30"/>
              <operator activated="true" class="imageprocessing:open_image" compatibility="1.4.001" expanded="true" height="60" name="Open Gray-scale Image (2)" width="90" x="45" y="300">
                <parameter key="filename" value="D:\Μεταπτυχιακό\Διπλωματική\filtered-images\21.jpg"/>
                <parameter key="set_mask" value="false"/>
              </operator>
              <operator activated="true" class="multiply" compatibility="5.2.006" expanded="true" height="94" name="Multiply (2)" width="90" x="246" y="255"/>
              <operator activated="true" class="imageprocessing:poi_generator" compatibility="1.4.001" expanded="true" height="60" name="Point of interest generator (2)" width="90" x="260" y="159">
                <parameter key="Points count" value="300"/>
                <list key="Points Table"/>
              </operator>
              <operator activated="true" class="imageprocessing:trainable_segmentation" compatibility="1.4.001" expanded="true" height="112" name="Trainable segmentation (2)" width="90" x="380" y="255">
                <parameter key="assign_label" value="by point label"/>
                <process expanded="true" height="413" width="692">
                  <operator activated="true" class="numerical_to_binominal" compatibility="5.2.006" expanded="true" height="76" name="Numerical to Binominal (2)" width="90" x="84" y="106">
                    <parameter key="attribute_filter_type" value="single"/>
                    <parameter key="attribute" value="label"/>
                    <parameter key="include_special_attributes" value="true"/>
                    <parameter key="min" value="255.0"/>
                    <parameter key="max" value="255.0"/>
                  </operator>
                  <operator activated="true" class="generate_attributes" compatibility="5.2.006" expanded="true" height="76" name="Generate Attributes" width="90" x="271" y="116">
                    <list key="function_descriptions">
                      <parameter key="decision" value="if(label==255,&quot;cancer&quot;,&quot;no_cancer&quot;)"/>
                    </list>
                  </operator>
                  <operator activated="true" class="decision_tree" compatibility="5.2.006" expanded="true" height="76" name="Decision Tree (3)" width="90" x="447" y="120"/>
                  <connect from_port="example set" to_op="Numerical to Binominal (2)" to_port="example set input"/>
                  <connect from_op="Numerical to Binominal (2)" from_port="example set output" to_op="Generate Attributes" to_port="example set input"/>
                  <connect from_op="Generate Attributes" from_port="example set output" to_op="Decision Tree (3)" to_port="training set"/>
                  <connect from_op="Decision Tree (3)" from_port="model" to_port="model"/>
                  <portSpacing port="source_example set" spacing="0"/>
                  <portSpacing port="sink_model" spacing="0"/>
                </process>
              </operator>
              <operator activated="true" class="apply_model" compatibility="5.2.006" expanded="true" height="76" name="Apply Model (3)" width="90" x="447" y="75">
                <list key="application_parameters"/>
              </operator>
              <connect from_port="example set" to_op="Numerical to Binominal" to_port="example set input"/>
              <connect from_op="Numerical to Binominal" from_port="example set output" to_op="Decision Tree (2)" to_port="training set"/>
              <connect from_op="Decision Tree (2)" from_port="model" to_op="Apply Model (3)" to_port="model"/>
              <connect from_op="Open Gray-scale Image (2)" from_port="grayscale image plus" to_op="Multiply (2)" to_port="input"/>
              <connect from_op="Multiply (2)" from_port="output 1" to_op="Point of interest generator (2)" to_port="img"/>
              <connect from_op="Multiply (2)" from_port="output 2" to_op="Trainable segmentation (2)" to_port="images 1"/>
              <connect from_op="Point of interest generator (2)" from_port="points of interest" to_op="Trainable segmentation (2)" to_port="points"/>
              <connect from_op="Trainable segmentation (2)" from_port="exampleSet" to_op="Apply Model (3)" to_port="unlabelled data"/>
              <connect from_op="Apply Model (3)" from_port="model" to_port="model"/>
              <portSpacing port="source_example set" spacing="0"/>
              <portSpacing port="sink_model" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="apply_model" compatibility="5.2.006" expanded="true" height="76" name="Apply Model (2)" width="90" x="447" y="30">
            <list key="application_parameters"/>
          </operator>
          <connect from_op="Read Excel" from_port="output" to_op="Validation" to_port="training"/>
          <connect from_op="Validation" from_port="model" to_op="Apply Model (2)" to_port="model"/>
          <connect from_op="Open Gray-scale Image" from_port="grayscale image plus" to_op="Multiply" to_port="input"/>
          <connect from_op="Multiply" from_port="output 1" to_op="Point of interest generator" to_port="img"/>
          <connect from_op="Multiply" from_port="output 2" to_op="Trainable segmentation" to_port="images 1"/>
          <connect from_op="Multiply" from_port="output 3" to_op="contrast_adjuster" to_port="grayscale in"/>
          <connect from_op="Multiply" from_port="output 4" to_op="Gaussian Blur (3)" to_port="image plus"/>
          <connect from_op="Multiply" from_port="output 5" to_op="Gaussian Blur" to_port="image plus"/>
          <connect from_op="Multiply" from_port="output 6" to_op="Gaussian Blur (2)" to_port="image plus"/>
          <connect from_op="Gaussian Blur (2)" from_port="image plus" to_op="Trainable segmentation" to_port="images 5"/>
          <connect from_op="Point of interest generator" from_port="points of interest" to_op="Trainable segmentation" to_port="points"/>
          <connect from_op="contrast_adjuster" from_port="grayscale out" to_op="Trainable segmentation" to_port="images 2"/>
          <connect from_op="Gaussian Blur (3)" from_port="image plus" to_op="Trainable segmentation" to_port="images 3"/>
          <connect from_op="Gaussian Blur" from_port="image plus" to_op="Trainable segmentation" to_port="images 4"/>
          <connect from_op="Trainable segmentation" from_port="model" to_port="result 1"/>
          <connect from_op="Trainable segmentation" from_port="exampleSet" to_op="Apply Model (2)" to_port="unlabelled data"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
        </process>
      </operator>
    </process>
    [ /code]
Sign In or Register to comment.