Welcome to the segmodels_keras documentation!

This is a fork of the segmentation_models library by Pavel Iakubovskii, which is not maintained anymore.

This fork is updated to support Keras 3, and also contains some bug fixes, some improvements and support for some extra backbone models.

It is not meant as a full replacement of the original library, but rather as a solution for a library I developed and depended on segmentation_models: orthoseg . Hence, full backwards compatibility or support for all features is not an explicit goal. For example, the resnet backbones got small changes compared to the original library, so existing weights you saved for them won’t be compatible.

The main features of this library are:

  • High level API (just two lines of code to create model for segmentation)

  • 4 model architectures for binary and multi-class image segmentation (including legendary Unet)

  • 20+ available backbones for each architecture

  • All backbones have pre-trained weights for faster and better convergence

  • Helpful segmentation losses (Jaccard, Dice, Focal) and metrics (IoU, F-score)

Indices and tables