Swin Transformer is a pioneering neural network architecture that introduces a novel approach to handling local and global information in computer vision tasks. Departing from traditional self-attention mechanisms, Swin Transformer adopts a hierarchical design, organizing its attention windows in a shifted manner. This innovation enables more efficient modeling of contextual information across different scales, enhancing the model's capability to capture intricate patterns.
Iluvatar GPU | IXUCA SDK |
---|---|
MR-V100 | 4.2.0 |
Pretrained model: https://huggingface.co/docs/transformers/model_doc/swin
git lfs install
git clone https://huggingface.co/microsoft/swin-tiny-patch4-window7-224 swin-tiny-patch4-window7-224
Dataset: https://www.image-net.org/download.php to download the validation dataset.
pip3 install -r requirements.txt
python3 export.py --output swin_transformer.onnx
# Use onnxsim optimize onnx model
onnxsim swin_transformer.onnx swin_transformer_opt.onnx
export DATASETS_DIR=/Path/to/imagenet_val/
# Accuracy
bash scripts/infer_swin_transformer_fp16_accuracy.sh
# Performance
bash scripts/infer_swin_transformer_fp16_performance.sh
Model | BatchSize | Precision | FPS | Top-1(%) | Top-5(%) |
---|---|---|---|---|---|
Swin Transformer | 32 | FP16 | 1104.52 | 80.578 | 95.2 |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。