SVT Base is a mid-sized variant of the Sparse Vision Transformer (SVT) series, designed to combine the expressive power of Vision Transformers (ViTs) with the efficiency of sparse attention mechanisms. By employing sparse attention and multi-stage feature extraction, SVT-Base reduces computational complexity while retaining global modeling capabilities.
| GPU | IXUCA SDK | Release | Branch |
|---|---|---|---|
| MR-V100 | 4.4.0 | 26.03 | release/26.03 |
| MR-V100 | 4.3.0 | 25.12 | release/25.12 |
Note: 请切换到与您的 SDK 版本对应的 Release 分支进行测试。请勿直接在 master 分支上运行测试,因为 master 分支可能包含与您的本地 SDK 版本不兼容的最新更改。
切换分支命令示例:
git checkout release/26.03
Pretrained model: https://download.openmmlab.com/mmclassification/v0/twins/twins-svt-base_3rdparty_8xb128_in1k_20220126-e31cc8e9.pth
Dataset: https://www.image-net.org/download.php to download the validation dataset.
# Install libGL
## CentOS
yum install -y mesa-libGL
## Ubuntu
apt install -y libgl1-mesa-glx
pip3 install -r ../../igie_common/requirements.txt
pip3 install --no-build-isolation mmcv==1.5.3 mmcls==0.24.0# git clone mmpretrain
git clone -b v0.24.0 https://github.com/open-mmlab/mmpretrain.git
# export onnx model
python3 ../../igie_common/export_mmcls.py --cfg mmpretrain/configs/twins/twins-svt-base_8xb128_in1k.py --weight twins-svt-base_3rdparty_8xb128_in1k_20220126-e31cc8e9.pth --output svt_base.onnx
# Use onnxsim optimize onnx model
onnxsim svt_base.onnx svt_base_opt.onnxexport DATASETS_DIR=/Path/to/imagenet_val/
export RUN_DIR=../../igie_common/# Accuracy
bash scripts/infer_svt_base_fp16_accuracy.sh
# Performance
bash scripts/infer_svt_base_fp16_performance.sh| Model | BatchSize | Precision | FPS | Top-1(%) | Top-5(%) |
|---|---|---|---|---|---|
| SVT Base | 32 | FP16 | 673.165 | 82.865 | 96.213 |