← All writing
Evaluation · 5 min read · 27 Aug 2026

How to Benchmark a Computer Vision Model Honestly

Before a model goes anywhere near production, its numbers need to survive scrutiny. Here is how I try to make sure mine do.

Cover image for the article: How to Benchmark a Computer Vision Model Honestly

Why the reported number is rarely the real number

Every computer vision project eventually produces a headline metric: ninety-four percent accuracy, an mAP of 0.71, an F1 score that looks good enough to put in a slide deck. The trouble is that these numbers are only as honest as the process that generated them, and that process is where most of the damage happens quietly, long before anyone notices a problem in production. I have come to treat the benchmarking stage with the same suspicion I apply to the model architecture itself, because a beautifully engineered network evaluated badly will still fail in the field.

The core issue is that benchmarking is not a neutral act of measurement. It is an experimental design problem, and like any experiment it can be biased by how you split your data, what you compare against, and what conditions you test under. A model that scores well on a benchmark that quietly resembles its training data is not being evaluated, it is being flattered. Deployment does not care about flattery. It cares about whether the system behaves sensibly on the messy, unseen inputs that arrive at three in the morning from a camera nobody calibrated properly.

So the question worth asking before any number goes into a report is simple: would this score survive contact with reality? Answering that honestly requires attention to three things in particular, which I will work through with a concrete example throughout: data leakage, baseline strength, and the realism of test conditions.

Data leakage: the silent inflator of accuracy

Imagine a defect detection model trained on images from a factory production line, where frames are extracted from video at five frames per second. If you shuffle all the frames randomly and then split into training and test sets, you will almost certainly end up with near-duplicate frames of the same defect, taken a fifth of a second apart, on both sides of the split. The model does not need to learn what a defect looks like; it only needs to memorise that particular scratch on that particular component. Your test accuracy might read ninety-seven percent, but you have not measured generalisation, you have measured memorisation with extra steps.

The fix is to split by the unit that actually varies in deployment, not by the unit that is easiest to shuffle. In this example that means splitting by production run, by physical part, or by time window, so that no frame from a given object or session appears in both training and test. The same logic applies broadly: split by patient in medical imaging, by camera or site in surveillance work, by video clip rather than by frame in action recognition. If the grouping variable that matters in the real world can leak across your split, your metric is measuring something other than what you think it is.

A useful sanity check is to ask what the test accuracy would look like if you deliberately introduced the leak, then compare that against your leakage-aware split. In one hypothetical setup I have reasoned through, a frame-level random split gave accuracy in the mid-nineties, while a proper split by physical part dropped that same model to the low eighties. That gap is not noise, it is the size of the illusion. Reporting the higher number to a stakeholder who is about to greenlight deployment is not a small rounding error, it is a decision made on false information.

factory production line camera

Strong baselines and realistic conditions

Even with a clean split, a number in isolation tells you almost nothing. Ninety percent accuracy sounds impressive until you learn that the majority class makes up ninety-one percent of the test set, in which case a model that predicts the same label every time would beat it. This is why every serious benchmark needs at least one deliberately unglamorous baseline: predicting the majority class, using a simple colour histogram classifier, or applying a template matching approach if the task allows it. If your carefully tuned convolutional network cannot clear a trivial baseline by a meaningful margin, the architecture is not the problem worth discussing yet.

Beyond baselines, the test set itself needs to resemble the distribution the model will actually meet. A pedestrian detector benchmarked only on daytime footage with clear weather will produce a confident, misleading number if the deployment context includes dusk, rain, or a different camera lens with more distortion. It is worth deliberately constructing stratified test subsets: one for lighting conditions, one for occlusion levels, one for camera types, so that the aggregate score cannot hide a subgroup where performance collapses. A model averaging eighty-eight percent overall but forty percent on night-time frames is not an eighty-eight percent model in any operationally useful sense.

It is also worth testing under the specific failure modes the deployment environment will introduce that the training data did not: compression artefacts from a lower-bandwidth video feed, motion blur from a faster-moving subject, or a slightly different sensor with different colour response. None of this needs to be exotic. A handful of manually collected edge cases, evaluated qualitatively alongside the main metric, often reveals more about deployment risk than another decimal point on the main benchmark.

The practical takeaway

Honest benchmarking is less about statistical sophistication and more about discipline in how the evaluation is set up before a single number is computed. Split your data along the axis that varies in the real world, not the axis that is convenient to shuffle. Always report at least one naive baseline alongside your model's score, so the reader can judge the size of the actual achievement. Break down performance by meaningful subgroups rather than trusting a single aggregate figure, and deliberately seek out the conditions your training data did not cover.

None of this guarantees a model will succeed once deployed, because the world will always find new ways to be unrepresented in your test set. But it does mean that when the number goes into a report, it reflects something closer to the truth, and a model that clears an honest bar is one you can trust considerably more than one that merely cleared a convenient one.

security camera night footage
← All writing See the project case studies →