HyperAIHyperAI

Command Palette

Search for a command to run...

You Only Look Once : Détection d'objets unifiée et en temps réel

Joseph Redmon Santosh Divvala Ross Girshick Ali Farhadi

Résumé

Nous présentons YOLO, une nouvelle approche de la détection d'objets. Les travaux antérieurs sur la détection d'objets réutilisaient des classifieurs pour effectuer la détection. Nous reformulons plutôt la détection d'objets comme un problème de régression vers des boîtes englobantes spatialement séparées et les probabilités de classes associées. Un unique réseau de neurones prédit directement les boîtes englobantes et les probabilités de classes à partir d'images entières en une seule évaluation. Puisque l'ensemble du pipeline de détection est un réseau unique, il peut être optimisé de bout en bout directement sur la performance de détection. Notre architecture unifiée est extrêmement rapide. Notre modèle YOLO de base traite les images en temps réel à 45 images par seconde. Une version plus petite du réseau, Fast YOLO, traite 155 images par seconde tout en atteignant le double du mAP d'autres détecteurs en temps réel. Comparé aux systèmes de détection de l'état de l'art, YOLO commet davantage d'erreurs de localisation mais est moins susceptible de produire des faux positifs sur l'arrière-plan. Enfin, YOLO apprend des représentations très générales des objets. Il surpasse les autres méthodes de détection, notamment DPM et R-CNN, lorsqu'il s'agit de généraliser d'images naturelles vers d'autres domaines comme l'art.

One-sentence Summary

University of Washington, Allen Institute for AI, and Facebook AI Research propose YOLO, which reframes object detection as a single-network regression problem that predicts bounding boxes and class probabilities directly from full images, achieving 45 FPS in real time and outperforming DPM and R-CNN in cross-domain generalization to artwork.

Key Contributions

  • Introduces YOLO, a single convolutional network that reframes object detection as regression from full-image pixels to bounding box coordinates and class probabilities, enabling end-to-end optimization directly on detection performance.

  • Demonstrates real-time detection with the base YOLO model running at 45 frames per second on a Titan X GPU and Fast YOLO reaching 155 frames per second while achieving more than twice the mAP of other real-time detectors.

  • Shows that full-image context reduces background false positives to less than half those of Fast R-CNN, and that YOLO outperforms DPM and R-CNN when generalizing from natural images to artwork.

Introduction

The authors study object detection, a computer vision task where systems must identify what objects are present in an image, where they are located, and how they interact. This matters for applications such as autonomous driving, assistive vision devices, and responsive robotics, where fast and accurate perception is essential.

Prior detection methods mainly repurpose image classifiers by scanning many locations and scales, or by generating candidate regions before classification. These approaches often rely on complex, multi stage pipelines that must be trained separately, making them slower and harder to optimize. They can also struggle with background errors and limited contextual understanding.

To address these challenges, the authors introduce YOLO, which reformulates object detection as a single regression problem. Using one convolutional network, it directly predicts bounding boxes and class probabilities from the whole image. This design enables real time performance, stronger use of global context, and better generalization to new domains, while still trading off some accuracy on precise localization, especially for small objects.

Method

The authors leverage a unified convolutional detector that replaces a multi stage detection pipeline with a single neural network. The model uses features from the full input image to predict bounding boxes and class probabilities simultaneously, which allows the network to reason about the whole scene rather than treating detection as a sequence of independent proposals and classifiers.

The image is divided into an S×SS \times SS×S grid. If the center of an object falls into a grid cell, that grid cell is responsible for detecting the object. Each cell predicts BBB bounding boxes along with confidence scores. The confidence score expresses both the probability that the cell contains an object and the expected accuracy of the predicted box:

Confidence=Pr⁡(Object)×IOUpredtruth.\text{Confidence}=\Pr(\text{Object})\times \text{IOU}_{\text{pred}}^{\text{truth}}.Confidence=Pr(Object)×IOUpredtruth​.

If a cell contains no object, the desired confidence is zero. If it does contain an object, the confidence should approximate the intersection over union between the predicted box and the ground truth. Each box is represented by five values: center coordinates (x,y)(x,y)(x,y), width www, height hhh, and confidence. The center coordinates are parameterized as offsets relative to the corresponding grid cell, while the width and height are normalized with respect to the whole image.

Each grid cell also predicts conditional class probabilities, Pr⁡(Classi∣Object)\Pr(\text{Class}_i|\text{Object})Pr(Classi​∣Object). These probabilities are conditioned on the presence of an object in that cell. At inference time, the conditional class probabilities are multiplied by the box confidence to obtain a class specific score:

Pr⁡(Classi∣Object)×Pr⁡(Object)×IOUpredtruth=Pr⁡(Classi)×IOUpredtruth.\Pr(\text{Class}_i|\text{Object})\times \Pr(\text{Object})\times \text{IOU}_{\text{pred}}^{\text{truth}} = \Pr(\text{Class}_i)\times \text{IOU}_{\text{pred}}^{\text{truth}}.Pr(Classi​∣Object)×Pr(Object)×IOUpredtruth​=Pr(Classi​)×IOUpredtruth​.

This score encodes both the likelihood that a class appears in the box and how well the predicted box matches the object. For a standard configuration with S=7S=7S=7, B=2B=2B=2, and C=20C=20C=20, the network outputs a 7×7×307\times 7\times 307×7×30 prediction tensor.

The detector itself is implemented as a deep convolutional network. The early convolutional layers extract visual features, while the later fully connected layers produce the predicted probabilities and coordinates. The architecture contains 24 convolutional layers followed by 2 fully connected layers. Instead of using inception style modules, it alternates 1×11\times 11×1 reduction layers with 3×33\times 33×3 convolutional layers to control computational cost while preserving representational depth. The complete detector stack, from feature extraction to the final prediction tensor, is shown in the figure below:

A faster variant is obtained by reducing the number of convolutional layers and the number of filters in those layers. In this reduced model, the remaining training and testing procedure is unchanged.

Training begins with classification pretraining. The convolutional backbone, typically the first 20 convolutional layers of the detection network, is trained on a large classification dataset with added average pooling and a fully connected output layer. The pretrained weights are then transferred to detection by adding randomly initialized convolutional and fully connected layers. Because detection requires finer spatial detail, the input resolution is increased before detection training. The final layer uses a linear activation, while all preceding layers use leaky rectified linear activation:

ϕ(x)={x,if x>0,0.1x,otherwise.\phi(x)= \begin{cases} x, & \text{if } x>0,\\ 0.1x, & \text{otherwise}. \end{cases}ϕ(x)={x,0.1x,​if x>0,otherwise.​

The network is optimized with a multi part sum squared error objective. A direct squared loss is easy to minimize, but it can be poorly aligned with detection performance because it equally weights localization error and classification error, and it can over penalize empty grid cells. To address this, coordinate errors are weighted more heavily, while confidence errors for non object cells are downweighted. The weighting parameters are set to λcoord=5\lambda_{\text{coord}}=5λcoord​=5 and λnoobj=0.5\lambda_{\text{noobj}}=0.5λnoobj​=0.5. To reduce the disproportionate effect of localization error in small boxes, the model predicts the square root of box width and height:

L=λcoord∑i=0S2∑j=0B1ijobj[(xi−x^i)2+(yi−y^i)2]+λcoord∑i=0S2∑j=0B1ijobj[(wi−w^i)2+(hi−h^i)2]+∑i=0S2∑j=0B1ijobj(Ci−C^i)2+λnoobj∑i=0S2∑j=0B1ijnoobj(Ci−C^i)2+∑i=0S21iobj∑c∈classes(pi(c)−p^i(c))2.\begin{aligned} \mathcal{L} &= \lambda_{\text{coord}} \sum_{i=0}^{S^2} \sum_{j=0}^{B} \mathbb{1}_{ij}^{\text{obj}} \left[ (x_i-\hat{x}_i)^2+ (y_i-\hat{y}_i)^2 \right] \\ &\quad+ \lambda_{\text{coord}} \sum_{i=0}^{S^2} \sum_{j=0}^{B} \mathbb{1}_{ij}^{\text{obj}} \left[ (\sqrt{w_i}-\sqrt{\hat{w}_i})^2+ (\sqrt{h_i}-\sqrt{\hat{h}_i})^2 \right] \\ &\quad+ \sum_{i=0}^{S^2} \sum_{j=0}^{B} \mathbb{1}_{ij}^{\text{obj}} (C_i-\hat{C}_i)^2 \\ &\quad+ \lambda_{\text{noobj}} \sum_{i=0}^{S^2} \sum_{j=0}^{B} \mathbb{1}_{ij}^{\text{noobj}} (C_i-\hat{C}_i)^2 \\ &\quad+ \sum_{i=0}^{S^2} \mathbb{1}_{i}^{\text{obj}} \sum_{c\in\text{classes}} (p_i(c)-\hat{p}_i(c))^2. \end{aligned}L​=λcoord​i=0∑S2​j=0∑B​1ijobj​[(xi​−x^i​)2+(yi​−y^​i​)2]+λcoord​i=0∑S2​j=0∑B​1ijobj​[(wi​​−w^i​​)2+(hi​​−h^i​​)2]+i=0∑S2​j=0∑B​1ijobj​(Ci​−C^i​)2+λnoobj​i=0∑S2​j=0∑B​1ijnoobj​(Ci​−C^i​)2+i=0∑S2​1iobj​c∈classes∑​(pi​(c)−p^​i​(c))2.​

Here, 1iobj\mathbb{1}_{i}^{\text{obj}}1iobj​ indicates that an object appears in cell iii, and 1ijobj\mathbb{1}_{ij}^{\text{obj}}1ijobj​ indicates that the jjjth box predictor in cell iii is responsible for that object. Responsibility is assigned to the box predictor that currently has the highest IOU with the ground truth. This encourages different box predictors to specialize in different object sizes, aspect ratios, or categories.

Training uses a batch size of 64, momentum of 0.9, and weight decay of 0.0005. The learning rate is warmed up from 10−310^{-3}10−3 to 10−210^{-2}10−2 to avoid early divergence, then follows a staged decay schedule. Dropout is applied after the first fully connected layer to reduce co adaptation between units. Data augmentation is performed by applying random scaling and translation of up to 20 percent of the original image size, along with random adjustments of exposure and saturation by up to a factor of 1.5 in HSV color space.

At test time, detection requires only a single forward pass through the network. The grid based prediction design enforces spatial diversity, so multiple cells may sometimes predict overlapping boxes for the same object, especially for large objects or objects near grid cell boundaries. Non maximum suppression is used to remove duplicate detections while preserving the final class specific confidence scores.

Experiment

The experiments evaluate YOLO on PASCAL VOC, analyze its errors against Fast R-CNN, test cross-domain generalization to artwork, and verify real-time webcam deployment. YOLO is shown to provide an efficient real-time detection framework, while Fast R-CNN remains accurate but makes more background false positives, and the complementary error patterns allow YOLO to rescore Fast R-CNN detections and reduce those false positives. YOLO also generalizes better than proposal-based detectors to artwork by modeling object shape and spatial context, supporting its practical use in interactive real-time applications.

The table compares fast object detectors on PASCAL VOC 2007, highlighting YOLO as a detector that balances accuracy and speed well. Fast YOLO is described as the fastest detector while remaining substantially more accurate than other real-time systems, and the standard YOLO version improves accuracy over the fast version while still running well above real time. Fast YOLO is presented as the fastest detector with accuracy far above other real-time detectors. Standard YOLO trades some speed for a clear accuracy gain over Fast YOLO while remaining fast. YOLO stays competitive with Faster R-CNN variants while offering much higher throughput than the slower high accuracy detectors.

Combining the strongest Fast R-CNN with YOLO produces a notably larger gain on VOC 2007 than combining it with other Fast R-CNN variants. The improvement is attributed to YOLO making different mistakes, especially fewer background errors, rather than to generic model ensembling. Although both models are run separately, YOLO is fast enough that adding it does not introduce significant extra computation. YOLO gives Fast R-CNN a much larger performance boost than other Fast R-CNN models. Fast R-CNN ensemble combinations produce only small gains. The Fast R-CNN and YOLO combination adds little computational time because YOLO is fast.

On PASCAL VOC 2012, standalone YOLO trails the leading detection methods, while the combined Fast R-CNN + YOLO model is among the highest-scoring systems. The combination gives Fast R-CNN a notable improvement and moves it up the public leaderboard. YOLO also shows category-specific strengths and weaknesses, with lower performance on some small-object classes and better performance on classes such as cat and train. Fast R-CNN + YOLO is among the top performing methods in the leaderboard comparison. The combination improves Fast R-CNN by 2.3% mAP and raises its leaderboard ranking. YOLO is described as the only real-time detector in this comparison. YOLO performs relatively worse on some small-object classes and better on classes such as cat and train.

YOLO achieves the strongest person detection results among the listed methods on both natural images and artwork datasets. Its performance degrades less than other detectors when moving from VOC 2007 to the Picasso and People-Art datasets, indicating better cross-domain generalization. R-CNN is competitive on VOC 2007 but drops substantially on artwork, while DPM transfers more stable but lower-accuracy performance. YOLO leads the compared detectors across the reported natural-image and artwork person detection settings R-CNN performs well on natural images but loses much more accuracy on artwork datasets DPM maintains more stable performance across artwork datasets than R-CNN but starts from a lower baseline

Experiments evaluate YOLO on PASCAL VOC 2007 and 2012 and in cross-domain person detection, assessing real-time speed, standalone accuracy, complementary ensembling, and robustness to domain shift. On VOC, fast and standard YOLO variants demonstrate that the detector balances speed and accuracy, while combining YOLO with Fast R-CNN yields a larger gain than other fast model combinations because the detectors make different mistakes. Although standalone YOLO trails leading methods on VOC 2012, the combined model performs strongly and shows class-dependent behavior, with weaker results on small objects; person detection results further indicate that YOLO generalizes better to artwork than several compared detectors.


Créer de l'IA avec l'IA

De l'idée au lancement — accélérez votre développement IA avec le co-codage IA gratuit, un environnement prêt à l'emploi et le meilleur prix pour les GPU.

Codage assisté par IA
GPU prêts à l’emploi
Tarifs les plus avantageux

HyperAI Newsletters

Abonnez-vous à nos dernières mises à jour
Nous vous enverrons les dernières mises à jour de la semaine dans votre boîte de réception à neuf heures chaque lundi matin
Propulsé par MailChimp