🚀 InfiMM-HD
InfiMM-HD是一個用於高分辨率多模態理解的模型,可處理文本和圖像數據,實現圖像到文本的生成任務。它基於多個大規模數據集進行預訓練,為多模態領域的研究和應用提供了強大支持。
🚀 快速開始
使用以下代碼開始使用基礎模型:
import torch
from transformers import AutoModelForCausalLM, AutoProcessor
processor = AutoProcessor.from_pretrained("Infi-MM/infimm-hd", trust_remote_code=True)
prompts = [
{
"role": "user",
"content": [
{"image": "/xxx/test.jpg"},
"Please describe the image in detail.",
],
}
]
inputs = processor(prompts)
model = AutoModelForCausalLM.from_pretrained(
"Infi-MM/infimm-hd",
torch_dtype=torch.bfloat16,
trust_remote_code=True,
).to(0).eval()
inputs = inputs
inputs["batch_images"] = inputs["batch_images"].to(torch.bfloat16)
for k in inputs:
inputs[k] = inputs[k].to(model.device)
generated_ids = model.generate(
**inputs,
min_new_tokens=0,
max_new_tokens=256,
)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)
print(generated_text)
📚 詳細文檔
更多詳細信息可在我們的論文中找到:https://arxiv.org/abs/2403.01487。我們已經在 https://github.com/InfiMM/infimm-hd/ 上發佈了預訓練模型和PyTorch代碼。您可以基於我們的預訓練模型構建自己的模型。
📄 許可證
本項目採用 CC BY - NC 4.0 許可證。
圖像的版權歸原作者所有。
更多信息請參閱 LICENSE。
📞 聯繫我們
如果您有任何問題,請隨時通過電子郵件 infimmbytedance@gmail.com 與我們聯繫。
📑 引用
@misc{liu2024infimmhd,
title={InfiMM-HD: A Leap Forward in High-Resolution Multimodal Understanding},
author={Haogeng Liu and Quanzeng You and Xiaotian Han and Yiqi Wang and Bohan Zhai and Yongfei Liu and Yunzhe Tao and Huaibo Huang and Ran He and Hongxia Yang},
year={2024},
eprint={2403.01487},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
🔍 模型信息
屬性 |
詳情 |
模型類型 |
文本生成 |
訓練數據 |
HuggingFaceM4/OBELICS、laion/laion2B - en、coyo - 700m、mmc4 |