🚀 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 |