The Vision Journalmodel cards for computer vision

Model library › Applications

Which Real-Time Object Detector Should You Actually Use?

Model card filed 2026-10-15

01 Overview

Real-time object detection is the task of locating and classifying multiple objects in a video stream or a sequence of images quickly enough to be useful in interactive or autonomous systems. Unlike offline detection, where accuracy is the primary concern, real-time detection imposes a strict latency budget, often measured in milliseconds per frame. The goal is to produce bounding boxes and class labels for every object of interest while maintaining a frame rate that keeps pace with the source, typically 30 frames per second or higher. This balance between speed and precision defines the design space of modern detectors.

Single-stage detectors have become the dominant approach for real-time applications because they predict boxes and classes in one forward pass through the network, avoiding the region proposal step of two-stage methods. This architectural choice reduces latency but can sacrifice some accuracy, especially for small or overlapping objects. The field continues to evolve with anchor-free designs, better feature fusion, and lightweight backbones, but the fundamental trade-off remains: you cannot simultaneously maximize speed, accuracy, and resource efficiency without compromise.

Choosing a detector is therefore an exercise in matching constraints to requirements. A system that must run on an embedded device with limited power will favor a smaller input size and a compact architecture, while a server-side application with a powerful GPU can afford a larger model and higher resolution. The sections that follow break down the key considerations for making that choice.

02 What the model is for

A real-time object detector is built to answer two questions for every frame: what objects are present, and where are they located? It outputs a set of bounding boxes, each with a class label and a confidence score. This makes it suitable for applications where immediate awareness of the scene is required, such as autonomous driving, robotics, video surveillance, and augmented reality. In these settings, delayed detections are often useless because the environment changes rapidly.

The model is not a general-purpose image understanding system. It does not describe relationships between objects, track them over time, or segment their exact shapes. Those tasks require additional components, such as trackers or segmentation heads. The detector's role is to provide a reliable snapshot of object locations at each time step, which downstream logic can then use for decision-making. For example, a retail analytics system might use detections to count people entering a store, while a drone might use them to avoid obstacles.

Because real-time detectors prioritize speed, they are often deployed in scenarios where recall matters more than precision, or vice versa, depending on the cost of false positives and false negatives. A security camera might tolerate occasional false alarms to avoid missing an intruder, whereas a robotic arm might need high precision to avoid grasping empty space. Understanding these operational priorities is essential before selecting a model.

03 The data it needs

Training a real-time object detector requires a dataset of images or video frames annotated with bounding boxes and class labels. The annotations must be consistent and accurate, as noisy labels directly degrade performance. The dataset should cover the range of object appearances, scales, lighting conditions, backgrounds, and occlusions that the model will encounter in deployment. For real-time applications, it is also important to include frames that represent motion blur and compression artifacts, which are common in live video.

The volume of data needed depends on the complexity of the task and the diversity of the objects. Simple tasks with a few distinct classes may require only a few thousand annotated images, while detecting many classes in cluttered scenes may need tens or hundreds of thousands. Data augmentation techniques, such as random cropping, flipping, color jitter, and mosaic augmentation, can artificially expand the dataset and improve robustness. However, augmentation cannot replace genuinely diverse data, especially for rare or safety-critical objects.

Class imbalance is a common challenge. If some classes appear far more frequently than others, the model may become biased toward the majority classes. Strategies such as oversampling, focal loss, or class-balanced sampling can help, but they require careful tuning. Additionally, the annotation process itself can be costly and time-consuming, so many practitioners start with a pre-trained model and fine-tune on a smaller, task-specific dataset. This transfer learning approach can reduce data requirements while still achieving acceptable performance.

04 Architecture in plain terms

A single-stage detector typically consists of three main parts: a backbone network, a neck, and a detection head. The backbone extracts features from the input image, often using a convolutional neural network that progressively reduces spatial resolution while increasing channel depth. Common backbones are designed for efficiency, using depthwise separable convolutions or lightweight blocks to keep computation low. The neck then combines features from different levels of the backbone to detect objects at multiple scales. This is often done with a feature pyramid network or a similar structure that upsamples and merges feature maps.

The detection head takes the fused features and predicts bounding boxes and class probabilities for each spatial location. In anchor-based detectors, the head predicts offsets relative to a set of predefined anchor boxes of various sizes and aspect ratios. Anchor-free detectors instead predict the box directly, often by regressing distances to the object's edges or by predicting keypoints. Both approaches have trade-offs: anchors can simplify learning but require tuning, while anchor-free methods reduce hyperparameters but may struggle with certain object shapes.

To achieve real-time speed, the architecture must be computationally efficient. This is often achieved by using a smaller input resolution, a lightweight backbone, and a reduced number of output layers. Some designs also employ techniques like separable convolutions, pruning, or quantization. The final model is typically a single network that can be trained end-to-end, which simplifies deployment compared to two-stage pipelines that require separate region proposal and classification steps.

05 Training and evaluation

Training a real-time detector involves optimizing a multi-part loss function that balances classification, localization, and sometimes objectness or confidence. The loss is computed over all predicted boxes and matched ground-truth boxes, using a matching strategy such as IoU-based assignment. Hard negative mining or focal loss is often used to address the imbalance between easy negatives and informative positives. The model is trained with stochastic gradient descent or a variant, using a learning rate schedule and regularization techniques like weight decay and dropout.

Evaluation is typically reported using mean Average Precision (mAP) at a specific Intersection over Union (IoU) threshold, such as 0.5 or a range from 0.5 to 0.95. mAP summarizes the precision-recall curve across all classes, providing a single number that reflects both localization and classification quality. However, mAP alone does not capture speed. Therefore, real-time detectors are often evaluated with a speed-accuracy trade-off curve, plotting mAP against frames per second (FPS) on a target hardware platform. This curve helps practitioners choose a model that meets their latency budget.

It is important to evaluate on a test set that reflects the deployment conditions, including variations in lighting, weather, and object density. Cross-validation can provide more robust estimates, but it is computationally expensive. Additionally, metrics like FPS are highly dependent on hardware, batch size, and software optimizations, so they should be measured on the actual target device. Finally, always consider the cost of false positives and false negatives in the context of the application; a model with slightly lower mAP but better recall for critical classes may be preferable.

06 Limitations and failure modes

Real-time object detectors are not perfect and can fail in predictable ways. Small objects are often missed because they occupy few pixels and may be lost in the downsampling of the backbone. Occluded objects, where only part of the object is visible, can be misclassified or ignored. Dense scenes with many overlapping objects challenge the non-maximum suppression step, which may incorrectly merge or discard valid detections. These issues are exacerbated when the input resolution is reduced to meet speed requirements.

Domain shift is another major limitation. A model trained on one dataset may perform poorly on another with different lighting, weather, camera angles, or object appearances. This is especially problematic in real-time applications where the environment can change dynamically. Additionally, real-time detectors are sensitive to motion blur and compression artifacts, which are common in live video streams. They may also struggle with unusual aspect ratios or object classes that were underrepresented in training.

Finally, the speed-accuracy trade-off means that no single model is best for all scenarios. A model that achieves high FPS on a high-end GPU may be too slow on an embedded device. Quantization and pruning can improve speed but may reduce accuracy. It is essential to validate the chosen model on the target hardware and with representative data, and to monitor performance over time as conditions change. No detector can guarantee correct results in all situations, so systems should include fallback mechanisms or human oversight where safety is critical.

07 Frequently asked questions

What input size should I use for real-time detection? The input size is a primary lever for speed. Smaller sizes like 320×320 or 416×416 yield higher FPS but may miss small objects. Larger sizes like 640×640 improve accuracy at the cost of speed. Start with the smallest size that meets your accuracy requirements on your hardware.

How do I choose between anchor-based and anchor-free detectors? Anchor-based models can be more accurate for datasets with varied object shapes but require tuning anchor sizes. Anchor-free models simplify the pipeline and often generalize better, but may need more training data. For real-time, both can be efficient; consider the availability of pre-trained weights and community support.

Can I use a real-time detector for tracking? Detection alone does not track objects across frames. You can combine a detector with a tracking algorithm, such as Kalman filters or simple IoU matching, to maintain identities. However, this adds complexity and may reduce overall throughput.

What hardware do I need? Real-time performance depends on the model, input size, and hardware. A modern GPU can run many detectors at high FPS, while embedded devices like mobile phones or edge TPUs require lighter models. Always benchmark on your target device.

How do I handle class imbalance? Use techniques like focal loss, oversampling, or data augmentation. Also, ensure your evaluation metrics reflect the importance of each class, and consider per-class thresholds.

Is it better to train from scratch or fine-tune? Fine-tuning a pre-trained model is almost always faster and requires less data. Train from scratch only if your domain is very different and you have a large, well-annotated dataset.