microsoft / swin-base-patch4-window7-224

huggingface.co
Total runs: 305.1K
24-hour runs: 0
7-day runs: 22.6K
30-day runs: 213.3K
Model's Last Updated: September 11 2023
image-classification

Introduction of swin-base-patch4-window7-224

Model Details of swin-base-patch4-window7-224

Swin Transformer (base-sized model)

Swin Transformer model trained on ImageNet-1k at resolution 224x224. 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-window7-224")
model = SwinForImageClassification.from_pretrained("microsoft/swin-base-patch4-window7-224")

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-window7-224 on huggingface.co

305.1K
Total runs
0
24-hour runs
4.1K
3-day runs
22.6K
7-day runs
213.3K
30-day runs

More Information About swin-base-patch4-window7-224 huggingface.co Model

More swin-base-patch4-window7-224 license Visit here:

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

swin-base-patch4-window7-224 huggingface.co

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

swin-base-patch4-window7-224 huggingface.co Url

https://huggingface.co/microsoft/swin-base-patch4-window7-224

microsoft swin-base-patch4-window7-224 online free

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

microsoft swin-base-patch4-window7-224 online free url in huggingface.co:

https://huggingface.co/microsoft/swin-base-patch4-window7-224

swin-base-patch4-window7-224 install

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

swin-base-patch4-window7-224 install url in huggingface.co:

https://huggingface.co/microsoft/swin-base-patch4-window7-224

Url of swin-base-patch4-window7-224

swin-base-patch4-window7-224 huggingface.co Url

Provider of swin-base-patch4-window7-224 huggingface.co

microsoft
ORGANIZATIONS

Other API from microsoft

huggingface.co

Total runs: 289.1M
Run Growth: 213.7M
Growth Rate: 73.50%
Updated: February 14 2024
huggingface.co

Total runs: 6.6M
Run Growth: 1.8M
Growth Rate: 27.15%
Updated: September 26 2022
huggingface.co

Total runs: 968.6K
Run Growth: 235.6K
Growth Rate: 24.37%
Updated: January 21 2025
huggingface.co

Total runs: 712.6K
Run Growth: 81.7K
Growth Rate: 11.08%
Updated: February 28 2023
huggingface.co

Total runs: 498.7K
Run Growth: -603.0K
Growth Rate: -120.91%
Updated: April 24 2023
huggingface.co

Total runs: 315.8K
Run Growth: 0
Growth Rate: 0.00%
Updated: January 09 2025
huggingface.co

Total runs: 301.3K
Run Growth: 47.3K
Growth Rate: 16.24%
Updated: February 03 2022
huggingface.co

Total runs: 237.3K
Run Growth: 53.9K
Growth Rate: 23.46%
Updated: April 30 2024
huggingface.co

Total runs: 152.5K
Run Growth: -35.4K
Growth Rate: -22.93%
Updated: February 03 2023
huggingface.co

Total runs: 139.2K
Run Growth: -81.4K
Growth Rate: -59.00%
Updated: November 08 2023
huggingface.co

Total runs: 112.5K
Run Growth: -26.6K
Growth Rate: -24.02%
Updated: April 30 2024
huggingface.co

Total runs: 111.8K
Run Growth: 45.2K
Growth Rate: 40.29%
Updated: April 08 2024
huggingface.co

Total runs: 83.7K
Run Growth: 58.0K
Growth Rate: 68.83%
Updated: December 23 2021
huggingface.co

Total runs: 65.3K
Run Growth: 902
Growth Rate: 100.00%
Updated: December 21 2024
huggingface.co

Total runs: 39.9K
Run Growth: 0
Growth Rate: 0.00%
Updated: January 09 2025
huggingface.co

Total runs: 19.4K
Run Growth: 6.1K
Growth Rate: 31.72%
Updated: February 29 2024
huggingface.co

Total runs: 16.3K
Run Growth: 2.9K
Growth Rate: 17.65%
Updated: June 27 2023
huggingface.co

Total runs: 14.6K
Run Growth: 3.7K
Growth Rate: 73.58%
Updated: October 22 2024
huggingface.co

Total runs: 13.6K
Run Growth: 20
Growth Rate: 0.15%
Updated: November 23 2023
huggingface.co

Total runs: 11.1K
Run Growth: 4.8K
Growth Rate: 43.62%
Updated: November 23 2023