occlusionSensitivity
Syntax
Description
computes a map of the change in classification score for the classes specified by
scoreMap
= occlusionSensitivity(net
,X
,label
)label
when parts of the input data X
are occluded
with a mask. The change in classification score is relative to the original data without
occlusion. The occluding mask is moved across the input data, giving a change in
classification score for each mask location. Use an occlusion sensitivity map to identify
the parts of your input data that most impact the classification score. Areas in the map
with higher positive values correspond to regions of input data that contribute positively
to the specified classification label. The network must contain a classificationLayer
.
computes a map of the change in total activation for the specified layer and channel when
parts of the input data activationMap
= occlusionSensitivity(net
,X
,layer
,channel
)X
are occluded with a mask. The change in
activation score is relative to the original data without occlusion. Areas in the map with
higher positive values correspond to regions of input data that contribute positively to the
specified channel activation, obtained by summing over all spatial dimensions for that
channel. The total activation fulfills the role of the class score for classification tasks
and generalizes the occlusion sensitivity technique to nonclassification tasks.
Use this syntax to compute the occlusion sensitivity map for nonclassification tasks, such as regression, or for use with a network containing a custom classification layer.
___ = occlusionSensitivity(___,
specifies options using one or more name-value pair arguments in addition to the input
arguments in previous syntaxes. For example, Name,Value
)'Stride',50
sets the stride
of the occluding mask to 50 pixels.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2019b
See Also
activations
| classify
| imageLIME
| gradCAM
Topics
- Understand Network Predictions Using Occlusion
- Grad-CAM Reveals the Why Behind Deep Learning Decisions
- Understand Network Predictions Using LIME
- Investigate Network Predictions Using Class Activation Mapping
- Visualize Features of a Convolutional Neural Network
- Visualize Activations of a Convolutional Neural Network