Home

Awesome

<div align="center"> <h1>ReST šŸ›Œ (ICCV2023)</h1> <h3>ReST: A Reconfigurable Spatial-Temporal Graph Model for Multi-Camera Multi-Object Tracking</h3>

Cheng-Che Cheng<sup>1</sup>Ā  Min-Xuan Qiu<sup>1</sup>Ā  Chen-Kuo Chiang<sup>2</sup>Ā  Shang-Hong Lai<sup>1</sup>Ā 

<sup>1</sup>National Tsing Hua University, Taiwan Ā <sup>2</sup>National Chung Cheng University, Taiwan

arXiv thecvf thecvf PWC

<!--- [![thecvf](https://img.shields.io/badge/CVF-Paper-7395C5.svg)](https://openaccess.thecvf.com/content/ICCV2023/papers/Cheng_ReST_A_Reconfigurable_Spatial-Temporal_Graph_Model_for_Multi-Camera_Multi-Object_Tracking_ICCV_2023_paper.pdf) [![thecvf](https://img.shields.io/badge/CVF-Supp-7395C5.svg)](https://openaccess.thecvf.com/content/ICCV2023/supplemental/Cheng_ReST_A_Reconfigurable_ICCV_2023_supplemental.pdf) ---> </div>

News

Introduction

ReST, a novel reconfigurable graph model, that first associates all detected objects across cameras spatially before reconfiguring it into a temporal graph for Temporal Association. This two-stage association approach enables us to extract robust spatial and temporal-aware features and address the problem with fragmented tracklets. Furthermore, our model is designed for online tracking, making it suitable for real-world applications. Experimental results show that the proposed graph model is able to extract more discriminating features for object tracking, and our model achieves state-of-the-art performance on several public datasets. <img src="https://github.com/chengche6230/ReST/blob/main/docs/method-overview.jpg" width="100%" height="100%"/>

Requirements

Installation

  1. Clone the project and create virtual environment

    git clone https://github.com/chengche6230/ReST.git
    conda create --name ReST python=3.8
    conda activate ReST
    
  2. Install (follow instructions):

    • torchreid
    • DGL (also check PyTorch/CUDA compatibility table below)
    • warmup_scheduler
    • py-motmetrics
    • Reference commands:
      # torchreid
      git clone https://github.com/KaiyangZhou/deep-person-reid.git
      cd deep-person-reid/
      pip install -r requirements.txt
      conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
      python setup.py develop
      
      # other packages (in /ReST)
      conda install -c dglteam/label/cu117 dgl
      pip install git+https://github.com/ildoonet/pytorch-gradual-warmup-lr.git
      pip install motmetrics
      
  3. Install other requirements

    pip install -r requirements.txt
    
  4. Download pre-trained ReID model

Datasets

  1. Place datasets in ./datasets/ as:
./datasets/
ā”œā”€ā”€ CAMPUS/
ā”‚   ā”œā”€ā”€ Garden1/
ā”‚   ā”‚   ā””ā”€ā”€ view-{}.txt
ā”‚   ā”œā”€ā”€ Garden2/
ā”‚   ā”‚   ā””ā”€ā”€ view-HC{}.txt
ā”‚   ā”œā”€ā”€ Parkinglot/
ā”‚   ā”‚   ā””ā”€ā”€ view-GL{}.txt
ā”‚   ā””ā”€ā”€ metainfo.json
ā”œā”€ā”€ PETS09/
ā”‚   ā”œā”€ā”€ S2L1/
ā”‚   ā”‚   ā””ā”€ā”€ View_00{}.txt
ā”‚   ā””ā”€ā”€ metainfo.json
ā”œā”€ā”€ Wildtrack/
ā”‚   ā”œā”€ā”€ sequence1/
ā”‚   ā”‚   ā””ā”€ā”€ src/
ā”‚   ā”‚       ā”œā”€ā”€ annotations_positions/
ā”‚   ā”‚       ā””ā”€ā”€ Image_subsets/
ā”‚   ā””ā”€ā”€ metainfo.json
ā””ā”€ā”€ {DATASET_NAME}/ # for customized dataset
    ā”œā”€ā”€ {SEQUENCE_NAME}/
    ā”‚   ā””ā”€ā”€ {ANNOTATION_FILE}.txt
    ā””ā”€ā”€ metainfo.json
  1. Prepare all metainfo.json files (e.g. frames, file pattern, homography)
  2. Run for each dataset:
    python ./src/datasets/preprocess.py --dataset {DATASET_NAME}
    
    Check ./datasets/{DATASET_NAME}/{SEQUENCE_NAME}/output if there is anything missing:
    /output/
    ā”œā”€ā”€ gt_MOT/ # for motmetrics
    ā”‚   ā””ā”€ā”€ c{CAM}.txt
    ā”œā”€ā”€ gt_train.json
    ā”œā”€ā”€ gt_eval.json
    ā”œā”€ā”€ gt_test.json
    ā””ā”€ā”€ {DETECTOR}_test.json # if you want to use other detector, e.g. yolox_test.json
    
  3. Prepare all image frames as {FRAME}_{CAM}.jpg in /output/frames.

Model Zoo

Download trained weights if you need, and modify TEST.CKPT_FILE_SG & TEST.CKPT_FILE_TG in ./configs/{DATASET_NAME}.yml.

DatasetSpatial GraphTemporal Graph
Wildtracksequence1sequence1
CAMPUSGarden1<br>Garden2<br>ParkinglotGarden1<br>Garden2<br>Parkinglot
PETS-09S2L1S2L1

Training

To train our model, basically run the command:

python main.py --config_file ./configs/{DATASET_NAME}.yml

In {DATASET_NAME}.yml:

Testing

python main.py --config_file ./configs/{DATASET_NAME}.yml

In {DATASET_NAME}.yml:

DEMO

Wildtrack

<img src="https://github.com/chengche6230/ReST/blob/main/docs/ReST_demo_Wildtrack.gif" width="65%" height="65%"/>

Acknowledgement

Citation

If you find this code useful for your research, please cite our paper

@InProceedings{Cheng_2023_ICCV,
    author    = {Cheng, Cheng-Che and Qiu, Min-Xuan and Chiang, Chen-Kuo and Lai, Shang-Hong},
    title     = {ReST: A Reconfigurable Spatial-Temporal Graph Model for Multi-Camera Multi-Object Tracking},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2023},
    pages     = {10051-10060}
}