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:

XYLossType The type of spatial position loss filter.
WHLossType The type of spatial size loss filter.
confidenceLossType The type of confidence filter.
classesLossType The type of classes filter.
reductionType The type of a reduction operation to apply.

Returns:

A valid MPSCNNYOLOLossDescriptor object or nil, if failure.

- (nonnull instancetype) init

- anchorBoxes [read], [write], [nonatomic], [retain]

NSData containing the width and height for numberOfAnchorBoxes anchor boxes

- classesLossDescriptor [read], [write], [nonatomic], [retain]

The type of a loss filter. This parameter specifies the type of a loss filter.

- confidenceLossDescriptor [read], [write], [nonatomic], [retain]

The type of a loss filter. This parameter specifies the type of a loss filter.

- (float) maxIOUForObjectAbsence [read], [write], [nonatomic], [assign]

- (float) minIOUForObjectPresence [read], [write], [nonatomic], [assign]

- numberOfAnchorBoxes [read], [write], [nonatomic], [assign]

number of anchor boxes used to detect object per grid cell

- reductionType [read], [write], [nonatomic], [assign]

ReductionType shared accross all losses (so they may generate same sized output)

- rescore [read], [write], [nonatomic], [assign]

Rescore pertains to multiplying the confidence groundTruth with IOU (intersection over union) of predicted bounding box and the groundTruth boundingBox. Default is YES

- scaleClass [read], [write], [nonatomic], [assign]

scale factor for no object classes loss and loss gradient default is 2.0

- scaleNoObject [read], [write], [nonatomic], [assign]

scale factor for no object confidence loss and loss gradient default is 5.0

- scaleObject [read], [write], [nonatomic], [assign]

scale factor for no object confidence loss and loss gradient default is 100.0

- scaleWH [read], [write], [nonatomic], [assign]

scale factor for WH loss and loss gradient default is 10.0

- scaleXY [read], [write], [nonatomic], [assign]

scale factor for XY loss and loss gradient default is 10.0

- WHLossDescriptor [read], [write], [nonatomic], [retain]

The type of a loss filter. This parameter specifies the type of a loss filter.

- XYLossDescriptor [read], [write], [nonatomic], [retain]

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