Skip to content

XiaRho/TGVFM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temporal-Guided Visual Foundation Models for Event-Based Vision

arXiv

🌞 TGVFM


Our Temporal-Guided Visual Foundation Models (TGVFM) introduce a unified framework that fuses event-based temporal information with pretrained Visual Foundation Models through a novel temporal context fusion block.

🛠️ Environment Setup

  • Create a conda virtual env and install the dependencies following the requirements.sh file.
bash requirements.sh

✨ Download the pretrained VFM models of Rein and our checkpoints of TGVFM-B_Seg and TGVFM-S_Seg

  1. Download our prepared zip file: TGVFM-checkpoints.zip

  2. Unzip the zip file in the ./checkpoints folder in the root directory of this repo.

  3. checkpoints data folder structure should look like this:

checkpoints
├── Rein_checkpoints
│   ├── ViT-B
│   │   ├── ...
│   ├── ViT-S
│   │   ├── ...
│   ├── TGVFM-B_Seg.pth
│   ├── TGVFM-S_Seg.pth

🔩 Preparing the DSEC Datasets

  1. Download our prepared zip file: dsec_dataset.zip

  2. Unzip the zip file in the ./ folder in the root directory of this repo.

  3. The DSEC dataset folder structure should look like this:

dsec_dataset
├── 62mask_gt_label_train_edges
│   ├── zurich_city_00_a
│   ├── ...
├── 62mask_test_edges
│   ├── zurich_city_13_a
│   ├── ...
├── train_semantic_segmentation
│   ├── zurich_city_00_a
│   ├── ...
├── test_semantic_labels
│   ├── zurich_city_13_a
│   ├── ...
  • The 62mask_gt_label_train_edges and 62mask_test_edges are reconstructed grayscale frames by our E2VID-B3.

🏝️ Semantic Segmentation

Training (TGVFM-S):

python main.py --config-file configs/rein_distill.py --num-gpus 1 --bs 2 --lr 5e-6 --temporal_block 4 --sequences_num 5 --memory_length 3 --student_vit_type S --seg_train_w_gt --tag TGVFM-S
  • Modify --student_vit_type S to --student_vit_type B to train TGVFM-B.

Testing with our provided checkpoints:

  1. TGVFM-S
python main.py --config-file configs/rein_distill.py --num-gpus 1 --bs 2 --lr 5e-6 --temporal_block 4 --sequences_num 5 --memory_length 3 --student_vit_type S --seg_train_w_gt --tag TGVFM-S_Eval --eval-only --init_from ./checkpoints/TGVFM-S_Seg.pth
  1. TGVFM-B
python main.py --config-file configs/rein_distill.py --num-gpus 1 --bs 2 --lr 5e-6 --temporal_block 4 --sequences_num 5 --memory_length 3 --student_vit_type B --seg_train_w_gt --tag TGVFM-B_Eval --eval-only --init_from ./checkpoints/TGVFM-B_Seg.pth
  • We have currently prepared only the code for supervised training of VGVFM on semantic segmentation. The distillation version and the related code for other tasks will be made public soon.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors