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 (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:
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.

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:
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.

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:
Compared to other YOLO models on COCO:
These comparisons indicate that YOLOS is primarily a research model for transformer-based detection rather than a leading choice for maximum accuracy.

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:
For production deployments that prioritize accuracy or mature ecosystem support, other YOLO models are generally preferred over YOLOS.
Other models worth comparing for similar use cases.
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.
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.