Deep Residual Learning for Image Recognition
Paper • 1512.03385 • Published • 16
How to use leftthomas/resnet50 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="leftthomas/resnet50", trust_remote_code=True)
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png") # Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("leftthomas/resnet50", trust_remote_code=True)
model = AutoModelForImageClassification.from_pretrained("leftthomas/resnet50", trust_remote_code=True)Pretrained model on ImageNet. The ResNet architecture was introduced in this paper.
You can use the raw model to classify images along the 1,000 ImageNet labels, but you can also change its head to fine-tune it on a downstream task (another classification task with different labels, image segmentation or object detection, to name a few).
This model has a top1-accuracy of 76.13% and a top-5 accuracy of 92.86% in the evaluation set of ImageNet.