image processing - How to test accuracy of segmentation ...
stackoverflow.com › questions › 13974167Dec 20, 2012 · If your areas are not uniform, it will be something like (pixels in the detected area that match the ground truth)/total number of pixels in the ground truth segmentation. in the image below: count (gray)/ (count (black+gray)) A measure you should consider is also a ratio of the detection area compared to the ground truth area, because you may have a detection that covers the whole image, and have a score of 100% accuracy on the above formula.