I now want to count each pixel for when an image goes through the network and produces semantic data. How do i do this? when the tutorial does count each pixel in the tutorial it does this for one image and uses PXDs.
To perform the semantic segmentation for a random image te following code is used:
I = read(imdsTest);
C = semanticseg(I, net);
B = labeloverlay(I,C,'Colormap',cmap,'Transparency',0.4);
How can i use this data to count the pixels in this outputted image for the labels?
The code used at the start to coun each pixel is:
labelDir = fullfile(outputFolder,'labels');
pxds = pixelLabelDatastore(labelDir,classes,labelIDs);