Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mpscnncrosschannelnormalization(3) [mojave man page]

MPSCNNCrossChannelNormalization(3)			 MetalPerformanceShaders.framework			MPSCNNCrossChannelNormalization(3)

NAME
MPSCNNCrossChannelNormalization SYNOPSIS
#import <MPSCNNNormalization.h> Inherits MPSCNNKernel. Instance Methods (nonnull instancetype) - initWithDevice:kernelSize: (nullable instancetype) - initWithCoder:device: (nonnull instancetype) - initWithDevice: Properties float alpha float beta float delta NSUInteger kernelSize Additional Inherited Members Detailed Description This depends on Metal.framework Specifies the normalization filter across feature channels. This normalization filter applies the filter to a local region across nearby feature channels, but with no spatial extent (i.e., they have shape kernelSize x 1 x 1). The normalized output is given by: Y(i,j,k) = X(i,j,k) / L(i,j,k)^beta, where the normalizing factor is: L(i,j,k) = delta + alpha/N * (sum_{q in Q(k)} X(i,j,q)^2, where N is the kernel size. The window Q(k) itself is defined as: Q(k) = [max(0, k-floor(N/2)), min(D-1, k+floor((N-1)/2)], where k is the feature channel index (running from 0 to D-1) and D is the number of feature channels, and alpha, beta and delta are paremeters. It is the end-users responsibility to ensure that the combination of the parameters delta and alpha does not result in a situation where the denominator becomes zero - in such situations the resulting pixel-value is undefined. Method Documentation - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. Parameters: aDecoder The NSCoder subclass with your serialized MPSKernel device The MTLDevice on which to make the MPSKernel Returns: A new MPSKernel object, or nil if failure. Reimplemented from MPSCNNKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device Standard init with default properties per filter type Parameters: device The device that the filter will be used on. May not be NULL. Returns: A pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later. Reimplemented from MPSCNNKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(NSUInteger) kernelSize Initialize a local response normalization filter in a channel Parameters: device The device the filter will run on kernelSize The kernel filter size in each dimension. Returns: A valid MPSCNNCrossChannelNormalization object or nil, if failure. Property Documentation - alpha [read], [write], [nonatomic], [assign] The value of alpha. Default is 1.0. Must be non-negative. - beta [read], [write], [nonatomic], [assign] The value of beta. Default is 5.0 - delta [read], [write], [nonatomic], [assign] The value of delta. Default is 1.0 - kernelSize [read], [nonatomic], [assign] The size of the square filter window. Default is 5 Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNCrossChannelNormalization(3)

Check Out this Related Man Page

MPSCNNLocalContrastNormalization(3)			 MetalPerformanceShaders.framework		       MPSCNNLocalContrastNormalization(3)

NAME
MPSCNNLocalContrastNormalization SYNOPSIS
#import <MPSCNNNormalization.h> Inherits MPSCNNKernel. Instance Methods (nonnull instancetype) - initWithDevice:kernelWidth:kernelHeight: (nullable instancetype) - initWithCoder:device: (nonnull instancetype) - initWithDevice: Properties float alpha float beta float delta float p0 float pm float ps NSUInteger kernelWidth NSUInteger kernelHeight Additional Inherited Members Detailed Description This depends on Metal.framework Specifies the local contrast normalization filter. The local contrast normalization is quite similar to spatial normalization (see MPSCNNSpatialNormalization) in that it applies the filter over local regions which extend spatially, but are in separate feature channels (i.e., they have shape 1 x kernelWidth x kernelHeight), but instead of dividing by the local 'energy' of the feature, the denominator uses the local variance of the feature - effectively the mean value of the feature is subtracted from the signal. For each feature channel, the function computes the variance VAR(i,j) and mean M(i,j) of X(i,j) inside each rectangle around the spatial point (i,j). Then the result is computed for each element of X as follows: Y(i,j) = pm + ps * ( X(i,j) - p0 * M(i,j)) / (delta + alpha * VAR(i,j))^beta, where kw and kh are the kernelWidth and the kernelHeight and pm, ps and p0 are parameters that can be used to offset and scale the result in various ways. For example setting pm=0, ps=1, p0=1, delta=0, alpha=1.0 and beta=0.5 scales input data so that the result has unit variance and zero mean, provided that input variance is positive. It is the end-users responsibility to ensure that the combination of the parameters delta and alpha does not result in a situation where the denominator becomes zero - in such situations the resulting pixel-value is undefined. A good way to guard against tiny variances is to regulate the expression with a small value for delta, for example delta = 1/1024 = 0.0009765625. Method Documentation - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. Parameters: aDecoder The NSCoder subclass with your serialized MPSKernel device The MTLDevice on which to make the MPSKernel Returns: A new MPSKernel object, or nil if failure. Reimplemented from MPSCNNKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device Standard init with default properties per filter type Parameters: device The device that the filter will be used on. May not be NULL. Returns: A pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later. Reimplemented from MPSCNNKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(NSUInteger) kernelWidth(NSUInteger) kernelHeight Initialize a local contrast normalization filter Parameters: device The device the filter will run on kernelWidth The width of the kernel kernelHeight The height of the kernel Returns: A valid MPSCNNLocalContrastNormalization object or nil, if failure. NOTE: For now, kernelWidth must be equal to kernelHeight Property Documentation - alpha [read], [write], [nonatomic], [assign] The value of alpha. Default is 0.0 The default value 0.0 is not recommended and is preserved for backwards compatibility. With alpha 0, it performs a local mean subtraction. The MPSCNNLocalContrastNormalizationNode used with the MPSNNGraph uses 1.0 as a default. - beta [read], [write], [nonatomic], [assign] The value of beta. Default is 0.5 - delta [read], [write], [nonatomic], [assign] The value of delta. Default is 1/1024 - kernelHeight [read], [nonatomic], [assign] The height of the filter window - kernelWidth [read], [nonatomic], [assign] The width of the filter window - p0 [read], [write], [nonatomic], [assign] The value of p0. Default is 1.0 - pm [read], [write], [nonatomic], [assign] The value of pm. Default is 0.0 - ps [read], [write], [nonatomic], [assign] The value of ps. Default is 1.0 Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNLocalContrastNormalization(3)
Man Page