• Stars
    star
    445
  • Rank 98,085 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 2 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[CVPR 2022 Oral & TPAMI 2024] MixFormer: End-to-End Tracking with Iterative Mixed Attention

MixFormer

The official implementation of the CVPR 2022 paper MixFormer: End-to-End Tracking with Iterative Mixed Attention

PWC

PWC

PWC

[Models and Raw results] (Google Driver) [Models and Raw results] (Baidu Driver: hmuv)

MixFormer_Framework

News

[Feb 10, 2023]

  • πŸ”₯πŸ”₯πŸ”₯ Code and models for MixViT and MixViT-ConvMAE are available now ! Thank Tianhui Song for helping us clean up the code.

[Feb 8, 2023]

  • Extended version has been available at https://arxiv.org/abs/2302.02814. In particular, the extented MixViT-L(ConvMAE) achieves AUC score of 73.3% on LaSOT. Besides, we design a new TrackMAE pre-training method for tracking. Code and models will be updated soon.

[Oct 26, 2022]

  • MixFormerL (based on MixViT-L) rank 1/41 on VOT2022-STb public dataset.
  • The VOT2022-RGBD and VOT2022-D winners of MixForRGBD and MixForD, implemented by Lai Simiao, are constructed upon our MixFormer.
  • The VOT2022-STs winner of MS-AOT employs MixFormer as a part of the tracker. The VOT2022-STb winner of APMT_MR employs the SPM proposed in MixFormer to select dynamic templates.

[Mar 29, 2022]

  • Our paper is selected for an oral presentation.

[Mar 21, 2022]

  • MixFormer is accepted to CVPR2022.
  • We release Code, models and raw results.

Highlights

✨ New transformer tracking framework

MixFormer is composed of a target-search mixed attention (MAM) based backbone and a simple corner head, yielding a compact tracking pipeline without an explicit integration module.

✨ End-to-end, post-processing-free

Mixformer is an end-to-end tracking framework without post-processing.

✨ Strong performance

Tracker VOT2020 (EAO) LaSOT (NP) GOT-10K (AO) TrackingNet (NP)
MixViT-L (ConvMAE) 0.567 82.8 - 90.3
MixViT-L 0.584 82.2 75.7 90.2
MixCvT 0.555 79.9 70.7 88.9
ToMP101* (CVPR2022) - 79.2 - 86.4
SBT-large* (CVPR2022) 0.529 - 70.4 -
SwinTrack* (Arxiv2021) - 78.6 69.4 88.2
Sim-L/14* (Arxiv2022) - 79.7 69.8 87.4
STARK (ICCV2021) 0.505 77.0 68.8 86.9
KeepTrack (ICCV2021) - 77.2 - -
TransT (CVPR2021) 0.495 73.8 67.1 86.7
TrDiMP (CVPR2021) - - 67.1 83.3
Siam R-CNN (CVPR2020) - 72.2 64.9 85.4
TREG (Arxiv2021) - 74.1 66.8 83.8

Install the environment

Use the Anaconda

conda create -n mixformer python=3.6
conda activate mixformer
bash install_pytorch17.sh

Data Preparation

Put the tracking datasets in ./data. It should look like:

${MixFormer_ROOT}
 -- data
     -- lasot
         |-- airplane
         |-- basketball
         |-- bear
         ...
     -- got10k
         |-- test
         |-- train
         |-- val
     -- coco
         |-- annotations
         |-- train2017
     -- trackingnet
         |-- TRAIN_0
         |-- TRAIN_1
         ...
         |-- TRAIN_11
         |-- TEST

Set project paths

Run the following command to set paths for this project

python tracking/create_default_local_file.py --workspace_dir . --data_dir ./data --save_dir .

After running this command, you can also modify paths by editing these two files

lib/train/admin/local.py  # paths about training
lib/test/evaluation/local.py  # paths about testing

Train MixFormer

Training with multiple GPUs using DDP. More details of other training settings can be found at tracking/train_mixformer_[cvt/vit/convmae].sh for different backbone respectively.

# MixFormer with CVT backbone
bash tracking/train_mixformer_cvt.sh

# MixFormer with ViT backbone
bash tracking/train_mixformer_vit.sh

# MixFormer with ConvMAE backbone
bash tracking/train_mixformer_convmae.sh

Test and evaluate MixFormer on benchmarks

  • LaSOT/GOT10k-test/TrackingNet/OTB100/UAV123. More details of test settings can be found at tracking/test_mixformer_[cvt/vit/convmae].sh
bash tracking/test_mixformer_cvt.sh
bash tracking/test_mixformer_vit.sh
bash tracking/test_mixformer_convmae.sh
  • VOT2020
    Before evaluating "MixFormer+AR" on VOT2020, please install some extra packages following external/AR/README.md. Also, the VOT toolkit is required to evaluate our tracker. To download and instal VOT toolkit, you can follow this tutorial. For convenience, you can use our example workspaces of VOT toolkit under external/vot20/ by setting trackers.ini.
cd external/vot20/<workspace_dir>
vot evaluate --workspace . MixFormerPython
# generating analysis results
vot analysis --workspace . --nocache

Run MixFormer on your own video

bash tracking/run_video_demo.sh

Compute FLOPs/Params and test speed

bash tracking/profile_mixformer.sh

Visualize attention maps

bash tracking/vis_mixformer_attn.sh

vis_attn

Model Zoo and raw results

The trained models and the raw tracking results are provided in the [Models and Raw results] (Google Driver) or [Models and Raw results] (Baidu Driver: hmuv).

Contact

Yutao Cui: [email protected]

Acknowledgments

  • Thanks for PyTracking Library and STARK Library, which helps us to quickly implement our ideas.
  • We use the implementation of the CvT from the official repo CvT.

✏️ Citation

If you think this project is helpful, please feel free to leave a star⭐️ and cite our paper:

@inproceedings{cui2022mixformer,
  title={Mixformer: End-to-end tracking with iterative mixed attention},
  author={Cui, Yutao and Jiang, Cheng and Wang, Limin and Wu, Gangshan},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={13608--13618},
  year={2022}
}
@misc{cui2023mixformer,
      title={MixFormer: End-to-End Tracking with Iterative Mixed Attention}, 
      author={Yutao Cui and Cheng Jiang and Gangshan Wu and Limin Wang},
      year={2023},
      eprint={2302.02814},
      archivePrefix={arXiv}
}

More Repositories

1

VideoMAE

[NeurIPS 2022 Spotlight] VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training
Python
1,295
star
2

TDN

[CVPR 2021] TDN: Temporal Difference Networks for Efficient Action Recognition
Python
366
star
3

EMA-VFI

[CVPR 2023] Extracting Motion and Appearance via Inter-Frame Attention for Efficient Video Frame Interpolatio
Python
339
star
4

SparseBEV

[ICCV 2023] SparseBEV: High-Performance Sparse 3D Object Detection from Multi-Camera Videos
Python
328
star
5

MOC-Detector

[ECCV 2020] Actions as Moving Points
Python
264
star
6

AdaMixer

[CVPR 2022 Oral] AdaMixer: A Fast-Converging Query-Based Object Detector
Jupyter Notebook
236
star
7

CamLiFlow

[CVPR 2022 Oral & TPAMI 2023] Learning Optical Flow and Scene Flow with Bidirectional Camera-LiDAR Fusion
Python
216
star
8

SparseOcc

[ECCV 2024] Fully Sparse 3D Occupancy Prediction & RayIoU Evaluation Metric
Python
199
star
9

MeMOTR

[ICCV 2023] MeMOTR: Long-Term Memory-Augmented Transformer for Multi-Object Tracking
Python
141
star
10

MixFormerV2

[NeurIPS 2023] MixFormerV2: Efficient Fully Transformer Tracking
Python
136
star
11

SportsMOT

[ICCV 2023] SportsMOT: A Large Multi-Object Tracking Dataset in Multiple Sports Scenes
Python
133
star
12

SADRNet

[TIP 2021] SADRNet: Self-Aligned Dual Face Regression Networks for Robust 3D Dense Face Alignment and Reconstruction
Python
126
star
13

MultiSports

[ICCV 2021] MultiSports: A Multi-Person Video Dataset of Spatio-Temporally Localized Sports Actions
Python
106
star
14

FCOT

[CVIU] Fully Convolutional Online Tracking
Python
91
star
15

MMN

[AAAI 2022] Negative Sample Matters: A Renaissance of Metric Learning for Temporal Grounding
Python
88
star
16

RTD-Action

[ICCV 2021] Relaxed Transformer Decoders for Direct Action Proposal Generation
Python
86
star
17

MOTIP

Multiple Object Tracking as ID Prediction
Python
84
star
18

BCN

[ECCV 2020] Boundary-Aware Cascade Networks for Temporal Action Segmentation
Python
84
star
19

LinK

[CVPR 2023] LinK: Linear Kernel for LiDAR-based 3D Perception
Python
81
star
20

MixSort

[ICCV2023] MixSort: The Customized Tracker in SportsMOT
Python
69
star
21

CPD-Video

Learning Spatiotemporal Features via Video and Text Pair Discrimination
Python
60
star
22

SGM-VFI

[CVPR 2024] Sparse Global Matching for Video Frame Interpolation with Large Motion
Python
59
star
23

Structured-Sparse-RCNN

[CVPR 2022] Structured Sparse R-CNN for Direct Scene Graph Generation
Jupyter Notebook
57
star
24

TRACE

[ICCV 2021] Target Adaptive Context Aggregation for Video Scene Graph Generation
Python
57
star
25

CRCNN-Action

Context-aware RCNN: a Baseline for Action Detection in Videos
Python
53
star
26

STMixer

[CVPR 2023] STMixer: A One-Stage Sparse Action Detector
Python
49
star
27

BasicTAD

BasicTAD: an Astounding RGB-Only Baselinefor Temporal Action Detection
Python
48
star
28

DDM

[CVPR 2022] Progressive Attention on Multi-Level Dense Difference Maps for Generic Event Boundary Detection
Python
48
star
29

VideoMAE-Action-Detection

[NeurIPS 2022 Spotlight] VideoMAE for Action Detection
Python
47
star
30

MGSampler

[ICCV 2021] MGSampler: An Explainable Sampling Strategy for Video Action Recognition
Python
46
star
31

FSL-Video

[BMVC 2021] A Closer Look at Few-Shot Video Classification: A New Baseline and Benchmark
Python
39
star
32

BIVDiff

[CVPR 2024] BIVDiff: A Training-free Framework for General-Purpose Video Synthesis via Bridging Image and Video Diffusion Models
Python
39
star
33

PointTAD

[NeurIPS 2022] PointTAD: Multi-Label Temporal Action Detection with Learnable Query Points
Python
37
star
34

TemporalPerceiver

[T-PAMI 2023] Temporal Perceiver: A General Architecture for Arbitrary Boundary Detection
Python
34
star
35

TIA

[CVPR 2022] Task-specific Inconsistency Alignment for Domain Adaptive Object Detection
Python
33
star
36

CoMAE

[AAAI 2023] CoMAE: Single Model Hybrid Pre-training on Small-Scale RGB-D Datasets
Python
31
star
37

PDPP

[CVPR 2023 Hightlight] PDPP: Projected Diffusion for Procedure Planning in Instructional Videos
Python
27
star
38

JoMoLD

[ECCV 2022] Joint-Modal Label Denoising for Weakly-Supervised Audio-Visual Video Parsing
Python
27
star
39

EVAD

[ICCV 2023] Efficient Video Action Detection with Token Dropout and Context Refinement
Python
24
star
40

CGA-Net

[CVPR 2021] CGA-Net: Category Guided Aggregation for Point Cloud Semantic Segmentation
Python
23
star
41

SSD-LT

[ICCV 2021] Self Supervision to Distillation for Long-Tailed Visual Recognition
Python
22
star
42

TREG

Target Transformed Regression for Accurate Tracking
Python
21
star
43

VFIMamba

VFIMamba: Video Frame Interpolation with State Space Models
Python
21
star
44

DEQDet

[ICCV 2023] Deep Equilibrium Object Detection
Jupyter Notebook
20
star
45

MGMAE

[ICCV 2023] MGMAE: Motion Guided Masking for Video Masked Autoencoding
Python
19
star
46

OCSampler

[CVPR 2022] OCSampler: Compressing Videos to One Clip with Single-step Sampling
Python
17
star
47

SportsHHI

[CVPR 2024] SportsHHI: A Dataset for Human-Human Interaction Detection in Sports Videos
Python
11
star
48

APP-Net

[TIP] APP-Net: Auxiliary-point-based Push and Pull Operations for Efficient Point Cloud Recognition
Python
11
star
49

AMD

[CVPR 2024] Asymmetric Masked Distillation for Pre-Training Small Foundation Models
Python
11
star
50

StageInteractor

[ICCV 2023] StageInteractor: Query-based Object Detector with Cross-stage Interaction
Python
9
star
51

SPLAM

[ECCV 2024 Oral] SPLAM: Accelerating Image Generation with Sub-path Linear Approximation Model
Python
9
star
52

CMPT

[IJCV 2021] Cross-Modal Pyramid Translation for RGB-D Scene Recognition
Python
8
star
53

VLG

VLG: General Video Recognition with Web Textual Knowledge (https://arxiv.org/abs/2212.01638)
Python
8
star
54

DGN

[IJCV 2023] Dual Graph Networks for Pose Estimation in Crowded Scenes
Python
7
star
55

Dynamic-MDETR

[TPAMI 2024] Dynamic MDETR: A Dynamic Multimodal Transformer Decoder for Visual Grounding
Python
7
star
56

BFRNet

Python
6
star
57

ViT-TAD

[CVPR 2024] Adapting Short-Term Transformers for Action Detection in Untrimmed Videos
Python
6
star
58

VideoEval

VideoEval: Comprehensive Benchmark Suite for Low-Cost Evaluation of Video Foundation Model
Python
6
star
59

ZeroI2V

[ECCV 2024] ZeroI2V: Zero-Cost Adaptation of Pre-trained Transformers from Image to Video
Python
5
star
60

PRVG

[CVIU 2024] End-to-end dense video grounding via parallel regression
Python
5
star
61

LogN

[IJCV 2024] Logit Normalization for Long-Tail Object Detection
Python
4
star