forked from facebookresearch/mmf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] Add VinVL checkpoint and configs (facebookresearch#1159)
Summary: Pull Request resolved: facebookresearch#1159 Add the VinVL model checkpoints to the model zoo. Add the VinVL default configs. Test Plan: Imported from OSS Reviewed By: ebsmothers, apsdehal Differential Revision: D32698108 Pulled By: Ryan-Qiyu-Jiang fbshipit-source-id: 2a841d9293cee97b77a5847454e4348df99d8d00
- Loading branch information
1 parent
ea4a776
commit 7634dc7
Showing
3 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# VinVL | ||
|
||
This repository contains the code for pytorch implementation of VinVL model, released originally under this ([repo](https://github.com/microsoft/Oscar)). Please cite the following papers if you are using VinVL model from mmf: | ||
|
||
* Zhang, P., Li, X., Hu, X., Yang, J., Zhang, L., Wang, L., ... & Gao, J. (2021). *Vinvl: Revisiting visual representations in vision-language models*. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 5579-5588). ([arXiV](https://arxiv.org/abs/2101.00529)) | ||
``` | ||
@article{li2020oscar, | ||
title={Oscar: Object-Semantics Aligned Pre-training for Vision-Language Tasks}, | ||
author={Li, Xiujun and Yin, Xi and Li, Chunyuan and Hu, Xiaowei and Zhang, Pengchuan and Zhang, Lei and Wang, Lijuan and Hu, Houdong and Dong, Li and Wei, Furu and Choi, Yejin and Gao, Jianfeng}, | ||
journal={ECCV 2020}, | ||
year={2020} | ||
} | ||
@article{zhang2021vinvl, | ||
title={VinVL: Making Visual Representations Matter in Vision-Language Models}, | ||
author={Zhang, Pengchuan and Li, Xiujun and Hu, Xiaowei and Yang, Jianwei and Zhang, Lei and Wang, Lijuan and Choi, Yejin and Gao, Jianfeng}, | ||
journal={CVPR 2021}, | ||
year={2021} | ||
} | ||
``` | ||
|
||
Please see [https://mmf.sh/docs/projects/vilt](https://mmf.sh/docs/projects/vinvl) for more details on how to use the VinVL model. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
model_config: | ||
vinvl: | ||
do_pretraining: false | ||
heads: | ||
vqa2: | ||
type: mlp | ||
num_labels: 3129 | ||
|
||
dataset_config: | ||
vqa2: | ||
processors: | ||
text_processor: | ||
type: vinvl_text_tokenizer | ||
params: | ||
from_pretrained: bert-base-uncased | ||
corrupt_probability: 0 | ||
tokenizer_config: | ||
type: bert-base-uncased | ||
params: | ||
do_lower_case: true | ||
mask_probability: 0 | ||
|
||
training: | ||
clip_gradients: false | ||
lr_scheduler: true | ||
max_updates: 44000 | ||
checkpoint_interval: 4000 | ||
evaluation_interval: 4000 | ||
batch_size: 256 # 32 per GPU * 8 GPU | ||
find_unused_parameters: false | ||
log_interval: 1000 | ||
|
||
optimizer: | ||
type: adam_w | ||
params: | ||
lr: 1e-4 | ||
eps: 1e-8 | ||
weight_decay: 1e-2 | ||
|
||
|
||
scheduler: | ||
type: warmup_cosine | ||
params: | ||
num_warmup_steps: 4400 | ||
num_training_steps: ${training.max_updates} | ||
|
||
|
||
evaluation: | ||
metrics: | ||
- type: vqa_accuracy | ||
datasets: | ||
- vqa2 |