microsoft / swin-base-patch4-window12-384-in22k

huggingface.co
Total runs: 100.5K
24-hour runs: 0
7-day runs: 327
30-day runs: 54.7K
Model's Last Updated: May 17 2022
image-classification

Introduction of swin-base-patch4-window12-384-in22k

Model Details of swin-base-patch4-window12-384-in22k

Swin Transformer (large-sized model)

Swin Transformer model pre-trained on ImageNet-21k (14 million images, 21,841 classes) at resolution 384x384. It was introduced in the paper Swin Transformer: Hierarchical Vision Transformer using Shifted Windows by Liu et al. and first released in this repository .

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

Model description

The Swin Transformer is a type of Vision Transformer. It builds hierarchical feature maps by merging image patches (shown in gray) in deeper layers and has linear computation complexity to input image size due to computation of self-attention only within each local window (shown in red). It can thus serve as a general-purpose backbone for both image classification and dense recognition tasks. In contrast, previous vision Transformers produce feature maps of a single low resolution and have quadratic computation complexity to input image size due to computation of self-attention globally.

model image

Source

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 to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:

from transformers import AutoFeatureExtractor, SwinForImageClassification
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/swin-base-patch4-window12-384-in22k")
model = SwinForImageClassification.from_pretrained("microsoft/swin-base-patch4-window12-384-in22k")

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])

For more code examples, we refer to the documentation .

BibTeX entry and citation info
@article{DBLP:journals/corr/abs-2103-14030,
  author    = {Ze Liu and
               Yutong Lin and
               Yue Cao and
               Han Hu and
               Yixuan Wei and
               Zheng Zhang and
               Stephen Lin and
               Baining Guo},
  title     = {Swin Transformer: Hierarchical Vision Transformer using Shifted Windows},
  journal   = {CoRR},
  volume    = {abs/2103.14030},
  year      = {2021},
  url       = {https://arxiv.org/abs/2103.14030},
  eprinttype = {arXiv},
  eprint    = {2103.14030},
  timestamp = {Thu, 08 Apr 2021 07:53:26 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2103-14030.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

Runs of microsoft swin-base-patch4-window12-384-in22k on huggingface.co

100.5K
Total runs
0
24-hour runs
-289
3-day runs
327
7-day runs
54.7K
30-day runs

More Information About swin-base-patch4-window12-384-in22k huggingface.co Model

More swin-base-patch4-window12-384-in22k license Visit here:

https://choosealicense.com/licenses/apache-2.0

swin-base-patch4-window12-384-in22k huggingface.co

swin-base-patch4-window12-384-in22k huggingface.co is an AI model on huggingface.co that provides swin-base-patch4-window12-384-in22k's model effect (), which can be used instantly with this microsoft swin-base-patch4-window12-384-in22k model. huggingface.co supports a free trial of the swin-base-patch4-window12-384-in22k model, and also provides paid use of the swin-base-patch4-window12-384-in22k. Support call swin-base-patch4-window12-384-in22k model through api, including Node.js, Python, http.

swin-base-patch4-window12-384-in22k huggingface.co Url

https://huggingface.co/microsoft/swin-base-patch4-window12-384-in22k

microsoft swin-base-patch4-window12-384-in22k online free

swin-base-patch4-window12-384-in22k huggingface.co is an online trial and call api platform, which integrates swin-base-patch4-window12-384-in22k's modeling effects, including api services, and provides a free online trial of swin-base-patch4-window12-384-in22k, you can try swin-base-patch4-window12-384-in22k online for free by clicking the link below.

microsoft swin-base-patch4-window12-384-in22k online free url in huggingface.co:

https://huggingface.co/microsoft/swin-base-patch4-window12-384-in22k

swin-base-patch4-window12-384-in22k install

swin-base-patch4-window12-384-in22k is an open source model from GitHub that offers a free installation service, and any user can find swin-base-patch4-window12-384-in22k on GitHub to install. At the same time, huggingface.co provides the effect of swin-base-patch4-window12-384-in22k install, users can directly use swin-base-patch4-window12-384-in22k installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

swin-base-patch4-window12-384-in22k install url in huggingface.co:

https://huggingface.co/microsoft/swin-base-patch4-window12-384-in22k

Url of swin-base-patch4-window12-384-in22k

swin-base-patch4-window12-384-in22k huggingface.co Url

Provider of swin-base-patch4-window12-384-in22k huggingface.co

microsoft
ORGANIZATIONS

Other API from microsoft

huggingface.co

Total runs: 681.1K
Run Growth: 208.0K
Growth Rate: 30.53%
Updated:February 03 2022
huggingface.co

Total runs: 595.8K
Run Growth: -131.1K
Growth Rate: -22.00%
Updated:November 25 2025
huggingface.co

Total runs: 535.6K
Run Growth: 307.0K
Growth Rate: 57.32%
Updated:April 08 2024
huggingface.co

Total runs: 511.8K
Run Growth: -531.5K
Growth Rate: -103.84%
Updated:December 08 2025
huggingface.co

Total runs: 316.8K
Run Growth: -151.7K
Growth Rate: -47.04%
Updated:September 26 2022
huggingface.co

Total runs: 289.1K
Run Growth: -22.3K
Growth Rate: -7.70%
Updated:February 14 2024
huggingface.co

Total runs: 140.6K
Run Growth: 111.6K
Growth Rate: 79.35%
Updated:May 12 2026
huggingface.co

Total runs: 118.6K
Run Growth: 19.0K
Growth Rate: 16.65%
Updated:February 03 2023
huggingface.co

Total runs: 117.8K
Run Growth: -147.4K
Growth Rate: -125.12%
Updated:November 08 2023
huggingface.co

Total runs: 117.6K
Run Growth: -1.2K
Growth Rate: -1.03%
Updated:February 29 2024
huggingface.co

Total runs: 100.0K
Run Growth: -425
Growth Rate: -0.42%
Updated:August 28 2025
huggingface.co

Total runs: 69.7K
Run Growth: -13.1K
Growth Rate: -18.74%
Updated:November 25 2025
huggingface.co

Total runs: 68.7K
Run Growth: -18.2K
Growth Rate: -26.47%
Updated:December 03 2025
huggingface.co

Total runs: 57.5K
Run Growth: 26.0K
Growth Rate: 50.00%
Updated:December 23 2021
huggingface.co

Total runs: 32.5K
Run Growth: 28.2K
Growth Rate: 86.85%
Updated:April 23 2026
huggingface.co

Total runs: 31.2K
Run Growth: 9.0K
Growth Rate: 28.07%
Updated:April 24 2023