alt.freeweights.vision / swin-base-patch4-window7-224-in22k
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.visionSubject:

swin-base-patch4-window7-224-in22k

Date: 2026-11-15Commit: 68dc766Signed: 2DC28CC7B26A283B ✓

Image classification model with 109M parameters. Safetensors weights, 1.31 GB in all. Published by microsoft under Apache-2.0.

109M params1.31GBswin-base-patch4-window7-224-in22ksafetensorspermissive
FactsParams109MSize1.31 GBFormatssafetensorsTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get microsoft/swin-base-patch4-window7-224-in22k
# manifest sha256 2019dc20a315… · 1.31 GB · 7 files
$ fw verify ./swin-base-patch4-window7-224-in22k microsoft/swin-base-patch4-window7-224-in22k
From sourceHosted (signed)microsoft/swin-base-patch4-window7-224-in22kLast check: 2026-11-15 03:31 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
1.31 GB
Weights
437 MB (safetensors)
Parameters
109M
Formats
safetensors
Task
image classification
License
Apache-2.0 (permissive)
Files
7, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:31 UTCpassed

Model card

From the publisher at commit 68dc766. Shown as plain text with links; images open at the publisher.

Swin Transformer (large-sized model)#

Swin Transformer model pre-trained on ImageNet-21k (14 million images, 21,841 classes) 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.

Image: 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 AutoImageProcessor, SwinForImageClassification
from PIL import Image
import requests

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

processor = AutoImageProcessor.from_pretrained("microsoft/swin-base-patch4-window7-224-in22k")
model = SwinForImageClassification.from_pretrained("microsoft/swin-base-patch4-window7-224-in22k")

inputs = processor(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}
}

Files

7 files · 1.31 GBWeights 437 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 7 files with their sha256
FileSizesha256
.gitattributes1.23 KB98ccb431c012ebfe976280fbd45aea4cec7409935868ccecf3954370f96732a1
README.md3.73 KB1a9b81bb20fde33b6e4da082419e5642f89e28ab5a40e1a891cc5963bd1c1ea7
config.json1.67 MB0baf0997885424ae9ab9989fa6292b9cdf8a7da07672af32c0756dfd0a695f05
model.safetensors437 MB15a3bd6ffd00ccb907de277fc93681d4646fbcd902e795f4385b97611f306828
preprocessor_config.json255 Bcf47f0a7c8ff723066a62ca5cf536ba0f530ed1e797a0eab270f1304e2f880db
pytorch_model.bin437 MBdfd8ca7de71e90b8ec52b2437a0915e1b41c8bcd64ad8e190b537a8923ab4bc7
tf_model.h5437 MBb990e3b69a8488de93c7d6373050af3d334238184a9ec019febad8b62136b1cd
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
68dc76680a pinned now2026-11-15 03:31 UTC7 files · 1.31 GB

Use it

$ fw get microsoft/swin-base-patch4-window7-224-in22k
# manifest sha256 2019dc20a315… · 1.31 GB · 7 files
$ fw verify ./swin-base-patch4-window7-224-in22k microsoft/swin-base-patch4-window7-224-in22k
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/swin-base-patch4-window7-224-in22k.json --dir ./swin-base-patch4-window7-224-in22k $ python3 fw.py verify ./swin-base-patch4-window7-224-in22k ./microsoft__swin-base-patch4-window7-224-in22k.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/swin-base-patch4-window7-224-in22k --revision 68dc76680a5bf3bdf670669f3025dc9be2e30781 --local-dir ./swin-base-patch4-window7-224-in22k

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
1a9b81bb20fde33b6e4da082419e5642f89e28ab5a40e1a891cc5963bd1c1ea7
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.visionSubject: swin-base-patch4-window7-224-in22kDate: 2026-11-15Commit: 68dc766Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/swin-base-patch4-window7-224-in22k
Pinned commit
68dc76680a5bf3bdf670669f3025dc9be2e30781
Manifest
swin-base-patch4-window7-224-in22k.json · .minisig
Manifest sha256
2019dc20a315c6d546ee00b6bf34e47fcb6ec4606432f31685f462f57ea68357
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:31 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/swin-base-patch4-window7-224-in22k.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/swin-base-patch4-window7-224-in22k.json.minisig $ minisign -Vm swin-base-patch4-window7-224-in22k.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/swin-base-patch4-window7-224-in22k
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. swin-base-patch4-window7-224-in22k.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX