Book a free call

Computer Vision Best Practices That Hold Up in Production

Computer vision best practices cover data, model choice, honest evaluation and monitoring, so your model keeps working after launch, not just in the lab.

Hertiv engineering teamReviewed by a senior engineer
8 min read
Computer Vision Best Practices That Hold Up in Production
On this page

Short answer

Computer vision best practices are the working rules that keep a vision model accurate once it leaves the lab: label data carefully, pick the simplest model that fits the task, test on data the model has never seen, and watch accuracy after launch. They matter because a model that scores well in training can still fail on real images, where light, angles and rare cases change the picture.

What are computer vision best practices?

Computer vision best practices are the working rules that keep a vision model accurate once it leaves the lab: label data carefully, pick the simplest model that fits the task, test on data the model has never seen, and watch accuracy after it goes live. They are not tricks for squeezing a few extra points out of a benchmark; they are habits that stop a model from failing quietly on real images.

Most vision projects fail for ordinary reasons. The training data does not look like the real world, the test set is too easy, or nobody checks the model after launch. The table below shows the practices that matter at each stage of a project, and the rest of this article explains each one in turn.

StagePractice that matters most
DataLabel a sample by hand and check agreement
ModelStart from a proven base model
EvaluationTest on data the model has never seen
DeploymentRun a shadow period before going live
MonitoringRe-check accuracy every month

These practices apply whether the model counts stock on shelves, checks parts on a line or reads documents. The details change with the task, but the pattern stays the same: good data, honest testing and steady checks after launch. The computer vision guide explains the main tasks a vision system can take on.

How do you get the data right?

You get the data right by treating labelling as the core of the project, not as a chore to rush through. A model can only learn what the labels teach it, so unclear labels produce a model that is confidently wrong. Write a short labelling guide with examples of edge cases, and have two people label the same sample so you can measure how often they agree.

Collect data that looks like the real world, not just the easy cases. Include the awkward light, the odd angles, the worn labels and the rare cases the model will meet in production. If a case is rare but costly to miss, gather extra examples of it rather than hoping the model generalises from a handful.

Split the data into training, validation and test sets before you train anything, and keep the test set locked away until the end. If the same image, or near copies of it, appear in both training and test sets, the test score will flatter the model. A clean split is the single most useful habit in a vision project, and it costs nothing but discipline.

How do you choose the right model for the task?

You choose the right model by matching it to the task, not by picking the newest architecture. Classification suits a yes-or-no question about a whole image, detection suits finding and counting objects, segmentation suits tracing exact shapes, and OCR suits reading text. Naming the task first narrows the choice to a small set of proven options.

Start from a proven base model that was trained on a large public dataset, then adapt it to your own data. Training from scratch is rarely worth it: it needs far more data and compute, and it usually performs worse. A base model gives you a strong starting point, and fine-tuning on your own labelled data is where most of the value comes from.

Weigh where the model will run before you pick it. A model that runs in the cloud can be large and accurate, while a model on a phone or a camera needs to be small and fast. Decide the latency and hardware limits early, because a model that is too slow for the job is a failed model, however accurate it is. The implementation guide walks through the steps from data to a working system.

How do you evaluate a model honestly?

You evaluate a model honestly by testing it on data it has never seen, using the metric that matches the cost of being wrong. Accuracy alone hides the important failures: a model can be 95% accurate while missing every rare case that matters. For detection, look at precision and recall separately; for counting, check the error on the counts, not just whether objects were found.

Review the mistakes by hand, not just the score. Look at the images the model got wrong and sort them into groups: bad light, occlusion, rare classes, wrong labels. Each group points to a different fix, and the pattern of errors tells you more than any single number. If most errors come from one group, fix that group before tuning anything else.

Test the edge cases on purpose. Build a small set of the hardest images you can find — the ones with glare, partial views and unusual angles — and track the score on that set separately. A model that only works on clean images is not ready for production, and the hard set is what keeps the team honest about that. The techniques guide explains the methods behind these checks.

How do you deploy a vision model in production?

You deploy a vision model in production by running it alongside the old process first, so you can compare results before it takes over. A shadow period of a few weeks shows how the model behaves on real images without risking a bad decision. Log every prediction with its confidence score, and review a sample of the low-confidence cases by hand each week.

Set a confidence threshold below which the model asks a human instead of deciding. The right threshold depends on the cost of a mistake: a wrong count on a shelf is cheap to fix, while a missed defect on a part is not. Make the threshold a setting you can change without redeploying the model, so the team can tighten it as they learn.

Plan for the model to be wrong sometimes. Build a clear path for a human to overrule a prediction, and record those overrulings: they are the best training data for the next version. A deployment that hides mistakes is worse than a slow one, because the team stops trusting the system. The debugging guide shows how to trace failures once a model is live.

How do you keep a live model working?

You keep a live model working by checking it on a schedule, because the world it sees changes over time. Cameras move, lighting changes with the seasons, packaging changes, and new products appear. A model trained last year slowly drifts away from the images it now has to judge, and the drift shows up as a quiet fall in accuracy rather than an obvious crash.

Re-check accuracy every month on a fresh sample of real images, labelled by hand. Track the score over time so a slow decline is visible before it becomes a problem. When accuracy drops, gather the new kinds of images that are failing and add them to the training set, rather than retraining on the same old data.

Keep versions of the model, the data and the labels together, so any result can be traced back to the exact model that produced it. When a new version goes live, compare it with the old one on the same test set before switching over. Versioning turns model updates from a gamble into a routine, and it makes audits and rollbacks straightforward.

Example (hypothetical): a warehouse damage-check pilot

Example (hypothetical): a warehouse checks 1,200 boxes a day for damage before shipping. A person needs 30 seconds per box, so manual checking takes 1,200 times 30 seconds, which is 36,000 seconds, or 10 hours a day.

The team wants a vision model to flag only the boxes that might be damaged, so a person only checks the flagged ones.

The model flags 90 boxes a day, and a reviewer checks each flagged box in 20 seconds, which is 90 times 20 seconds, or 1,800 seconds, or 30 minutes.

Of the 90 flagged boxes, 36 are truly damaged, so the precision is 36 out of 90, or 40 in 100. The warehouse ships 40 damaged boxes a day in total, so the model catches 36 of them and misses 4, which is a recall of 90 in 100.

The time saved is 10 hours minus 30 minutes, which is 9 and a half hours a day, and the four missed boxes are caught by a second check at packing. The team decides the trade is worth it, but only because a human still reviews the flagged boxes and the missed cases are tracked every week.

What are the common mistakes?

The most common computer vision mistakes are training on data that does not match the real world, trusting a single score, and launching without a human in the loop.

  • Dirty or narrow data. Training on clean, well-lit images and then deploying in a warehouse or a shop floor is asking the model to fail.
  • Leaky test sets. Near copies of training images in the test set make the score look far better than the model really is.
  • One metric only. Accuracy hides the rare cases; check precision, recall and the errors by hand.
  • No confidence threshold. A model that always answers, even when unsure, will make costly mistakes that a human could have caught.
  • No monitoring. A model that is never re-checked drifts silently as the world changes around it.

Start small, label well, test honestly and keep a human in the loop. A vision project that follows those rules is far more likely to survive its first month in production than one that chases the highest test score.

Key takeaways

  • Label data carefully and measure how often labellers agree
  • Match the model to the task and start from a proven base model
  • Judge the model on held-out data and on its mistakes, not one score
  • Run a shadow period and let humans overrule low-confidence calls
  • Re-check accuracy monthly, because the world the model sees changes

Frequently asked questions

What is the most important computer vision best practice?

Good data. A model trained on well-labelled images that look like the real world will beat a fancier model trained on poor data. Labelling quality, a clean test split and images that cover the awkward cases matter more than the choice of architecture.

How much labelled data does a vision model need?

It depends on the task and on how similar the cases are. A narrow task with consistent images can work with a few hundred labelled examples when starting from a base model, while a broad task with varied scenes needs far more. Start small and add data where the model fails.

Should I train a vision model from scratch?

Usually not. A base model trained on a large public dataset, then fine-tuned on your own labelled data, is faster to build and usually more accurate. Training from scratch needs far more data and compute and is only worth it for unusual tasks.

How do I know if my model is ready for production?

Run it in shadow mode beside the current process for a few weeks and compare results on real images. If accuracy holds up, the low-confidence cases are handled by a human, and the team can explain the errors, it is ready to take over.

What causes a vision model to get worse over time?

Drift. Cameras move, lighting changes, packaging changes and new products appear, so the images the model sees stop matching its training data. Monthly re-checks on fresh, hand-labelled images catch the decline before it becomes a problem.

Do I need a human in the loop for computer vision?

Yes, at least for low-confidence cases and for review. A human who checks flagged images catches mistakes the model cannot see, and those corrections are the best training data for the next version of the model.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a computer vision product and want the basics right? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Computer Vision service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call