👁️

Object Detection - YOLO-S

🛠

Pure Transformer Object Detection

Detects and localizes objects in images. Lighter weight than DETR (30.7M vs 41.6M parameters) while achieving competitive accuracy. Efficient for real-time applications.

What it does

YOLOS (You Only Look at One Sequence) detects objects in images using pure transformer architecture. Unlike other detection methods that rely on convolutional neural networks, YOLOS applies transformers directly to image patches, treating detection as a sequence-to-sequence prediction problem. Point it at any photo, and it returns a list of detected objects with precise locations (bounding boxes) and confidence scores. Can detect 80+ object types with competitive speed and accuracy.

Problem it solves

  • Lightweight object detection – Smaller, faster model than ResNet-based detectors
  • Pure transformer detection – No convolutional backbone, end-to-end transformer
  • Detect multiple objects in a single image (people, animals, vehicles, furniture, etc.)
  • Localize objects with precise bounding boxes showing where each object is
  • Real-time object detection for applications where model size/speed matter
  • General-purpose detection across 80+ object categories
  • Batch processing for efficient large-scale image analysis
  • Mobile/edge-friendly – Smaller model size for deployment

Input/Output

  • Input: RGB image (variable size, internally normalized)
  • image
  • Output: Object detections with class labels and bounding boxes
    • Class label: What the object is (e.g., "person", "dog", "car", "chair")
    • Bounding box: Location in image [x_min, y_min, x_max, y_max]
    • Confidence score: How sure (0.0–1.0, where 1.0 = 100% sure)
    • image

Performance

  • Quality by Object Type:
    • Large, distinct objects: Excellent detection (90%+ confidence)
    • Medium objects: Very good detection (70-85% confidence)
    • Small objects: Reasonable detection (50-70% confidence)
    • Occluded objects: May miss or detect as separate objects
    • Crowded scenes: Good, handles multiple
  • Advantages vs. DETR:
    • Simpler architecture: Pure transformer (no CNN backbone)
    • Smaller model: 25% fewer parameters
    • Faster inference: 15-30ms vs 20-50ms for DETR
    • Lower memory: More efficient GPU usage
    • Still competitive: Similar accuracy to DETR ResNet-50

Technical Details

Architecture
Vision Transformer (ViT-Small) for Object Detection
Components
Pure transformer applied directly to image patches—no convolutional backbone. Achieves competitive detection performance despite the simplicity.
Core Innovation
• Image-to-Patches Tokenization: Splits image into 16×16 patches and converts to embeddings • Vision Transformer Encoder (ViT-Small): 12 layers, 12 attention heads, 384 hidden dimensions • 100 Object Queries: Learnable embeddings that search for potential objects • Prediction Heads: Classification (80 COCO classes) and bounding box regression (x, y, w, h)
Training
• Pre-training: ImageNet-1k (200 epochs) for visual features • Fine-tuning: COCO 2017 (150 epochs, 80 object categories) • Loss: Bipartite matching (Hungarian algorithm) + cross-entropy classification + L1 + Generalized IoU localization • Optimizer: AdamW with standard transformer learning schedule
Requirements
• PyTorch (v1.7+) • HuggingFace Transformers • GPU recommended for inference

Compliance & Provenance

Provider
Open-source
Provider type
Specialized
License
Apache 2.0
EU AI Act risk class
Minimal Risk
Art. 50 transparency
Not applicable
Region availability
Available globally
Training data summary
Pending — provider has not yet published per Art. 53(d)

For more on how we classify models and mark outputs, see our AI Policy.

Model Source