shunxing1234
commited on
Commit
•
fd6cef9
1
Parent(s):
2b471f4
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# BriVL
|
2 |
+
|
3 |
+
|
4 |
+
BriVL (Bridging Vision and Language Model) 是首个中文通用图文多模态大规模预训练模型。BriVL模型在图文检索任务上有着优异的效果,超过了同期其他常见的多模态预训练模型(例如UNITER、CLIP)。
|
5 |
+
|
6 |
+
BriVL论文:[WenLan: Bridging Vision and Language by Large-Scale Multi-Modal Pre-Training](https://arxiv.org/abs/2103.06561)
|
7 |
+
|
8 |
+
|
9 |
+
# 适用场景
|
10 |
+
|
11 |
+
适用场景示例:图像检索文本、文本检索图像、图像标注、图像零样本分类、作为其他下游多模态任务的输入特征等。
|
12 |
+
|
13 |
+
# 技术特色
|
14 |
+
|
15 |
+
1. BriVL使用对比学习算法将图像和文本映射到了同一特征空间,可用于弥补图像特征和文本特征之间存在的隔阂。
|
16 |
+
2. 基于视觉-语言弱相关的假设,除了能理解对图像的描述性文本外,也可以捕捉图像和文本之间存在的抽象联系。
|
17 |
+
3. 图像编码器和文本编码器可分别独立运行,有利于实际生产环境中的部署。
|
18 |
+
|
19 |
+
# 下载专区
|
20 |
+
|
21 |
+
|
22 |
+
| 模型 | 语言 | 参数量(单位:亿) | 文件(file) |
|
23 |
+
| --------- | ---- | ------------------ | --------------------------- |
|
24 |
+
| BriVL-1.0 | 中文 | 10亿 | BriVL-1.0-5500w.tar|
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
# 使用BriVL
|
29 |
+
|
30 |
+
### 搭建环境
|
31 |
+
|
32 |
+
```
|
33 |
+
# 环境要求
|
34 |
+
lmdb==0.99
|
35 |
+
timm==0.4.12
|
36 |
+
easydict==1.9
|
37 |
+
pandas==1.2.4
|
38 |
+
jsonlines==2.0.0
|
39 |
+
tqdm==4.60.0
|
40 |
+
torchvision==0.9.1
|
41 |
+
numpy==1.20.2
|
42 |
+
torch==1.8.1
|
43 |
+
transformers==4.5.1
|
44 |
+
msgpack_numpy==0.4.7.1
|
45 |
+
msgpack_python==0.5.6
|
46 |
+
Pillow==8.3.1
|
47 |
+
PyYAML==5.4.1
|
48 |
+
```
|
49 |
+
|
50 |
+
配置要求在requirements.txt中,可使用下面的命令:
|
51 |
+
|
52 |
+
|
53 |
+
```
|
54 |
+
pip install -r requirements.txt
|
55 |
+
```
|
56 |
+
|
57 |
+
|
58 |
+
### 特征提取与计算检索结果
|
59 |
+
|
60 |
+
```
|
61 |
+
cd evaluation/
|
62 |
+
bash test_xyb.sh
|
63 |
+
```
|
64 |
+
|
65 |
+
### 数据解释
|
66 |
+
现已放入3个图文对示例:
|
67 |
+
|
68 |
+
```
|
69 |
+
./data/imgs # 放入图像
|
70 |
+
./data/jsonls # 放入图文对描述
|
71 |
+
```
|
72 |
+
|
73 |
+
# 引用BriVL
|
74 |
+
|
75 |
+
```
|
76 |
+
@article{DBLP:journals/corr/abs-2103-06561,
|
77 |
+
author = {Yuqi Huo and
|
78 |
+
Manli Zhang and
|
79 |
+
Guangzhen Liu and
|
80 |
+
Haoyu Lu and
|
81 |
+
Yizhao Gao and
|
82 |
+
Guoxing Yang and
|
83 |
+
Jingyuan Wen and
|
84 |
+
Heng Zhang and
|
85 |
+
Baogui Xu and
|
86 |
+
Weihao Zheng and
|
87 |
+
Zongzheng Xi and
|
88 |
+
Yueqian Yang and
|
89 |
+
Anwen Hu and
|
90 |
+
Jinming Zhao and
|
91 |
+
Ruichen Li and
|
92 |
+
Yida Zhao and
|
93 |
+
Liang Zhang and
|
94 |
+
Yuqing Song and
|
95 |
+
Xin Hong and
|
96 |
+
Wanqing Cui and
|
97 |
+
Dan Yang Hou and
|
98 |
+
Yingyan Li and
|
99 |
+
Junyi Li and
|
100 |
+
Peiyu Liu and
|
101 |
+
Zheng Gong and
|
102 |
+
Chuhao Jin and
|
103 |
+
Yuchong Sun and
|
104 |
+
Shizhe Chen and
|
105 |
+
Zhiwu Lu and
|
106 |
+
Zhicheng Dou and
|
107 |
+
Qin Jin and
|
108 |
+
Yanyan Lan and
|
109 |
+
Wayne Xin Zhao and
|
110 |
+
Ruihua Song and
|
111 |
+
Ji{-}Rong Wen},
|
112 |
+
title = {WenLan: Bridging Vision and Language by Large-Scale Multi-Modal Pre-Training},
|
113 |
+
journal = {CoRR},
|
114 |
+
volume = {abs/2103.06561},
|
115 |
+
year = {2021},
|
116 |
+
url = {https://arxiv.org/abs/2103.06561},
|
117 |
+
archivePrefix = {arXiv},
|
118 |
+
eprint = {2103.06561},
|
119 |
+
timestamp = {Tue, 03 Aug 2021 12:35:30 +0200},
|
120 |
+
biburl = {https://dblp.org/rec/journals/corr/abs-2103-06561.bib},
|
121 |
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
122 |
+
}
|
123 |
+
```
|
124 |
+
|
125 |
+
|
126 |
+
|