đ ResNet-101 v1.5
A ResNet model pre-trained on ImageNet-1k at a resolution of 224x224, introduced in the paper Deep Residual Learning for Image Recognition by He et al.
đ Quick Start
ResNet-101 v1.5 is a pre - trained model for image classification. You can use it directly or find fine - tuned versions on the model hub.
⨠Features
- Residual Learning and Skip Connections: ResNet democratized the concepts of residual learning and skip connections, enabling the training of much deeper models.
- Version Difference: ResNet v1.5 differs from the original model. In the bottleneck blocks requiring downsampling, v1 has a stride of 2 in the first 1x1 convolution, while v1.5 has a stride of 2 in the 3x3 convolution. This makes ResNet50 v1.5 slightly more accurate (~0.5% top1) than v1, though it has a small performance drawback (~5% imgs/sec) according to Nvidia.

đ Documentation
Model description
ResNet (Residual Network) is a convolutional neural network that popularized the concepts of residual learning and skip connections, which allows for the training of much deeper models.
This is ResNet v1.5, with a difference from the original model: in the bottleneck blocks that need downsampling, v1 has a stride of 2 in the first 1x1 convolution, while v1.5 has a stride of 2 in the 3x3 convolution.
Intended uses & limitations
You can use the raw model for image classification. Check the model hub to find fine - tuned versions for tasks that interest you.
đģ Usage Examples
Basic Usage
Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
from transformers import AutoFeatureExtractor, ResNetForImageClassification
import torch
from datasets import load_dataset
dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]
feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/resnet-101")
model = ResNetForImageClassification.from_pretrained("microsoft/resnet-101")
inputs = feature_extractor(image, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])
For more code examples, refer to the documentation.
BibTeX entry and citation info
@inproceedings{he2016deep,
title={Deep residual learning for image recognition},
author={He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
pages={770--778},
year={2016}
}
đ License
This model is licensed under the Apache - 2.0 license.
Property |
Details |
Model Type |
ResNet-101 v1.5 for image classification |
Training Data |
ImageNet-1k |