Roboflow

YOLOS Overview

YOLOS (You Only Look at One Sequence) is a transformer-based object detection model widely distributed through Hugging Face Transformers, released in June 2021 under the MIT license. It applies a minimally adapted Vision Transformer to object detection by representing both the image and detection tokens as a flat sequence processed by standard multi-head self-attention, without convolutional components or feature pyramid networks. The architecture demonstrates that detection can be performed without region proposals or multi-scale feature fusion.

YOLOS achieves moderate performance on COCO relative to purpose-built detectors, with its primary contribution being a demonstration of the transferability of ViT pre-training to detection tasks. It is most appropriate for research contexts exploring transformer-based detection architectures and for scenarios where architectural simplicity is preferred over peak accuracy.

YOLOS Details & Performance

Vision Tasks

Object Detection

Features

Real-Time Vision

Usage

Past 30 Days

Not available

Not in Playground

Performance

Avg. Latency

Arena Rankings

Not yet ranked in arena

YOLOS Explained

YOLOS (You Only Look At One Sequence) is an object detection model that applies the Vision Transformer architecture to detection tasks. It was designed to explore how transformer-based sequence modeling can replace convolutional backbones in object recognition.

YOLOS uses a Vision Transformer (ViT) style backbone instead of a convolutional neural network. Images are split into patches, which are treated as a sequence of tokens, similar to text tokens in NLP transformers.

The model consists of:

  • A transformer encoder that processes a sequence of image patch embeddings.
  • A detector head that maps the resulting sequence of detection representations to class labels and bounding box predictions.

YOLOS is considered a YOLO model because it processes the sequence of image patches once to produce detections, in line with the “You Only Look Once” paradigm.

Diagram of the YOLOS transformer encoder and detection head architecture
The YOLOS model architecture

Before YOLOS, YOLO models used convolutional neural networks as their backbone to extract image features. Different YOLO variants changed the exact CNN design, but all built the detection neck on top of a CNN backbone.

YOLOS differs from these models in several ways:

  • The backbone is a transformer encoder instead of a CNN.
  • Image patches are treated as a sequence, similar to tokens in NLP models.
  • Aside from the single-pass detection concept, the YOLOS network architecture does not share other structural components with previous YOLO models.

Transformers were first introduced for NLP in the “Attention is All You Need” paper and became a standard approach for sequence modeling. They are widely used to process sequences of text.

Later, transformers were adapted to computer vision through the Vision Transformer (ViT), which set new standards in image classification at the time. ViT treats an image as a sequence of patches, analogous to sequences of text tokens in models such as GPT and BERT.

YOLOS extends this idea from classification to object detection by using a ViT-style encoder as the backbone and adding a detection head.

The Vision Transformer for image classification
The Vision Transformer for image classification

YOLOS was not designed to be state of the art in accuracy. The original research positioned it as an exploration of transformers for object detection rather than a benchmark leader.

On the COCO dataset:

  • The YOLOS-B variant, reported as the best performing YOLOS model in the referenced summary, achieved an Average Precision (AP) of 42.0.
  • This result used 1000 pre-training epochs followed by 150 fine-tuning epochs.

Compared to other YOLO models on COCO:

  • The most performant YOLOS variant achieved 42.0 AP.
  • YOLOv7 E6E, which was a state-of-the-art model in November 2022, achieved 56.8 AP.
  • YOLOS does not reach the AP of YOLOv4 and more recent YOLO variants when benchmarked on COCO.

These comparisons indicate that YOLOS is primarily a research model for transformer-based detection rather than a leading choice for maximum accuracy.

Benchmark comparison of YOLOS vs YOLOv3-Tiny, YOLOv4-Tiny, and YOLOv7 E6E on COCO AP
YOLOS evaluation relative to comparable YOLO models (YOLOv3-Tiny, YOLOv4-Tiny)

YOLOS can be trained on custom datasets using the approach described in its original resources and repository. The training process follows the transformer-based design, with long pre-training and fine-tuning schedules reported for the YOLOS-B result on COCO.

For users whose main goal is the highest available performance on a custom dataset, other YOLO variants such as YOLOv5 are typically recommended over YOLOS. YOLOS is more suitable when the objective is to study or apply transformer-based architectures for object detection.

YOLOS is most appropriate in the following scenarios:

  • Research on transformer architectures for vision and detection.
  • Experiments that compare CNN backbones and transformer backbones within the YOLO paradigm.
  • Educational use to understand how ViT-style models can be adapted from classification to detection.

For production deployments that prioritize accuracy or mature ecosystem support, other YOLO models are generally preferred over YOLOS.

Alternatives to YOLOS

Other models worth comparing for similar use cases.

Meta
DETR
DETR (Detection Transformer) is an end-to-end object detection model developed by Facebook Research (Meta), released in May 2020. It is one of the first models to eliminate hand-crafted components such as anchor generation and non-maximum suppression by framing object detection as a direct set prediction problem, solved with a transformer encoder-decoder architecture built on top of a CNN backbone.DETR achieves 42.0% AP on the COCO benchmark with a ResNet-50 backbone, performing comparably to a well-tuned Faster R-CNN at the time of release. Its attention-based design allows it to reason about global context and long-range dependencies within an image. DETR is primarily used as a research baseline and architectural reference, with subsequent works such as Deformable DETR and DINO building on its foundations to address its slower training convergence and limited small-object detection capability.
Baidu
RT-DETR
RT-DETR (Real-Time Detection Transformer) is an object detection model developed by Baidu, released in April 2023 under the Apache 2.0 license. It is the first transformer-based real-time object detector, addressing the inference speed limitations of earlier DETR models through an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, enabling the model to process multi-scale features without the high computational overhead of standard transformer encoders.RT-DETR achieves 53.1% AP on COCO at 108 FPS on an NVIDIA T4 GPU for the RT-DETR-L variant, outperforming comparably sized YOLO detectors at similar speeds. It maintains end-to-end inference without non-maximum suppression, simplifying deployment pipelines. RT-DETR established the baseline for real-time transformer detection and has been extended by subsequent works including RF-DETR and RT-DETRv2.
RF-DETR
RF-DETR is a real-time transformer-based object detection model developed by Roboflow, with code and weights first released in March 2025 under the Apache 2.0 license. It is the first real-time model to exceed 60 AP on the Microsoft COCO benchmark, built on a DINOv2 vision transformer backbone with weight-sharing neural architecture search used to identify accuracy-latency trade-offs. The full family spans six sizes from Nano (30.5M parameters, 384×384 input) to 2XL (126.9M parameters, 880×880 input), with the accompanying research paper accepted to ICLR 2026.RF-DETR is designed for strong domain adaptability, achieving state-of-the-art performance on RF100-VL, a benchmark measuring generalization to real-world object detection tasks across diverse domains. It is deployable through Roboflow Inference and supports fine-tuning on custom datasets, making it well suited for domain-specific applications with limited training data.
YOLOv8
YOLOv8 is an object detection and multi-task vision model developed by Ultralytics, released in January 2023 under the AGPL-3.0 license. It succeeds YOLOv5 and introduces an anchor-free detection head, a new C2f module for improved gradient flow, and a decoupled head that separates classification and regression tasks. These changes improve both accuracy and training efficiency compared to earlier Ultralytics models.YOLOv8 supports object detection, instance segmentation, image classification, pose estimation, and oriented bounding box detection within a unified codebase. It is available in five sizes from Nano to Extra Large and exports to ONNX, TensorRT, CoreML, and other formats. YOLOv8 is one of the most widely adopted detection models in production and is directly supported by Roboflow Inference for custom model training and deployment.
YOLO11
YOLO11 is an object detection and multi-task vision model developed by Ultralytics, released in September 2024 under the AGPL-3.0 license. It is the latest generation in the Ultralytics YOLO series and supports object detection, instance segmentation, image classification, pose estimation, and oriented bounding box detection within a single unified framework. YOLO11 introduces architectural refinements that improve accuracy while reducing parameter count compared to YOLOv8 at equivalent model sizes.YOLO11 is available in five model sizes from Nano to Extra Large and is deployable through the Ultralytics Python package, Roboflow Inference, and export formats including ONNX, TensorRT, and CoreML. It supports fine-tuning on custom datasets through the standard Ultralytics training API.
DEIM
DEIM is a training framework for DETR-based object detection models released in December 2024 by researchers at Intellindust AI Lab, City University of Hong Kong, Great Bay University, and Hefei Normal University. It enhances existing real-time DETR architectures by improving the matcher used during training, enabling faster convergence and higher accuracy without modifying the inference architecture or adding computational overhead at deployment time. DEIM introduces two core techniques: Dense One-to-One (O2O) matching, which increases the number of positive matches per target, and Matchability-Aware Loss (MAL), which down-weights low-quality matches generated by the dense strategy. The paper was accepted at CVPR 2025.When integrated with RT-DETR and D-FINE, DEIM consistently improves performance while reducing training time by up to 50%. Applied to RT-DETRv2, it achieves 53.2% AP with a single day of training on an NVIDIA 4090 GPU. DEIM-enhanced models including DEIM-D-FINE-L and DEIM-D-FINE-X achieve 54.7% and 56.5% AP at 124 and 78 FPS respectively on an NVIDIA T4 GPU. DEIM is released under the Apache 2.0 license. A successor, DEIMv2, was released in September 2025, adding DINOv3-based backbones and introducing ultra-lightweight variants (Pico, Femto, and Atto) for edge deployment.

YOLOS License

MIT

License terms and commercial-use guidance for YOLOS.

This model is released under the MIT License, a short and permissive open-source license that allows commercial use, modification, and redistribution.

Read the full MIT license ↗

Yes. Under the terms of the MIT license, you can freely use this model for commercial purposes. You must retain the copyright notice and license text when redistributing.

License information is provided as a guide and is not legal advice.