Abdul MoizFractional CTO · Senior EngineerBook a free call

AI models

The Single Pipeline That Explains Modern Computer Vision

Classification, detection, segmentation, and vision-language models all reduce to the same five stages. Once you see the pipeline, the papers stop looking like separate fields.

Updated · 3 min read

Fractional CTO · Senior Engineer

Key takeaways

  • A modern computer vision pipeline has five core stages: input, preprocessing, backbone, task head and post-processing, with an optional neck between backbone and head.
  • The backbone turns pixels into features, and the head turns those features into a label, boxes or a mask.
  • Classification, detection and segmentation mostly share the early stages and differ in the head and the final clean-up.

The first time I read a detection paper after only knowing classification, it felt like a different field. Anchor boxes, non-max suppression, feature pyramids — none of it resembled the ResNet-and-softmax pipeline I'd learned first. It took building a few of these systems end to end to notice that it wasn't actually a different field. It was the same five-stage pipeline with a different last stage bolted on.

The same pipeline, task by task
TaskNeckHead predictsPost-processing
ClassificationUsually noneOne score per classTake the top score
Object detectionUsuallyBoxes and classesNon-max suppression, in many models
SegmentationUsuallyA class for each pixelThresholds and mask clean-up
Image and text (CLIP)NoneA match score with textPick the closest text

The five stages of a computer vision pipeline

  1. Input
  2. Preprocessing
  3. Backbone
  4. Neckoptional
  5. Task head
  6. Post-processing

Input. An image, or a batch of frames, arrives in whatever resolution and format the source produces.

Preprocessing. Resize to a fixed input shape, normalize pixel values, and — during training only — apply augmentation (crops, flips, color jitter) so the model doesn't memorize the exact pixel statistics of the training set.

Backbone. A convolutional network (ResNet, EfficientNet) or a vision transformer (ViT) turns pixels into a feature map: a compressed spatial representation where nearby patterns in the image show up as similar activations. This is the expensive part, and it's almost always pretrained — trained once on a huge dataset like ImageNet, then reused, because learning good visual features from scratch on a small task-specific dataset rarely works as well.

Neck. Some architectures insert a stage that combines features at multiple scales — a Feature Pyramid Network, for instance — so the model can see both fine detail and broad context at once. Classification often skips this; detection and segmentation usually need it, because objects show up at wildly different sizes in the same image.

Task head. This is the only stage that actually differs between "tasks." A classification head is a single dense layer mapping pooled features to class scores. A detection head predicts a box location and a class per candidate region. A segmentation head predicts a class per pixel. Everything upstream of the head is shared machinery.

Post-processing. Most detection heads emit far more candidate boxes than there are real objects, so non-max suppression collapses overlapping predictions into one. (DETR is the well-known exception: it learns not to repeat itself.) Segmentation masks often get cleaned up with thresholding. Classification just takes the top score.

Why this view of computer vision helps

Once you see it this way, three things that used to look unrelated collapse into the same idea:

  • Transfer learning is reusing the backbone and swapping the head — because the backbone learned generally useful visual features, and the head is where task-specific behavior lives.
  • Multi-task models are one backbone feeding several heads at once — a single feature map doing double duty for, say, classification and segmentation, because the expensive part of the network doesn't need to be duplicated per task.
  • Foundation vision-language models (CLIP and its descendants) are what you get when the "head" stops being a fixed classifier and becomes a comparison against text embeddings instead — which is exactly why they can classify categories they were never explicitly trained on. The backbone-to-features idea didn't change; what changed is what sits on top of it.

A practical takeaway

When you're evaluating a new vision architecture or paper, the fastest way to understand it isn't to read the whole thing top to bottom — it's to identify which of the five stages it's actually innovating on. Most papers change exactly one stage (a new backbone, a new neck, a new head) and leave the rest standard. Once you know which slot the contribution goes in, the rest of the paper reads as implementation detail rather than a new mental model.

Choosing a starting point for your project

  1. Pick the head from the decision you need to make. If someone only needs to know whether a part is faulty, classification is enough. If they need to know where, use detection. If they need the exact area, use segmentation.
  2. Reuse a pretrained backbone. Training one from scratch rarely pays off on a small dataset.
  3. Spend your effort on data. Labels that disagree with each other limit every stage after them.
  4. Match the preprocessing. Resize and normalize images in production exactly as you did in training. A mismatch here is a common cause of a model that works in the notebook and fails live.
  5. Measure on images you did not collect on the same day. Lighting, cameras and angles change.

The last point is the visual version of testing an AI system on realistic inputs.

Common questions

What are the stages of a computer vision pipeline?

Input, preprocessing, backbone, an optional neck, task head and post-processing. The backbone extracts features, and the head turns them into the answer you need, such as a label, boxes or a mask.

What is a backbone in computer vision?

It is the part of the network that turns pixels into useful features. It is usually pretrained on a large dataset, such as ImageNet, and reused for many tasks.

What is the difference between object detection and segmentation?

Detection draws a box around each object. Segmentation labels the pixels that belong to it. Segmentation is more precise and usually costs more to label and train.

Sources and further reading

Abdul MoizFractional CTOSenior Engineer

About the author

I build production-grade AI applications, AI agents and data systems, fix AI-built apps, and help teams as a fractional CTO. I've spent seven years building software people rely on, including a media platform that grew to 2M+ users.

ShareXLinkedIn

Keep reading

Working on something like this?

Tell me about it on a free 30-minute call.