ที่เก็บนี้เป็นจุดเริ่มต้นสำหรับทุกสิ่งที่มุ่งหวังครอบครัวของโมเดลอัตโนมัติที่ผลักดันขอบเขตของการเรียนรู้ด้วยภาพและหลายรูปแบบ:
Multimodal Autoregressive Pre-training of Large Vision Encoders [ BibTeX ]Scalable Pre-training of Large Autoregressive Image Models [ BibTeX ]*: การมีส่วนร่วมทางเทคนิคที่เท่าเทียมกัน
หากคุณกำลังมองหาโมเดล AIM ดั้งเดิม (AIMv1) โปรดดูที่ readme ที่นี่
เราแนะนำตระกูล VISION ของ MISION ที่ได้รับการฝึกฝนล่วงหน้าด้วยวัตถุประสงค์แบบอัตโนมัติหลายรูปแบบ AIMv2 การฝึกอบรมล่วงหน้านั้นง่ายและตรงไปตรงมาในการฝึกอบรมและปรับขนาดได้อย่างมีประสิทธิภาพ ไฮไลท์ AIMV2 บางส่วน ได้แก่ :
เราแบ่งปันกับชุมชน AIMv2 ที่ได้รับการฝึกอบรมล่วงหน้าเกี่ยวกับความสามารถที่แตกต่างกัน, มติก่อนการฝึกอบรม:
AIMv2 with 224px ]AIMv2 with 336px ]AIMv2 with 448px ]AIMv2 with Native Resolution ]AIMv2 distilled ViT-Large ] ( แนะนำสำหรับการใช้งานหลายรูปแบบ )Zero-shot Adapted AIMv2 ] โปรดติดตั้ง pytorch โดยใช้คำแนะนำการติดตั้งอย่างเป็นทางการ หลังจากนั้นติดตั้งแพ็คเกจเป็น:
pip install 'git+https://github.com/apple/ml-aim.git#subdirectory=aim-v1'
pip install 'git+https://github.com/apple/ml-aim.git#subdirectory=aim-v2'
นอกจากนี้เรายังให้การสนับสนุนแบ็กเอนด์ MLX สำหรับการวิจัยและการทดลองเกี่ยวกับ Apple Silicon เพื่อเปิดใช้งานการสนับสนุน MLX เพียงแค่เรียกใช้:
pip install mlx
from PIL import Image
from aim . v2 . utils import load_pretrained
from aim . v1 . torch . data import val_transforms
img = Image . open (...)
model = load_pretrained ( "aimv2-large-patch14-336" , backend = "torch" )
transform = val_transforms ( img_size = 336 )
inp = transform ( img ). unsqueeze ( 0 )
features = model ( inp ) from PIL import Image
import mlx . core as mx
from aim . v2 . utils import load_pretrained
from aim . v1 . torch . data import val_transforms
img = Image . open (...)
model = load_pretrained ( "aimv2-large-patch14-336" , backend = "mlx" )
transform = val_transforms ( img_size = 336 )
inp = transform ( img ). unsqueeze ( 0 )
inp = mx . array ( inp . numpy ())
features = model ( inp ) from PIL import Image
import jax . numpy as jnp
from aim . v2 . utils import load_pretrained
from aim . v1 . torch . data import val_transforms
img = Image . open (...)
model , params = load_pretrained ( "aimv2-large-patch14-336" , backend = "jax" )
transform = val_transforms ( img_size = 336 )
inp = transform ( img ). unsqueeze ( 0 )
inp = jnp . array ( inp )
features = model . apply ({ "params" : params }, inp )รุ่นที่ผ่านการฝึกอบรมมาก่อนสามารถเข้าถึงได้ผ่าน HuggingFace Hub As:
from PIL import Image
from transformers import AutoImageProcessor , AutoModel
image = Image . open (...)
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 )| model_id | #params | IN-1K | ลิงค์ HF | กระดูกสันหลัง |
|---|---|---|---|---|
| AIMv2-large-patch14-224 | 0.3b | 86.6 | ? ลิงก์ | การเชื่อมโยง |
| AIMV2-Huge-Patch14-224 | 0.6b | 87.5 | ? ลิงก์ | การเชื่อมโยง |
| AIMV2-1B-Patch14-224 | 1.2b | 88.1 | ? ลิงก์ | การเชื่อมโยง |
| AIMv2-3b-patch14-224 | 2.7B | 88.5 | ? ลิงก์ | การเชื่อมโยง |
| model_id | #params | IN-1K | ลิงค์ HF | กระดูกสันหลัง |
|---|---|---|---|---|
| AIMv2-large-patch14-336 | 0.3b | 87.6 | ? ลิงก์ | การเชื่อมโยง |
| AIMV2-Huge-Patch14-336 | 0.6b | 88.2 | ? ลิงก์ | การเชื่อมโยง |
| AIMV2-1B-Patch14-336 | 1.2b | 88.7 | ? ลิงก์ | การเชื่อมโยง |
| AIMv2-3b-patch14-336 | 2.7B | 89.2 | ? ลิงก์ | การเชื่อมโยง |
| model_id | #params | IN-1K | ลิงค์ HF | กระดูกสันหลัง |
|---|---|---|---|---|
| AIMv2-large-patch14-448 | 0.3b | 87.9 | ? ลิงก์ | การเชื่อมโยง |
| AIMV2-Huge-Patch14-448 | 0.6b | 88.6 | ? ลิงก์ | การเชื่อมโยง |
| AIMV2-1B-Patch14-448 | 1.2b | 89.0 | ? ลิงก์ | การเชื่อมโยง |
| AIMv2-3b-patch14-448 | 2.7B | 89.5 | ? ลิงก์ | การเชื่อมโยง |
นอกจากนี้เรายังมีจุดตรวจสอบ AIMV2-L ที่ได้รับการแก้ไขเพื่อประมวลผลความละเอียดของภาพและอัตราส่วนภาพที่หลากหลาย ภาพจะถูกเพิ่ม (patch_size = 14 ) โดยไม่คำนึงถึงอัตราส่วนภาพ จุดตรวจนี้รองรับจำนวนแพตช์ในช่วง [112, 4096]
| model_id | #params | IN-1K | ลิงค์ HF | กระดูกสันหลัง |
|---|---|---|---|---|
| AIMv2-large-patch14-native | 0.3b | 87.3 | ? ลิงก์ | การเชื่อมโยง |
เราให้บริการจุดตรวจสอบ AIMV2-L ที่กลั่นจาก AIMV2-3B ซึ่งให้ประสิทธิภาพที่น่าทึ่งสำหรับการวัดความเข้าใจที่หลากหลาย
| แบบอย่าง | VQAV2 | GQA | okvqa | textvqa | docvqa | อินฟอร์ก้า | ชาร์ตกา | Sciqa | MMEP |
|---|---|---|---|---|---|---|---|---|---|
| AIMv2-l | 80.2 | 72.6 | 60.9 | 53.9 | 26.8 | 22.4 | 20.3 | 74.5 | 1457 |
| AIMv2-l-distilled | 81.1 | 73.0 | 61.4 | 53.5 | 29.2 | 23.3 | 24.0 | 76.3 | 1627 |
| model_id | #params | ความละเอียด | ลิงค์ HF | กระดูกสันหลัง |
|---|---|---|---|---|
| AIMv2 ขนาดใหญ่-แพทช์ 14-224-- distilled | 0.3b | 224px | ? ลิงก์ | การเชื่อมโยง |
| AIMv2-large-patch14-336-distilled | 0.3b | 336px | ? ลิงก์ | การเชื่อมโยง |
เราให้บริการ AIMV2-L VISION และการเข้ารหัสข้อความหลังจากปรับจูนเพื่อเปิดใช้งานการรับรู้แบบศูนย์
| แบบอย่าง | #params | zero-shot in1-k | กระดูกสันหลัง |
|---|---|---|---|
| AIMv2-l | 0.3b | 77.0 | การเชื่อมโยง |
หากคุณพบว่างานของเรามีประโยชน์โปรดพิจารณาอ้างเราว่า:
@misc { fini2024multimodal ,
title = { Multimodal Autoregressive Pre-training of Large Vision Encoders } ,
author = { Enrico Fini and Mustafa Shukor and Xiujun Li and Philipp Dufter and Michal Klein and David Haldimann and Sai Aitharaju and Victor Guilherme Turrisi da Costa and Louis Béthune and Zhe Gan and Alexander T Toshev and Marcin Eichner and Moin Nabi and Yinfei Yang and Joshua M. Susskind and Alaaeldin El-Nouby } ,
year = { 2024 } ,
eprint = { 2411.14402 } ,
archivePrefix = { arXiv } ,
primaryClass = { cs.CV }
} @InProceedings { pmlr-v235-el-nouby24a ,
title = { Scalable Pre-training of Large Autoregressive Image Models } ,
author = { El-Nouby, Alaaeldin and Klein, Michal and Zhai, Shuangfei and Bautista, Miguel '{A}ngel and Shankar, Vaishaal and Toshev, Alexander T and Susskind, Joshua M. and Joulin, Armand } ,
booktitle = { Proceedings of the 41st International Conference on Machine Learning } ,
pages = { 12371--12384 } ,
year = { 2024 } ,
}โปรดตรวจสอบใบอนุญาตที่เก็บก่อนใช้รหัสและรุ่นที่ให้ไว้