focalLossLayer
Description
A focal loss layer predicts object classes using focal loss. Add the focal loss layer to train an object detection, semantic segmentation, or a classification network when imbalance exists between foreground and background classes. To compensate for class imbalance, the focal loss function multiplies the cross entropy function with a modulating factor that increases the sensitivity of the network to misclassified observations.
Creation
Description
creates a focal loss
layer for deep learning networks. For information on how to use focal loss layer in an
object detection network, see Create SSD Object Detection Network.layer
= focalLossLayer
sets properties of the focal loss layer by using one or more name-value pair arguments.
Enclose each property name in quotes.layer
= focalLossLayer(Name,Value
)
For example, focalLossLayer('Name','focalloss')
creates a focal
loss layer with the name 'focalloss'
and the specified balancing and
focusing parameters.
Properties
Examples
More About
References
[1] Lin, Tsung-Yi, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. "Focal Loss for Dense Object Detection." In 2017 IEEE® International Conference on Computer Vision (ICCV), 2999–3007. Venice: IEEE, 2017. https://doi.org/10.1109/ICCV.2017.324.
Extended Capabilities
Version History
Introduced in R2020a
See Also
trainNetwork
(Deep Learning Toolbox) | trainSSDObjectDetector
| focalCrossEntropy
Topics
- Getting Started with Object Detection Using Deep Learning
- Getting Started with SSD Multibox Detection
- List of Deep Learning Layers (Deep Learning Toolbox)
- Deep Learning in MATLAB (Deep Learning Toolbox)
- Specify Layers of Convolutional Neural Network (Deep Learning Toolbox)