Views
No views yet
conda create -n ViSFT python=3.8
conda activate ViSFTpip install --extra-index-url https://download.pytorch.org/whl/cu113 torch==1.12.0
pip install --extra-index-url https://download.pytorch.org/whl/cu113 torchvision==0.13.0
pip install --extra-index-url https://download.pytorch.org/whl/cu113 torchaudio==0.12.0 pip install --user git+https://github.com/microsoft/LoRAcd ./mmf/models/visft/ops
sudo sh make.sh
# back to root dir
cd ../../../../pip install -r requirements.txtDATA_PATH/
└── processed_datasets/
└─── coco_caption_hdf5_files
├──TEST_CAPLENS_coco_5_cap_per_img_5_min_word_freq.json
├──TEST_CAPTIONS_coco_5_cap_per_img_5_min_word_freq.json
├──TEST_IMAGES_coco_5_cap_per_img_5_min_word_freq.hdf5
├──TRAIN_CAPLENS_coco_5_cap_per_img_5_min_word_freq.json
├──TRAIN_CAPTIONS_coco_5_cap_per_img_5_min_word_freq.json
├──TRAIN_IMAGES_coco_5_cap_per_img_5_min_word_freq.hdf5
├──VAL_CAPLENS_coco_5_cap_per_img_5_min_word_freq.json
├──VAL_CAPTIONS_coco_5_cap_per_img_5_min_word_freq.json
├──VAL_IMAGES_coco_5_cap_per_img_5_min_word_freq.hdf5
└───WORDMAP_coco_5_cap_per_img_5_min_word_freq.jsonDATA_PATH/
└── public_datasets/
└─── coco
├──train2017
├──val2017
├──test2017
└───annotations
├──instances_train2017.json
├──instances_val2017.json
└───image_info_test-dev2017.jsonwget https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/eva_vit_g.pthbackbone_dir: path/eva_vit_g.pthbash ./scripts/stage1_train/eva_g/caption.sh
bash ./scripts/stage1_train/eva_g/detection.sh
bash ./scripts/stage1_train/eva_g/segment.shpython ./scripts/preprocess/extract_eva_e_vit.pybackbone_dir: path/EVA02_CLIP_E_psz14_plus_s9B_Visual.pt# can be executed in parallel
bash ./scripts/stage1_train/eva_e/caption.sh
bash ./scripts/stage1_train/eva_e/detection.sh
bash ./scripts/stage1_train/eva_e/segment.sh| In-domain Heads | ||
|---|---|---|
| EVA-G | EVA-E | |
| Caption Head | weights | weights |
| Segment Head | weights | weights |
| Detection Head | weights | weights |
backbone_dir: path/eva_vit_g.pth
caption_ckpt_path: 'path/eva_g_caption_heads.ckpt'
segment_ckpt_path:'path/eva_g_segment_heads.ckpt'
detection_ckpt_path: 'path/eva_g_detection_heads.ckpt'bash ./scripts/stage2_train/eva_g/stage2.shbackbone_dir: path/EVA02_CLIP_E_psz14_plus_s9B_Visual.pt
caption_ckpt_path: 'path/eva_e_caption_heads.ckpt'
segment_ckpt_path:'path/eva_e_segment_heads.ckpt'
detection_ckpt_path: 'path/eva_e_detection_heads.ckpt'bash ./scripts/stage2_train/eva_e/stage2.shpython ./scripts/postprocess/extract_lora_weights.py| LoRA weights | ||
|---|---|---|
| Iters | EVA-G | EVA-E |
| 5k | weights | weights |
| 10k | weights | weights |
| 15k | weights | weights |
| 20k | weights | weights |
| 50k | weights | weights |
@misc{jiang2024supervised,
title={Supervised Fine-tuning in turn Improves Visual Foundation Models},
author={Xiaohu Jiang and Yixiao Ge and Yuying Ge and Chun Yuan and Ying Shan},
year={2024},
eprint={2401.10222},
archivePrefix={arXiv},
primaryClass={cs.CV}
}