segmentation_models.pytorch

GitHub

Semantic segmentation models with 500+ pretrained convolutional and transformer-based backbones.

RAW Doc

Encoders

πŸ” Available Encoders
=====================

Segmentation Models PyTorch provides support for a wide range of encoders.
This flexibility allows you to use these encoders with any model in the library by
specifying the encoder name in the `encoder_name parameter during model initialization.

Here’s a quick example of using a ResNet34 encoder with the Unet model:

.. code-block:: python

from segmentation_models_pytorch import Unet

# Initialize Unet with ResNet34 encoder pre-trained on ImageNet
model = Unet(encoder_name="resnet34", encoder_weights="imagenet")


The following encoder families are supported by the library, enabling you to choose the one that best fits your use case:

- Mix Vision Transformer (mit)
- MobileOne
- MobileNet
- EfficientNet
- ResNet
- ResNeXt
- SENet
- DPN
- VGG
- DenseNet
- Xception
- Inception

Choosing the Right Encoder
--------------------------

1. Small Models for Edge Devices
Consider encoders like MobileNet or MobileOne, which have a smaller parameter count and are optimized for lightweight deployment.

2. High Performance
If you require state-of-the-art accuracy Mix Vision Transformer (mit), EfficientNet families offer excellent balance between performance and computational efficiency.

For each encoder, the table below provides detailed information:

1. Pretrained Weights
Specifies the available pretrained weights (e.g.,
imagenet, imagenet21k).

2. Params, M:
The total number of parameters in the encoder, measured in millions. This metric helps you assess the model's size and computational requirements.

3. Script:
Indicates whether the encoder can be scripted with
torch.jit.script.

4. Compile:
Indicates whether the encoder is compatible with
torch.compile(model, fullgraph=True, dynamic=True, backend="eager").
You may still get some issues with another backends, such as
inductor, depending on the torch/cuda/... dependencies version,
but most of the time it will work.

5. Export:
Indicates whether the encoder can be exported using
torch.export.export, making it suitable for deployment in different environments (e.g., ONNX).


============================ ==================================== =========== ======== ========= ========
Encoder Pretrained weights Params, M Script Compile Export
============================ ==================================== =========== ======== ========= ========
resnet18 imagenet / ssl / swsl 11M βœ… βœ… βœ…
resnet34 imagenet 21M βœ… βœ… βœ…
resnet50 imagenet / ssl / swsl 23M βœ… βœ… βœ…
resnet101 imagenet 42M βœ… βœ… βœ…
resnet152 imagenet 58M βœ… βœ… βœ…
resnext50_32x4d imagenet / ssl / swsl 22M βœ… βœ… βœ…
resnext101_32x4d ssl / swsl 42M βœ… βœ… βœ…
resnext101_32x8d imagenet / instagram / ssl / swsl 86M βœ… βœ… βœ…
resnext101_32x16d instagram / ssl / swsl 191M βœ… βœ… βœ…
resnext101_32x32d instagram 466M βœ… βœ… βœ…
resnext101_32x48d instagram 826M βœ… βœ… βœ…
dpn68 imagenet 11M ❌ βœ… βœ…
dpn68b imagenet+5k 11M ❌ βœ… βœ…
dpn92 imagenet+5k 34M ❌ βœ… βœ…
dpn98 imagenet 58M ❌ βœ… βœ…
dpn107 imagenet+5k 84M ❌ βœ… βœ…
dpn131 imagenet 76M ❌ βœ… βœ…
vgg11 imagenet 9M βœ… βœ… βœ…
vgg11_bn imagenet 9M βœ… βœ… βœ…
vgg13 imagenet 9M βœ… βœ… βœ…
vgg13_bn imagenet 9M βœ… βœ… βœ…
vgg16 imagenet 14M βœ… βœ… βœ…
vgg16_bn imagenet 14M βœ… βœ… βœ…
vgg19 imagenet 20M βœ… βœ… βœ…
vgg19_bn imagenet 20M βœ… βœ… βœ…
senet154 imagenet 113M βœ… βœ… βœ…
se_resnet50 imagenet 26M βœ… βœ… βœ…
se_resnet101 imagenet 47M βœ… βœ… βœ…
se_resnet152 imagenet 64M βœ… βœ… βœ…
se_resnext50_32x4d imagenet 25M βœ… βœ… βœ…
se_resnext101_32x4d imagenet 46M βœ… βœ… βœ…
densenet121 imagenet 6M βœ… βœ… βœ…
densenet169 imagenet 12M βœ… βœ… βœ…
densenet201 imagenet 18M βœ… βœ… βœ…
densenet161 imagenet 26M βœ… βœ… βœ…
inceptionresnetv2 imagenet / imagenet+background 54M βœ… βœ… βœ…
inceptionv4 imagenet / imagenet+background 41M βœ… βœ… βœ…
efficientnet-b0 imagenet / advprop 4M βœ… βœ… βœ…
efficientnet-b1 imagenet / advprop 6M βœ… βœ… βœ…
efficientnet-b2 imagenet / advprop 7M βœ… βœ… βœ…
efficientnet-b3 imagenet / advprop 10M βœ… βœ… βœ…
efficientnet-b4 imagenet / advprop 17M βœ… βœ… βœ…
efficientnet-b5 imagenet / advprop 28M βœ… βœ… βœ…
efficientnet-b6 imagenet / advprop 40M βœ… βœ… βœ…
efficientnet-b7 imagenet / advprop 63M βœ… βœ… βœ…
mobilenet_v2 imagenet 2M βœ… βœ… βœ…
xception imagenet 20M βœ… βœ… βœ…
timm-efficientnet-b0 imagenet / advprop / noisy-student 4M βœ… βœ… βœ…
timm-efficientnet-b1 imagenet / advprop / noisy-student 6M βœ… βœ… βœ…
timm-efficientnet-b2 imagenet / advprop / noisy-student 7M βœ… βœ… βœ…
timm-efficientnet-b3 imagenet / advprop / noisy-student 10M βœ… βœ… βœ…
timm-efficientnet-b4 imagenet / advprop / noisy-student 17M βœ… βœ… βœ…
timm-efficientnet-b5 imagenet / advprop / noisy-student 28M βœ… βœ… βœ…
timm-efficientnet-b6 imagenet / advprop / noisy-student 40M βœ… βœ… βœ…
timm-efficientnet-b7 imagenet / advprop / noisy-student 63M βœ… βœ… βœ…
timm-efficientnet-b8 imagenet / advprop 84M βœ… βœ… βœ…
timm-efficientnet-l2 noisy-student / noisy-student-475 474M βœ… βœ… βœ…
timm-tf_efficientnet_lite0 imagenet 3M βœ… βœ… βœ…
timm-tf_efficientnet_lite1 imagenet 4M βœ… βœ… βœ…
timm-tf_efficientnet_lite2 imagenet 4M βœ… βœ… βœ…
timm-tf_efficientnet_lite3 imagenet 6M βœ… βœ… βœ…
timm-tf_efficientnet_lite4 imagenet 11M βœ… βœ… βœ…
timm-skresnet18 imagenet 11M βœ… βœ… βœ…
timm-skresnet34 imagenet 21M βœ… βœ… βœ…
timm-skresnext50_32x4d imagenet 23M βœ… βœ… βœ…
mit_b0 imagenet 3M βœ… βœ… βœ…
mit_b1 imagenet 13M βœ… βœ… βœ…
mit_b2 imagenet 24M βœ… βœ… βœ…
mit_b3 imagenet 44M βœ… βœ… βœ…
mit_b4 imagenet 60M βœ… βœ… βœ…
mit_b5 imagenet 81M βœ… βœ… βœ…
mobileone_s0 imagenet 4M βœ… βœ… βœ…
mobileone_s1 imagenet 3M βœ… βœ… βœ…
mobileone_s2 imagenet 5M βœ… βœ… βœ…
mobileone_s3 imagenet 8M βœ… βœ… βœ…
mobileone_s4 imagenet 12M βœ… βœ… βœ…
============================ ==================================== =========== ======== ========= ========

---

Encoders Dpt

:orphan:

.. _dpt-encoders:

DPT Encoders
============

This is a list of Vision Transformer encoders that are compatible with the DPT architecture.
While other Vision Transformer encoders from timm may also be compatible, the ones listed below are tested to work properly.

.. list-table:: Encoder Name
:widths: 100
:header-rows: 0

* - tu-fastvit_ma36.apple_dist_in1k
* - tu-fastvit_ma36.apple_in1k
* - tu-fastvit_mci0.apple_mclip
* - tu-fastvit_mci1.apple_mclip
* - tu-fastvit_mci2.apple_mclip
* - tu-fastvit_s12.apple_dist_in1k
* - tu-fastvit_s12.apple_in1k
* - tu-fastvit_sa12.apple_dist_in1k
* - tu-fastvit_sa12.apple_in1k
* - tu-fastvit_sa24.apple_dist_in1k
* - tu-fastvit_sa24.apple_in1k
* - tu-fastvit_sa36.apple_dist_in1k
* - tu-fastvit_sa36.apple_in1k
* - tu-fastvit_t8.apple_dist_in1k
* - tu-fastvit_t8.apple_in1k
* - tu-fastvit_t12.apple_dist_in1k
* - tu-fastvit_t12.apple_in1k
* - tu-flexivit_base.300ep_in1k
* - tu-flexivit_base.300ep_in21k
* - tu-flexivit_base.600ep_in1k
* - tu-flexivit_base.1000ep_in21k
* - tu-flexivit_base.1200ep_in1k
* - tu-flexivit_base.patch16_in21k
* - tu-flexivit_base.patch30_in21k
* - tu-flexivit_large.300ep_in1k
* - tu-flexivit_large.600ep_in1k
* - tu-flexivit_large.1200ep_in1k
* - tu-flexivit_small.300ep_in1k
* - tu-flexivit_small.600ep_in1k
* - tu-flexivit_small.1200ep_in1k
* - tu-maxvit_base_tf_224.in1k
* - tu-maxvit_base_tf_224.in21k
* - tu-maxvit_base_tf_384.in1k
* - tu-maxvit_base_tf_384.in21k_ft_in1k
* - tu-maxvit_base_tf_512.in1k
* - tu-maxvit_base_tf_512.in21k_ft_in1k
* - tu-maxvit_large_tf_224.in1k
* - tu-maxvit_large_tf_224.in21k
* - tu-maxvit_large_tf_384.in1k
* - tu-maxvit_large_tf_384.in21k_ft_in1k
* - tu-maxvit_large_tf_512.in1k
* - tu-maxvit_large_tf_512.in21k_ft_in1k
* - tu-maxvit_nano_rw_256.sw_in1k
* - tu-maxvit_rmlp_base_rw_224.sw_in12k
* - tu-maxvit_rmlp_base_rw_224.sw_in12k_ft_in1k
* - tu-maxvit_rmlp_base_rw_384.sw_in12k_ft_in1k
* - tu-maxvit_rmlp_nano_rw_256.sw_in1k
* - tu-maxvit_rmlp_pico_rw_256.sw_in1k
* - tu-maxvit_rmlp_small_rw_224.sw_in1k
* - tu-maxvit_rmlp_tiny_rw_256.sw_in1k
* - tu-maxvit_small_tf_224.in1k
* - tu-maxvit_small_tf_384.in1k
* - tu-maxvit_small_tf_512.in1k
* - tu-maxvit_tiny_rw_224.sw_in1k
* - tu-maxvit_tiny_tf_224.in1k
* - tu-maxvit_tiny_tf_384.in1k
* - tu-maxvit_tiny_tf_512.in1k
* - tu-maxvit_xlarge_tf_224.in21k
* - tu-maxvit_xlarge_tf_384.in21k_ft_in1k
* - tu-maxvit_xlarge_tf_512.in21k_ft_in1k
* - tu-maxxvit_rmlp_nano_rw_256.sw_in1k
* - tu-maxxvit_rmlp_small_rw_256.sw_in1k
* - tu-maxxvitv2_nano_rw_256.sw_in1k
* - tu-maxxvitv2_rmlp_base_rw_224.sw_in12k
* - tu-maxxvitv2_rmlp_base_rw_224.sw_in12k_ft_in1k
* - tu-maxxvitv2_rmlp_base_rw_384.sw_in12k_ft_in1k
* - tu-mobilevit_s.cvnets_in1k
* - tu-mobilevit_xs.cvnets_in1k
* - tu-mobilevit_xxs.cvnets_in1k
* - tu-mobilevitv2_050.cvnets_in1k
* - tu-mobilevitv2_075.cvnets_in1k
* - tu-mobilevitv2_100.cvnets_in1k
* - tu-mobilevitv2_125.cvnets_in1k
* - tu-mobilevitv2_150.cvnets_in1k
* - tu-mobilevitv2_150.cvnets_in22k_ft_in1k
* - tu-mobilevitv2_150.cvnets_in22k_ft_in1k_384
* - tu-mobilevitv2_175.cvnets_in1k
* - tu-mobilevitv2_175.cvnets_in22k_ft_in1k
* - tu-mobilevitv2_175.cvnets_in22k_ft_in1k_384
* - tu-mobilevitv2_200.cvnets_in1k
* - tu-mobilevitv2_200.cvnets_in22k_ft_in1k
* - tu-mobilevitv2_200.cvnets_in22k_ft_in1k_384
* - tu-mvitv2_base.fb_in1k
* - tu-mvitv2_base_cls.fb_inw21k
* - tu-mvitv2_huge_cls.fb_inw21k
* - tu-mvitv2_large.fb_in1k
* - tu-mvitv2_large_cls.fb_inw21k
* - tu-mvitv2_small.fb_in1k
* - tu-mvitv2_tiny.fb_in1k
* - tu-samvit_base_patch16.sa1b
* - tu-samvit_huge_patch16.sa1b
* - tu-samvit_large_patch16.sa1b
* - tu-test_vit2.r160_in1k
* - tu-test_vit3.r160_in1k
* - tu-test_vit.r160_in1k
* - tu-vit_base_mci_224.apple_mclip
* - tu-vit_base_mci_224.apple_mclip_lt
* - tu-vit_base_patch8_224.augreg2_in21k_ft_in1k
* - tu-vit_base_patch8_224.augreg_in21k
* - tu-vit_base_patch8_224.augreg_in21k_ft_in1k
* - tu-vit_base_patch8_224.dino
* - tu-vit_base_patch16_224.augreg2_in21k_ft_in1k
* - tu-vit_base_patch16_224.augreg_in1k
* - tu-vit_base_patch16_224.augreg_in21k
* - tu-vit_base_patch16_224.augreg_in21k_ft_in1k
* - tu-vit_base_patch16_224.dino
* - tu-vit_base_patch16_224.mae
* - tu-vit_base_patch16_224.orig_in21k
* - tu-vit_base_patch16_224.orig_in21k_ft_in1k
* - tu-vit_base_patch16_224.sam_in1k
* - tu-vit_base_patch16_224_miil.in21k
* - tu-vit_base_patch16_224_miil.in21k_ft_in1k
* - tu-vit_base_patch16_384.augreg_in1k
* - tu-vit_base_patch16_384.augreg_in21k_ft_in1k
* - tu-vit_base_patch16_384.orig_in21k_ft_in1k
* - tu-vit_base_patch16_clip_224.datacompxl
* - tu-vit_base_patch16_clip_224.dfn2b
* - tu-vit_base_patch16_clip_224.laion2b
* - tu-vit_base_patch16_clip_224.laion2b_ft_in1k
* - tu-vit_base_patch16_clip_224.laion2b_ft_in12k
* - tu-vit_base_patch16_clip_224.laion2b_ft_in12k_in1k
* - tu-vit_base_patch16_clip_224.laion400m_e32
* - tu-vit_base_patch16_clip_224.metaclip_2pt5b
* - tu-vit_base_patch16_clip_224.metaclip_400m
* - tu-vit_base_patch16_clip_224.openai
* - tu-vit_base_patch16_clip_224.openai_ft_in1k
* - tu-vit_base_patch16_clip_224.openai_ft_in12k
* - tu-vit_base_patch16_clip_224.openai_ft_in12k_in1k
* - tu-vit_base_patch16_clip_384.laion2b_ft_in1k
* - tu-vit_base_patch16_clip_384.laion2b_ft_in12k_in1k
* - tu-vit_base_patch16_clip_384.openai_ft_in1k
* - tu-vit_base_patch16_clip_384.openai_ft_in12k_in1k
* - tu-vit_base_patch16_clip_quickgelu_224.metaclip_2pt5b
* - tu-vit_base_patch16_clip_quickgelu_224.metaclip_400m
* - tu-vit_base_patch16_clip_quickgelu_224.openai
* - tu-vit_base_patch16_plus_clip_240.laion400m_e32
* - tu-vit_base_patch16_rope_reg1_gap_256.sbb_in1k
* - tu-vit_base_patch16_rpn_224.sw_in1k
* - tu-vit_base_patch16_siglip_224.v2_webli
* - tu-vit_base_patch16_siglip_224.webli
* - tu-vit_base_patch16_siglip_256.v2_webli
* - tu-vit_base_patch16_siglip_256.webli
* - tu-vit_base_patch16_siglip_256.webli_i18n
* - tu-vit_base_patch16_siglip_384.v2_webli
* - tu-vit_base_patch16_siglip_384.webli
* - tu-vit_base_patch16_siglip_512.v2_webli
* - tu-vit_base_patch16_siglip_512.webli
* - tu-vit_base_patch16_siglip_gap_224.v2_webli
* - tu-vit_base_patch16_siglip_gap_224.webli
* - tu-vit_base_patch16_siglip_gap_256.v2_webli
* - tu-vit_base_patch16_siglip_gap_256.webli
* - tu-vit_base_patch16_siglip_gap_256.webli_i18n
* - tu-vit_base_patch16_siglip_gap_384.v2_webli
* - tu-vit_base_patch16_siglip_gap_384.webli
* - tu-vit_base_patch16_siglip_gap_512.v2_webli
* - tu-vit_base_patch16_siglip_gap_512.webli
* - tu-vit_base_patch32_224.augreg_in1k
* - tu-vit_base_patch32_224.augreg_in21k
* - tu-vit_base_patch32_224.augreg_in21k_ft_in1k
* - tu-vit_base_patch32_224.orig_in21k
* - tu-vit_base_patch32_224.sam_in1k
* - tu-vit_base_patch32_384.augreg_in1k
* - tu-vit_base_patch32_384.augreg_in21k_ft_in1k
* - tu-vit_base_patch32_clip_224.datacompxl
* - tu-vit_base_patch32_clip_224.laion2b
* - tu-vit_base_patch32_clip_224.laion2b_ft_in1k
* - tu-vit_base_patch32_clip_224.laion2b_ft_in12k_in1k
* - tu-vit_base_patch32_clip_224.laion400m_e32
* - tu-vit_base_patch32_clip_224.metaclip_2pt5b
* - tu-vit_base_patch32_clip_224.metaclip_400m
* - tu-vit_base_patch32_clip_224.openai
* - tu-vit_base_patch32_clip_224.openai_ft_in1k
* - tu-vit_base_patch32_clip_256.datacompxl
* - tu-vit_base_patch32_clip_384.laion2b_ft_in12k_in1k
* - tu-vit_base_patch32_clip_384.openai_ft_in12k_in1k
* - tu-vit_base_patch32_clip_448.laion2b_ft_in12k_in1k
* - tu-vit_base_patch32_clip_quickgelu_224.laion400m_e32
* - tu-vit_base_patch32_clip_quickgelu_224.metaclip_2pt5b
* - tu-vit_base_patch32_clip_quickgelu_224.metaclip_400m
* - tu-vit_base_patch32_clip_quickgelu_224.openai
* - tu-vit_base_patch32_siglip_256.v2_webli
* - tu-vit_base_patch32_siglip_gap_256.v2_webli
* - tu-vit_base_r50_s16_224.orig_in21k
* - tu-vit_base_r50_s16_384.orig_in21k_ft_in1k
* - tu-vit_betwixt_patch16_reg1_gap_256.sbb_in1k
* - tu-vit_betwixt_patch16_reg4_gap_256.sbb2_e200_in12k
* - tu-vit_betwixt_patch16_reg4_gap_256.sbb2_e200_in12k_ft_in1k
* - tu-vit_betwixt_patch16_reg4_gap_256.sbb_in1k
* - tu-vit_betwixt_patch16_reg4_gap_256.sbb_in12k
* - tu-vit_betwixt_patch16_reg4_gap_256.sbb_in12k_ft_in1k
* - tu-vit_betwixt_patch16_reg4_gap_384.sbb2_e200_in12k_ft_in1k
* - tu-vit_betwixt_patch16_rope_reg4_gap_256.sbb_in1k
* - tu-vit_betwixt_patch32_clip_224.tinyclip_laion400m
* - tu-vit_giant_patch16_gap_224.in22k_ijepa
* - tu-vit_giantopt_patch16_siglip_256.v2_webli
* - tu-vit_giantopt_patch16_siglip_384.v2_webli
* - tu-vit_giantopt_patch16_siglip_gap_256.v2_webli
* - tu-vit_giantopt_patch16_siglip_gap_384.v2_webli
* - tu-vit_huge_patch16_gap_448.in1k_ijepa
* - tu-vit_large_patch16_224.augreg_in21k
* - tu-vit_large_patch16_224.augreg_in21k_ft_in1k
* - tu-vit_large_patch16_224.mae
* - tu-vit_large_patch16_224.orig_in21k
* - tu-vit_large_patch16_384.augreg_in21k_ft_in1k
* - tu-vit_large_patch16_siglip_256.v2_webli
* - tu-vit_large_patch16_siglip_256.webli
* - tu-vit_large_patch16_siglip_384.v2_webli
* - tu-vit_large_patch16_siglip_384.webli
* - tu-vit_large_patch16_siglip_512.v2_webli
* - tu-vit_large_patch16_siglip_gap_256.v2_webli
* - tu-vit_large_patch16_siglip_gap_256.webli
* - tu-vit_large_patch16_siglip_gap_384.v2_webli
* - tu-vit_large_patch16_siglip_gap_384.webli
* - tu-vit_large_patch16_siglip_gap_512.v2_webli
* - tu-vit_large_patch32_224.orig_in21k
* - tu-vit_large_patch32_384.orig_in21k_ft_in1k
* - tu-vit_large_r50_s32_224.augreg_in21k
* - tu-vit_large_r50_s32_224.augreg_in21k_ft_in1k
* - tu-vit_large_r50_s32_384.augreg_in21k_ft_in1k
* - tu-vit_little_patch16_reg1_gap_256.sbb_in12k
* - tu-vit_little_patch16_reg1_gap_256.sbb_in12k_ft_in1k
* - tu-vit_little_patch16_reg4_gap_256.sbb_in1k
* - tu-vit_medium_patch16_clip_224.tinyclip_yfcc15m
* - tu-vit_medium_patch16_gap_240.sw_in12k
* - tu-vit_medium_patch16_gap_256.sw_in12k_ft_in1k
* - tu-vit_medium_patch16_gap_384.sw_in12k_ft_in1k
* - tu-vit_medium_patch16_reg1_gap_256.sbb_in1k
* - tu-vit_medium_patch16_reg4_gap_256.sbb_in1k
* - tu-vit_medium_patch16_reg4_gap_256.sbb_in12k
* - tu-vit_medium_patch16_reg4_gap_256.sbb_in12k_ft_in1k
* - tu-vit_medium_patch16_rope_reg1_gap_256.sbb_in1k
* - tu-vit_medium_patch32_clip_224.tinyclip_laion400m
* - tu-vit_mediumd_patch16_reg4_gap_256.sbb2_e200_in12k
* - tu-vit_mediumd_patch16_reg4_gap_256.sbb2_e200_in12k_ft_in1k
* - tu-vit_mediumd_patch16_reg4_gap_256.sbb_in12k
* - tu-vit_mediumd_patch16_reg4_gap_256.sbb_in12k_ft_in1k
* - tu-vit_mediumd_patch16_reg4_gap_384.sbb2_e200_in12k_ft_in1k
* - tu-vit_mediumd_patch16_rope_reg1_gap_256.sbb_in1k
* - tu-vit_pwee_patch16_reg1_gap_256.sbb_in1k
* - tu-vit_relpos_base_patch16_224.sw_in1k
* - tu-vit_relpos_base_patch16_clsgap_224.sw_in1k
* - tu-vit_relpos_base_patch32_plus_rpn_256.sw_in1k
* - tu-vit_relpos_medium_patch16_224.sw_in1k
* - tu-vit_relpos_medium_patch16_cls_224.sw_in1k
* - tu-vit_relpos_medium_patch16_rpn_224.sw_in1k
* - tu-vit_relpos_small_patch16_224.sw_in1k
* - tu-vit_small_patch8_224.dino
* - tu-vit_small_patch16_224.augreg_in1k
* - tu-vit_small_patch16_224.augreg_in21k
* - tu-vit_small_patch16_224.augreg_in21k_ft_in1k
* - tu-vit_small_patch16_224.dino
* - tu-vit_small_patch16_384.augreg_in1k
* - tu-vit_small_patch16_384.augreg_in21k_ft_in1k
* - tu-vit_small_patch32_224.augreg_in21k
* - tu-vit_small_patch32_224.augreg_in21k_ft_in1k
* - tu-vit_small_patch32_384.augreg_in21k_ft_in1k
* - tu-vit_small_r26_s32_224.augreg_in21k
* - tu-vit_small_r26_s32_224.augreg_in21k_ft_in1k
* - tu-vit_small_r26_s32_384.augreg_in21k_ft_in1k
* - tu-vit_so150m2_patch16_reg1_gap_256.sbb_e200_in12k
* - tu-vit_so150m2_patch16_reg1_gap_256.sbb_e200_in12k_ft_in1k
* - tu-vit_so150m2_patch16_reg1_gap_384.sbb_e200_in12k_ft_in1k
* - tu-vit_so150m2_patch16_reg1_gap_448.sbb_e200_in12k_ft_in1k
* - tu-vit_so150m_patch16_reg4_gap_256.sbb_e250_in12k
* - tu-vit_so150m_patch16_reg4_gap_256.sbb_e250_in12k_ft_in1k
* - tu-vit_so150m_patch16_reg4_gap_384.sbb_e250_in12k_ft_in1k
* - tu-vit_so400m_patch16_siglip_256.v2_webli
* - tu-vit_so400m_patch16_siglip_256.webli_i18n
* - tu-vit_so400m_patch16_siglip_384.v2_webli
* - tu-vit_so400m_patch16_siglip_512.v2_webli
* - tu-vit_so400m_patch16_siglip_gap_256.v2_webli
* - tu-vit_so400m_patch16_siglip_gap_256.webli_i18n
* - tu-vit_so400m_patch16_siglip_gap_384.v2_webli
* - tu-vit_so400m_patch16_siglip_gap_512.v2_webli
* - tu-vit_srelpos_medium_patch16_224.sw_in1k
* - tu-vit_srelpos_small_patch16_224.sw_in1k
* - tu-vit_tiny_patch16_224.augreg_in21k
* - tu-vit_tiny_patch16_224.augreg_in21k_ft_in1k
* - tu-vit_tiny_patch16_384.augreg_in21k_ft_in1k
* - tu-vit_tiny_r_s16_p8_224.augreg_in21k
* - tu-vit_tiny_r_s16_p8_224.augreg_in21k_ft_in1k
* - tu-vit_tiny_r_s16_p8_384.augreg_in21k_ft_in1k
* - tu-vit_wee_patch16_reg1_gap_256.sbb_in1k
* - tu-vit_xsmall_patch16_clip_224.tinyclip_yfcc15m
* - tu-vitamin_base_224.datacomp1b_clip
* - tu-vitamin_base_224.datacomp1b_clip_ltt
* - tu-vitamin_large2_224.datacomp1b_clip
* - tu-vitamin_large2_256.datacomp1b_clip
* - tu-vitamin_large2_336.datacomp1b_clip
* - tu-vitamin_large2_384.datacomp1b_clip
* - tu-vitamin_large_224.datacomp1b_clip
* - tu-vitamin_large_256.datacomp1b_clip
* - tu-vitamin_large_336.datacomp1b_clip
* - tu-vitamin_large_384.datacomp1b_clip
* - tu-vitamin_small_224.datacomp1b_clip
* - tu-vitamin_small_224.datacomp1b_clip_ltt
* - tu-vitamin_xlarge_256.datacomp1b_clip
* - tu-vitamin_xlarge_336.datacomp1b_clip
* - tu-vitamin_xlarge_384.datacomp1b_clip
* - tu-hiera_small_abswin_256.sbb2_e200_in12k
* - tu-hiera_small_abswin_256.sbb2_e200_in12k_ft_in1k
* - tu-hiera_small_abswin_256.sbb2_pd_e200_in12k
* - tu-hiera_small_abswin_256.sbb2_pd_e200_in12k_ft_in1k
* - tu-swin_base_patch4_window7_224.ms_in1k
* - tu-swin_base_patch4_window7_224.ms_in22k
* - tu-swin_base_patch4_window7_224.ms_in22k_ft_in1k
* - tu-swin_base_patch4_window12_384.ms_in1k
* - tu-swin_base_patch4_window12_384.ms_in22k
* - tu-swin_base_patch4_window12_384.ms_in22k_ft_in1k
* - tu-swin_large_patch4_window7_224.ms_in22k
* - tu-swin_large_patch4_window7_224.ms_in22k_ft_in1k
* - tu-swin_large_patch4_window12_384.ms_in22k
* - tu-swin_large_patch4_window12_384.ms_in22k_ft_in1k
* - tu-swin_s3_base_224.ms_in1k
* - tu-swin_s3_small_224.ms_in1k
* - tu-swin_s3_tiny_224.ms_in1k
* - tu-swin_small_patch4_window7_224.ms_in1k
* - tu-swin_small_patch4_window7_224.ms_in22k
* - tu-swin_small_patch4_window7_224.ms_in22k_ft_in1k
* - tu-swin_tiny_patch4_window7_224.ms_in1k
* - tu-swin_tiny_patch4_window7_224.ms_in22k
* - tu-swin_tiny_patch4_window7_224.ms_in22k_ft_in1k
* - tu-swinv2_base_window8_256.ms_in1k
* - tu-swinv2_base_window12_192.ms_in22k
* - tu-swinv2_base_window12to16_192to256.ms_in22k_ft_in1k
* - tu-swinv2_base_window12to24_192to384.ms_in22k_ft_in1k
* - tu-swinv2_base_window16_256.ms_in1k
* - tu-swinv2_cr_small_224.sw_in1k
* - tu-swinv2_cr_small_ns_224.sw_in1k
* - tu-swinv2_cr_tiny_ns_224.sw_in1k
* - tu-swinv2_large_window12_192.ms_in22k
* - tu-swinv2_large_window12to16_192to256.ms_in22k_ft_in1k
* - tu-swinv2_large_window12to24_192to384.ms_in22k_ft_in1k
* - tu-swinv2_small_window8_256.ms_in1k
* - tu-swinv2_small_window16_256.ms_in1k
* - tu-swinv2_tiny_window8_256.ms_in1k
* - tu-swinv2_tiny_window16_256.ms_in1k
* - tu-efficientformer_l1.snap_dist_in1k
* - tu-efficientformer_l3.snap_dist_in1k
* - tu-efficientformer_l7.snap_dist_in1k
* - tu-beit_base_patch16_224.in22k_ft_in22k
* - tu-beit_base_patch16_224.in22k_ft_in22k_in1k
* - tu-beit_base_patch16_384.in22k_ft_in22k_in1k
* - tu-beit_large_patch16_224.in22k_ft_in22k
* - tu-beit_large_patch16_224.in22k_ft_in22k_in1k
* - tu-beit_large_patch16_384.in22k_ft_in22k_in1k
* - tu-beit_large_patch16_512.in22k_ft_in22k_in1k
* - tu-beitv2_base_patch16_224.in1k_ft_in1k
* - tu-beitv2_base_patch16_224.in1k_ft_in22k
* - tu-beitv2_base_patch16_224.in1k_ft_in22k_in1k
* - tu-beitv2_large_patch16_224.in1k_ft_in1k
* - tu-beitv2_large_patch16_224.in1k_ft_in22k
* - tu-beitv2_large_patch16_224.in1k_ft_in22k_in1k
* - tu-cait_m36_384.fb_dist_in1k
* - tu-cait_m48_448.fb_dist_in1k
* - tu-cait_s24_224.fb_dist_in1k
* - tu-cait_s24_384.fb_dist_in1k
* - tu-cait_s36_384.fb_dist_in1k
* - tu-cait_xs24_384.fb_dist_in1k
* - tu-cait_xxs24_224.fb_dist_in1k
* - tu-cait_xxs24_384.fb_dist_in1k
* - tu-cait_xxs36_224.fb_dist_in1k
* - tu-cait_xxs36_384.fb_dist_in1k
* - tu-coatnet_0_rw_224.sw_in1k
* - tu-coatnet_1_rw_224.sw_in1k
* - tu-coatnet_2_rw_224.sw_in12k
* - tu-coatnet_2_rw_224.sw_in12k_ft_in1k
* - tu-coatnet_3_rw_224.sw_in12k
* - tu-coatnet_bn_0_rw_224.sw_in1k
* - tu-coatnet_nano_rw_224.sw_in1k
* - tu-coatnet_rmlp_1_rw2_224.sw_in12k
* - tu-coatnet_rmlp_1_rw2_224.sw_in12k_ft_in1k
* - tu-coatnet_rmlp_1_rw_224.sw_in1k
* - tu-coatnet_rmlp_2_rw_224.sw_in1k
* - tu-coatnet_rmlp_2_rw_224.sw_in12k
* - tu-coatnet_rmlp_2_rw_224.sw_in12k_ft_in1k
* - tu-coatnet_rmlp_2_rw_384.sw_in12k_ft_in1k
* - tu-coatnet_rmlp_nano_rw_224.sw_in1k
* - tu-deit3_base_patch16_224.fb_in1k
* - tu-deit3_base_patch16_224.fb_in22k_ft_in1k
* - tu-deit3_base_patch16_384.fb_in1k
* - tu-deit3_base_patch16_384.fb_in22k_ft_in1k
* - tu-deit3_large_patch16_224.fb_in1k
* - tu-deit3_large_patch16_224.fb_in22k_ft_in1k
* - tu-deit3_large_patch16_384.fb_in1k
* - tu-deit3_large_patch16_384.fb_in22k_ft_in1k
* - tu-deit3_medium_patch16_224.fb_in1k
* - tu-deit3_medium_patch16_224.fb_in22k_ft_in1k
* - tu-deit3_small_patch16_224.fb_in1k
* - tu-deit3_small_patch16_224.fb_in22k_ft_in1k
* - tu-deit3_small_patch16_384.fb_in1k
* - tu-deit3_small_patch16_384.fb_in22k_ft_in1k
* - tu-deit_base_distilled_patch16_224.fb_in1k
* - tu-deit_base_distilled_patch16_384.fb_in1k
* - tu-deit_base_patch16_224.fb_in1k
* - tu-deit_base_patch16_384.fb_in1k
* - tu-deit_small_distilled_patch16_224.fb_in1k
* - tu-deit_small_patch16_224.fb_in1k
* - tu-deit_tiny_distilled_patch16_224.fb_in1k
* - tu-deit_tiny_patch16_224.fb_in1k
* - tu-regnety_160.deit_in1k
* - tu-twins_pcpvt_base.in1k
* - tu-twins_pcpvt_large.in1k
* - tu-twins_pcpvt_small.in1k
* - tu-twins_svt_base.in1k
* - tu-twins_svt_large.in1k
* - tu-twins_svt_small.in1k
* - tu-xcit_large_24_p8_224.fb_dist_in1k
* - tu-xcit_large_24_p8_224.fb_in1k
* - tu-xcit_large_24_p8_384.fb_dist_in1k
* - tu-xcit_large_24_p16_224.fb_dist_in1k
* - tu-xcit_large_24_p16_224.fb_in1k
* - tu-xcit_large_24_p16_384.fb_dist_in1k
* - tu-xcit_medium_24_p8_224.fb_dist_in1k
* - tu-xcit_medium_24_p8_224.fb_in1k
* - tu-xcit_medium_24_p8_384.fb_dist_in1k
* - tu-xcit_medium_24_p16_224.fb_dist_in1k
* - tu-xcit_medium_24_p16_224.fb_in1k
* - tu-xcit_medium_24_p16_384.fb_dist_in1k
* - tu-xcit_nano_12_p8_224.fb_dist_in1k
* - tu-xcit_nano_12_p8_224.fb_in1k
* - tu-xcit_nano_12_p8_384.fb_dist_in1k
* - tu-xcit_nano_12_p16_224.fb_dist_in1k
* - tu-xcit_nano_12_p16_224.fb_in1k
* - tu-xcit_nano_12_p16_384.fb_dist_in1k
* - tu-xcit_small_12_p8_224.fb_dist_in1k
* - tu-xcit_small_12_p8_224.fb_in1k
* - tu-xcit_small_12_p8_384.fb_dist_in1k
* - tu-xcit_small_12_p16_224.fb_dist_in1k
* - tu-xcit_small_12_p16_224.fb_in1k
* - tu-xcit_small_12_p16_384.fb_dist_in1k
* - tu-xcit_small_24_p8_224.fb_dist_in1k
* - tu-xcit_small_24_p8_224.fb_in1k
* - tu-xcit_small_24_p8_384.fb_dist_in1k
* - tu-xcit_small_24_p16_224.fb_dist_in1k
* - tu-xcit_small_24_p16_224.fb_in1k
* - tu-xcit_small_24_p16_384.fb_dist_in1k
* - tu-xcit_tiny_12_p8_224.fb_dist_in1k
* - tu-xcit_tiny_12_p8_224.fb_in1k
* - tu-xcit_tiny_12_p8_384.fb_dist_in1k
* - tu-xcit_tiny_12_p16_224.fb_dist_in1k
* - tu-xcit_tiny_12_p16_224.fb_in1k
* - tu-xcit_tiny_12_p16_384.fb_dist_in1k
* - tu-xcit_tiny_24_p8_224.fb_dist_in1k
* - tu-xcit_tiny_24_p8_224.fb_in1k
* - tu-xcit_tiny_24_p8_384.fb_dist_in1k
* - tu-xcit_tiny_24_p16_224.fb_dist_in1k
* - tu-xcit_tiny_24_p16_224.fb_in1k
* - tu-xcit_tiny_24_p16_384.fb_dist_in1k

---

Encoders Timm

🎯 Timm Encoders
================

Pytorch Image Models (a.k.a. timm) has a lot of pretrained models and interface which allows using these models as encoders in smp,
however, not all models are supported

- not all transformer models have features_only functionality implemented that is required for encoder
- some models have inappropriate strides

Below is a table of suitable encoders (for DeepLabV3, DeepLabV3+, and PAN dilation support is needed also)

Total number of encoders: 812 (593+219)

.. note::

To use following encoders you have to add prefix tu-, e.g. tu-adv_inception_v3

Traditional-Style
~~~~~~~~~~~~~~~~~

These models typically produce feature maps at the following downsampling scales relative to the input resolution: 1/2, 1/4, 1/8, 1/16, and 1/32

+----------------------------------+------------------+
| Encoder name | Support dilation |
+==================================+==================+
| bat_resnext26ts | βœ… |
+----------------------------------+------------------+
| botnet26t_256 | βœ… |
+----------------------------------+------------------+
| botnet50ts_256 | βœ… |
+----------------------------------+------------------+
| coatnet_0_224 | |
+----------------------------------+------------------+
| coatnet_0_rw_224 | |
+----------------------------------+------------------+
| coatnet_1_224 | |
+----------------------------------+------------------+
| coatnet_1_rw_224 | |
+----------------------------------+------------------+
| coatnet_2_224 | |
+----------------------------------+------------------+
| coatnet_2_rw_224 | |
+----------------------------------+------------------+
| coatnet_3_224 | |
+----------------------------------+------------------+
| coatnet_3_rw_224 | |
+----------------------------------+------------------+
| coatnet_4_224 | |
+----------------------------------+------------------+
| coatnet_5_224 | |
+----------------------------------+------------------+
| coatnet_bn_0_rw_224 | |
+----------------------------------+------------------+
| coatnet_nano_cc_224 | |
+----------------------------------+------------------+
| coatnet_nano_rw_224 | |
+----------------------------------+------------------+
| coatnet_pico_rw_224 | |
+----------------------------------+------------------+
| coatnet_rmlp_0_rw_224 | |
+----------------------------------+------------------+
| coatnet_rmlp_1_rw2_224 | |
+----------------------------------+------------------+
| coatnet_rmlp_1_rw_224 | |
+----------------------------------+------------------+
| coatnet_rmlp_2_rw_224 | |
+----------------------------------+------------------+
| coatnet_rmlp_2_rw_384 | |
+----------------------------------+------------------+
| coatnet_rmlp_3_rw_224 | |
+----------------------------------+------------------+
| coatnet_rmlp_nano_rw_224 | |
+----------------------------------+------------------+
| coatnext_nano_rw_224 | |
+----------------------------------+------------------+
| cs3darknet_focus_l | βœ… |
+----------------------------------+------------------+
| cs3darknet_focus_m | βœ… |
+----------------------------------+------------------+
| cs3darknet_focus_s | βœ… |
+----------------------------------+------------------+
| cs3darknet_focus_x | βœ… |
+----------------------------------+------------------+
| cs3darknet_l | βœ… |
+----------------------------------+------------------+
| cs3darknet_m | βœ… |
+----------------------------------+------------------+
| cs3darknet_s | βœ… |
+----------------------------------+------------------+
| cs3darknet_x | βœ… |
+----------------------------------+------------------+
| cs3edgenet_x | βœ… |
+----------------------------------+------------------+
| cs3se_edgenet_x | βœ… |
+----------------------------------+------------------+
| cs3sedarknet_l | βœ… |
+----------------------------------+------------------+
| cs3sedarknet_x | βœ… |
+----------------------------------+------------------+
| cs3sedarknet_xdw | βœ… |
+----------------------------------+------------------+
| cspdarknet53 | βœ… |
+----------------------------------+------------------+
| cspresnet50 | βœ… |
+----------------------------------+------------------+
| cspresnet50d | βœ… |
+----------------------------------+------------------+
| cspresnet50w | βœ… |
+----------------------------------+------------------+
| cspresnext50 | βœ… |
+----------------------------------+------------------+
| darknet17 | βœ… |
+----------------------------------+------------------+
| darknet21 | βœ… |
+----------------------------------+------------------+
| darknet53 | βœ… |
+----------------------------------+------------------+
| darknetaa53 | βœ… |
+----------------------------------+------------------+
| densenet121 | |
+----------------------------------+------------------+
| densenet161 | |
+----------------------------------+------------------+
| densenet169 | |
+----------------------------------+------------------+
| densenet201 | |
+----------------------------------+------------------+
| densenet264d | |
+----------------------------------+------------------+
| densenetblur121d | |
+----------------------------------+------------------+
| dla34 | |
+----------------------------------+------------------+
| dla46_c | |
+----------------------------------+------------------+
| dla46x_c | |
+----------------------------------+------------------+
| dla60 | |
+----------------------------------+------------------+
| dla60_res2net | |
+----------------------------------+------------------+
| dla60_res2next | |
+----------------------------------+------------------+
| dla60x | |
+----------------------------------+------------------+
| dla60x_c | |
+----------------------------------+------------------+
| dla102 | |
+----------------------------------+------------------+
| dla102x | |
+----------------------------------+------------------+
| dla102x2 | |
+----------------------------------+------------------+
| dla169 | |
+----------------------------------+------------------+
| dm_nfnet_f0 | βœ… |
+----------------------------------+------------------+
| dm_nfnet_f1 | βœ… |
+----------------------------------+------------------+
| dm_nfnet_f2 | βœ… |
+----------------------------------+------------------+
| dm_nfnet_f3 | βœ… |
+----------------------------------+------------------+
| dm_nfnet_f4 | βœ… |
+----------------------------------+------------------+
| dm_nfnet_f5 | βœ… |
+----------------------------------+------------------+
| dm_nfnet_f6 | βœ… |
+----------------------------------+------------------+
| dpn48b | |
+----------------------------------+------------------+
| dpn68 | |
+----------------------------------+------------------+
| dpn68b | |
+----------------------------------+------------------+
| dpn92 | |
+----------------------------------+------------------+
| dpn98 | |
+----------------------------------+------------------+
| dpn107 | |
+----------------------------------+------------------+
| dpn131 | |
+----------------------------------+------------------+
| eca_botnext26ts_256 | βœ… |
+----------------------------------+------------------+
| eca_halonext26ts | βœ… |
+----------------------------------+------------------+
| eca_nfnet_l0 | βœ… |
+----------------------------------+------------------+
| eca_nfnet_l1 | βœ… |
+----------------------------------+------------------+
| eca_nfnet_l2 | βœ… |
+----------------------------------+------------------+
| eca_nfnet_l3 | βœ… |
+----------------------------------+------------------+
| eca_resnet33ts | βœ… |
+----------------------------------+------------------+
| eca_resnext26ts | βœ… |
+----------------------------------+------------------+
| eca_vovnet39b | |
+----------------------------------+------------------+
| ecaresnet26t | βœ… |
+----------------------------------+------------------+
| ecaresnet50d | βœ… |
+----------------------------------+------------------+
| ecaresnet50d_pruned | βœ… |
+----------------------------------+------------------+
| ecaresnet50t | βœ… |
+----------------------------------+------------------+
| ecaresnet101d | βœ… |
+----------------------------------+------------------+
| ecaresnet101d_pruned | βœ… |
+----------------------------------+------------------+
| ecaresnet200d | βœ… |
+----------------------------------+------------------+
| ecaresnet269d | βœ… |
+----------------------------------+------------------+
| ecaresnetlight | βœ… |
+----------------------------------+------------------+
| ecaresnext26t_32x4d | βœ… |
+----------------------------------+------------------+
| ecaresnext50t_32x4d | βœ… |
+----------------------------------+------------------+
| efficientnet_b0 | βœ… |
+----------------------------------+------------------+
| efficientnet_b0_g8_gn | βœ… |
+----------------------------------+------------------+
| efficientnet_b0_g16_evos | βœ… |
+----------------------------------+------------------+
| efficientnet_b0_gn | βœ… |
+----------------------------------+------------------+
| efficientnet_b1 | βœ… |
+----------------------------------+------------------+
| efficientnet_b1_pruned | βœ… |
+----------------------------------+------------------+
| efficientnet_b2 | βœ… |
+----------------------------------+------------------+
| efficientnet_b2_pruned | βœ… |
+----------------------------------+------------------+
| efficientnet_b3 | βœ… |
+----------------------------------+------------------+
| efficientnet_b3_g8_gn | βœ… |
+----------------------------------+------------------+
| efficientnet_b3_gn | βœ… |
+----------------------------------+------------------+
| efficientnet_b3_pruned | βœ… |
+----------------------------------+------------------+
| efficientnet_b4 | βœ… |
+----------------------------------+------------------+
| efficientnet_b5 | βœ… |
+----------------------------------+------------------+
| efficientnet_b6 | βœ… |
+----------------------------------+------------------+
| efficientnet_b7 | βœ… |
+----------------------------------+------------------+
| efficientnet_b8 | βœ… |
+----------------------------------+------------------+
| efficientnet_blur_b0 | βœ… |
+----------------------------------+------------------+
| efficientnet_cc_b0_4e | βœ… |
+----------------------------------+------------------+
| efficientnet_cc_b0_8e | βœ… |
+----------------------------------+------------------+
| efficientnet_cc_b1_8e | βœ… |
+----------------------------------+------------------+
| efficientnet_el | βœ… |
+----------------------------------+------------------+
| efficientnet_el_pruned | βœ… |
+----------------------------------+------------------+
| efficientnet_em | βœ… |
+----------------------------------+------------------+
| efficientnet_es | βœ… |
+----------------------------------+------------------+
| efficientnet_es_pruned | βœ… |
+----------------------------------+------------------+
| efficientnet_l2 | βœ… |
+----------------------------------+------------------+
| efficientnet_lite0 | βœ… |
+----------------------------------+------------------+
| efficientnet_lite1 | βœ… |
+----------------------------------+------------------+
| efficientnet_lite2 | βœ… |
+----------------------------------+------------------+
| efficientnet_lite3 | βœ… |
+----------------------------------+------------------+
| efficientnet_lite4 | βœ… |
+----------------------------------+------------------+
| efficientnetv2_l | βœ… |
+----------------------------------+------------------+
| efficientnetv2_m | βœ… |
+----------------------------------+------------------+
| efficientnetv2_rw_m | βœ… |
+----------------------------------+------------------+
| efficientnetv2_rw_s | βœ… |
+----------------------------------+------------------+
| efficientnetv2_rw_t | βœ… |
+----------------------------------+------------------+
| efficientnetv2_s | βœ… |
+----------------------------------+------------------+
| efficientnetv2_xl | βœ… |
+----------------------------------+------------------+
| ese_vovnet19b_dw | |
+----------------------------------+------------------+
| ese_vovnet19b_slim | |
+----------------------------------+------------------+
| ese_vovnet19b_slim_dw | |
+----------------------------------+------------------+
| ese_vovnet39b | |
+----------------------------------+------------------+
| ese_vovnet39b_evos | |
+----------------------------------+------------------+
| ese_vovnet57b | |
+----------------------------------+------------------+
| ese_vovnet99b | |
+----------------------------------+------------------+
| fbnetc_100 | βœ… |
+----------------------------------+------------------+
| fbnetv3_b | βœ… |
+----------------------------------+------------------+
| fbnetv3_d | βœ… |
+----------------------------------+------------------+
| fbnetv3_g | βœ… |
+----------------------------------+------------------+
| gc_efficientnetv2_rw_t | βœ… |
+----------------------------------+------------------+
| gcresnet33ts | βœ… |
+----------------------------------+------------------+
| gcresnet50t | βœ… |
+----------------------------------+------------------+
| gcresnext26ts | βœ… |
+----------------------------------+------------------+
| gcresnext50ts | βœ… |
+----------------------------------+------------------+
| gernet_l | βœ… |
+----------------------------------+------------------+
| gernet_m | βœ… |
+----------------------------------+------------------+
| gernet_s | βœ… |
+----------------------------------+------------------+
| ghostnet_050 | |
+----------------------------------+------------------+
| ghostnet_100 | |
+----------------------------------+------------------+
| ghostnet_130 | |
+----------------------------------+------------------+
| ghostnetv2_100 | |
+----------------------------------+------------------+
| ghostnetv2_130 | |
+----------------------------------+------------------+
| ghostnetv2_160 | |
+----------------------------------+------------------+
| halo2botnet50ts_256 | βœ… |
+----------------------------------+------------------+
| halonet26t | βœ… |
+----------------------------------+------------------+
| halonet50ts | βœ… |
+----------------------------------+------------------+
| halonet_h1 | βœ… |
+----------------------------------+------------------+
| haloregnetz_b | βœ… |
+----------------------------------+------------------+
| hardcorenas_a | βœ… |
+----------------------------------+------------------+
| hardcorenas_b | βœ… |
+----------------------------------+------------------+
| hardcorenas_c | βœ… |
+----------------------------------+------------------+
| hardcorenas_d | βœ… |
+----------------------------------+------------------+
| hardcorenas_e | βœ… |
+----------------------------------+------------------+
| hardcorenas_f | βœ… |
+----------------------------------+------------------+
| hrnet_w18 | |
+----------------------------------+------------------+
| hrnet_w18_small | |
+----------------------------------+------------------+
| hrnet_w18_small_v2 | |
+----------------------------------+------------------+
| hrnet_w18_ssld | |
+----------------------------------+------------------+
| hrnet_w30 | |
+----------------------------------+------------------+
| hrnet_w32 | |
+----------------------------------+------------------+
| hrnet_w40 | |
+----------------------------------+------------------+
| hrnet_w44 | |
+----------------------------------+------------------+
| hrnet_w48 | |
+----------------------------------+------------------+
| hrnet_w48_ssld | |
+----------------------------------+------------------+
| hrnet_w64 | |
+----------------------------------+------------------+
| lambda_resnet26rpt_256 | βœ… |
+----------------------------------+------------------+
| lambda_resnet26t | βœ… |
+----------------------------------+------------------+
| lambda_resnet50ts | βœ… |
+----------------------------------+------------------+
| lamhalobotnet50ts_256 | βœ… |
+----------------------------------+------------------+
| lcnet_035 | βœ… |
+----------------------------------+------------------+
| lcnet_050 | βœ… |
+----------------------------------+------------------+
| lcnet_075 | βœ… |
+----------------------------------+------------------+
| lcnet_100 | βœ… |
+----------------------------------+------------------+
| lcnet_150 | βœ… |
+----------------------------------+------------------+
| legacy_senet154 | |
+----------------------------------+------------------+
| legacy_seresnet18 | |
+----------------------------------+------------------+
| legacy_seresnet34 | |
+----------------------------------+------------------+
| legacy_seresnet50 | |
+----------------------------------+------------------+
| legacy_seresnet101 | |
+----------------------------------+------------------+
| legacy_seresnet152 | |
+----------------------------------+------------------+
| legacy_seresnext26_32x4d | |
+----------------------------------+------------------+
| legacy_seresnext50_32x4d | |
+----------------------------------+------------------+
| legacy_seresnext101_32x4d | |
+----------------------------------+------------------+
| maxvit_base_tf_224 | |
+----------------------------------+------------------+
| maxvit_base_tf_384 | |
+----------------------------------+------------------+
| maxvit_base_tf_512 | |
+----------------------------------+------------------+
| maxvit_large_tf_224 | |
+----------------------------------+------------------+
| maxvit_large_tf_384 | |
+----------------------------------+------------------+
| maxvit_large_tf_512 | |
+----------------------------------+------------------+
| maxvit_nano_rw_256 | |
+----------------------------------+------------------+
| maxvit_pico_rw_256 | |
+----------------------------------+------------------+
| maxvit_rmlp_base_rw_224 | |
+----------------------------------+------------------+
| maxvit_rmlp_base_rw_384 | |
+----------------------------------+------------------+
| maxvit_rmlp_nano_rw_256 | |
+----------------------------------+------------------+
| maxvit_rmlp_pico_rw_256 | |
+----------------------------------+------------------+
| maxvit_rmlp_small_rw_224 | |
+----------------------------------+------------------+
| maxvit_rmlp_small_rw_256 | |
+----------------------------------+------------------+
| maxvit_rmlp_tiny_rw_256 | |
+----------------------------------+------------------+
| maxvit_small_tf_224 | |
+----------------------------------+------------------+
| maxvit_small_tf_384 | |
+----------------------------------+------------------+
| maxvit_small_tf_512 | |
+----------------------------------+------------------+
| maxvit_tiny_pm_256 | |
+----------------------------------+------------------+
| maxvit_tiny_rw_224 | |
+----------------------------------+------------------+
| maxvit_tiny_rw_256 | |
+----------------------------------+------------------+
| maxvit_tiny_tf_224 | |
+----------------------------------+------------------+
| maxvit_tiny_tf_384 | |
+----------------------------------+------------------+
| maxvit_tiny_tf_512 | |
+----------------------------------+------------------+
| maxvit_xlarge_tf_224 | |
+----------------------------------+------------------+
| maxvit_xlarge_tf_384 | |
+----------------------------------+------------------+
| maxvit_xlarge_tf_512 | |
+----------------------------------+------------------+
| maxxvit_rmlp_nano_rw_256 | |
+----------------------------------+------------------+
| maxxvit_rmlp_small_rw_256 | |
+----------------------------------+------------------+
| maxxvit_rmlp_tiny_rw_256 | |
+----------------------------------+------------------+
| maxxvitv2_nano_rw_256 | |
+----------------------------------+------------------+
| maxxvitv2_rmlp_base_rw_224 | |
+----------------------------------+------------------+
| maxxvitv2_rmlp_base_rw_384 | |
+----------------------------------+------------------+
| maxxvitv2_rmlp_large_rw_224 | |
+----------------------------------+------------------+
| mixnet_l | βœ… |
+----------------------------------+------------------+
| mixnet_m | βœ… |
+----------------------------------+------------------+
| mixnet_s | βœ… |
+----------------------------------+------------------+
| mixnet_xl | βœ… |
+----------------------------------+------------------+
| mixnet_xxl | βœ… |
+----------------------------------+------------------+
| mnasnet_050 | βœ… |
+----------------------------------+------------------+
| mnasnet_075 | βœ… |
+----------------------------------+------------------+
| mnasnet_100 | βœ… |
+----------------------------------+------------------+
| mnasnet_140 | βœ… |
+----------------------------------+------------------+
| mnasnet_small | βœ… |
+----------------------------------+------------------+
| mobilenet_edgetpu_100 | βœ… |
+----------------------------------+------------------+
| mobilenet_edgetpu_v2_l | βœ… |
+----------------------------------+------------------+
| mobilenet_edgetpu_v2_m | βœ… |
+----------------------------------+------------------+
| mobilenet_edgetpu_v2_s | βœ… |
+----------------------------------+------------------+
| mobilenet_edgetpu_v2_xs | βœ… |
+----------------------------------+------------------+
| mobilenetv1_100 | βœ… |
+----------------------------------+------------------+
| mobilenetv1_100h | βœ… |
+----------------------------------+------------------+
| mobilenetv1_125 | βœ… |
+----------------------------------+------------------+
| mobilenetv2_035 | βœ… |
+----------------------------------+------------------+
| mobilenetv2_050 | βœ… |
+----------------------------------+------------------+
| mobilenetv2_075 | βœ… |
+----------------------------------+------------------+
| mobilenetv2_100 | βœ… |
+----------------------------------+------------------+
| mobilenetv2_110d | βœ… |
+----------------------------------+------------------+
| mobilenetv2_120d | βœ… |
+----------------------------------+------------------+
| mobilenetv2_140 | βœ… |
+----------------------------------+------------------+
| mobilenetv3_large_075 | βœ… |
+----------------------------------+------------------+
| mobilenetv3_large_100 | βœ… |
+----------------------------------+------------------+
| mobilenetv3_large_150d | βœ… |
+----------------------------------+------------------+
| mobilenetv3_rw | βœ… |
+----------------------------------+------------------+
| mobilenetv3_small_050 | βœ… |
+----------------------------------+------------------+
| mobilenetv3_small_075 | βœ… |
+----------------------------------+------------------+
| mobilenetv3_small_100 | βœ… |
+----------------------------------+------------------+
| mobilenetv4_conv_aa_large | βœ… |
+----------------------------------+------------------+
| mobilenetv4_conv_aa_medium | βœ… |
+----------------------------------+------------------+
| mobilenetv4_conv_blur_medium | βœ… |
+----------------------------------+------------------+
| mobilenetv4_conv_large | βœ… |
+----------------------------------+------------------+
| mobilenetv4_conv_medium | βœ… |
+----------------------------------+------------------+
| mobilenetv4_conv_small | βœ… |
+----------------------------------+------------------+
| mobilenetv4_conv_small_035 | βœ… |
+----------------------------------+------------------+
| mobilenetv4_conv_small_050 | βœ… |
+----------------------------------+------------------+
| mobilenetv4_hybrid_large | βœ… |
+----------------------------------+------------------+
| mobilenetv4_hybrid_large_075 | βœ… |
+----------------------------------+------------------+
| mobilenetv4_hybrid_medium | βœ… |
+----------------------------------+------------------+
| mobilenetv4_hybrid_medium_075 | βœ… |
+----------------------------------+------------------+
| mobileone_s0 | βœ… |
+----------------------------------+------------------+
| mobileone_s1 | βœ… |
+----------------------------------+------------------+
| mobileone_s2 | βœ… |
+----------------------------------+------------------+
| mobileone_s3 | βœ… |
+----------------------------------+------------------+
| mobileone_s4 | βœ… |
+----------------------------------+------------------+
| mobilevit_s | βœ… |
+----------------------------------+------------------+
| mobilevit_xs | βœ… |
+----------------------------------+------------------+
| mobilevit_xxs | βœ… |
+----------------------------------+------------------+
| mobilevitv2_050 | βœ… |
+----------------------------------+------------------+
| mobilevitv2_075 | βœ… |
+----------------------------------+------------------+
| mobilevitv2_100 | βœ… |
+----------------------------------+------------------+
| mobilevitv2_125 | βœ… |
+----------------------------------+------------------+
| mobilevitv2_150 | βœ… |
+----------------------------------+------------------+
| mobilevitv2_175 | βœ… |
+----------------------------------+------------------+
| mobilevitv2_200 | βœ… |
+----------------------------------+------------------+
| nf_ecaresnet26 | βœ… |
+----------------------------------+------------------+
| nf_ecaresnet50 | βœ… |
+----------------------------------+------------------+
| nf_ecaresnet101 | βœ… |
+----------------------------------+------------------+
| nf_regnet_b0 | βœ… |
+----------------------------------+------------------+
| nf_regnet_b1 | βœ… |
+----------------------------------+------------------+
| nf_regnet_b2 | βœ… |
+----------------------------------+------------------+
| nf_regnet_b3 | βœ… |
+----------------------------------+------------------+
| nf_regnet_b4 | βœ… |
+----------------------------------+------------------+
| nf_regnet_b5 | βœ… |
+----------------------------------+------------------+
| nf_resnet26 | βœ… |
+----------------------------------+------------------+
| nf_resnet50 | βœ… |
+----------------------------------+------------------+
| nf_resnet101 | βœ… |
+----------------------------------+------------------+
| nf_seresnet26 | βœ… |
+----------------------------------+------------------+
| nf_seresnet50 | βœ… |
+----------------------------------+------------------+
| nf_seresnet101 | βœ… |
+----------------------------------+------------------+
| nfnet_f0 | βœ… |
+----------------------------------+------------------+
| nfnet_f1 | βœ… |
+----------------------------------+------------------+
| nfnet_f2 | βœ… |
+----------------------------------+------------------+
| nfnet_f3 | βœ… |
+----------------------------------+------------------+
| nfnet_f4 | βœ… |
+----------------------------------+------------------+
| nfnet_f5 | βœ… |
+----------------------------------+------------------+
| nfnet_f6 | βœ… |
+----------------------------------+------------------+
| nfnet_f7 | βœ… |
+----------------------------------+------------------+
| nfnet_l0 | βœ… |
+----------------------------------+------------------+
| regnetv_040 | βœ… |
+----------------------------------+------------------+
| regnetv_064 | βœ… |
+----------------------------------+------------------+
| regnetx_002 | βœ… |
+----------------------------------+------------------+
| regnetx_004 | βœ… |
+----------------------------------+------------------+
| regnetx_004_tv | βœ… |
+----------------------------------+------------------+
| regnetx_006 | βœ… |
+----------------------------------+------------------+
| regnetx_008 | βœ… |
+----------------------------------+------------------+
| regnetx_016 | βœ… |
+----------------------------------+------------------+
| regnetx_032 | βœ… |
+----------------------------------+------------------+
| regnetx_040 | βœ… |
+----------------------------------+------------------+
| regnetx_064 | βœ… |
+----------------------------------+------------------+
| regnetx_080 | βœ… |
+----------------------------------+------------------+
| regnetx_120 | βœ… |
+----------------------------------+------------------+
| regnetx_160 | βœ… |
+----------------------------------+------------------+
| regnetx_320 | βœ… |
+----------------------------------+------------------+
| regnety_002 | βœ… |
+----------------------------------+------------------+
| regnety_004 | βœ… |
+----------------------------------+------------------+
| regnety_006 | βœ… |
+----------------------------------+------------------+
| regnety_008 | βœ… |
+----------------------------------+------------------+
| regnety_008_tv | βœ… |
+----------------------------------+------------------+
| regnety_016 | βœ… |
+----------------------------------+------------------+
| regnety_032 | βœ… |
+----------------------------------+------------------+
| regnety_040 | βœ… |
+----------------------------------+------------------+
| regnety_040_sgn | βœ… |
+----------------------------------+------------------+
| regnety_064 | βœ… |
+----------------------------------+------------------+
| regnety_080 | βœ… |
+----------------------------------+------------------+
| regnety_080_tv | βœ… |
+----------------------------------+------------------+
| regnety_120 | βœ… |
+----------------------------------+------------------+
| regnety_160 | βœ… |
+----------------------------------+------------------+
| regnety_320 | βœ… |
+----------------------------------+------------------+
| regnety_640 | βœ… |
+----------------------------------+------------------+
| regnety_1280 | βœ… |
+----------------------------------+------------------+
| regnety_2560 | βœ… |
+----------------------------------+------------------+
| regnetz_005 | βœ… |
+----------------------------------+------------------+
| regnetz_040 | βœ… |
+----------------------------------+------------------+
| regnetz_040_h | βœ… |
+----------------------------------+------------------+
| regnetz_b16 | βœ… |
+----------------------------------+------------------+
| regnetz_b16_evos | βœ… |
+----------------------------------+------------------+
| regnetz_c16 | βœ… |
+----------------------------------+------------------+
| regnetz_c16_evos | βœ… |
+----------------------------------+------------------+
| regnetz_d8 | βœ… |
+----------------------------------+------------------+
| regnetz_d8_evos | βœ… |
+----------------------------------+------------------+
| regnetz_d32 | βœ… |
+----------------------------------+------------------+
| regnetz_e8 | βœ… |
+----------------------------------+------------------+
| repghostnet_050 | |
+----------------------------------+------------------+
| repghostnet_058 | |
+----------------------------------+------------------+
| repghostnet_080 | |
+----------------------------------+------------------+
| repghostnet_100 | |
+----------------------------------+------------------+
| repghostnet_111 | |
+----------------------------------+------------------+
| repghostnet_130 | |
+----------------------------------+------------------+
| repghostnet_150 | |
+----------------------------------+------------------+
| repghostnet_200 | |
+----------------------------------+------------------+
| repvgg_a0 | βœ… |
+----------------------------------+------------------+
| repvgg_a1 | βœ… |
+----------------------------------+------------------+
| repvgg_a2 | βœ… |
+----------------------------------+------------------+
| repvgg_b0 | βœ… |
+----------------------------------+------------------+
| repvgg_b1 | βœ… |
+----------------------------------+------------------+
| repvgg_b1g4 | βœ… |
+----------------------------------+------------------+
| repvgg_b2 | βœ… |
+----------------------------------+------------------+
| repvgg_b2g4 | βœ… |
+----------------------------------+------------------+
| repvgg_b3 | βœ… |
+----------------------------------+------------------+
| repvgg_b3g4 | βœ… |
+----------------------------------+------------------+
| repvgg_d2se | βœ… |
+----------------------------------+------------------+
| res2net50_14w_8s | βœ… |
+----------------------------------+------------------+
| res2net50_26w_4s | βœ… |
+----------------------------------+------------------+
| res2net50_26w_6s | βœ… |
+----------------------------------+------------------+
| res2net50_26w_8s | βœ… |
+----------------------------------+------------------+
| res2net50_48w_2s | βœ… |
+----------------------------------+------------------+
| res2net50d | βœ… |
+----------------------------------+------------------+
| res2net101_26w_4s | βœ… |
+----------------------------------+------------------+
| res2net101d | βœ… |
+----------------------------------+------------------+
| res2next50 | βœ… |
+----------------------------------+------------------+
| resnest14d | βœ… |
+----------------------------------+------------------+
| resnest26d | βœ… |
+----------------------------------+------------------+
| resnest50d | βœ… |
+----------------------------------+------------------+
| resnest50d_1s4x24d | βœ… |
+----------------------------------+------------------+
| resnest50d_4s2x40d | βœ… |
+----------------------------------+------------------+
| resnest101e | βœ… |
+----------------------------------+------------------+
| resnest200e | βœ… |
+----------------------------------+------------------+
| resnest269e | βœ… |
+----------------------------------+------------------+
| resnet10t | βœ… |
+----------------------------------+------------------+
| resnet14t | βœ… |
+----------------------------------+------------------+
| resnet18 | βœ… |
+----------------------------------+------------------+
| resnet18d | βœ… |
+----------------------------------+------------------+
| resnet26 | βœ… |
+----------------------------------+------------------+
| resnet26d | βœ… |
+----------------------------------+------------------+
| resnet26t | βœ… |
+----------------------------------+------------------+
| resnet32ts | βœ… |
+----------------------------------+------------------+
| resnet33ts | βœ… |
+----------------------------------+------------------+
| resnet34 | βœ… |
+----------------------------------+------------------+
| resnet34d | βœ… |
+----------------------------------+------------------+
| resnet50 | βœ… |
+----------------------------------+------------------+
| resnet50_clip | βœ… |
+----------------------------------+------------------+
| resnet50_clip_gap | βœ… |
+----------------------------------+------------------+
| resnet50_gn | βœ… |
+----------------------------------+------------------+
| resnet50_mlp | βœ… |
+----------------------------------+------------------+
| resnet50c | βœ… |
+----------------------------------+------------------+
| resnet50d | βœ… |
+----------------------------------+------------------+
| resnet50s | βœ… |
+----------------------------------+------------------+
| resnet50t | βœ… |
+----------------------------------+------------------+
| resnet50x4_clip | βœ… |
+----------------------------------+------------------+
| resnet50x4_clip_gap | βœ… |
+----------------------------------+------------------+
| resnet50x16_clip | βœ… |
+----------------------------------+------------------+
| resnet50x16_clip_gap | βœ… |
+----------------------------------+------------------+
| resnet50x64_clip | βœ… |
+----------------------------------+------------------+
| resnet50x64_clip_gap | βœ… |
+----------------------------------+------------------+
| resnet51q | βœ… |
+----------------------------------+------------------+
| resnet61q | βœ… |
+----------------------------------+------------------+
| resnet101 | βœ… |
+----------------------------------+------------------+
| resnet101_clip | βœ… |
+----------------------------------+------------------+
| resnet101_clip_gap | βœ… |
+----------------------------------+------------------+
| resnet101c | βœ… |
+----------------------------------+------------------+
| resnet101d | βœ… |
+----------------------------------+------------------+
| resnet101s | βœ… |
+----------------------------------+------------------+
| resnet152 | βœ… |
+----------------------------------+------------------+
| resnet152c | βœ… |
+----------------------------------+------------------+
| resnet152d | βœ… |
+----------------------------------+------------------+
| resnet152s | βœ… |
+----------------------------------+------------------+
| resnet200 | βœ… |
+----------------------------------+------------------+
| resnet200d | βœ… |
+----------------------------------+------------------+
| resnetaa34d | βœ… |
+----------------------------------+------------------+
| resnetaa50 | βœ… |
+----------------------------------+------------------+
| resnetaa50d | βœ… |
+----------------------------------+------------------+
| resnetaa101d | βœ… |
+----------------------------------+------------------+
| resnetblur18 | βœ… |
+----------------------------------+------------------+
| resnetblur50 | βœ… |
+----------------------------------+------------------+
| resnetblur50d | βœ… |
+----------------------------------+------------------+
| resnetblur101d | βœ… |
+----------------------------------+------------------+
| resnetrs50 | βœ… |
+----------------------------------+------------------+
| resnetrs101 | βœ… |
+----------------------------------+------------------+
| resnetrs152 | βœ… |
+----------------------------------+------------------+
| resnetrs200 | βœ… |
+----------------------------------+------------------+
| resnetrs270 | βœ… |
+----------------------------------+------------------+
| resnetrs350 | βœ… |
+----------------------------------+------------------+
| resnetrs420 | βœ… |
+----------------------------------+------------------+
| resnetv2_18 | βœ… |
+----------------------------------+------------------+
| resnetv2_18d | βœ… |
+----------------------------------+------------------+
| resnetv2_34 | βœ… |
+----------------------------------+------------------+
| resnetv2_34d | βœ… |
+----------------------------------+------------------+
| resnetv2_50 | βœ… |
+----------------------------------+------------------+
| resnetv2_50d | βœ… |
+----------------------------------+------------------+
| resnetv2_50d_evos | βœ… |
+----------------------------------+------------------+
| resnetv2_50d_frn | βœ… |
+----------------------------------+------------------+
| resnetv2_50d_gn | βœ… |
+----------------------------------+------------------+
| resnetv2_50t | βœ… |
+----------------------------------+------------------+
| resnetv2_50x1_bit | βœ… |
+----------------------------------+------------------+
| resnetv2_50x3_bit | βœ… |
+----------------------------------+------------------+
| resnetv2_101 | βœ… |
+----------------------------------+------------------+
| resnetv2_101d | βœ… |
+----------------------------------+------------------+
| resnetv2_101x1_bit | βœ… |
+----------------------------------+------------------+
| resnetv2_101x3_bit | βœ… |
+----------------------------------+------------------+
| resnetv2_152 | βœ… |
+----------------------------------+------------------+
| resnetv2_152d | βœ… |
+----------------------------------+------------------+
| resnetv2_152x2_bit | βœ… |
+----------------------------------+------------------+
| resnetv2_152x4_bit | βœ… |
+----------------------------------+------------------+
| resnext26ts | βœ… |
+----------------------------------+------------------+
| resnext50_32x4d | βœ… |
+----------------------------------+------------------+
| resnext50d_32x4d | βœ… |
+----------------------------------+------------------+
| resnext101_32x4d | βœ… |
+----------------------------------+------------------+
| resnext101_32x8d | βœ… |
+----------------------------------+------------------+
| resnext101_32x16d | βœ… |
+----------------------------------+------------------+
| resnext101_32x32d | βœ… |
+----------------------------------+------------------+
| resnext101_64x4d | βœ… |
+----------------------------------+------------------+
| rexnet_100 | βœ… |
+----------------------------------+------------------+
| rexnet_130 | βœ… |
+----------------------------------+------------------+
| rexnet_150 | βœ… |
+----------------------------------+------------------+
| rexnet_200 | βœ… |
+----------------------------------+------------------+
| rexnet_300 | βœ… |
+----------------------------------+------------------+
| rexnetr_100 | βœ… |
+----------------------------------+------------------+
| rexnetr_130 | βœ… |
+----------------------------------+------------------+
| rexnetr_150 | βœ… |
+----------------------------------+------------------+
| rexnetr_200 | βœ… |
+----------------------------------+------------------+
| rexnetr_300 | βœ… |
+----------------------------------+------------------+
| sebotnet33ts_256 | βœ… |
+----------------------------------+------------------+
| sedarknet21 | βœ… |
+----------------------------------+------------------+
| sehalonet33ts | βœ… |
+----------------------------------+------------------+
| selecsls42 | |
+----------------------------------+------------------+
| selecsls42b | |
+----------------------------------+------------------+
| selecsls60 | |
+----------------------------------+------------------+
| selecsls60b | |
+----------------------------------+------------------+
| selecsls84 | |
+----------------------------------+------------------+
| semnasnet_050 | βœ… |
+----------------------------------+------------------+
| semnasnet_075 | βœ… |
+----------------------------------+------------------+
| semnasnet_100 | βœ… |
+----------------------------------+------------------+
| semnasnet_140 | βœ… |
+----------------------------------+------------------+
| senet154 | βœ… |
+----------------------------------+------------------+
| seresnet18 | βœ… |
+----------------------------------+------------------+
| seresnet33ts | βœ… |
+----------------------------------+------------------+
| seresnet34 | βœ… |
+----------------------------------+------------------+
| seresnet50 | βœ… |
+----------------------------------+------------------+
| seresnet50t | βœ… |
+----------------------------------+------------------+
| seresnet101 | βœ… |
+----------------------------------+------------------+
| seresnet152 | βœ… |
+----------------------------------+------------------+
| seresnet152d | βœ… |
+----------------------------------+------------------+
| seresnet200d | βœ… |
+----------------------------------+------------------+
| seresnet269d | βœ… |
+----------------------------------+------------------+
| seresnetaa50d | βœ… |
+----------------------------------+------------------+
| seresnext26d_32x4d | βœ… |
+----------------------------------+------------------+
| seresnext26t_32x4d | βœ… |
+----------------------------------+------------------+
| seresnext26ts | βœ… |
+----------------------------------+------------------+
| seresnext50_32x4d | βœ… |
+----------------------------------+------------------+
| seresnext101_32x4d | βœ… |
+----------------------------------+------------------+
| seresnext101_32x8d | βœ… |
+----------------------------------+------------------+
| seresnext101_64x4d | βœ… |
+----------------------------------+------------------+
| seresnext101d_32x8d | βœ… |
+----------------------------------+------------------+
| seresnextaa101d_32x8d | βœ… |
+----------------------------------+------------------+
| seresnextaa201d_32x8d | βœ… |
+----------------------------------+------------------+
| skresnet18 | βœ… |
+----------------------------------+------------------+
| skresnet34 | βœ… |
+----------------------------------+------------------+
| skresnet50 | βœ… |
+----------------------------------+------------------+
| skresnet50d | βœ… |
+----------------------------------+------------------+
| skresnext50_32x4d | βœ… |
+----------------------------------+------------------+
| spnasnet_100 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b0 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b1 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b2 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b3 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b4 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b5 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b6 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b7 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_b8 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_cc_b0_4e | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_cc_b0_8e | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_cc_b1_8e | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_el | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_em | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_es | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_l2 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_lite0 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_lite1 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_lite2 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_lite3 | βœ… |
+----------------------------------+------------------+
| tf_efficientnet_lite4 | βœ… |
+----------------------------------+------------------+
| tf_efficientnetv2_b0 | βœ… |
+----------------------------------+------------------+
| tf_efficientnetv2_b1 | βœ… |
+----------------------------------+------------------+
| tf_efficientnetv2_b2 | βœ… |
+----------------------------------+------------------+
| tf_efficientnetv2_b3 | βœ… |
+----------------------------------+------------------+
| tf_efficientnetv2_l | βœ… |
+----------------------------------+------------------+
| tf_efficientnetv2_m | βœ… |
+----------------------------------+------------------+
| tf_efficientnetv2_s | βœ… |
+----------------------------------+------------------+
| tf_efficientnetv2_xl | βœ… |
+----------------------------------+------------------+
| tf_mixnet_l | βœ… |
+----------------------------------+------------------+
| tf_mixnet_m | βœ… |
+----------------------------------+------------------+
| tf_mixnet_s | βœ… |
+----------------------------------+------------------+
| tf_mobilenetv3_large_075 | βœ… |
+----------------------------------+------------------+
| tf_mobilenetv3_large_100 | βœ… |
+----------------------------------+------------------+
| tf_mobilenetv3_large_minimal_100 | βœ… |
+----------------------------------+------------------+
| tf_mobilenetv3_small_075 | βœ… |
+----------------------------------+------------------+
| tf_mobilenetv3_small_100 | βœ… |
+----------------------------------+------------------+
| tf_mobilenetv3_small_minimal_100 | βœ… |
+----------------------------------+------------------+
| tinynet_a | βœ… |
+----------------------------------+------------------+
| tinynet_b | βœ… |
+----------------------------------+------------------+
| tinynet_c | βœ… |
+----------------------------------+------------------+
| tinynet_d | βœ… |
+----------------------------------+------------------+
| tinynet_e | βœ… |
+----------------------------------+------------------+
| vgg11 | |
+----------------------------------+------------------+
| vgg11_bn | |
+----------------------------------+------------------+
| vgg13 | |
+----------------------------------+------------------+
| vgg13_bn | |
+----------------------------------+------------------+
| vgg16 | |
+----------------------------------+------------------+
| vgg16_bn | |
+----------------------------------+------------------+
| vgg19 | |
+----------------------------------+------------------+
| vgg19_bn | |
+----------------------------------+------------------+
| vovnet39a | |
+----------------------------------+------------------+
| vovnet57a | |
+----------------------------------+------------------+
| wide_resnet50_2 | βœ… |
+----------------------------------+------------------+
| wide_resnet101_2 | βœ… |
+----------------------------------+------------------+
| xception41 | βœ… |
+----------------------------------+------------------+
| xception41p | βœ… |
+----------------------------------+------------------+
| xception65 | βœ… |
+----------------------------------+------------------+
| xception65p | βœ… |
+----------------------------------+------------------+
| xception71 | βœ… |
+----------------------------------+------------------+

Transformer-Style
~~~~~~~~~~~~~~~~~

Transformer-style models (e.g., Swin Transformer, ConvNeXt) typically produce feature maps starting at a 1/4 scale, followed by 1/8, 1/16, and 1/32 scales

+------------------------------------+------------------+
| Encoder name | Support dilation |
+====================================+==================+
| caformer_b36 | |
+------------------------------------+------------------+
| caformer_m36 | |
+------------------------------------+------------------+
| caformer_s18 | |
+------------------------------------+------------------+
| caformer_s36 | |
+------------------------------------+------------------+
| convformer_b36 | |
+------------------------------------+------------------+
| convformer_m36 | |
+------------------------------------+------------------+
| convformer_s18 | |
+------------------------------------+------------------+
| convformer_s36 | |
+------------------------------------+------------------+
| convnext_atto | βœ… |
+------------------------------------+------------------+
| convnext_atto_ols | βœ… |
+------------------------------------+------------------+
| convnext_atto_rms | βœ… |
+------------------------------------+------------------+
| convnext_base | βœ… |
+------------------------------------+------------------+
| convnext_femto | βœ… |
+------------------------------------+------------------+
| convnext_femto_ols | βœ… |
+------------------------------------+------------------+
| convnext_large | βœ… |
+------------------------------------+------------------+
| convnext_large_mlp | βœ… |
+------------------------------------+------------------+
| convnext_nano | βœ… |
+------------------------------------+------------------+
| convnext_nano_ols | βœ… |
+------------------------------------+------------------+
| convnext_pico | βœ… |
+------------------------------------+------------------+
| convnext_pico_ols | βœ… |
+------------------------------------+------------------+
| convnext_small | βœ… |
+------------------------------------+------------------+
| convnext_tiny | βœ… |
+------------------------------------+------------------+
| convnext_tiny_hnf | βœ… |
+------------------------------------+------------------+
| convnext_xlarge | βœ… |
+------------------------------------+------------------+
| convnext_xxlarge | βœ… |
+------------------------------------+------------------+
| convnext_zepto_rms | βœ… |
+------------------------------------+------------------+
| convnext_zepto_rms_ols | βœ… |
+------------------------------------+------------------+
| convnextv2_atto | βœ… |
+------------------------------------+------------------+
| convnextv2_base | βœ… |
+------------------------------------+------------------+
| convnextv2_femto | βœ… |
+------------------------------------+------------------+
| convnextv2_huge | βœ… |
+------------------------------------+------------------+
| convnextv2_large | βœ… |
+------------------------------------+------------------+
| convnextv2_nano | βœ… |
+------------------------------------+------------------+
| convnextv2_pico | βœ… |
+------------------------------------+------------------+
| convnextv2_small | βœ… |
+------------------------------------+------------------+
| convnextv2_tiny | βœ… |
+------------------------------------+------------------+
| davit_base | |
+------------------------------------+------------------+
| davit_base_fl | |
+------------------------------------+------------------+
| davit_giant | |
+------------------------------------+------------------+
| davit_huge | |
+------------------------------------+------------------+
| davit_huge_fl | |
+------------------------------------+------------------+
| davit_large | |
+------------------------------------+------------------+
| davit_small | |
+------------------------------------+------------------+
| davit_tiny | |
+------------------------------------+------------------+
| edgenext_base | |
+------------------------------------+------------------+
| edgenext_small | |
+------------------------------------+------------------+
| edgenext_small_rw | |
+------------------------------------+------------------+
| edgenext_x_small | |
+------------------------------------+------------------+
| edgenext_xx_small | |
+------------------------------------+------------------+
| efficientformer_l1 | |
+------------------------------------+------------------+
| efficientformer_l3 | |
+------------------------------------+------------------+
| efficientformer_l7 | |
+------------------------------------+------------------+
| efficientformerv2_l | |
+------------------------------------+------------------+
| efficientformerv2_s0 | |
+------------------------------------+------------------+
| efficientformerv2_s1 | |
+------------------------------------+------------------+
| efficientformerv2_s2 | |
+------------------------------------+------------------+
| efficientvit_b0 | |
+------------------------------------+------------------+
| efficientvit_b1 | |
+------------------------------------+------------------+
| efficientvit_b2 | |
+------------------------------------+------------------+
| efficientvit_b3 | |
+------------------------------------+------------------+
| efficientvit_l1 | |
+------------------------------------+------------------+
| efficientvit_l2 | |
+------------------------------------+------------------+
| efficientvit_l3 | |
+------------------------------------+------------------+
| fastvit_ma36 | |
+------------------------------------+------------------+
| fastvit_mci0 | |
+------------------------------------+------------------+
| fastvit_mci1 | |
+------------------------------------+------------------+
| fastvit_mci2 | |
+------------------------------------+------------------+
| fastvit_s12 | |
+------------------------------------+------------------+
| fastvit_sa12 | |
+------------------------------------+------------------+
| fastvit_sa24 | |
+------------------------------------+------------------+
| fastvit_sa36 | |
+------------------------------------+------------------+
| fastvit_t8 | |
+------------------------------------+------------------+
| fastvit_t12 | |
+------------------------------------+------------------+
| focalnet_base_lrf | |
+------------------------------------+------------------+
| focalnet_base_srf | |
+------------------------------------+------------------+
| focalnet_huge_fl3 | |
+------------------------------------+------------------+
| focalnet_huge_fl4 | |
+------------------------------------+------------------+
| focalnet_large_fl3 | |
+------------------------------------+------------------+
| focalnet_large_fl4 | |
+------------------------------------+------------------+
| focalnet_small_lrf | |
+------------------------------------+------------------+
| focalnet_small_srf | |
+------------------------------------+------------------+
| focalnet_tiny_lrf | |
+------------------------------------+------------------+
| focalnet_tiny_srf | |
+------------------------------------+------------------+
| focalnet_xlarge_fl3 | |
+------------------------------------+------------------+
| focalnet_xlarge_fl4 | |
+------------------------------------+------------------+
| hgnet_base | |
+------------------------------------+------------------+
| hgnet_small | |
+------------------------------------+------------------+
| hgnet_tiny | |
+------------------------------------+------------------+
| hgnetv2_b0 | |
+------------------------------------+------------------+
| hgnetv2_b1 | |
+------------------------------------+------------------+
| hgnetv2_b2 | |
+------------------------------------+------------------+
| hgnetv2_b3 | |
+------------------------------------+------------------+
| hgnetv2_b4 | |
+------------------------------------+------------------+
| hgnetv2_b5 | |
+------------------------------------+------------------+
| hgnetv2_b6 | |
+------------------------------------+------------------+
| hiera_base_224 | |
+------------------------------------+------------------+
| hiera_base_abswin_256 | |
+------------------------------------+------------------+
| hiera_base_plus_224 | |
+------------------------------------+------------------+
| hiera_huge_224 | |
+------------------------------------+------------------+
| hiera_large_224 | |
+------------------------------------+------------------+
| hiera_small_224 | |
+------------------------------------+------------------+
| hiera_small_abswin_256 | |
+------------------------------------+------------------+
| hiera_tiny_224 | |
+------------------------------------+------------------+
| hieradet_small | |
+------------------------------------+------------------+
| inception_next_base | |
+------------------------------------+------------------+
| inception_next_small | |
+------------------------------------+------------------+
| inception_next_tiny | |
+------------------------------------+------------------+
| mambaout_base | |
+------------------------------------+------------------+
| mambaout_base_plus_rw | |
+------------------------------------+------------------+
| mambaout_base_short_rw | |
+------------------------------------+------------------+
| mambaout_base_tall_rw | |
+------------------------------------+------------------+
| mambaout_base_wide_rw | |
+------------------------------------+------------------+
| mambaout_femto | |
+------------------------------------+------------------+
| mambaout_kobe | |
+------------------------------------+------------------+
| mambaout_small | |
+------------------------------------+------------------+
| mambaout_small_rw | |
+------------------------------------+------------------+
| mambaout_tiny | |
+------------------------------------+------------------+
| mvitv2_base | |
+------------------------------------+------------------+
| mvitv2_base_cls | |
+------------------------------------+------------------+
| mvitv2_huge_cls | |
+------------------------------------+------------------+
| mvitv2_large | |
+------------------------------------+------------------+
| mvitv2_large_cls | |
+------------------------------------+------------------+
| mvitv2_small | |
+------------------------------------+------------------+
| mvitv2_small_cls | |
+------------------------------------+------------------+
| mvitv2_tiny | |
+------------------------------------+------------------+
| nest_base | |
+------------------------------------+------------------+
| nest_base_jx | |
+------------------------------------+------------------+
| nest_small | |
+------------------------------------+------------------+
| nest_small_jx | |
+------------------------------------+------------------+
| nest_tiny | |
+------------------------------------+------------------+
| nest_tiny_jx | |
+------------------------------------+------------------+
| nextvit_base | |
+------------------------------------+------------------+
| nextvit_large | |
+------------------------------------+------------------+
| nextvit_small | |
+------------------------------------+------------------+
| poolformer_m36 | |
+------------------------------------+------------------+
| poolformer_m48 | |
+------------------------------------+------------------+
| poolformer_s12 | |
+------------------------------------+------------------+
| poolformer_s24 | |
+------------------------------------+------------------+
| poolformer_s36 | |
+------------------------------------+------------------+
| poolformerv2_m36 | |
+------------------------------------+------------------+
| poolformerv2_m48 | |
+------------------------------------+------------------+
| poolformerv2_s12 | |
+------------------------------------+------------------+
| poolformerv2_s24 | |
+------------------------------------+------------------+
| poolformerv2_s36 | |
+------------------------------------+------------------+
| pvt_v2_b0 | |
+------------------------------------+------------------+
| pvt_v2_b1 | |
+------------------------------------+------------------+
| pvt_v2_b2 | |
+------------------------------------+------------------+
| pvt_v2_b2_li | |
+------------------------------------+------------------+
| pvt_v2_b3 | |
+------------------------------------+------------------+
| pvt_v2_b4 | |
+------------------------------------+------------------+
| pvt_v2_b5 | |
+------------------------------------+------------------+
| rdnet_base | |
+------------------------------------+------------------+
| rdnet_large | |
+------------------------------------+------------------+
| rdnet_small | |
+------------------------------------+------------------+
| rdnet_tiny | |
+------------------------------------+------------------+
| repvit_m0_9 | |
+------------------------------------+------------------+
| repvit_m1 | |
+------------------------------------+------------------+
| repvit_m1_0 | |
+------------------------------------+------------------+
| repvit_m1_1 | |
+------------------------------------+------------------+
| repvit_m1_5 | |
+------------------------------------+------------------+
| repvit_m2 | |
+------------------------------------+------------------+
| repvit_m2_3 | |
+------------------------------------+------------------+
| repvit_m3 | |
+------------------------------------+------------------+
| sam2_hiera_base_plus | |
+------------------------------------+------------------+
| sam2_hiera_large | |
+------------------------------------+------------------+
| sam2_hiera_small | |
+------------------------------------+------------------+
| sam2_hiera_tiny | |
+------------------------------------+------------------+
| swin_base_patch4_window7_224 | |
+------------------------------------+------------------+
| swin_base_patch4_window12_384 | |
+------------------------------------+------------------+
| swin_large_patch4_window7_224 | |
+------------------------------------+------------------+
| swin_large_patch4_window12_384 | |
+------------------------------------+------------------+
| swin_s3_base_224 | |
+------------------------------------+------------------+
| swin_s3_small_224 | |
+------------------------------------+------------------+
| swin_s3_tiny_224 | |
+------------------------------------+------------------+
| swin_small_patch4_window7_224 | |
+------------------------------------+------------------+
| swin_tiny_patch4_window7_224 | |
+------------------------------------+------------------+
| swinv2_base_window8_256 | |
+------------------------------------+------------------+
| swinv2_base_window12_192 | |
+------------------------------------+------------------+
| swinv2_base_window12to16_192to256 | |
+------------------------------------+------------------+
| swinv2_base_window12to24_192to384 | |
+------------------------------------+------------------+
| swinv2_base_window16_256 | |
+------------------------------------+------------------+
| swinv2_cr_base_224 | |
+------------------------------------+------------------+
| swinv2_cr_base_384 | |
+------------------------------------+------------------+
| swinv2_cr_base_ns_224 | |
+------------------------------------+------------------+
| swinv2_cr_giant_224 | |
+------------------------------------+------------------+
| swinv2_cr_giant_384 | |
+------------------------------------+------------------+
| swinv2_cr_huge_224 | |
+------------------------------------+------------------+
| swinv2_cr_huge_384 | |
+------------------------------------+------------------+
| swinv2_cr_large_224 | |
+------------------------------------+------------------+
| swinv2_cr_large_384 | |
+------------------------------------+------------------+
| swinv2_cr_small_224 | |
+------------------------------------+------------------+
| swinv2_cr_small_384 | |
+------------------------------------+------------------+
| swinv2_cr_small_ns_224 | |
+------------------------------------+------------------+
| swinv2_cr_small_ns_256 | |
+------------------------------------+------------------+
| swinv2_cr_tiny_224 | |
+------------------------------------+------------------+
| swinv2_cr_tiny_384 | |
+------------------------------------+------------------+
| swinv2_cr_tiny_ns_224 | |
+------------------------------------+------------------+
| swinv2_large_window12_192 | |
+------------------------------------+------------------+
| swinv2_large_window12to16_192to256 | |
+------------------------------------+------------------+
| swinv2_large_window12to24_192to384 | |
+------------------------------------+------------------+
| swinv2_small_window8_256 | |
+------------------------------------+------------------+
| swinv2_small_window16_256 | |
+------------------------------------+------------------+
| swinv2_tiny_window8_256 | |
+------------------------------------+------------------+
| swinv2_tiny_window16_256 | |
+------------------------------------+------------------+
| tiny_vit_5m_224 | |
+------------------------------------+------------------+
| tiny_vit_11m_224 | |
+------------------------------------+------------------+
| tiny_vit_21m_224 | |
+------------------------------------+------------------+
| tiny_vit_21m_384 | |
+------------------------------------+------------------+
| tiny_vit_21m_512 | |
+------------------------------------+------------------+
| tresnet_l | |
+------------------------------------+------------------+
| tresnet_m | |
+------------------------------------+------------------+
| tresnet_v2_l | |
+------------------------------------+------------------+
| tresnet_xl | |
+------------------------------------+------------------+
| twins_pcpvt_base | |
+------------------------------------+------------------+
| twins_pcpvt_large | |
+------------------------------------+------------------+
| twins_pcpvt_small | |
+------------------------------------+------------------+
| twins_svt_base | |
+------------------------------------+------------------+
| twins_svt_large | |
+------------------------------------+------------------+
| twins_svt_small | |
+------------------------------------+------------------+

---

Index

.. Segmentation Models documentation master file, created by
sphinx-quickstart on Fri Nov 27 00:00:20 2020.
You can adapt this file completely to your liking, but it should at least
contain the root
toctree directive.

Welcome to Segmentation Models's documentation!
===============================================

.. toctree::
:maxdepth: 2
:caption: Contents:

install
quickstart
models
encoders
encoders_timm
losses
metrics
save_load
insights


Indices and tables
==================

* :ref:genindex
* :ref:
modindex
* :ref:
search

---

Insights

πŸ’‘ Insights
===========

1. Models architecture
~~~~~~~~~~~~~~~~~~~~~~

All segmentation models in SMP (this library short name) are made of:

- encoder (feature extractor, a.k.a backbone)
- decoder (features fusion block to create segmentation mask)
- segmentation head (final head to reduce number of channels from decoder and upsample mask to preserve input-output spatial resolution identity)
- classification head (optional head which build on top of deepest encoder features)


2. Creating your own encoder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Encoder is a "classification model" which extract features from image and pass it to decoder.
Each encoder should have following attributes and methods and be inherited from
segmentation_models_pytorch.encoders._base.EncoderMixin

.. code-block:: python

class MyEncoder(torch.nn.Module, EncoderMixin):

def __init__(self, kwargs):
super().__init__()

# A number of channels for each encoder feature tensor, list of integers
self._out_channels: List[int] = [3, 16, 64, 128, 256, 512]

# A number of stages in decoder (in other words number of downsampling operations), integer
# use in in forward pass to reduce number of returning features
self._depth: int = 5

# Default number of input channels in first Conv2d layer for encoder (usually 3)
self._in_channels: int = 3

# Define encoder modules below
...

def forward(self, x: torch.Tensor) -> List[torch.Tensor]:
"""Produce list of features of different spatial resolutions, each feature is a 4D torch.tensor of
shape NCHW (features should be sorted in descending order according to spatial resolution, starting
with resolution same as input
x tensor).

Input: x with shape (1, 3, 64, 64)
Output: [f0, f1, f2, f3, f4, f5] - features with corresponding shapes
[(1, 3, 64, 64), (1, 64, 32, 32), (1, 128, 16, 16), (1, 256, 8, 8),
(1, 512, 4, 4), (1, 1024, 2, 2)] (C - dim may differ)

also should support number of features according to specified depth, e.g. if depth = 5,
number of feature tensors = 6 (one with same resolution as input and 5 downsampled),
depth = 3 -> number of feature tensors = 4 (one with same resolution as input and 3 downsampled).
"""

return [feat1, feat2, feat3, feat4, feat5, feat6]

When you write your own Encoder class register its build parameters

.. code-block:: python

smp.encoders.encoders["my_awesome_encoder"] = {
"encoder": MyEncoder, # encoder class here
"pretrained_settings": {
"imagenet": {
"mean": [0.485, 0.456, 0.406],
"std": [0.229, 0.224, 0.225],
"url": "https://some-url.com/my-model-weights",
"input_space": "RGB",
"input_range": [0, 1],
},
},
"params": {
# init params for encoder if any
},
},

Now you can use your encoder

.. code-block:: python

model = smp.Unet(encoder_name="my_awesome_encoder")

For better understanding see more examples of encoder in smp.encoders module.

.. note::

If it works fine, dont forget to contribute your work and make a PR to SMP πŸ˜‰

3. Aux classification output
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

All models support `aux_params parameter, which is default set to None.
If
aux_params = None than classification auxiliary output is not created, else
model produce not only
mask, but also label output with shape (N, C).

Classification head consist of following layers:

1. GlobalPooling
2. Dropout (optional)
3. Linear
4. Activation (optional)

Example:

.. code-block:: python

aux_params=dict(
pooling='avg', # one of 'avg', 'max'
dropout=0.5, # dropout ratio, default is None
activation='sigmoid', # activation function, default is None
classes=4, # define number of output labels
)

model = smp.Unet('resnet34', classes=4, aux_params=aux_params)
mask, label = model(x)

mask.shape, label.shape
# (N, 4, H, W), (N, 4)

4. Freezing and unfreezing the encoder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sometimes you may want to freeze the encoder during training, e.g. when using pretrained backbones and only fine-tuning the decoder and segmentation head.

All segmentation models in SMP provide two helper methods:

.. code-block:: python

model = smp.Unet("resnet34", classes=2)

# Freeze encoder: stops gradient updates and freezes normalization layer stats
model.freeze_encoder()

# Unfreeze encoder: re-enables training for encoder parameters and normalization layers
model.unfreeze_encoder()

.. important::
- Freezing sets
requires_grad = False for all encoder parameters.
- Normalization layers that track running statistics (e.g., BatchNorm and InstanceNorm layers) are set to
.eval() mode to prevent updates to running_mean and running_var.
- If you later call
model.train(), frozen encoders will remain frozen until you call unfreeze_encoder().

---

Install

βš™οΈ Installation
===============

PyPI version:

.. code-block:: bash

$ pip install -U segmentation-models-pytorch


Latest version from source:

.. code-block:: bash

$ pip install -U git+https://github.com/qubvel/segmentation_models.pytorch

---

Losses

πŸ“‰ Losses
=========

Collection of popular semantic segmentation losses. Adapted from
an awesome repo with pytorch utils https://github.com/BloodAxe/pytorch-toolbelt

Constants
~~~~~~~~~
.. automodule:: segmentation_models_pytorch.losses.constants
:members:

JaccardLoss
~~~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.losses.JaccardLoss

DiceLoss
~~~~~~~~
.. autoclass:: segmentation_models_pytorch.losses.DiceLoss

TverskyLoss
~~~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.losses.TverskyLoss

FocalLoss
~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.losses.FocalLoss

LovaszLoss
~~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.losses.LovaszLoss

SoftBCEWithLogitsLoss
~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.losses.SoftBCEWithLogitsLoss

SoftCrossEntropyLoss
~~~~~~~~~~~~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.losses.SoftCrossEntropyLoss

MCCLoss
~~~~~~~~~~~~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.losses.MCCLoss
:members: forward

---

Metrics

πŸ“ Metrics
==========

Functional metrics
~~~~~~~~~~~~~~~~~~

.. currentmodule:: segmentation_models_pytorch.metrics.functional

.. autosummary::

get_stats
fbeta_score
f1_score
iou_score
accuracy
precision
recall
sensitivity
specificity
balanced_accuracy
positive_predictive_value
negative_predictive_value
false_negative_rate
false_positive_rate
false_discovery_rate
false_omission_rate
positive_likelihood_ratio
negative_likelihood_ratio

.. automodule:: segmentation_models_pytorch.metrics.functional
:members:

---

Models

πŸ•ΈοΈ Segmentation Models
==============================


.. contents::
:local:

.. _unet:

Unet
~~~~
.. autoclass:: segmentation_models_pytorch.Unet


.. _unetplusplus:

Unet++
~~~~~~
.. autoclass:: segmentation_models_pytorch.UnetPlusPlus


.. _fpn:

FPN
~~~
.. autoclass:: segmentation_models_pytorch.FPN


.. _pspnet:

PSPNet
~~~~~~
.. autoclass:: segmentation_models_pytorch.PSPNet


.. _deeplabv3:

DeepLabV3
~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.DeepLabV3


.. _deeplabv3plus:

DeepLabV3+
~~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.DeepLabV3Plus


.. _linknet:

Linknet
~~~~~~~
.. autoclass:: segmentation_models_pytorch.Linknet


.. _manet:

MAnet
~~~~~~
.. autoclass:: segmentation_models_pytorch.MAnet


.. _pan:

PAN
~~~
.. autoclass:: segmentation_models_pytorch.PAN


.. _upernet:

UPerNet
~~~~~~~
.. autoclass:: segmentation_models_pytorch.UPerNet


.. _segformer:

Segformer
~~~~~~~~~
.. autoclass:: segmentation_models_pytorch.Segformer


.. _dpt:

DPT
~~~

.. note::

See full list of DPT-compatible timm encoders in :ref:dpt-encoders.

.. note::

For some encoders, the model requires dynamic_img_size=True to be passed in order to work with resolutions different from what the encoder was trained for.

.. autoclass:: segmentation_models_pytorch.DPT

---

Quickstart

πŸš€ Quick Start
==============

1. Create segmentation model

Segmentation model is just a PyTorch nn.Module, which can be created as easy as:

.. code-block:: python

import segmentation_models_pytorch as smp

model = smp.Unet(
encoder_name="resnet34", # choose encoder, e.g. mobilenet_v2 or efficientnet-b7
encoder_weights="imagenet", # use
imagenet pre-trained weights for encoder initialization
in_channels=1, # model input channels (1 for gray-scale images, 3 for RGB, etc.)
classes=3, # model output channels (number of classes in your dataset)
)

- Check the page with available :doc:model architectures <models>.
- Check the table with :doc:
available ported encoders and its corresponding weights <encoders>.
-
Pytorch Image Models (timm) <https://github.com/huggingface/pytorch-image-models>_ encoders are also supported, check it :doc:here<encoders_timm>.

Alternatively, you can use smp.create_model function to create a model by name:

.. code-block:: python

model = smp.create_model(
arch="fpn", # name of the architecture, e.g. 'Unet'/ 'FPN' / etc. Case INsensitive!
encoder_name="mit_b0",
encoder_weights="imagenet",
in_channels=1,
classes=3,
)


2. Configure data preprocessing

All encoders have pretrained weights. Preparing your data the same way as during weights pre-training may give your better results (higher metric score and faster convergence). But it is relevant only for 1-2-3-channels images and not necessary in case you train the whole model, not only decoder.

.. code-block:: python

from segmentation_models_pytorch.encoders import get_preprocessing_fn

preprocess_input = get_preprocessing_fn('resnet18', pretrained='imagenet')


3. Congratulations! πŸŽ‰


You are done! Now you can train your model with your favorite framework, or as simple as:

.. code-block:: python

for images, gt_masks in dataloader:

predicted_mask = model(images)
loss = loss_fn(predicted_mask, gt_masks)

loss.backward()
optimizer.step()

Check the following examples:

.. |colab-badge| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/binary_segmentation_intro.ipynb
:alt: Open In Colab

- Finetuning notebook on Oxford Pet dataset with PyTorch Lightning <https://github.com/qubvel/segmentation_models.pytorch/blob/main/examples/binary_segmentation_intro.ipynb>__ |colab-badge|
- Finetuning script for cloth segmentation with
PyTorch Lightning <https://github.com/ternaus/cloths_segmentation>__

---

Save Load

πŸ“‚ Saving and Loading
=====================

In this section, we will discuss how to save a trained model, push it to the Hugging Face Hub, and load it back for later use.

Saving and Sharing a Model
--------------------------

Once you have trained your model, you can save it using the .save_pretrained method. This method saves the model configuration and weights to a directory of your choice.
And, optionally, you can push the model to the Hugging Face Hub by setting the
push_to_hub parameter to True.

For example:

.. code:: python

import segmentation_models_pytorch as smp

model = smp.Unet('resnet34', encoder_weights='imagenet')

# After training your model, save it to a directory
model.save_pretrained('./my_model')

# Or saved and pushed to the Hub simultaneously
model.save_pretrained('username/my-model', push_to_hub=True)

Loading Trained Model
---------------------

Once your model is saved and pushed to the Hub, you can load it back using the smp.from_pretrained method. This method allows you to load the model weights and configuration from a directory or directly from the Hub.

For example:

.. code:: python

import segmentation_models_pytorch as smp

# Load the model from the local directory
model = smp.from_pretrained('./my_model')

# Alternatively, load the model directly from the Hugging Face Hub
model = smp.from_pretrained('username/my-model')

Loading pre-trained model with different number of classes for fine-tuning:

.. code:: python

import segmentation_models_pytorch as smp

model = smp.from_pretrained('<path-or-repo-name>', classes=5, strict=False)

Saving model Metrics and Dataset Name
-------------------------------------

You can simply pass the metrics and dataset parameters to the save_pretrained method to save the model metrics and dataset name in Model Card along with the model configuration and weights.

For example:

.. code:: python

import segmentation_models_pytorch as smp

model = smp.Unet('resnet34', encoder_weights='imagenet')

# After training your model, save it to a directory
model.save_pretrained('./my_model', metrics={'accuracy': 0.95}, dataset='my_dataset')

# Or saved and pushed to the Hub simultaneously
model.save_pretrained('username/my-model', push_to_hub=True, metrics={'accuracy': 0.95}, dataset='my_dataset')

Saving with preprocessing transform (Albumentations)
----------------------------------------------------

You can save the preprocessing transform along with the model and push it to the Hub.
This can be useful when you want to share the model with the preprocessing transform that was used during training,
to make sure that the inference pipeline is consistent with the training pipeline.

.. code:: python

import albumentations as A
import segmentation_models_pytorch as smp

# Define a preprocessing transform for image that would be used during inference
preprocessing_transform = A.Compose([
A.Resize(256, 256),
A.Normalize()
])

model = smp.Unet()

directory_or_repo_on_the_hub = "qubvel-hf/unet-with-transform" # <username>/<repo-name>

# Save the model and transform (and pus ot hub, if needed)
model.save_pretrained(directory_or_repo_on_the_hub, push_to_hub=True)
preprocessing_transform.save_pretrained(directory_or_repo_on_the_hub, push_to_hub=True)

# Loading transform and model
restored_model = smp.from_pretrained(directory_or_repo_on_the_hub)
restored_transform = A.Compose.from_pretrained(directory_or_repo_on_the_hub)

print(restored_transform)

Conclusion
----------

By following these steps, you can easily save, share, and load your models, facilitating collaboration and reproducibility in your projects. Don't forget to replace the placeholders with your actual model paths and names.

|binary-segmentation-intro|
|save-load-model-and-share-with-hf-hub|

.. |binary-segmentation-intro| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/binary_segmentation_intro.ipynb
:alt: Open In Colab

.. |save-load-model-and-share-with-hf-hub| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/save_load_model_and_share_with_hf_hub.ipynb
:alt: Open In Colab

---

README

<div align="center">


Python library with Neural Networks for Image Semantic
Segmentation based on PyTorch.


[](https://github.com/qubvel/segmentation_models.pytorch/actions/workflows/tests.yml)

[](https://smp.readthedocs.io/en/latest/)
<br>
[](https://pypi.org/project/segmentation-models-pytorch/)
[](https://pepy.tech/project/segmentation-models-pytorch)
[](https://pepy.tech/project/segmentation-models-pytorch)
<br>
[](https://github.com/qubvel/segmentation_models.pytorch/blob/main/LICENSE)
[](https://pepy.tech/project/segmentation-models-pytorch)

</div>

The main features of the library are:

- Super simple high-level API (just two lines to create a neural network)
- 12 encoder-decoder model architectures (Unet, Unet++, Segformer, DPT, ...)
- 800+ pretrained convolution- and transform-based encoders, including timm support
- Popular metrics and losses for training routines (Dice, Jaccard, Tversky, ...)
- ONNX export and torch script/trace/compile friendly

<a href="https://github.com/withoutbg/withoutbg" target="_blank">
<img src="https://withoutbg.com/images/img-and-matte.png" alt="Sponsored by withoutBG"/>
</a>

withoutBG is a high-quality background removal tool. They built their open-source image matting and refiner models using smp.Unet and are proudly sponsoring this project.


πŸ“š Project Documentation πŸ“š

Visit Read The Docs Project Page or read the following README to know more about Segmentation Models Pytorch (SMP for short) library

πŸ“‹ Table of content


1. Quick start
2. Examples
3. Models and encoders
4. Models API
1. Input channels
2. Auxiliary classification output
3. Depth
5. Installation
6. Competitions won with the library
7. Contributing
8. Citing
9. License

⏳ Quick start <a name="start"></a>

#### 1. Create your first Segmentation model with SMP

The segmentation model is just a PyTorch torch.nn.Module, which can be created as easy as:

python
import segmentation_models_pytorch as smp

model = smp.Unet(
encoder_name="resnet34", # choose encoder, e.g. mobilenet_v2 or efficientnet-b7
encoder_weights="imagenet", # use
imagenet pre-trained weights for encoder initialization
in_channels=1, # model input channels (1 for gray-scale images, 3 for RGB, etc.)
classes=3, # model output channels (number of classes in your dataset)
)


- see table with available model architectures
- see table with available encoders and their corresponding weights

#### 2. Configure data preprocessing

All encoders have pretrained weights. Preparing your data the same way as during weights pre-training may give you better results (higher metric score and faster convergence). It is not necessary in case you train the whole model, not only the decoder.

python
from segmentation_models_pytorch.encoders import get_preprocessing_fn

preprocess_input = get_preprocessing_fn('resnet18', pretrained='imagenet')

Congratulations! You are done! Now you can train your model with your favorite framework!

πŸ’‘ Examples <a name="examples"></a>

| Name | Link | Colab |
|-------------------------------------------|-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| Train pets binary segmentation on OxfordPets | Notebook | [](https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/binary_segmentation_intro.ipynb) |
| Train cars binary segmentation on CamVid | Notebook.ipynb) | [](https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/cars%20segmentation%20(camvid).ipynb) |
| Train multiclass segmentation on CamVid | Notebook | [](https://colab.research.google.com/github/qubvel-org/segmentation_models.pytorch/blob/main/examples/camvid_segmentation_multiclass.ipynb) |
| Train clothes binary segmentation by @ternaus | Repo | |
| Load and inference pretrained Segformer | Notebook | [](https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/segformer_inference_pretrained.ipynb) |
| Load and inference pretrained DPT | Notebook | [](https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/dpt_inference_pretrained.ipynb) |
| Load and inference pretrained UPerNet | Notebook | [](https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/upernet_inference_pretrained.ipynb) |
| Save and load models locally / to HuggingFace Hub |Notebook | [](https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/save_load_model_and_share_with_hf_hub.ipynb)
| Export trained model to ONNX | Notebook | [](https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/convert_to_onnx.ipynb) |


πŸ“¦ Models and encoders <a name="models-and-encoders"></a>

Architectures <a name="architectures"></a>


| Architecture | Paper | Documentation | Checkpoints |
|--------------|-------|---------------|------------|
| Unet | paper | docs | |
| Unet++ | paper | docs | |
| MAnet | paper | docs | |
| Linknet | paper | docs | |
| FPN | paper | docs | |
| PSPNet | paper | docs | |
| PAN | paper | docs | |
| DeepLabV3 | paper | docs | |
| DeepLabV3+ | paper | docs | |
| UPerNet | paper | docs | checkpoints |
| Segformer | paper | docs | checkpoints |
| DPT | paper | docs | checkpoints |

Encoders <a name="encoders"></a>

The library provides a wide range of pretrained encoders (also known as backbones) for segmentation models. Instead of using features from the final layer of a classification model, we extract intermediate features and feed them into the decoder for segmentation tasks.

All encoders come with pretrained weights, which help achieve faster and more stable convergence when training segmentation models.

Given the extensive selection of supported encoders, you can choose the best one for your specific use case, for example:
- Lightweight encoders for low-latency applications or real-time inference on edge devices (mobilenet/mobileone).
- High-capacity architectures for complex tasks involving a large number of segmented classes, providing superior accuracy (convnext/swin/mit).

By selecting the right encoder, you can balance efficiency, performance, and model complexity to suit your project needs.

All encoders and corresponding pretrained weight are listed in the documentation:
- table with natively ported encoders
- table with timm encoders supported

πŸ” Models API <a name="api"></a>

Input channels

The input channels parameter allows you to create a model that can process a tensor with an arbitrary number of channels.
If you use pretrained weights from ImageNet, the weights of the first convolution will be reused:
- For the 1-channel case, it would be a sum of the weights of the first convolution layer.
- Otherwise, channels would be populated with weights like
new_weight[:, i] = pretrained_weight[:, i % 3], and then scaled with new_weight * 3 / new_in_channels.

python
model = smp.FPN('resnet34', in_channels=1)
mask = model(torch.ones([1, 1, 64, 64]))

Auxiliary classification output

All models support aux_params parameters, which is default set to None.
If
aux_params = None then classification auxiliary output is not created, else
model produce not only
mask, but also label output with shape NC.
Classification head consists of GlobalPooling->Dropout(optional)->Linear->Activation(optional) layers, which can be
configured by
aux_params as follows:

python
aux_params=dict(
pooling='avg', # one of 'avg', 'max'
dropout=0.5, # dropout ratio, default is None
activation='sigmoid', # activation function, default is None
classes=4, # define number of output labels
)
model = smp.Unet('resnet34', classes=4, aux_params=aux_params)
mask, label = model(x)

Depth

Depth parameter specify a number of downsampling operations in encoder, so you can make
your model lighter if specify smaller
depth.

python
model = smp.Unet('resnet34', encoder_depth=4)

πŸ›  Installation <a name="installation"></a>


PyPI version:

bash
$ pip install segmentation-models-pytorch

The latest version from GitHub:

bash
$ pip install git+https://github.com/qubvel/segmentation_models.pytorch

πŸ† Competitions won with the library <a name="competitions"></a>

Segmentation Models package is widely used in image segmentation competitions.
Here you can find competitions, names of the winners and links to their solutions.

πŸ›  Projects built with SMP

- withoutBG: An open-source background removal tool that uses smp.Unet` for its image matting and refinement models. Check withoutBG Focus on HuggingFace.


🀝 Contributing <a name="contributing"></a>

1. Install SMP in dev mode

bash
make install_dev  # Create .venv, install SMP in dev mode

2. Run tests and code checks

bash
make test          # Run tests suite with pytest
make fixup # Ruff for formatting and lint checks

3. Update a table (in case you added an encoder)

bash
make table        # Generates a table with encoders and print to stdout

πŸ“ Citing <a name="citing"></a>


text
@misc{Iakubovskii:2019,
Author = {Pavel Iakubovskii},
Title = {Segmentation Models Pytorch},
Year = {2019},
Publisher = {GitHub},
Journal = {GitHub repository},
Howpublished = {\url{https://github.com/qubvel/segmentation_models.pytorch}}
}

πŸ›‘οΈ License <a name="license"></a>


The project is primarily distributed under MIT License, while some files are subject to other licenses. Please refer to LICENSES and license statements in each file for careful check, especially for commercial use.

---