r/learnmachinelearning • u/No-Show-7313 • 29d ago
What I learned while evaluating a computer vision model
I've been working on computer vision projects and one lesson I've learned is that a high overall metric doesn't always tell the full story.
A few things I now check during evaluation:
- Per-class precision and recall
- Confusion matrices and difficult examples
- Performance on validation data that wasn't used for training
- Whether improvements hold up on real-world images
I'm curious how others here approach error analysis. What's the first thing you inspect when a model's validation metrics look good but its real-world predictions are disappointing?
5
u/PLBjt 29d ago
First thing I do is pull the top 50 highest-confidence wrong predictions and just look at them. Nine times out of ten it's not random noise, it's something systematic like a labeling quirk, a background that correlates with the class, or near-duplicate images leaking between train and val. Then I split the val metric by whatever metadata I have (camera, lighting, source folder) because a good average often hides one slice that's terrible. Costs you an afternoon, but it's way cheaper than retraining blindly. The catch is that if you keep tuning against that same val set you'll slowly overfit it, so I keep a small untouched set from the real deployment images and only peek at it rarely.
3
u/CelebrityChess 29d ago
first thing i check is whether the validation set actually looks like the real data, same cameras, lighting, resolution, jpeg compression and so on. a lot of the time val is just a random split of the same source as train so near duplicates leak across and the metric is inflated. second is looking at the worst errors by confidence, the confident wrong ones usually point straight at a labeling problem or a missing condition in the training data. only after that i'd bother with per class numbers.
1
u/Future_AGI 28d ago
before the confusion matrix, check calibration on a small hand-labeled batch of real-world images: confidence often stays high while accuracy drops on the new distribution, and a threshold tuned on validation will then be wrong in production too. A reliability plot of predicted confidence vs actual accuracy makes that gap visible in a few minutes.