Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,87 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- laion/laion2B-en
|
5 |
+
- laion/laion-coco
|
6 |
+
- laion/laion2B-multi
|
7 |
+
- kakaobrain/coyo-700m
|
8 |
+
- conceptual_captions
|
9 |
+
- wanng/wukong100m
|
10 |
+
pipeline_tag: image-feature-extraction
|
11 |
+
---
|
12 |
+
|
13 |
+
# InternViT-300M-448px-V2_5
|
14 |
+
|
15 |
+
[\[π GitHub\]](https://github.com/OpenGVLab/InternVL) [\[π Blog\]](https://internvl.github.io/blog/) [\[π InternVL 1.0 Paper\]](https://arxiv.org/abs/2312.14238) [\[π InternVL 1.5 Report\]](https://arxiv.org/abs/2404.16821) [\[π Mini-InternVL Report\]](https://arxiv.org/abs/2410.16261)
|
16 |
+
|
17 |
+
[\[π¨οΈ Chat Demo\]](https://internvl.opengvlab.com/) [\[π€ HF Demo\]](https://huggingface.co/spaces/OpenGVLab/InternVL) [\[π Quick Start\]](#quick-start) [\[π Documents\]](https://internvl.readthedocs.io/en/latest/)
|
18 |
+
|
19 |
+
We further refined the InternViT-300M by incrementally pre-training the previous weights [InternViT-6B-448px-V1-5](https://huggingface.co/OpenGVLab/InternViT-6B-448px-V1-5) on a more diverse data mixture using the NTP loss, leading to the enhanced InternViT-300M-448px-V2.5. This update enhances the foundational capabilities of edge-side MLLMs.
|
20 |
+
|
21 |
+
<div align="center">
|
22 |
+
|
23 |
+
| Model Name | HF Link |
|
24 |
+
| :---------------------: | :----------------------------------------: |
|
25 |
+
|InternViT-300M-448px-V2_5|[π€ link](https://huggingface.co/OpenGVLab/InternViT-300M-448px-V2_5) |
|
26 |
+
|InternViT-6B-448px-V2_5|[π€ link](https://huggingface.co/OpenGVLab/InternViT-6B-448px-V2_5)|
|
27 |
+
|
28 |
+
</div>
|
29 |
+
|
30 |
+
## Model Details
|
31 |
+
|
32 |
+
- **Model Type:** vision foundation model, feature backbone
|
33 |
+
- **Model Stats:**
|
34 |
+
- Params (M): 304
|
35 |
+
- Image size: 448 x 448, training with 1 - 12 tiles
|
36 |
+
- **Pretrain Dataset:** LAION-en, LAION-zh, COYO, GRIT, COCO, TextCaps, Objects365, OpenImages, All-Seeing, Wukong-OCR, LaionCOCO-OCR, and other OCR-related datasets.
|
37 |
+
To enhance the OCR capability of the model, we have incorporated additional OCR data alongside the general caption datasets. Specifically, we utilized PaddleOCR to perform Chinese OCR on images from Wukong and English OCR on images from LAION-COCO.
|
38 |
+
|
39 |
+
## Model Usage (Image Embeddings)
|
40 |
+
|
41 |
+
```python
|
42 |
+
import torch
|
43 |
+
from PIL import Image
|
44 |
+
from transformers import AutoModel, CLIPImageProcessor
|
45 |
+
|
46 |
+
model = AutoModel.from_pretrained(
|
47 |
+
'OpenGVLab/InternViT-300M-448px-V2_5',
|
48 |
+
torch_dtype=torch.bfloat16,
|
49 |
+
low_cpu_mem_usage=True,
|
50 |
+
trust_remote_code=True).cuda().eval()
|
51 |
+
|
52 |
+
image = Image.open('./examples/image1.jpg').convert('RGB')
|
53 |
+
|
54 |
+
image_processor = CLIPImageProcessor.from_pretrained('OpenGVLab/InternViT-300M-448px-V2_5')
|
55 |
+
|
56 |
+
pixel_values = image_processor(images=image, return_tensors='pt').pixel_values
|
57 |
+
pixel_values = pixel_values.to(torch.bfloat16).cuda()
|
58 |
+
|
59 |
+
outputs = model(pixel_values)
|
60 |
+
```
|
61 |
+
|
62 |
+
## Citation
|
63 |
+
|
64 |
+
If you find this project useful in your research, please consider citing:
|
65 |
+
|
66 |
+
```BibTeX
|
67 |
+
|
68 |
+
@article{chen2023internvl,
|
69 |
+
title={InternVL: Scaling up Vision Foundation Models and Aligning for Generic Visual-Linguistic Tasks},
|
70 |
+
author={Chen, Zhe and Wu, Jiannan and Wang, Wenhai and Su, Weijie and Chen, Guo and Xing, Sen and Zhong, Muyan and Zhang, Qinglong and Zhu, Xizhou and Lu, Lewei and Li, Bin and Luo, Ping and Lu, Tong and Qiao, Yu and Dai, Jifeng},
|
71 |
+
journal={arXiv preprint arXiv:2312.14238},
|
72 |
+
year={2023}
|
73 |
+
}
|
74 |
+
@article{chen2024far,
|
75 |
+
title={How Far Are We to GPT-4V? Closing the Gap to Commercial Multimodal Models with Open-Source Suites},
|
76 |
+
author={Chen, Zhe and Wang, Weiyun and Tian, Hao and Ye, Shenglong and Gao, Zhangwei and Cui, Erfei and Tong, Wenwen and Hu, Kongzhi and Luo, Jiapeng and Ma, Zheng and others},
|
77 |
+
journal={arXiv preprint arXiv:2404.16821},
|
78 |
+
year={2024}
|
79 |
+
}
|
80 |
+
@article{gao2024mini,
|
81 |
+
title={Mini-internvl: A flexible-transfer pocket multimodal model with 5\% parameters and 90\% performance},
|
82 |
+
author={Gao, Zhangwei and Chen, Zhe and Cui, Erfei and Ren, Yiming and Wang, Weiyun and Zhu, Jinguo and Tian, Hao and Ye, Shenglong and He, Junjun and Zhu, Xizhou and others},
|
83 |
+
journal={arXiv preprint arXiv:2410.16261},
|
84 |
+
year={2024}
|
85 |
+
}
|
86 |
+
|
87 |
+
```
|