microsoft/cvt-13-384-22k

# Convolutional Vision Transformer (CvT) CvT-13 model pre-trained on ImageNet-22k and fine-tuned on ImageNet-1k at resolution 384x384. It was introduced in the paper [CvT: Introducing Convolutions to…

azureFoundry/HuggingFace/microsoft-cvt-13-384-22k@1

Convolutional Vision Transformer (CvT)

CvT-13 model pre-trained on ImageNet-22k and fine-tuned on ImageNet-1k at resolution 384x384. It was introduced in the paper CvT: Introducing Convolutions to Vision Transformers by Wu et al. and first released in this repository.

Disclaimer: The team releasing CvT did not write a model card for this model so this model card has been written by the Hugging Face team.

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, CvtForImageClassification
from PIL import Image
import requests

url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
image = Image.open(requests.get(url, stream=True).raw)

feature_extractor = AutoFeatureExtractor.from_pretrained('microsoft/cvt-13-384-22k')
model = CvtForImageClassification.from_pretrained('microsoft/cvt-13-384-22k')

inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)
logits = outputs.logits
# model predicts one of the 1000 ImageNet classes
predicted_class_idx = logits.argmax(-1).item()
print("Predicted class:", model.config.id2label[predicted_class_idx])

microsoft/cvt-13-384-22k powered by Hugging Face Inference Toolkit

Send Request

You can use cURL or any REST Client to send a request to the AzureML endpoint with your AzureML token.

curl <AZUREML_ENDPOINT_URL> \
    -X POST \
    -H "Authorization: Bearer <AZUREML_TOKEN>" \
    -H "Content-Type: image/jpeg" \
    --data-binary @"image.jpg"

Supported Parameters

  • inputs (string): The input image data as a base64-encoded string. If no parameters are provided, you can also provide the image data as a raw bytes payload.
  • parameters (object):
  • function_to_apply (enum): Possible values: sigmoid, softmax, none.
  • top_k (integer): When specified, limits the output to the top K most probable classes.

Check the full API Specification at the Hugging Face Inference documentation.

Specifications & capabilities

Published model ID
cvt-13-384-22k

Provider specifications & access

1–1 / 1

microsoft/cvt-13-384-22k ↗

source model id
HuggingFace/microsoft-cvt-13-384-22k@1
hosting
foundry-managed-compute
platforms
  • Microsoft Foundry
license
apache-2.0
architecture
input_modalities
    output_modalities
      capabilities

        Original sources

        1–4 / 4

        Hugging Face · microsoft/cvt-13-384-22k ↗

        Microsoft Foundry · Model page ↗

        Microsoft Foundry · Model documentation ↗

        Microsoft Foundry · Catalog ↗

        Source links

        1–1 / 1

        Explore more models

        Models

        Loading
        EVIDENCE / COMPARISON

        Benchmarks

        Explore every benchmark

        Loading

        These charts contain model-linked results. The charts above also include unlinked source profiles. Compare scores within each evaluation. Model quality, usage, transparency and system performance measure different things.

        Install TensorTrace