Skip to main content
QUICK REVIEW

[Paper Review] LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection

Qiang Chen, Xiangbo Su|arXiv (Cornell University)|Jun 5, 2024
Infrared Target Detection MethodologiesEngineering9 citations
TL;DR

LW-DETR introduces a light-weight DETR-based detector with a plain ViT encoder and a shallow DETR decoder, achieving higher accuracy and lower latency than YOLO-based real-time detectors across multiple model scales, aided by interleaved window/global attention and Objects365 pretraining.

ABSTRACT

In this paper, we present a light-weight detection transformer, LW-DETR, which outperforms YOLOs for real-time object detection. The architecture is a simple stack of a ViT encoder, a projector, and a shallow DETR decoder. Our approach leverages recent advanced techniques, such as training-effective techniques, e.g., improved loss and pretraining, and interleaved window and global attentions for reducing the ViT encoder complexity. We improve the ViT encoder by aggregating multi-level feature maps, and the intermediate and final feature maps in the ViT encoder, forming richer feature maps, and introduce window-major feature map organization for improving the efficiency of interleaved attention computation. Experimental results demonstrate that the proposed approach is superior over existing real-time detectors, e.g., YOLO and its variants, on COCO and other benchmark datasets. Code and models are available at (https://github.com/Atten4Vis/LW-DETR).

Motivation & Objective

  • Motivate real-time object detection with transformer-based backbones as an alternative to CNN-based YOLO models.
  • Propose a simple LW-DETR architecture combining ViT encoder, projector, and DETR decoder for efficiency.
  • Enhance training and inference efficiency using advanced loss, pretraining, interleaved attention, and window-major feature maps.
  • Demonstrate state-of-the-art real-time performance on COCO and cross-domain benchmarks.

Proposed method

  • Use a plain ViT encoder connected to a DETR decoder via a convolutional projector.
  • Aggregate multi-level encoder features to form richer representations.
  • Adopt interleaved window and global attentions to reduce encoder complexity.
  • Implement a window-major feature map organization to enable efficient interleaved attention.
  • Training with IoU-aware classification loss and standard DETR-style bbox losses, plus Objects365 pretraining.
  • Instantiate five LW-DETR variants (tiny, small, medium, large, xlarge) with scale-appropriate backbones, projector configurations, and decoder heads.
  • Use mixed-query selection combining content and spatial queries to form object queries.

Experimental results

Research questions

  • RQ1Can a light-weight DETR-based detector match or surpass state-of-the-art real-time CNN detectors (e.g., YOLO variants) in both speed and accuracy?
  • RQ2How do training enhancements (IoU-aware loss, more supervision, pretraining) and architectural simplifications (interleaved window/global attention, window-major maps) impact real-time DETR performance?
  • RQ3What is the impact of multi-scale feature aggregation and different projector configurations on detection quality and latency?
  • RQ4Is pretraining on large datasets like Objects365 essential for DETR-based real-time detectors to outperform CNN-based counterparts?

Key findings

  • LW-DETR tiny achieves 42.6 mAP at 500 FPS on a T4 GPU.
  • LW-DETR small achieves 48.0 mAP with over 340 FPS.
  • LW-DETR medium achieves 52.5 mAP with over 178 FPS.
  • LW-DETR large achieves 56.1 mAP at 113 FPS; xlarge achieves 58.3 mAP at 52 FPS.
  • LW-DETR consistently outperforms YOLOv8, RTMDet, and YOLO-NAS across scales on COCO val2017, with notable gains at larger models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.