Skip to content

youngsjjn/TrSeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrSeg: Transformer for Semantic Segmentation

Introduction

This repository is a PyTorch implementation of TrSeg. This work is based on semseg.

The codebase mainly uses ResNet50/101/152 as backbone and can be easily adapted to other basic classification structures. Sample experimented dataset is Cityscapes.

Requirement

Hardware: >= 44G GPU memory

Software: PyTorch>=1.0.0, python3

Usage

For installation, follow installation steps below or recommend you to refer to the instructions described here.

If you use multiple GPUs for training, Apex is required for synchronized training (such as Sync-BN).

For its pretrained model, you can download from my drive.

Getting Started

Installation

  1. Clone this repository.
git clone https://github.com/youngsjjn/TrSeg.git
  1. Install Python dependencies.
pip install -r requirements.txt

Implementation

  1. Download datasets (i.e. Cityscapes) and change the root of data path in config. Download data list and pre-trained backbone models (ResNet50/101/152) here.

  2. Train (Evaluation is included at the end of the training)

sh tool/train.sh cityscapes transform101
  1. Test
sh tool/test.sh cityscapes transform101
Network (ResNet-101) mIoU
PSPNet 78.6
Deeplab-v3 79.3
TrSeg 79.9

Citation

You may want to cite:

@article{jin2021trseg,
  title={TrSeg: Transformer for semantic segmentation},
  author={Jin, Youngsaeng and Han, David and Ko, Hanseok},
  journal={Pattern Recognition Letters},
  volume={148},
  pages={29--35},
  year={2021},
  publisher={Elsevier}
}

About

TrSeg: Transformer for Semantic Segmentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published