Disclaimer: The team releasing ResNet did not write a model card for this model so this model card has been written by the Hugging Face team.
Model description
ResNet introduced residual connections, they allow to train networks with an unseen number of layers (up to 1000). ResNet won the 2015 ILSVRC & COCO competition, one important milestone in deep computer vision.
Intended uses & limitations
You can use the raw model for image classification. See the
model hub
to look for
fine-tuned versions on a task that interests you.
How to use
Here is how to use this model:
>>> from transformers import AutoImageProcessor, AutoModelForImageClassification
>>> import torch
>>> from datasets import load_dataset
>>> dataset = load_dataset("huggingface/cats-image")
>>> image = dataset["test"]["image"][0]
>>> image_processor = AutoImageProcessor.from_pretrained("microsoft/resnet-18")
>>> model = AutoModelForImageClassification.from_pretrained("microsoft/resnet-18")
>>> inputs = image_processor(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])
tiger cat
resnet-18 huggingface.co is an AI model on huggingface.co that provides resnet-18's model effect (), which can be used instantly with this microsoft resnet-18 model. huggingface.co supports a free trial of the resnet-18 model, and also provides paid use of the resnet-18. Support call resnet-18 model through api, including Node.js, Python, http.
resnet-18 huggingface.co is an online trial and call api platform, which integrates resnet-18's modeling effects, including api services, and provides a free online trial of resnet-18, you can try resnet-18 online for free by clicking the link below.
microsoft resnet-18 online free url in huggingface.co:
resnet-18 is an open source model from GitHub that offers a free installation service, and any user can find resnet-18 on GitHub to install. At the same time, huggingface.co provides the effect of resnet-18 install, users can directly use resnet-18 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.