Skip to content

KeyError when using Segformer architecture in segmentation_models_pytorch #1019

Closed
@essawey

Description

@essawey

Description:

I encountered an error while trying to use the "Segformer" architecture in segmentation_models_pytorch as shown below:

import segmentation_models_pytorch as smp
model = smp.create_model(arch="Segformer")

Error:
KeyError: "Wrong architecture type Segformer. Available options are: ['unet', 'unetplusplus', 'manet', 'linknet', 'fpn', 'pspnet', 'deeplabv3', 'deeplabv3plus', 'pan']"

It appears that the "Segformer" architecture is not linked to the library. Based on the error message, only the listed architectures are currently available for use.

Environment:

segmentation_models_pytorch version: 0.3.4
Python version: 3.8

I believe the architecture might not be integrated into the library yet.
Please let me know if there are any updates regarding this,
if there’s another way to use Segformer with this library.

Thanks <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions