qubvel-org / segmentation_models.pytorch

Semantic segmentation models with 500+ pretrained convolutional and transformer-based backbones.
https://smp.readthedocs.io/
MIT License
9.73k stars 1.68k forks source link

Add Segformer model #941

Open brianhou0208 opened 1 month ago

brianhou0208 commented 1 month ago

Description

There is already a Segformer encoder mix_transformer in this repo, and the decoder architecture of Segformer is simple and similar to UPerNet.

Question

Is there a need to add a Segformer to this repo?, I can contribute a PR.

Architecture

image

Reference

qubvel commented 1 month ago

Hi @brianhou0208, there was a demand for this architecture and it can be a great feature, especially in case we will be able to load the original weights too! I would appreciate your contribution!

brianhou0208 commented 1 month ago

Check the PR here

944

alex-stenger commented 1 month ago

Waiting for the PR to be accepted, is there for now a way to make a SegFormer with smp, and to load weights ?