PreProcessStepsreverse_channels Method
Reverse channels operation.
Namespace: OpenVinoSharp.preprocessAssembly: OpenVINO_CSharp_API (in OpenVINO_CSharp_API.dll) Version: 2024.3.0.2+a9617c0f8f80882646d0eba11b88ae6cb17b3fb8
public PreProcessSteps reverse_channels()
Return Value
PreProcessStepsReference to 'this' to allow chaining with other calls in a builder-like manner.
Adds appropriate operation which reverses channels layout. Operation requires layout having 'C'
dimension Operation convert_color (RGB-BGR) does reversing of channels also, but only for NHWC layout
when user data has 'NCHW' layout (example is [1, 3, 224, 224] RGB order) but model expects
BGR planes order. Preprocessing may look like this:
var proc = PrePostProcessor(function);
proc.input().preprocess().convert_layout({0, 3, 1, 2});