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

swin-base-patch4-window7-224-ONNX

Date: 2026-11-15Commit: fd9394fSigned: 2DC28CC7B26A283B ✓

Image classification model. Onnx weights, 995 MB in all. Published by onnx-community under Apache-2.0.

vision995MBswin-base-patch4-window7-224-ONNXonnxpermissive
FactsParamsnot statedSize995 MBFormatsonnxTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/swin-base-patch4-window7-224-ONNX
# manifest sha256 ee33521f1341… · 995 MB · 13 files
$ fw verify ./swin-base-patch4-window7-224-ONNX onnx-community/swin-base-patch4-window7-224-ONNX
From sourceHosted (signed)onnx-community/swin-base-patch4-window7-224-ONNXLast check: 2026-11-15 05:30 UTC

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

Quantized of swin-base-patch4-window7-224.

Works with

Runs with

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

Convert with

Scan with

Overview

Size
995 MB
Weights
54.5 MB (smallest of 8 ONNX variants)
Parameters
not stated
Formats
onnx
Task
image classification
License
Apache-2.0 (permissive)
Files
13, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: microsoft/swin-base-patch4-window7-224

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 05:30 UTCpassed

Model card

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

swin-base-patch4-window7-224 (ONNX)#

This is an ONNX version of microsoft/swin-base-patch4-window7-224. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js#

See the pipeline documentation for image-classification: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ImageClassificationPipeline


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

13 files · 995 MBWeights 54.5 MB (smallest of 8 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 13 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md4.33 KB019bbc15eb021296f8c8841ae665e9cd5873251c516695343941d06f6a190714
config.json70.1 KB97d7f86fbd8b65b4af30687688f6c4a49e6609a686933786ce9b918760051773
onnx/model.onnx356 MBc06f0f01a35fe763a0de4035bc5aec1586e787768c01124139a258574c46b21f
onnx/model_bnb4.onnx58.7 MB524689bb6678f6945978d2c5528c72062d43ea702ee44115124c3b69595b5650
onnx/model_fp16.onnx179 MB9b56d7a63ec2edb185950eba94b2b578c1a7140937fd3bec5e65a8113ef6bd60
onnx/model_int8.onnx94.2 MB842991f655807d71ad631a0f946bc63bc8fe25a32b80c620c8af9d5c540898b2
onnx/model_q4.onnx64.1 MB519492df75e91224b64193c5140170f90bdd50c4b1347a7871b1c24971ed1662
onnx/model_q4f16.onnx54.5 MBbeae8918fb79d7e2ec91fd67d6e4c19942722866b13fb2893adae5a5d392cab1
onnx/model_quantized.onnx94.2 MBb5a2cb141a33f2601648f29e2f390761b897f3b507d3b2bd10694462e9cb49f2
onnx/model_uint8.onnx94.2 MBb5a2cb141a33f2601648f29e2f390761b897f3b507d3b2bd10694462e9cb49f2
preprocessor_config.json365 Bc8bd311d0271406c794bbc133ca706780f6d94c4c337999793356a191d3c1167
quantize_config.json310 B9b60b5877b9a1687b5cddbc06124a974cb7536af9dbf5295279bf73c3823170c
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
fd9394fe90 pinned now2026-11-15 05:30 UTC13 files · 995 MB

Use it

$ fw get onnx-community/swin-base-patch4-window7-224-ONNX
# manifest sha256 ee33521f1341… · 995 MB · 13 files
$ fw verify ./swin-base-patch4-window7-224-ONNX onnx-community/swin-base-patch4-window7-224-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/swin-base-patch4-window7-224-ONNX.json --dir ./swin-base-patch4-window7-224-ONNX $ python3 fw.py verify ./swin-base-patch4-window7-224-ONNX ./onnx-community__swin-base-patch4-window7-224-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/swin-base-patch4-window7-224-ONNX --revision fd9394fe902dd9b4c7b0f48d02015a5b99d53cd1 --local-dir ./swin-base-patch4-window7-224-ONNX

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
019bbc15eb021296f8c8841ae665e9cd5873251c516695343941d06f6a190714
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: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject: swin-base-patch4-window7-224-ONNXDate: 2026-11-15Commit: fd9394fSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/swin-base-patch4-window7-224-ONNX
Pinned commit
fd9394fe902dd9b4c7b0f48d02015a5b99d53cd1
Manifest
swin-base-patch4-window7-224-ONNX.json · .minisig
Manifest sha256
ee33521f1341392aad3c8df924f3d3000a14bf3717f91d000c47804e3badd199
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:30 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/swin-base-patch4-window7-224-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/swin-base-patch4-window7-224-ONNX.json.minisig $ minisign -Vm swin-base-patch4-window7-224-ONNX.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

Parent

microsoft/swin-base-patch4-window7-224 · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/swin-base-patch4-window7-224-ONNX
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-ONNX.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