https://au.mathworks.com/help/vision/ref/evaluatesemanticsegmentation.html
evaluateSemanticSegmentation - Evaluate semantic segmentation data set against ground truth - MATLAB
This MATLAB function computes various metrics to evaluate the quality of the semantic segmentation results, dsResults, against the ground truth segmentation,...
semantic segmentationdata setground truthevaluatematlab