IOU, not the monetary kind, is Intersection Over Union Metric, commonly used to measure the performance of a model on the semantic segmentation task. It is literally just the intersection set divided by the union set. Intersection of two sets is an AND operation. If it exists in both sets, then we put it into the intersection set. For each class, the intersection is defined as the number of pixels that are both truly part of that class and are classified as part of that class by the network. Union of the two set is a OR operation. If it exists in at least one of the two sets, then we put it into the union set. The union is defined as the number of pixels that are truly part of that class plus the number of pixels that are classified as part of that class by the network. So, the intersection set should always be smaller or equal to the union set. The ratio then tell us the overall performance per pixel, per class. Since this intersection set is divided by the union set, the ratio will always be less than or equal to one. We can go even further and calculate the mean IOU for a network, which is just the average of all the IOU for all the classes. This gives you an idea of how well it handles all the different classifications for every single pixel. Intensive flow we can use matrix mean IOU function and call it directly.