Object detection AI finds objects in an image and returns the coordinates where each labelled object is found. The two-stage family includes Faster R-CNN. Single-stage detectors include YOLO, which predicts boxes in one pass. Transformer detectors include DETR, RT-DETR and RF-DETR. Open-set detectors such as Grounding DINO take a text prompt instead of a fixed class list. Off-the-shelf models that work in demos can fail at the edge cases, lighting and throughput of a real deployment, the subject of why off-the-shelf computer vision models fail in production.
This guide covers the families and YOLO’s place among them, what a detector needs in labelled data, the edge cases that break public models, and how to choose between an API and a custom-trained detector.
Object Detection AI in 2025: The Model Families Worth Knowing
The families differ in how they turn an image into boxes.
| Family | Representative models | How it produces boxes | What the papers report |
|---|---|---|---|
| Two-stage | Faster R-CNN | A Region Proposal Network suggests candidate regions, then a second network classifies and refines them | 5 fps with a VGG-16 backbone on a GPU, with top accuracy on PASCAL VOC and COCO in its year (Ren et al., 2015) |
| Single-stage (YOLO) | YOLOv7, YOLO11, YOLO26 | One network predicts boxes and class probabilities in a single pass | The original YOLO ran at 45 fps and Fast YOLO at 155 fps (Redmon et al.) |
| Transformer (DETR line) | DETR, RT-DETR, RF-DETR | Set prediction with learned object queries, no anchors and no non-maximum suppression | RT-DETR-R50 reaches 53.1% AP on COCO at 108 FPS on a T4 GPU (Zhao et al.) |
| Open-set / open-vocabulary | Grounding DINO | A text prompt names what to find, and language features fuse with image features | 52.5 AP on COCO without seeing any COCO training images (Liu et al.) |
Treat the table as a map. The figures come from different papers, hardware and years, so they cannot be compared across rows. If you want to know how each family’s internals work, our explainer object detection explained goes deeper than this guide.
Where YOLO Fits
The YOLO26 review calls YOLO the most influential family of real-time detectors. A peer-reviewed review of YOLOv1 to YOLOv8 describes it as a central real-time detection system for robotics, driverless cars and video monitoring. Ultralytics released YOLO11 on 27 September 2024, and the company reports that YOLO11m reaches higher COCO mAP than YOLOv8m with 22% fewer parameters. YOLO26 followed in September 2025. It removes non-maximum suppression (NMS) in favour of native end-to-end predictions, and its authors report up to 43% faster CPU inference for the nano model than earlier YOLO versions.
The RT-DETR authors argue that NMS hurts YOLO’s speed and accuracy, and they built a real-time transformer that beats the YOLO models of its time on both. YOLO26 then took the NMS-free idea back into a convolutional design. RF-DETR’s 2x-large variant is, by its authors’ account, the first real-time detector to pass 60 AP on COCO. The YOLO26 review expects CNN and transformer principles to keep merging.
For a pipeline choice between the two dominant real-time families, our comparison of RT-DETR vs YOLO for production inspection pipelines covers the trade-off in more detail.
What Is the Difference Between One-Stage and Two-Stage Detectors?
A two-stage detector first proposes candidate regions, then a detection network classifies them. A one-stage detector predicts boxes and classes directly from the full image in one network evaluation.
Faster R-CNN is a classic two-stage design. Its Region Proposal Network shares convolutional features with the detection network, which makes proposals nearly free compared with older methods like Selective Search. In the Faster R-CNN paper’s own ablation, the two-stage system scored 58.7% mAP against 53.9% for a one-stage variant on the same ZF backbone. YOLO took the other road. It treats detection as a single regression problem, which gave it real-time speed. Its authors noted that it made more localisation errors than the leading detectors of the time but was far less likely to fire on background.
YOLOv7 reported 56.8% AP, at publication the highest among known real-time detectors running at 30 FPS or more on a V100. The practical difference today is less about accuracy and more about latency, how easily the model exports, and how many post-processing steps you have to tune. DETR-style transformers are a third option. They predict a set of objects directly and skip both proposals and NMS.
How Much Labelled Data Does a Detector Need?
The vendor guidance ranges from tens of images per class to thousands, and the low end is a minimum, not a target.
- Google Cloud Vertex AI requires at least 10 images per label, each with at least one box. Google recommends about 1,000 annotations per label and at most a 100x ratio between the most and least common label.
- Ultralytics recommends 1,500 or more images and 10,000 or more labelled instances per class for best YOLOv5 training results.
- Microsoft Azure Custom Vision suggests starting a prototype with 50 images per label. Microsoft also says the service is not optimal for subtle differences such as minor cracks or dents.
Vendors also stress that training data must match deployment. Google states that training data should be as close as possible to the prediction data, so blurry, low-resolution security-camera footage needs blurry, low-resolution training images. Ultralytics asks for images from different times of day, seasons, weather, lighting, angles and cameras. Ultralytics recommends starting from pretrained weights for small and medium datasets, and a 2025 small-object survey reports that transfer learning significantly reduces the labelled data needed.
One rule from Google’s documentation works well as a sanity check: if a human cannot be trained to assign a label after looking at an image for one or two seconds, the model probably cannot learn it either.
What Annotation Involves
For detection, annotation means drawing a box around each object of interest. Segmentation needs pixel-level labels that trace object boundaries. Ultralytics says labels must closely enclose each object, with no space between object and box.
Worked Example: Annotation Hours per Class
The assumptions are the published per-box times in Papadopoulos et al.: 35 seconds for one high-quality box drawn the traditional way, and 7 seconds with their extreme-clicking method, where the annotator clicks the four outermost points of the object.
- At Google’s recommended 1,000 annotations per label: 1,000 × 35 s = 35,000 s, about 9.7 hours per class. With extreme clicking: 1,000 × 7 s = 7,000 s, about 1.9 hours.
- At Ultralytics’ 10,000 instances per class: 10,000 × 35 s = 350,000 s, about 97 hours per class. With extreme clicking: 70,000 s, about 19 hours.
These hours cover drawing only. The Roboflow 100 benchmark gives a sense of real effort: its 100 practitioner datasets account for over 11,170 labelling hours.
What Kinds of Edge Cases Break Public Detection Models in Real Deployments?
Public models lose effectiveness on inputs shifted away from the distribution they were trained on.
Small objects. COCO defines a small object as one under 32×32 pixels. Small objects carry little spatial information, they can miss anchor and grid regions, and downsampling in convolutional networks strips their textures and edges. Ultralytics notes that datasets with many small objects benefit from training at native or higher resolution, such as 1280 instead of 640. When Vertex AI scales down an image whose smaller side exceeds 1024 pixels, it drops boxes smaller than 8×8 pixels.
Occlusion, clutter and noisy backgrounds. Dense arrangements hinder detection. The small-object survey singles out industrial defects surrounded by intricate machinery, as on production inspection lines, as a low signal-to-noise case.
A new camera location. One study trained models on images from twenty fixed camera traps. Performance was excellent at the training locations and poor at new ones. We read a fixed industrial or retail camera as the same situation.
Image corruption. On the Pascal-C, COCO-C and Cityscapes-C benchmarks, standard detectors fell to 30 to 60% of their original performance on corrupted images. Stylising the training images substantially improved robustness.
Natural distribution shift. On COCO-O, which covers sketches, weather, cartoons, paintings, tattoos and handmade objects, a Faster R-CNN detector lost 55.7% of its performance in relative terms. Higher clean COCO mAP did not mean better robustness. The detection transformers in that study had the worst out-of-distribution generalisation.
Plant conditions a dataset never saw. Our own analysis of benchmark vs production detection names a fixed mounting angle, LED panels flickering at 50 Hz and the class distribution as where a COCO-trained YOLO11 demo runs into trouble.
Rare and unseen classes. Grounding DINO’s authors report false positives they call hallucinations. On the PlantDoc dataset, with infrequent categories such as tomato leaf mosaic virus, it scored 0.36 against GLIP’s 1.1.
Why a High COCO Score Does Not Mean a Good Fit for Your Cameras
COCO is the standard object-detection benchmark. It has 330K images, 200K of them annotated, across 80 categories of everyday Flickr photos. Practitioner datasets in Roboflow 100 average only ten classes.
The metric adds its own blind spots. Mean Average Precision (mAP) ranks detected instances for each category across the whole dataset. The Optimal Correction Cost paper shows that a detector can ignore two of three images and still score the same mAP as one that handles all three. Its authors also found that bootstrapped mAP distributions overlap, so detector rankings can flip with the test set. AP gives no operating threshold, so its score rises as the confidence threshold approaches zero. The LRP paper shows that a single fixed threshold cannot be optimal for every class, rare classes especially.
The Roboflow 100 authors found that model performance across domains may run contrary to COCO rankings, and that zero-shot models such as GLIP generalise poorly to obscure domains even as they approach fine-tuned performance on COCO. Their conclusion: general benchmarks are a proxy, “there is no substitute for domain-specific training”. The full benchmark-to-production argument belongs on the benchmark vs production detection page.
Off-the-Shelf API or Custom-Trained Detector: How to Choose
Google’s AutoML detection models are optimised for real-world photographs of objects. When your images look nothing like that, a custom-trained detector is the answer. Google’s Cloud Vision object localisation, for example, returns bounding regions for both significant and less prominent objects in an image.
| Your situation | Leaning | Why |
|---|---|---|
| Common objects (people, vehicles, packages) in ordinary photos, accuracy tolerance is loose | Off-the-shelf API | The classes and image style match what general models were trained on |
| Prototype to test feasibility on a handful of labels | Managed custom training | Azure Custom Vision suggests starting with 50 images per label |
| Subtle defects such as cracks or dents | Custom-trained detector | Microsoft says Custom Vision is not optimal for subtle differences like these |
| New camera locations, corrupted images | Custom-trained detector on your own frames | Models trained at some camera locations generalised poorly to new ones; corrupted images cut performance to 30 to 60% |
| Classes you cannot list in advance | Open-set detector, with careful validation | Grounding DINO detects from text prompts but produces false positives |
| Latency on edge hardware matters | Model exported for the target runtime | YOLO26 exports to TensorRT, ONNX, CoreML and TFLite; see real-time detection throughput |
Two practical constraints also shape the choice.
The Ultralytics Licence
Under Ultralytics’ own guidance, using its code, models, architectures, training pipelines or fine-tuned models means one of two things. You open-source your entire project under AGPL-3.0, or you buy an Enterprise License. According to Ultralytics, this applies even if you train from scratch, use no pretrained weights, use YOLO only internally or for R&D, or serve it behind a SaaS API or inside an edge device. Compliance means publishing the complete source of the derivative work: the larger application, scripts, configuration files and, where applicable, model weights. Commercial products, proprietary software and embedded deployments in cameras or appliances need an Enterprise License unless fully open-sourced.
Check the licence before you write the first training script. In practice it decides whether YOLO is a free default or a line item, and whether a permissively licensed alternative is worth its integration cost.
Managed Services Can Be Retired
Microsoft has announced the planned retirement of Azure Custom Vision, with full support for existing customers until 25 September 2028. Microsoft encourages Custom Vision customers to plan and make their transition to alternative solutions within that window. A custom model you own does not have that dependency, but you carry its maintenance.
When the decision lands on a custom detector, the work is data collection that reflects the deployment, annotation, choosing a model family that fits the latency budget and licence, and validating on held-out frames from the real cameras. TechnoLynx’s computer vision R&D team can take on that work, from collecting deployment frames to validating on the real cameras.
The Choice That Matters More than the Model
Of the decisions above, the model family is the easiest to change later. Your training frames are harder to change. The COCO-O authors found that, without additional data, every detector they tested declined sharply on COCO-O. So before comparing detector architectures for robustness, settle whether your training set looks like what your cameras will actually see.