diff --git a/model_api/cpp/models/src/segmentation_model.cpp b/model_api/cpp/models/src/segmentation_model.cpp index e899f3b5..7b63e85f 100644 --- a/model_api/cpp/models/src/segmentation_model.cpp +++ b/model_api/cpp/models/src/segmentation_model.cpp @@ -253,7 +253,8 @@ void SegmentationModel::prepareInputsOutputs(std::shared_ptr& model) std::unique_ptr SegmentationModel::postprocess(InferenceResult& infResult) { const auto& inputImgSize = infResult.internalModelData->asRef(); - const auto& outTensor = infResult.outputsData[outputNames[0]]; + const auto& outputName = outputNames[0] == feature_vector_name ? outputNames[1] : outputNames[0]; + const auto& outTensor = infResult.outputsData[outputName]; const ov::Shape& outputShape = outTensor.get_shape(); const ov::Layout& outputLayout = getLayoutFromShape(outputShape); size_t outChannels = ov::layout::has_channels(outputLayout) ?