What is a computer model?
Give a model a photo from a park and ask it to find the birds. It might trace a bird cleanly, miss a wing in shadow, or label a leaf as part of the bird. Those outcomes tell you something about what the model learned. To decide whether you can rely on it for the next batch of photos, you need to know how often each one happens.
What goes in and what comes out
A model is a mathematical function that maps inputs to outputs. In machine learning, training adjusts the function using data. At prediction time, the model takes a new input and produces an answer. For a bird photo, the input might be an array of pixel values. The output might be one score for the whole image, a box around each bird, or a score for every pixel. Apply a threshold to those pixel scores and you get a mask that says where the model thinks the bird is.
A prediction is the model’s answer. A label is the reference answer used to check it. The label depends on an annotation decision. If the task includes visible tail feathers in a bird mask, whoever draws the reference needs to apply that rule consistently. Otherwise, some apparent model error comes from disagreement about the task.
Four ways a prediction can land
Pick one class and call it positive. In a cat-versus-dog example, a cat correctly called a cat is a true positive, and a dog correctly called a dog is a true negative. A dog called a cat is a false positive. A cat called a dog is a false negative. A confusion matrix puts all four outcomes in one place, with the reference labels on the rows and predictions on the columns.
That gives us three answers from the same ten photos. Accuracy is 7 out of 10, or 70%. Precision asks how many of the model’s cat calls were right, which is 3 out of 5, or 60%. Recall asks how many of the actual cats it found, which is 3 out of 4, or 75%. In a large photo collection, missed birds and false alarms can have different costs. If each flag goes to a reviewer, precision tells you how much of that review is likely to pay off. Recall tells you how much of the birds you’re picking up.
How three masks can get the same score
At the pixel level, a large background can dominate accuracy. In the digit example below, an empty foreground prediction would still get about 63% of the pixels right. Three other predictions each get about 77%, even though one finds only part of the 8, one covers the whole digit and spills into the background, and one makes both kinds of error.
Intersection over union (IoU) measures overlap. Count the pixels that both the prediction and reference mark as foreground, then divide by the number that either one marks as foreground. The same overlap idea works for bounding boxes using area instead of pixel counts.
IoU = true positives ÷ (true positives + false positives + false negatives)
Mean IoU (mIoU) averages IoU across the evaluated classes. Each included class gets equal weight in that average, even when the background fills most of the frame and a bird takes up only a few pixels. I’d look at pixel accuracy, mIoU, and the individual class scores together. The class scores tell me where to open the images and start looking.
Where the model disagrees with a person
A confusion matrix is just as useful when the model makes one judgment per image or review item. In this comparison, a vision-language model could label an item good, suspect, or bad. A human reviewer marked each item good or bad.
The 65% agreement rate is a start. The direction of the disagreements tells me what to investigate. The model flagged all nine items the reviewer marked bad, and it also flagged seven of the eleven the reviewer accepted. If every bad verdict sends an item to manual review, I’d open those seven items first and look for a common reason the model flagged them.
Will it hold up on the next batch of photos?
I’d test on photo collections held out of training and group the results by class, capture date, and conditions. A dataset average can hide two clusters of performance. A model might work well on bright close-ups and struggle with distant subjects in low light. The distribution shows whether those failures are isolated or routine. The lowest-scoring groups tell you where to look, and a confidence interval around an average tells you how much uncertainty there is in that estimate.
If confidence scores decide which predictions get reviewed, I’d check those separately. When the model assigns about 90% confidence to a set of predictions, are roughly 90% correct? I’d ask that again as new photos come in, especially when cameras, lighting, or locations change.
For one bird photo, I want to know whether the mask follows the outline. Across a collection, I want to know which birds the model tends to miss, what else it mistakes for a bird, and how often those errors happen under the conditions we’ve tested.
Themes to be expanded on
- F1 score, ROC curves, and precision–recall curves across decision thresholds
- Mean, median, variance, standard deviation, and confidence intervals for model scores
- Error distributions, bimodality, worst-case performance, and per-class variation
- Calibration curves and how confidence changes over time
- Cross-entropy, focal loss, and Dice loss for training segmentation models
- Normalized cross-correlation for comparing aligned views under changes in brightness and contrast