Which computer vision libraries do you actually need today?
A production computer vision system today needs about seven categories of tooling — classical image processing, a deep-learning framework, a detection or segmentation training framework, annotation and dataset management, augmentation, an optimised inference runtime, and a serving or streaming layer — and in each category two or three mature open-source options cover pretty much every real project. The skill is in knowing which job each library does, and refusing any dependency that doesn't earn its place.
Ranked lists age in months. "The fifth-best computer vision library" is not a decision anyone can make; "use this to label your video, this to train your detector, this to run it at the edge" is. So this guide is structured around pipeline stages, and each entry answers three questions: what it does, when to reach for it, and when not to. If you're earlier in the decision, our overview of computer vision services for businesses covers the use cases, and the limitations are in computer vision advantages and challenges.
| Pipeline stage | Reach for | The decision that drives it |
|---|---|---|
| Image and video I/O, classical CV | OpenCV; scikit-image; Kornia | Production speed, readable science, or inside the training graph? |
| Training and backbones | PyTorch; torchvision and timm | Custom training logic, or fine-tuning a known architecture? |
| Detection and segmentation | Ultralytics YOLO, Detectron2, MMDetection, SAM family | Time to first result, research flexibility, or licence terms |
| Annotation | CVAT for video and geometry, Label Studio for mixed media | A box on a frame, or a multimodal judgement? |
| Curation and error analysis | FiftyOne | Do you need to look at failures, not just read a metric? |
| Augmentation | Albumentations | Which variation does your camera actually see? |
| Tracking and versioning | MLflow, Weights and Biases, DVC | Can you reproduce last quarter’s model exactly? |
| Inference optimisation | ONNX Runtime, TensorRT, OpenVINO | What silicon is in the box the model runs on? |
| Video at scale | GStreamer, DeepStream | How many streams share one accelerator? |
| Serving | Triton Inference Server, TorchServe | Multi-framework, or one PyTorch model? |
| Post-processing and tracking | Supervision | Rewriting box-drawing and zone logic again? |
Classical CV and image processing: the layer that never went away
Neural networks get the attention, but much of the actual production pipeline is still classical image processing: decoding frames, colour conversion, undistortion, contour extraction, and the geometry that turns a pixel coordinate into a position on the factory floor.
- OpenCV. The default: optimised I/O, transforms, camera calibration, stereo, optical flow and feature matching, behaving the same in Python and C++. Use it in pretty much every project. Not a deep-learning framework — it does have an inference module, but training belongs elsewhere.
- scikit-image. Readable scientific image analysis: segmentation, morphology, filtering, region properties. Ideal for microscopy, materials and medical imaging, where you need to reason about the algorithm. Not for a real-time loop — it's built for clarity rather than throughput.
- Kornia. Classical operations as differentiable PyTorch modules on the GPU. Use it when transforms have to live within the training graph, or to keep a batch on the accelerator rather than continually round-tripping to NumPy. Overkill if all you really need is a resize.
The typical mistake is asking the model to learn what a calibration matrix already knows. Every constraint you hand-code is one the model no longer needs training data to learn.
Deep-learning frameworks and pretrained model zoos
The framework question has largely been settled. Most production vision work is done in PyTorch, and the surrounding ecosystem assumes it. One rule holds across everything below: pick the backbone for the deployment constraint, not the leaderboard.
- PyTorch. The training framework. Use it for custom losses, custom data loading and anything else a higher-level framework won't anticipate. It's also the format most export toolchains work with natively.
- torchvision. Datasets, transforms and reference implementations of standard architectures. Use it when you want a well-understood baseline with no extra dependencies. Its coverage is deliberately conservative — it's a reference library, not the latest architecture.
- timm. The image-model zoo: classification backbones with pretrained weights behind a uniform interface, so that swapping a backbone is a string change rather than a refactor. Use it when the encoder matters. Not a detection framework.
- Hugging Face Transformers. Increasingly the distribution channel for vision and vision-language models, not just text. Use it when you want a hosted checkpoint, standard pre- and post-processing and a familiar fine-tuning workflow. The abstraction gets in the way if you need very tight control over the training loop.
Detection and segmentation: which training framework to build on
Detection and instance segmentation are where most commercial vision work lives. The pragmatic default is to prototype with the quickest framework to prove the task is learnable, and only move to a research framework if error analysis shows the architecture is the limiting factor.
- Ultralytics YOLO family. The quickest route from a labelled dataset to a working detector: sensible defaults, built-in export to most runtimes, and detection, segmentation, pose and classification all behind one interface. Use it when time to first result matters and the task is fairly standard. Check the licence before commercial deployment — a surprise licensing issue is the most common late gotcha in vision projects.
- Detectron2. A research-grade framework with clean, composable abstractions. Use it when you're modifying architectures, writing custom heads, or need instance and panoptic segmentation done properly. It's heavier to set up, and its defaults assume you know the domain.
- MMDetection. The most comprehensive catalogue of published architectures under a single configuration system, which makes comparing approaches fair. Use it during an architecture bake-off. That configuration system is very powerful and quite steep; it rewards a team that will actually use it twice.
- SAM-family promptable segmentation. High-quality masks from a point or box prompt, with no task-specific training required. Use it to bootstrap segmentation labels or to build interactive annotation tools. Not for a real-time hot path.
- Supervision. The glue you'd otherwise rewrite in every project: detection post-processing, non-maximum suppression, tracking integration, zone and line-crossing logic, annotation drawing. Use it as soon as your prototype has accumulated a few helper functions for boxes.
Annotation, dataset tooling and augmentation
This is the stage teams under-resource and then go on to blame the model for. Label quality, class definitions and dataset coverage set the ceiling on accuracy; no architecture can get past an inconsistent labelling guideline.
- CVAT. Built for video and geometry — keyframe interpolation, object tracks, polygons, cuboids, skeletons — with proper annotator management. Use it for any substantial video or industrial imaging work. It's heavier to self-host than a single-purpose tool.
- Label Studio. A general labelling platform for image, video, text and audio. Use it when the label is a judgement rather than a shape, or when one team labels across several modalities. Less specialised than CVAT for dense video geometry.
- FiftyOne. A dataset and evaluation workbench: browse images alongside ground truth and predictions, filter down to failures, find duplicates and label errors, and compare runs visually. Use it the first time a metric moves and no-one can explain why. It's not a labelling tool — pair it with CVAT or Label Studio.
- Albumentations. Fast augmentation that correctly transforms the boxes, masks and keypoints along with the image — the part naive implementations get wrong. Use it in pretty much every training pipeline, but don't treat the default recipe as free accuracy: a vertical flip on a fixed overhead camera teaches the model something that isn't true.
- The guideline matters more than the tool. Write it up as a specification, with edge cases and worked examples, before annotation starts.
Experiment tracking, dataset versioning and evaluation
A vision model is a function of code, weights, hyperparameters and a dataset. Version three of those and you still can't reproduce a result.
- MLflow. Experiment tracking, metrics, artefacts and a model registry you can self-host. Use it when data residency or procurement constraints rule out a hosted service, or when you want tracking and registry in one place.
- Weights and Biases. Hosted tracking with excellent visualisation and media logging, which suits vision work — you can look at the predicted masks as well as the loss curve. Use it when several people are comparing runs. Check the data-handling terms if your images are sensitive.
- DVC. Git-style versioning of datasets and model artefacts, with pipeline definitions that let you reproduce a run from a commit hash. Use it as soon as the dataset has changed twice.
- Evaluation and quality. Hold a fixed evaluation set that never gets trained on, and split by capture condition — camera, site, lighting, shift — rather than randomly. Otherwise near-duplicate frames leak across the split and your metric becomes fiction. A model that evaluates well and then fails in the field usually had both its training and evaluation sets drawn from one afternoon's footage.
Inference optimisation, runtimes and serving
The framework you train in is almost never the runtime you deploy on. Treating the export path as an afterthought is the most expensive scheduling mistake you can make in a vision project.
- ONNX and ONNX Runtime. A portable interchange format plus a runtime that executes it on CPU, GPU and various accelerators. Use it as the default hand-off between training and deployment. Exotic custom operators are where exports tend to break, so test your export early, on a real model.
- TensorRT. Aggressive optimisation for NVIDIA hardware: kernel fusion, precision reduction, hardware-specific graph tuning. Use it when latency or stream density is the bottleneck. The engine is tied to the target hardware, so build it in your deployment pipeline rather than committing a binary and hoping.
- OpenVINO. The equivalent for Intel CPUs, integrated graphics and accelerators. Use it when the target is commodity industrial hardware without a discrete GPU — many factory and retail installations.
- Triton Inference Server. Multi-model, multi-framework serving with dynamic batching, concurrent execution and ensembles. Use it when several models share one accelerator, or different teams ship different frameworks into one endpoint.
- TorchServe. A simpler serving path for PyTorch models with custom handlers. Use it when there is one model, one framework and you want less operational surface than Triton demands.
- Quantisation. Reduced precision gives you a large latency and memory win for a small accuracy cost — but that cost is not uniform across classes. Re-run your evaluation set after quantising, broken down by class, because the accuracy you lose is concentrated in the rare cases you actually cared about.
Edge deployment and video pipelines
Most commercially interesting vision runs on live video, often on a device close to the camera. That shifts the question from "does the model work?" to "can this box decode sixteen streams without dropping a frame?"
- GStreamer. The general-purpose media pipeline framework: capture, decode, transform, encode and stream, with hardware-accelerated elements on most platforms. Use it whenever video enters the system and frame timing matters. Reading frames one at a time in a Python loop works in a demo and collapses in production.
- DeepStream. A GStreamer-based SDK for multi-stream video analytics on NVIDIA hardware, keeping decode, inference and tracking on the GPU. Use it when stream density per device is your economic constraint. It ties you to one vendor's stack, which is a deliberate trade-off.
- Edge and embedded runtimes. The pattern is the same regardless of vendor: export to a portable format, compile with the vendor toolchain, quantise, and validate on-device. Choose a small architecture designed for the constraint, rather than a big one you hope to shrink later.
- Two constraints shape every edge design. Thermal throttling makes sustained throughput lower than benchmark throughput; and connectivity is intermittent, so decide early what the device does when the network goes away.
How vision-language models changed the toolchain
The most useful recent change in this space hasn't been a faster detector. It's that vision-language models have made the front of the project dramatically cheaper, without displacing the specialist models in the hot path.
- Prototype with a VLM to validate the task. Before you commit an annotation budget, run a general vision-language model over a representative sample and check whether the distinction you care about is visible at all. Many projects get killed off at this stage, very cheaply — which is the best outcome for one that was going to fail.
- Use open-vocabulary models to bootstrap labels. CLIP-style embedding models and open-vocabulary detectors let you retrieve and pre-label frames by description rather than by trained class. Human review then corrects a pre-labelled set rather than starting from scratch.
- Distil to a small specialist for the hot path. A large multimodal model is the wrong thing to run on every frame of sixteen streams. Use it to generate and verify training data, then train a compact detector that fits within your latency budget. The VLM is the teacher, not the runtime.
- Keep the VLM for the long tail. Route the rare, ambiguous or novel cases to the larger model and let the small model handle the routine majority — the tiering that works in agent systems, applied to pixels.
We go deeper in applications of vision-language models. For tooling: your stack now needs an experimentation path for prompted multimodal models alongside the traditional training path, because prompted models fail more fluently, and therefore less visibly.
Open-source libraries or a managed cloud vision service?
Not every vision problem needs a training pipeline. Managed cloud vision APIs solve a well-defined set of tasks — OCR and document extraction, generic object detection, common moderation categories — with no model to train and no runtime to operate.
| Open-source stack | Managed cloud vision service | |
|---|---|---|
| Best at | Domain-specific tasks nobody else has trained for | OCR, generic detection, document parsing |
| Time to first result | Weeks — data, labels, training, export | Hours — an API call against your images |
| Cost shape | Fixed infrastructure; cheap at high volume | Per-request; steep at high volume |
| Data residency | Runs wherever you run it, including on-premise | Data leaves your perimeter unless terms say otherwise |
| Latency | Single-digit milliseconds at the edge | Network round trip; no real-time control loops |
| Control | Full — architecture, thresholds, failure behaviour | Limited to exposed parameters |
| Typical failure | Under-resourced data work; no export plan | Task is close to but not quite what the API does |
The answer is usually both. As a Google Cloud Partner we build a great deal on Vertex AI and Gemini, and combining a managed multimodal model with a self-hosted specialist detector in a single pipeline is now ordinary architecture, not a compromise. Three questions decide it: does the task need domain knowledge that no general API has, must the data stay inside your perimeter, and is the volume high enough that per-request pricing overtakes the cost of running your own? Two yeses and you build.
How SoftmaxAI builds computer vision systems
We build our vision systems the same way we build everything else. We have a written, client-approved specification prior to any code. We have an agent-accelerated build led by senior engineers, and every decision that matters is owned by a human.
- The specification names the tools and the constraints. Target hardware, latency budget, stream count, labelling guideline, split strategy and export path are all agreed before training starts. Choosing a runtime after the model has hit its accuracy target is how projects get rebuilt twice.
- Boring core, deliberate edges. OpenCV and PyTorch for the plumbing, a proven training framework for the model, and ONNX as the hand-off. We add a dependency when it removes work, and we check its licence first.
- Evaluation before optimisation. A fixed evaluation set stratified by capture condition, visual error analysis on the failures, and a re-run after every export step.
- Operations from day one. Model registry, dataset versioning, drift monitoring and a defined path for retraining and field updates — the ML, computer vision and MLOps work that ultimately determines whether a model is still performing in month eighteen.
You can see the shape of this work in our case studies and the engagement models across our services. If you're still deciding whether a vision system is the right answer, have that conversation before anyone picks a library.
OpenCVPyTorchDetectron2MMDetectionAlbumentationsONNX RuntimeTensorRTOpenVINOTritonCVATFiftyOneDVCVision-language modelsEdge inference