How to access the output layer of a semantic segmenation model (with onnx)

Hello,

I want to use the opencv 4.5.5 dnn module with a onnx model (created with tf2onnx with opset9) for semantic segmentation

I wonder how to correctly access the different output layers of prediction.

The last output of the onnx-model shows
type: float32[unk__303,256,256,3] as dimension.

Can someone provide a working C++ or C# example.

My tries with different combinations of
layertest = new Mat(256, 256, MatType.CV_32FC1, rawOutput.Ptr(a));
layertest = new Mat(256, 256, MatType.CV_32FC1, rawOutput.Ptr(a, b));
layertest = new Mat(256, 256, MatType.CV_32FC1, rawOutput.Ptr(a, b, c));
did not lead to the desired success.

a=2, b=0, c=0 somehow looked not so bad, but the result was shifted…

Andreas