Main Content

fcddAnomalyDetector

Detect anomalies using fully convolutional data description (FCDD) network for anomaly detection

Since R2022b

    Description

    The fcddAnomalyDetector object detects images of anomalies using a fully convolutional data description (FCDD) network. To detect anomalous images, pass the trained detector to the classify function.

    Note

    This functionality requires Deep Learning Toolbox™ and the Computer Vision Toolbox™ Automated Visual Inspection Library. You can install the Computer Vision Toolbox Automated Visual Inspection Library from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

    Creation

    Description

    example

    detector = fcddAnomalyDetector(network) creates an FCDD anomaly detector from a base feature extraction backbone network.

    Input Arguments

    expand all

    Network that serves as the base feature extraction backbone, specified as a dlnetwork (Deep Learning Toolbox) object. You can create a dlnetwork for several common named pretrained networks, such as GoogLeNet and ResNet-18, using the pretrainedEncoderNetwork function.

    Properties

    expand all

    Anomaly threshold, specified as a numeric scalar. You must set the value of the threshold before calling the classify function. You can calculate a threshold using the anomalyThreshold function.

    This property is read-only.

    Network layers, specified as an array of Layer objects.

    This property is read-only.

    Network input layer names, specified as a cell array of character vectors.

    This property is read-only.

    Network output layer names, specified as a cell array of character vectors.

    This property is read-only.

    Network state, specified as a table with three columns:

    • Layer – Layer name, specified as a string scalar.

    • Parameter – State parameter name, specified as a string scalar.

    • Value – Value of state parameter, specified as a dlarray object.

    Layer states contain information calculated during the layer operation to be retained for use in subsequent forward passes of the layer. For example, the cell state and hidden state of LSTM layers, or running statistics in batch normalization layers.

    This property is read-only.

    Network learnable parameters, specified as a table with three columns:

    • Layer – Layer name, specified as a string scalar.

    • Parameter – Parameter name, specified as a string scalar.

    • Value – Value of parameter, specified as a dlarray object.

    The network learnable parameters contain the features learned by the network. For example, the weights of convolution and fully connected layers.

    Object Functions

    predictPredict unnormalized anomaly scores
    classifyClassify image as normal or anomalous
    anomalyMapPredict per-pixel anomaly score map

    Examples

    collapse all

    Create an fcddAnomalyDetector object with a ResNet-18 backbone.

    backbone = pretrainedEncoderNetwork("resnet18",3);
    detector = fcddAnomalyDetector(backbone)
    detector = 
      fcddAnomalyDetector with properties:
    
          Threshold: []
             Layers: [43x1 nnet.cnn.layer.Layer]
         InputNames: {'data'}
        OutputNames: {'fcddHeadPseudoHuber'}
              State: [4x3 table]
         Learnables: [10x3 table]
    
    

    References

    [1] Liznerski, Philipp, Lukas Ruff, Robert A. Vandermeulen, Billy Joe Franks, Marius Kloft, and Klaus-Robert Müller. "Explainable Deep One-Class Classification." Preprint, submitted March 18, 2021. https://arxiv.org/abs/2007.01760.

    Extended Capabilities

    Version History

    Introduced in R2022b

    expand all