Skip to content
ModelListedExternal
Browse files

Stanford Dog Vit

基于 Vision Transformer (ViT) 在 Stanford Dogs 数据集上微调的细粒度犬种分类模型

KindOtherVersionRevision 0ac7505

Model source

Kind
Other
File size
1.13 GB
Version
vRevision 0ac7505
Updated
Sep 17, 2026
Downloads
0
Source
Hugging Face

Source excerpt

基于 Vision Transformer (ViT) 在 Stanford Dogs 数据集上微调的细粒度犬种分类模型

Sources

1 source
Hugging FacePrimaryVersion 0ac7505656f5535c4670366c593241876b944923
huggingface.co/aYuan0/stanford-dog-vit/tree/0ac7505656f5535c4670366c593241876b944923

Verified Sep 17

Download files

Model artifacts

3 artifacts

ViT-full120.pt

pt · 1.13 GB · SHA-256 1ae2c2ae0866…2533 · Hugging Face

Download file

ViT-top100.pt

pt · 1.13 GB · SHA-256 67b8d991241c…fda0 · Hugging Face

Download file

ViT-top80.pt

pt · 1.13 GB · SHA-256 9641025a0dcc…8fcf · Hugging Face

Download file

Source excerpts

2 excerpts

--- language: zh tags: - image-classification - vit - stanford-dogs - fine-grained - pytorch license: apache-2.0 datasets: - stanford-dogs --- <div align="center"> # 🐕 Stanford Dogs ViT 犬种分类器 基于 **Vision Transformer (ViT)** 在 Stanford Dogs 数据集上微调的细粒度犬种分类模型 [![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://python.org) [![PyTorch](https://img.shields.io/badge/PyTorch-2.0+-ee4c2c.svg)](https://pytorch.org) [![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](LICENSE) </div> --- ## 📦 模型下载 | 模型文件 | 类别数 | 用途 | 说明 | |:---------|:-------|:-----|:-----| | `ViT-full120.pt` | 120 | 🚀 推理部署 | 完整模型,覆盖全部犬种 | | `ViT-top100.pt` | 100 | 📊 评估测试 | 在 Stanford / Atharva 数据集上评估 | | `ViT-top80.pt` | 80 | 🔧 精细调参 | 用于超参数调优实验 | --- ## 🚀 快速开始 ### 使用 ViT-full120.pt 推理 ```python import torch from torchvision import transforms from PIL import Image # 1. 加载模型 model = torch.load("ViT-full120.pt") model.eval() # 2. 图像预处理 transform = transforms.Compose([ transforms.Resize((224, 224)), transforms.ToTensor(), transforms.Normalize( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225] ), ]) # 3. 推理 image = Image.open("dog.jpg").convert("RGB") input_tensor = transform(image).unsqueeze(0) with torch.no_grad(): output = model(input_tensor) predicted_class = output.argmax(dim=1).item() print(f"预测类别: {predicted_class}") ``` --- ## 📚 数据集 <table> <tr> <td width="50%"> ### Stanford Dogs - 🌐 [官方主页](http://vision.stanford.edu/aditya86/ImageNetDogs/) - 🏷️ 120 个犬种 - 🖼️ 约 20,580 张图片 - ✅ 主要训练数据集 </td> <td width="50%"> ### Atharva Dog Breeds - 🌐 [GitHub 仓库](https://github.com/atharvataras/dog-breeds-dataset) - 📊 用于模型评估 - 🔬 跨数据集泛化测试 </td> </tr> </table> --- ## ⚙️ 训练细节 | 配置项 | 值 | |:-------|:---| | 基础模型 | ViT (Vision Transformer) | | 任务类型 | 细粒度图像分类 | | 深度学习框架 | PyTorch | | 输入尺寸 | 224 × 224 |

Source context: 0 downloads · 0 likes · Pipeline image-classification · Repo aYuan0/stanford-dog-vit