🚀 圖像特徵提取模型AIMv2
AIMv2是一系列經過多模態自迴歸目標預訓練的視覺模型,訓練過程簡單直接,可有效進行擴展。該模型在多模態理解基準測試、開放詞彙目標檢測和指代表達理解等任務中表現出色,具有很強的識別性能。
🚀 快速開始
模型信息
屬性 |
詳情 |
庫名稱 |
transformers |
許可證 |
apple-amlr |
評估指標 |
準確率 |
任務類型 |
圖像特徵提取 |
標籤 |
視覺、圖像特徵提取、mlx、pytorch |
模型性能
數據集 |
準確率 |
ImageNet-1K |
87.6% |
iNaturalist-18 |
79.7% |
CIFAR-10 |
99.1% |
CIFAR-100 |
92.5% |
Food-101 |
96.3% |
DTD |
88.5% |
Oxford Pets |
96.4% |
Stanford Cars |
96.7% |
Camelyon17 |
93.8% |
Patch Camelyon |
89.4% |
RxRx1 |
6.7% |
EuroSAT |
98.4% |
FMoW |
62.1% |
DomainNet Infographic |
71.7% |
模型簡介
[AIMv2論文
] [BibTeX
]
我們推出了AIMv2系列視覺模型,這些模型通過多模態自迴歸目標進行預訓練。AIMv2的預訓練過程簡單直接,能夠有效進行訓練和擴展。AIMv2的一些亮點包括:
- 在大多數多模態理解基準測試中,性能優於OAI CLIP和SigLIP。
- 在開放詞彙目標檢測和指代表達理解任務中,性能優於DINOv2。
- 具有強大的識別性能,AIMv2 - 3B使用凍結主幹在ImageNet上達到了*89.5%的準確率。
💻 使用示例
基礎用法
PyTorch
import requests
from PIL import Image
from transformers import AutoImageProcessor, AutoModel
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
processor = AutoImageProcessor.from_pretrained(
"apple/aimv2-large-patch14-336",
)
model = AutoModel.from_pretrained(
"apple/aimv2-large-patch14-336",
trust_remote_code=True,
)
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
JAX
import requests
from PIL import Image
from transformers import AutoImageProcessor, FlaxAutoModel
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
processor = AutoImageProcessor.from_pretrained(
"apple/aimv2-large-patch14-336",
)
model = FlaxAutoModel.from_pretrained(
"apple/aimv2-large-patch14-336",
trust_remote_code=True,
)
inputs = processor(images=image, return_tensors="jax")
outputs = model(**inputs)
📄 許可證
該項目使用apple-amlr
許可證。
📚 引用
如果您覺得我們的工作有用,請考慮引用以下文獻:
@misc{fini2024multimodalautoregressivepretraininglarge,
author = {Fini, Enrico and Shukor, Mustafa and Li, Xiujun and Dufter, Philipp and Klein, Michal and Haldimann, David and Aitharaju, Sai and da Costa, Victor Guilherme Turrisi and Béthune, Louis and Gan, Zhe and Toshev, Alexander T and Eichner, Marcin and Nabi, Moin and Yang, Yinfei and Susskind, Joshua M. and El-Nouby, Alaaeldin},
url = {https://arxiv.org/abs/2411.14402},
eprint = {2411.14402},
eprintclass = {cs.CV},
eprinttype = {arXiv},
title = {Multimodal Autoregressive Pre-training of Large Vision Encoders},
year = {2024},
}