RegNet模型,经自监督方式在海量网络图像上预训练,后在ImageNet-1k微调,适用于图像分类任务,助力视觉识别应用。【此简介由AI生成】
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
tf_model.h5LFS | 3 年前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
license: apache-2.0 tags:
- vision
- image-classification
datasets:
- imagenet-1k
widget:
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg example_title: Tiger
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg example_title: Teapot
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg example_title: Palace
RegNet
该 RegNet 模型基于 ImageNet-1k 数据集训练而成,相关论文发表于《无监督未筛选图像预训练使视觉模型更具鲁棒性与公平性》,并首次发布于此代码库。
免责声明:RegNet 发布团队未提供本模型的模型卡片,本文档由 Hugging Face 团队编写。
模型描述
研究团队采用自监督学习方式,对来自互联网的数十亿随机图像训练了 RegNet 系列模型。本模型后续基于 ImageNet 进行了精细调优。

使用场景与限制
您可将本基础模型用于图像分类任务。欢迎访问模型中心探索针对特定任务进行微调的衍生版本。
使用方法
以下是使用本模型的操作指南:
>>> from transformers import AutoFeatureExtractor, RegNetForImageClassification
>>> import torch
>>> from datasets import load_dataset
>>> dataset = load_dataset("huggingface/cats-image")
>>> image = dataset["test"]["image"][0]
>>> feature_extractor = AutoFeatureExtractor.from_pretrained("zuppif/regnet-y-040")
>>> model = RegNetForImageClassification.from_pretrained("zuppif/regnet-y-040")
>>> inputs = feature_extractor(image, return_tensors="pt")
>>> with torch.no_grad():
... logits = model(**inputs).logits
>>> # model predicts one of the 1000 ImageNet classes
>>> predicted_label = logits.argmax(-1).item()
>>> print(model.config.id2label[predicted_label])
'tabby, tabby cat'
如需更多代码示例,请参阅文档。