Skip to content

Latest commit

History

History
55 lines (33 loc) 路 2.64 KB

yolos.mdx

File metadata and controls

55 lines (33 loc) 路 2.64 KB

YOLOS

Overview

The YOLOS model was proposed in You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection by Yuxin Fang, Bencheng Liao, Xinggang Wang, Jiemin Fang, Jiyang Qi, Rui Wu, Jianwei Niu, Wenyu Liu. YOLOS proposes to just leverage the plain Vision Transformer (ViT) for object detection, inspired by DETR. It turns out that a base-sized encoder-only Transformer can also achieve 42 AP on COCO, similar to DETR and much more complex frameworks such as Faster R-CNN.

The abstract from the paper is the following:

Can Transformer perform 2D object- and region-level recognition from a pure sequence-to-sequence perspective with minimal knowledge about the 2D spatial structure? To answer this question, we present You Only Look at One Sequence (YOLOS), a series of object detection models based on the vanilla Vision Transformer with the fewest possible modifications, region priors, as well as inductive biases of the target task. We find that YOLOS pre-trained on the mid-sized ImageNet-1k dataset only can already achieve quite competitive performance on the challenging COCO object detection benchmark, e.g., YOLOS-Base directly adopted from BERT-Base architecture can obtain 42.0 box AP on COCO val. We also discuss the impacts as well as limitations of current pre-train schemes and model scaling strategies for Transformer in vision through YOLOS.

Tips:

  • One can use [YolosFeatureExtractor] for preparing images (and optional targets) for the model.
  • Contrary to DETR, YOLOS doesn't require a pixel_mask to be created.

This model was contributed by nielsr. The original code can be found here.

YolosConfig

[[autodoc]] YolosConfig

YolosFeatureExtractor

[[autodoc]] YolosFeatureExtractor - call - pad - post_process - post_process_segmentation - post_process_panoptic

YolosModel

[[autodoc]] YolosModel - forward

YolosForObjectDetection

[[autodoc]] YolosForObjectDetection - forward