HuggingFace镜像/efficientnet-b6
模型介绍文件和版本分析

EfficientNet (b6 模型)

EfficientNet 模型基于 ImageNet-1k 数据集在 528x528 分辨率下训练完成。该模型由 Mingxing Tan 和 Quoc V. Le 在论文 EfficientNet: 重新思考卷积神经网络的模型缩放方法 中提出,并首次发布于 此代码库。

免责声明:发布 EfficientNet 的团队未为此模型编写模型卡片,故本模型卡片由 Hugging Face 团队撰写。

模型描述

EfficientNet 是一种移动端友好的纯卷积神经网络(ConvNet),提出了一种新颖的复合系数缩放方法,能够通过简单而高效的策略统一缩放网络深度、宽度和分辨率维度。

模型结构图

使用场景与限制

您可以将原始模型用于图像分类任务。请访问 模型中心 查找您感兴趣任务的微调版本。

使用方法

以下示例展示如何使用本模型将 COCO 2017 数据集中的图像分类为 1000 个 ImageNet 类别之一:

import torch
from datasets import load_dataset
from transformers import EfficientNetImageProcessor, EfficientNetForImageClassification

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

preprocessor = EfficientNetImageProcessor.from_pretrained("google/efficientnet-b6")
model = EfficientNetForImageClassification.from_pretrained("google/efficientnet-b6")

inputs = preprocessor(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]),

如需更多代码示例,请参阅文档。

BibTeX 条目与引用信息

@article{Tan2019EfficientNetRM,
  title={EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks},
  author={Mingxing Tan and Quoc V. Le},
  journal={ArXiv},
  year={2019},
  volume={abs/1905.11946}
}
下载使用量0