Coder Social home page Coder Social logo

pmtrans_openmmseg's Introduction

PMFormer: Patch-Mix Transformer for Domain-Adaptive Semantic Segmentation

Get Started

Please see Overview for the general introduction of MMSegmentation.

Environment Setup

Please see for Get Started for MMsegmentation environment setup.

Setup Datasets

After unzipping SYNTHIA_RAND_CITYSCAPES dataset into data/synthia, run the following scripts for conversion:

Splitting Synthia Images into Train-Test-Val splits

python tools/dataset_converters/synthia_arange.py data/synthia/

Formating Synthia Images to be consistent with Cityscapes ones

python tools/dataset_converters/synthia_2_cityscape.py data/synthia/GT

The final folder structure should look like this:

DAFormer
├── ...
├── data
│   ├── cityscapes
│   │   ├── leftImg8bit
│   │   │   ├── test
│   │   │   ├── train
│   │   │   ├── val
│   │   ├── gtFine
│   │   │   ├── test
│   │   │   ├── train
│   │   │   ├── val
│   ├── gta
│   │   ├── images
│   │   ├── labels
│   ├── synthia
│   │   ├── RGB
│   │   ├── GT
│   │   │   ├── LABELS
├── ...

Pseudo Labelling

python target_labelling.py data/cityscapes/leftImg8bit
By default, the script looks in work_dirs/segformer_mit-b5_8xb1-40k_synthia-512x512/iter_40000.pth for the model file.

Training PMTrans

python tools/train.py configs/segformer/pmtrans_mit-b0_8xb1-40k_synthia2cityscapes-256x256.py
Note: You can also replace b0 with desired model size (b1, b2, b3, b4, b5)

Testing PMTrans

python tools/test.py configs/segformer/pmtrans_mit-b0_8xb1-40k_synthia2cityscapes-256x256.py work_dirs/pmtrans_mit-b0_8xb1-40k_synthia2cityscapes-256x256/iter_[iteration].pth --show

File Locations

pmtrans_openmmseg's People

Contributors

mengzhangli avatar xiexinch avatar meowzheng avatar xvjiarui avatar junjun2016 avatar diditwork avatar rockeycoss avatar sennnnn avatar csatsurnh avatar yamengxi avatar ai-tianlong avatar masaaki-75 avatar matrixgame2018 avatar sshuair avatar linfangjian01 avatar tianbinli avatar grimoire avatar ben-louis avatar daavoo avatar hellock avatar lkm2835 avatar johnzja avatar siddancha avatar provable0816 avatar jinxianwei avatar voyagerxvoyagerx avatar wangjiangben-hw avatar tianleishi avatar drcut avatar suyanzhou626 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.