Skip to content
Projects

About

Looped Transformer for Efficient Dense Visual Recognition

AI & Machine Learning

How these counts are measured

Measured star growth

in 24h
+2
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original
LoopDVR

Looped Transformer for Efficient Dense Visual Recognition

arXiv alphaXiv Webpage Live Demo

Sirui Liang1,2 · Xuanlong Yu2 · Longfei Liu2 · Xiaodong Cun1,📪 · Xi Shen2

1 GVC Lab, Great Bay University    2 Intellindust AI Lab

Object detection: COCO AP versus model parameters Instance segmentation: COCO AP versus model parameters Pose estimation: COCO AP versus model parameters

Achieving exceptional parameter efficiency via looped Transformer.

🖥️ Try LoopDVR in your browser! — Open↗

📋 TODO

  • If you find LoopDVR useful or interesting, please give us a Star🌟! Your support drives us to keep improving.
  • Fix bugs (If you encounter any issues, please feel free to open an issue or contact me! 🙏)
  • 🔥 Release paper!
  • 🔥 Release inference code and pretrained weights!

👀 Visualization Results

https://github.com/user-attachments/assets/73c1c8a5-d821-41e2-bb86-c9da4150077a

⚙️ Method

Overview

Overview of method

Looped Inference

LoopDVR attention visualization

🏆 Model Zoo

COCO val2017 results

Latency and peak memory are measured on an NVIDIA RTX 4090 D with batch size 1 and resolution 640 × 640 under FP16 using PyTorch (v2.11.0+cu128).

Object Detection

Model Params (M) Peak mem. (MiB) GFLOPs Latency (ms) AP Checkpoint
LoopDet-S 7.0 15.9 53.0 1.62 50.9 model
LoopDet-M 13.9 29.1 90.3 2.03 54.0 model
LoopDet-L 23.4 47.3 158.9 2.82 56.6 model
LoopDet-X 35.1 69.8 216.2 3.33 57.5 model

Instance Segmentation

Model Params (M) Peak mem. (MiB) GFLOPs Latency (ms) AP Checkpoint
LoopSeg-S 7.4 16.7 60.0 1.72 43.0 model
LoopSeg-M 14.6 30.5 101.4 2.18 45.5 model
LoopSeg-L 24.1 48.7 170.0 2.98 48.1 model
LoopSeg-X 35.8 71.2 227.3 3.47 48.9 model

Human Pose Estimation

Model Params (M) Peak mem. (MiB) GFLOPs Latency (ms) AP Checkpoint
LoopPose-S 7.7 26.3 58.1 2.98 68.2 model
LoopPose-M 14.6 39.5 98.3 3.24 71.8 model
LoopPose-L 24.6 58.7 169.1 3.98 72.9 model
LoopPose-X 36.3 82.0 229.7 4.46 74.3 model

🚀 Getting Started

📦 Installation

# clone this repo
git clone https://github.com/Intellindust-AI-Lab/LoopDVR
cd LoopDVR

# Create conda environment
conda create -n loopdvr python=3.11 -y
conda activate loopdvr

# Install dependencies
pip install -r requirements.txt

⏬ Download weights

Option 1: Download model weights automatically:

# Download all weights
python tools/download_weights.py

# Download LoopDet-S only (tasks: det / seg / pose)
python tools/download_weights.py --task-type det --model-size s

Option 2: Download the model weights you need from any of the following sources and place them in ./weights folder:

⚡ Inference

Place the matching checkpoint in weights/. For example, weights/loopdet-s.pth goes with configs/loopdet/loopdet-s.yaml. To run LoopDet-S on a local image named example.jpg:

python tools/infer.py \
    --config configs/loopdet/loopdet-s.yaml \
    --weights weights/loopdet-s.pth \
    --input example.jpg \
    --output outputs/boxes.png

Use --device cpu for CPU inference. The --threshold option controls the display score threshold (default 0.4).

📊 Evaluation

Set COCO_ROOT to COCO 2017 directory containing val2017/ and annotations/. Detection and segmentation use instances_val2017.json. Pose uses person_keypoints_val2017.json.

python tools/eval_coco.py \
    --config configs/loopdet/loopdet-s.yaml \
    --weights weights/loopdet-s.pth \
    --coco-root "$COCO_ROOT" \
    --output outputs/bbox.json

Evaluation runs in FP32, using batch size 4 by default. --batch-size and --workers to adjust evaluation settings.

❤️ Acknowledgements

We thank the authors of the following open-source projects that made this work possible: EdgeCrafter, RF-DETR, Raptor, and SReT.

📚 Citation

If you find this project useful in your research, please consider citing:

@article{liang2026loopdvr,
  title={{LoopDVR}: Looped Transformer for Efficient Dense Visual Recognition},
  author={Liang, Sirui and Yu, Xuanlong and Liu, Longfei and Cun, Xiaodong and Shen, Xi},
  journal={arXiv preprint arXiv:2611.32067},
  year={2026},
}

Explore related projects

Loading…