MPSCNNYOLOLossDescriptor(3) | MetalPerformanceShaders.framework | MPSCNNYOLOLossDescriptor(3) |
MPSCNNYOLOLossDescriptor
#import <MPSCNNLoss.h>
Inherits NSObject, and <NSCopying>.
(nonnull instancetype) - init
(nullable MPSCNNYOLOLossDescriptor *) +
cnnLossDescriptorWithXYLossType:WHLossType:confidenceLossType:classesLossType:reductionType:anchorBoxes:numberOfAnchorBoxes:
MPSCNNLossDescriptor * XYLossDescriptor
MPSCNNLossDescriptor * WHLossDescriptor
MPSCNNLossDescriptor * confidenceLossDescriptor
MPSCNNLossDescriptor * classesLossDescriptor
MPSCNNReductionType reductionType
BOOL rescore
float scaleXY
float scaleWH
float scaleNoObject
float scaleObject
float scaleClass
float minIOUForObjectPresence
float maxIOUForObjectAbsence
NSUInteger numberOfAnchorBoxes
NSData * anchorBoxes
This depends on Metal.framework. The MPSCNNYOLOLossDescriptor specifies a loss filter descriptor that is used to create a MPSCNNLoss filter. The MPSCNNYOLOLoss is a filter that has been specialized for object detection tasks and follows a specific layout for the feature-channels of the input, output, weight and label data.
The layout of the data within the feature-channels is as follows:
Each anchorbox uses ( 2+2+1 + numberOfClasses = 5 + numberOfClasses ) feature channels.
Therefore the total number of feature channels used is: (5 + numberOfClasses) * numberOfAnchorBoxes. The first feature channel for anchorbox index 'anchorIdx' is at fcIndex = (5 + numberOfClasses) * anchorIdx, and the feature channels within each anchorbox are stored in the layout: 'XYWHCFFFFFF...', where (XY) are the so-called raw x and y coordinates of the bounding box within each gridcell and (WH) are the corresponding width and height. 'C' signifies a confidence for having an object in the cell and FFFFF... are the feature channel values for each class of object to be classified in the object detector.
The YOLO-loss filter works by operating mostly independently on each anchorbox:
For details on how to set up the label values and anchorboxes see https://arxiv.org/abs/1612.08242
Make a descriptor for a MPSCNNYOLOLoss object.
Parameters:
Returns:
NSData containing the width and height for numberOfAnchorBoxes anchor boxes
The type of a loss filter. This parameter specifies the type of a loss filter.
The type of a loss filter. This parameter specifies the type of a loss filter.
number of anchor boxes used to detect object per grid cell
ReductionType shared accross all losses (so they may generate same sized output)
Rescore pertains to multiplying the confidence groundTruth with IOU (intersection over union) of predicted bounding box and the groundTruth boundingBox. Default is YES
scale factor for no object classes loss and loss gradient default is 2.0
scale factor for no object confidence loss and loss gradient default is 5.0
scale factor for no object confidence loss and loss gradient default is 100.0
scale factor for WH loss and loss gradient default is 10.0
scale factor for XY loss and loss gradient default is 10.0
The type of a loss filter. This parameter specifies the type of a loss filter.
The type of a loss filter. This parameter specifies the type of a loss filter.
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |