Skip to content

Using Automated Defect Analysis on IFM Images

This tutorial is to demonstrate how to perform an automated defect analysis on IFM images.
To execute the analysis, there need to be three NOMAD entries present:

  • an IFM Measurement type entry with associated microscopy file
  • two IFM Model type entries, each with the respective .keras model file

Depending on your knowledge and on which entries you have already present, you may jump ahead to the IFM Analysis subsection.

Uploads

  1. NOMAD Uploads page:
    Navigate to your Uploads page, reachable under PUBLISH > Uploads.
  2. Enter upload:
    You might need to create a new new upload using or edit an existing one.
    Create or Edit Upload

IFM Measurement Entry

  1. Create a new entry:
    Create a new entry via the button Create from Schema.
    Create a new entry Give it a name and select IFM Measurement as type.
    Create a new IFM measurement entry
  2. Assign the measurement files:
    You should now see the data section of the created entry. Assign an image and a metadata file.
    Assign measurement files Don't forget to click the save button in the top right corner afterwards!
    Assign measurement files
  3. Automated XML Parsing: As soon as a XML file is assigned, the plugin extracts metadata from it, such as:

    • exposure time
    • start and end time
    • magnification

    Processed entry If you have a UIBKSample entry already present with the same lab_id as extracted from the XML file, the entry automatically creates a reference to it.
    Reference to sample

IFM Model

Perform the same steps as above for creating two IFM Model entries:

  1. Create a new entry:
    Create a new entry via the button Create from Schema.
    Create a new entry Give it a name and select IFM Model as type.
    Create a new IFM model entry
  2. Assign the measurement files:
    You should now see the data section of the created entry. Assign an image and a metadata file.
    Assign measurement files Don't forget to click the save button in the top right corner afterwards!
    Assign measurement files
  3. Automated Parsing: As soon as the .keras file is assigned, the plugin extracts metadata from it, such as:

    • model type (binary/classification)
    • number of layers
    • number of parameters

    Processed entry

IFM Analysis

At this point, your NOMAD upload should contain at least one IFMMeasurement entry and two IFMModel entries:

Starting Point Analysis

To perform the analysis on this measurement perform the following steps:

  1. Create a new IFMAnalysis entry:
    Create a new IFM analysis entry
  2. Assign the measurement entry:
    Create a new input section by clicking the plus icon:
    Create a new input
    Click on the pen icon to assign an existing entry:
    Assign an existing entry
    Select the IFMMeasurement entry you want to analyze:
    Select the measurement entry
    Save this change:
    Save changes
    Done
  3. Assign the models: Repeat the steps from above to assign both IFMModel entries as well:
    Ready
  4. Check 'perform analysis':
    By opting the 'perform analysis' checkbox (and saving) the image analysis is triggered:
    Perform analysis
  5. Results: Execution of the code can take up to several minutes. Results are stored in a csv file that is referenced in the output section of the IFMAnalsis entry:
    Results From these results, a heatmap of the spatial distribution of detected defects is generated, and the prevalence of classified defects is calculated.
    Results