Table of Contents

Method GetLayersShapes

Namespace
OpenCvSharp.Dnn
Assembly
OpenCvSharp.dll

GetLayersShapes(IEnumerable<MatShape>, IEnumerable<MatType>, out int[], out MatShape[][], out MatShape[][])

Returns input and output shapes for all layers in the loaded model; preliminary inferencing isn't necessary (OpenCV 5).

public void GetLayersShapes(IEnumerable<MatShape> netInputShapes, IEnumerable<MatType> netInputTypes, out int[] layerIds, out MatShape[][] inLayersShapes, out MatShape[][] outLayersShapes)

Parameters

netInputShapes IEnumerable<MatShape>

shapes for all net inputs.

netInputTypes IEnumerable<MatType>

element types for all net inputs (parallel to netInputShapes).

layerIds int[]

output: layer IDs.

inLayersShapes MatShape[][]

output: input shapes per layer (order matches layerIds).

outLayersShapes MatShape[][]

output: output shapes per layer (order matches layerIds).