• Stars
    star
    277
  • Rank 147,978 (Top 3 %)
  • Language
    Python
  • Created over 2 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

[CVPR2023] All in One: Exploring Unified Video-Language Pre-training

PWC

PWC

PWC

All-in-one

Code for the paper: All in One: Exploring Unified Video-Language Pre-training Arxiv

ppl

News

  • 2022.03.25 Update Readme.
  • 2022.06.07 Release the model AllInOne+ pre-trained on Eight Dataset (YTT+WebVid+HowTo+CC3+CC12+CoCo+VG+SBU).
  • 2022.05.07 AllInOne+ is released. The main different between AllInOne is the Image and Video Co-train.
  • 2022.03.14 The first version of AllInOne is released.

Install

1. PytorchLighting

In this work, we use PytorchLighting for distributed training with mixed precision. Install pytorch and PytorchLighting first.

conda create -n allinone python=3.7
source activate allinone
cd [Path_To_This_Code]
pip install -r requirements.txt

If all packages include ffmpeg installed, please skip step 2.

2. On-the-fly decode (may skip)

To speed up the pre-training, we adopt on-the-fly decode for fast IO. Install ffmpeg as below.

1. ffmpeg

sudo conda install -y ffmpeg

Please install the required packages if not included in the requirements.txt.

If you server cannot connect to http or install ffmpeg slowly. Please download static binary file from FFmpeg Static Builds and then add to path variable, as follows:

export PATH=[PATH_TO_Dir/]ffmpeg-git-20220108-amd64-static:$PATH

2. pytorch video

Install pytorchvideo (for data augmentation) as below:

pip install ffmpeg-python
pip install pytorchvideo

Download Pretrained Weights

We provide three pretrained weights in google driver.

Model PT Data Parameter Pretrained Weight Trained Log Hparams
All-in-one-Ti Webvid+HowTo 12M Google Driver Google Driver Google Driver
All-in-one-S Webvid+HowTo 33M Google Driver Google Driver Google Driver
All-in-one-B Webvid+HowTo 110M Google Driver Google Driver Google Driver
All-in-one-B+ Webvid+HowTo+
CC3
110M Google Driver Google Driver Google Driver
All-in-one-B+ Webvid+YTT+HowTo+
CC3+CC12+Coco+VG+SBU
110M Google Driver Google Driver Google Driver

After downloaded these pretrained weights, move them into pretrained dir.

mkdir pretrained
cp *.ckpt pretrained/

Compare with state-of-the-arts

Model Param Data Frames TGIF-Action TGIF-Frame MSR R@5 MSR R@10
ClipBERT 137M I:Coco+VG 8 x 2 82.9 59.4 49.2 63.5
VIOLET 198M V:Webvid+
I:CC3
16 87.1 - 63.0 73.4
All-in-one-S 33M V:WebVid+Howto 3 91.2 64.0 61.5 70.9
All-in-one-B 110M V:WebVid+Howto 3 92.9 64.2 67.0 77.1
All-in-one-B+ 110M V:Webvid+
I:CC3
3 95.4 67.2 68.1 77.3
All-in-one-B+ 110M V:Webvid+YTT+HowTo+
I:CC3+CC12+Coco+VG+SBU
3 96.3 68.5 70.3 79.2

I is short for Image and V is short for Video in this table.

Dataset Preparation

See DATA.md

Pre-training

Full Video Pre-training

See TRAIN.md

Co-training with Image Dataset (All-in-one+)

See COTRAIN.md

Evaluation on Downstream Tasks

See EVAL.md

By unified design and sparse sampling, AllInOne show much small flops.

Citation

If you find our work helps, please cite our paper.

@article{wang2022allinone,
  title={All in One: Exploring Unified Video-Language Pre-training},
  author={Wang, Alex Jinpeng and Ge, Yixiao and Yan, Rui and Ge Yuying and Lin, Xudong and Cai, Guanyu  and Wu, Jianping and Shan, Ying and Qie, Xiaohu and Shou, Mike Zheng},
  journal={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2023}
}

Contact

Email: awinyimgprocess at gmail dot com

If you have any problem or have difficult in reproducing the results reported in this code, you can email to me or open a question in issues. We are also willing to merge the code if transfer our All-in-one to different tasks or datasets.

Acknowledgement

This work is mainly based on ViLT, Frozen and Merlot.

License

MIT

More Repositories

1

Awesome-Video-Diffusion

A curated list of recent diffusion models for video generation, editing, restoration, understanding, etc.
2,725
star
2

Show-1

Show-1: Marrying Pixel and Latent Diffusion Models for Text-to-Video Generation
Python
1,073
star
3

Tune-A-Video

Tune-A-Video: One-Shot Tuning of Image Diffusion Models for Text-to-Video Generation
Python
1,010
star
4

Image2Paragraph

[A toolbox for fun.] Transform Image into Unique Paragraph with ChatGPT, BLIP2, OFA, GRIT, Segment Anything, ControlNet.
Python
781
star
5

MotionDirector

MotionDirector: Motion Customization of Text-to-Video Diffusion Models.
Python
747
star
6

Show-o

Repository for Show-o, One Single Transformer to Unify Multimodal Understanding and Generation.
Python
684
star
7

Awesome-MLLM-Hallucination

📖 A curated list of resources dedicated to hallucination of multimodal large language models (MLLM).
340
star
8

VideoSwap

Code for [CVPR 2024] VideoSwap: Customized Video Subject Swapping with Interactive Semantic Point Correspondence
318
star
9

BoxDiff

[ICCV 2023] BoxDiff: Text-to-Image Synthesis with Training-Free Box-Constrained Diffusion
Python
239
star
10

DeVRF

The Pytorch implementation of "DeVRF: Fast Deformable Voxel Radiance Fields for Dynamic Scenes"
Python
178
star
11

EgoVLP

[NeurIPS2022] Egocentric Video-Language Pretraining
Python
140
star
12

VisorGPT

[NeurIPS 2023] Customize spatial layouts for conditional image synthesis models, e.g., ControlNet, using GPT
Python
129
star
13

Awesome-GUI-Agent

💻 A curated list of papers and resources for multi-modal Graphical User Interface (GUI) agents.
109
star
14

Awesome-Unified-Multimodal-Models

📖 This is a repository for organizing papers, codes and other resources related to unified multimodal models.
106
star
15

ShowAnything

Jupyter Notebook
79
star
16

cosmo

Python
70
star
17

loveu-tgve-2023

Official GitHub repository for the Text-Guided Video Editing (TGVE) competition of LOVEU Workshop @ CVPR'23.
Python
68
star
18

sparseformer

(ICLR 2024, CVPR 2024) SparseFormer
Python
62
star
19

datacentric.vlp

Compress conventional Vision-Language Pre-training data
Python
48
star
20

Region_Learner

The Pytorch implementation for "Video-Text Pre-training with Learned Regions"
Python
42
star
21

ShowRoom3D

This is the project page of ShowRoom3D
24
star
22

Long-form-Video-Prior

Python
22
star
23

DemoVLP

[Arxiv2022] Revitalize Region Feature for Democratizing Video-Language Pre-training
Python
21
star
24

CLVQA

[AAAI2023 (Oral)] Symbolic Replay: Scene Graph as Prompt for Continual Learning on VQA Task
Python
19
star
25

BYOC

[IEEE-VR 2024] Bring Your Own Character: A Holistic Solution for Automatic Facial Animation Generation of Customized Characters
C#
19
star
26

Q2A

[ECCV 2022] AssistQ: Affordance-centric Question-driven Task Completion for Egocentric Assistant
Python
18
star
27

HOSNeRF

This is the project page for the HOSNeRF
JavaScript
15
star
28

headshot

12
star
29

GEB-Plus

[ECCV 2022] GEB+: A Benchmark for Generic Event Boundary Captioning, Grounding and Retrieval
Python
12
star
30

Show-Anything-3D

Edit and Generate Anything in 3D world!
11
star
31

Awesome-Long-Context

A curated list of resources about long-context in large-language models and video understanding.
10
star
32

SCT

[IJCV2023] Offical implementation of "SCT: A Simple Baseline for Parameter-Efficient Fine-Tuning via Salient Channels"
Python
10
star
33

VisInContext

Official implementation of Leveraging Visual Tokens for Extended Text Contexts in Multi-Modal Learning
Python
9
star
34

LOVA3

The official repo of "Learning to Visual Question Answering, Asking and Assessment"
Python
9
star
35

SOIS

The Pytorch implementation of "Single-Stage Open-world Instance Segmentation with Cross-task Consistency Regularization"
8
star
36

AVA-AVD

Python
7
star
37

Efficient-CLS

[arXiv2022] Label-Efficient Online Continual Object Detection in Streaming Video
6
star
38

videollm-online

VideoLLM-online: Online Video Large Language Model for Streaming Video (CVPR 2024)
Python
6
star
39

Tune-An-Ellipse

[CVPR 2024] Tune-An-Ellipse: CLIP Has Potential to Find What You Want
6
star
40

mist

5
star
41

ColonNeRF

This is the project page for ColonNeRF.
JavaScript
4
star
42

DynVideo-E

This is the project page for DynVideo-E.
JavaScript
3
star
43

TTC-Tuning

Revisit Parameter-Efficient Transfer Learning: A Two-Stage Paradigm
2
star
44

assistq

SCSS
1
star