跳到正文
Hugging Face Blog·· 2022-02-11AI 评分50

用 🤗 Transformers 微调 ViT 进行图像分类

Fine-Tune ViT for Image Classification with 🤗 Transformers

AI 导读

这篇教程演示如何用 🤗 datasets 加载 beans 数据集,并用 🤗 transformers 微调预训练的 google/vit-base-patch16-224-in21k 模型进行图像分类。流程包括用 ViTImageProcessor 对图像做归一化和 resize 到 224 等预处理,再将像素值送入模型训练。

来源:Hugging Face Blog · huggingface.co