# qubvel-org/segmentation_models.pytorch

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/qubvel-org-segmentation-models-pytorch).**

11,620 stars · 1,836 forks · Python · MIT

## Links

- GitHub: https://github.com/qubvel-org/segmentation_models.pytorch
- Homepage: https://smp.readthedocs.io/
- awesome-repositories: https://awesome-repositories.com/repository/qubvel-org-segmentation-models-pytorch.md

## Topics

`computer-vision` `deeplab-v3-plus` `deeplabv3` `dpt` `fpn` `image-processing` `image-segmentation` `imagenet` `models` `pretrained-weights` `pspnet` `pytorch` `segformer` `segmentation` `segmentation-models` `semantic-segmentation` `transformers` `unet` `unet-pytorch` `unetplusplus`

## Description

This is a PyTorch semantic segmentation library designed for building image masking frameworks. It provides a collection of over 500 pretrained convolutional and transformer-based encoders and various decoder architectures to perform binary and multiclass pixel-level classification.

The library features a modular backbone integration that decouples encoder choice from decoder logic. It supports custom input channel configurations and encoder depth tuning, allowing the modification of input layers to accept non-standard channel counts while preserving pretrained weights. Some configurations also allow for the attachment of auxiliary classification heads to produce both a segmentation mask and a global image label.

Additional capabilities include preprocessing functions aligned with pretrained encoder weights and tools for exporting trained models to the ONNX format for cross-platform deployment. The system also supports integration with model hubs for saving and loading weights.

## Tags

### Artificial Intelligence & ML

- [PyTorch Semantic Segmentation Libraries](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-semantic-segmentation-libraries.md) — Provides a comprehensive library for building image segmentation models using PyTorch with a vast collection of pretrained encoders.
- [Semantic Segmentation](https://awesome-repositories.com/f/artificial-intelligence-ml/semantic-segmentation.md) — Provides a comprehensive library for building semantic segmentation models using pretrained encoders and various decoders. ([source](https://github.com/qubvel-org/segmentation_models.pytorch#readme))
- [Binary Segmentations](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/image-segmentation/binary-segmentations.md) — Enables identifying a single object class from the background by assigning a binary label to each pixel. ([source](https://github.com/qubvel-org/segmentation_models.pytorch/tree/main/examples))
- [Multiclass Segmentations](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/image-segmentation/multiclass-segmentations.md) — Provides the capability to categorize every pixel in an image into one of several distinct object classes. ([source](https://github.com/qubvel-org/segmentation_models.pytorch/tree/main/examples))
- [Encoder-Decoder Architectures](https://awesome-repositories.com/f/artificial-intelligence-ml/encoder-decoder-architectures.md) — Implements a variety of encoder-decoder architectures to map latent representations to pixel-level masks.
- [Modular Backbone Architectures](https://awesome-repositories.com/f/artificial-intelligence-ml/modular-backbone-architectures.md) — Features a modular backbone integration that allows swapping between convolutional and transformer-based encoders.
- [Pretrained Encoder Collections](https://awesome-repositories.com/f/artificial-intelligence-ml/pretrained-encoder-collections.md) — Offers a collection of over 500 pretrained convolutional and transformer-based encoders for feature extraction.
- [Computer Vision Workflows](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-workflows.md) — Facilitates custom vision workflows by allowing adjustments to input channels and encoder depths.
- [ONNX Model Exporters](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/serialization-and-export-formats/onnx-model-exporters.md) — Includes tools for serializing PyTorch computational graphs into the universal ONNX format for cross-platform deployment.
- [Data Preprocessing](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/data-and-checkpointing/data-preprocessing.md) — Ships preprocessing functions that normalize and transform input images to align with pretrained encoder weights. ([source](https://github.com/qubvel-org/segmentation_models.pytorch/blob/main/README.md))
- [Model Depth Optimization](https://awesome-repositories.com/f/artificial-intelligence-ml/model-depth-optimization.md) — Enables adjusting the number of downsampling operations in the encoder to balance model complexity and inference speed. ([source](https://github.com/qubvel-org/segmentation_models.pytorch/blob/main/README.md))
- [Preprocessing Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/preprocessing-pipelines.md) — Provides preprocessing functions aligned with specific pretrained encoder weights to ensure consistent normalization.
- [Adaptive Input Layers](https://awesome-repositories.com/f/artificial-intelligence-ml/weight-initialization/pretrained-weight-initializers/adaptive-input-layers.md) — Allows modifying the first layer of pretrained encoders to accept custom input channel counts while preserving weights.

### Graphics & Multimedia

- [Image Masking Frameworks](https://awesome-repositories.com/f/graphics-multimedia/image-masking-frameworks.md) — Implements a system for performing binary and multiclass pixel-level classification to create object masks.

### Networking & Communication

- [Input Channel Adaptations](https://awesome-repositories.com/f/networking-communication/custom-data-channels/input-channel-adaptations.md) — Allows configuring the number of input channels to support tensors with arbitrary dimensions while preserving pretrained weights. ([source](https://github.com/qubvel-org/segmentation_models.pytorch#readme))
