r/learnmachinelearning • • 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?

2 Upvotes

6 comments sorted by

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.

1

u/No-Show-7313 29d ago

That's a really good approach! Checking high-confidence wrong predictions first makes a lot of sense because systematic issues can easily get hidden behind good overall metrics. I especially like the idea of splitting validation performance by metadata like lighting and camera. It can reveal problems that aggregate metrics completely miss.

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/No-Show-7313 29d ago

Absolutely agree! The validation set needs to reflect real-world conditions, otherwise the metrics can be misleading. In computer vision, things like lighting, image quality, and near-duplicate images can make a big difference. I think evaluating on a separate set of real deployment images is a great way to catch these issues before production.

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.