Skip to main content Link Search Menu Expand Document (external link)

@mlmean attribute

:electric_plug: dp.kinect3 dp.oak
:information_source: signature
mlmean FLOAT [FLOAT]...
:bulb: examples
@mlmean 0.385 0.356 0.306

Subtract values from input channels before scaling: (pixel_value - mean) * scale.

Some models are trained so that inference later needs standardized input. Use @mlmean and @mlscale to standardize real-time input for these models. The given @mlmean floats are substracted from each input channel in the same order.

3-channel input with @mlswapch applies @mlmean to channels 2,1,0 and swaps data channels 0 and 2 before sending to the model as input.

:memo: @mlinput may be easier to understand than @mlswapch.