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

swin-base-patch4-window7-224

Date: 2026-11-14Commit: 20d6c26Signed: 2DC28CC7B26A283B ✓

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

88M params1.06GBswin-base-patch4-window7-224safetensorspermissive
FactsParams88MSize1.06 GBFormatssafetensorsTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get microsoft/swin-base-patch4-window7-224
# manifest sha256 22582497d4fb… · 1.06 GB · 7 files
$ fw verify ./swin-base-patch4-window7-224 microsoft/swin-base-patch4-window7-224
From sourceHosted (signed)microsoft/swin-base-patch4-window7-224Last check: 2026-11-14 21:23 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.06 GB
Weights
352 MB (safetensors)
Parameters
88M
Formats
safetensors
Task
image classification
License
Apache-2.0 (permissive)
Files
7, each with a sha256
Publisher
microsoft
Added
2026-11-14
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-14 21:23 UTCpassed

Model card

From the publisher at commit 20d6c26. Shown as plain text with links; images open at the publisher.

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.

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 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}
}

Files

7 files · 1.06 GBWeights 352 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 7 files with their sha256
FileSizesha256
.gitattributes1.23 KB98ccb431c012ebfe976280fbd45aea4cec7409935868ccecf3954370f96732a1
README.md3.69 KB850ac82df5a9789f8707232df4988b7476009e99d65634b5dc6e06eaa75b42ac
config.json71.8 KB209415fa36111055916ba03e5e9a1c265617ee930b565810e3aa1b37ce8e3d13
model.safetensors352 MBe2fef3925119a5bf28d0e7cf5319a6c4a6c724ad36d30bd512688607259ac2f1
preprocessor_config.json255 Bcf47f0a7c8ff723066a62ca5cf536ba0f530ed1e797a0eab270f1304e2f880db
pytorch_model.bin352 MB4df810a56930047b1e181a5119da088963c608b57fb4e2280700d4d4aaa1ff31
tf_model.h5352 MB084f26d2d4ce90d6e54679d06eb491ad6c7ea7b0e7f36afa2b8323aac123aa8a
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
20d6c26ef6 pinned now manifest updated, same commit2026-11-14 21:23 UTC7 files · 1.06 GB
20d6c26ef62026-11-14 21:23 UTC7 files · 1.06 GB

Use it

$ fw get microsoft/swin-base-patch4-window7-224
# manifest sha256 22582497d4fb… · 1.06 GB · 7 files
$ fw verify ./swin-base-patch4-window7-224 microsoft/swin-base-patch4-window7-224
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.json --dir ./swin-base-patch4-window7-224 $ python3 fw.py verify ./swin-base-patch4-window7-224 ./microsoft__swin-base-patch4-window7-224.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 --revision 20d6c26ef6455d36c0a78671d787c5da57513d4b --local-dir ./swin-base-patch4-window7-224

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-14
Text in
README.md
Text sha256
850ac82df5a9789f8707232df4988b7476009e99d65634b5dc6e06eaa75b42ac
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-224Date: 2026-11-14Commit: 20d6c26Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/swin-base-patch4-window7-224
Pinned commit
20d6c26ef6455d36c0a78671d787c5da57513d4b
Manifest
swin-base-patch4-window7-224.json · .minisig
Manifest sha256
22582497d4fb8140e3ae02f3505cb4b6fba812a87997de511efdd288b03f904c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:23 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.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/swin-base-patch4-window7-224.json.minisig $ minisign -Vm swin-base-patch4-window7-224.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

1 model in the catalog name this one as their parent.

Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/swin-base-patch4-window7-224
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.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of swin-base-patch4-window7-224. Each has its own license check and page.

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