Giter Club home page Giter Club logo

lc-msm's Introduction

LC-MSM

This repository contains the official code for
"LC-MSM: Language-Conditioned Masked Segmentation Model for Unsupervised Domain Adaptation"

Model Performance

GTA to Cityscapes SYNTHIA to Cityscapes
DAFormer 68.3 60.9
LC-MSM (Single-resolution) 71.8 62.8
HRDA 73.8 65.8
LC-MSM (Multi-resolution) 76.0 68.2

performance

Usage

environments

  • Ubuntu 20.04
  • Python 3.8.5

Requirements

  • torch >= 1.8.0
  • torchvision
  • mmcv-full
  • open-clip
  • tqdm

To use this code, please first install the 'mmcv-full' by following the official guidelines (mmcv).

The requirements can be installed by the following command

pip install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html
pip install open_clip_torch

Prepare dataset

Citysacpes: Please, download leftImg8bit_trainvaltest.zip and trainvaltest.zip from here


GTA: Please download all images and label packages from here


SYNTHIA: Please download SYNTHIA-RAND-CITYSCAPES from here

Pre-trained backbone weight

please download the pre-trained weight for MiT-B5 via shell script

sh tools/download_checkpoints.sh

Preprocessing the dataset

The following dataset is preprocessed in COCO format , but if you are using the raw json file you can preprocess with the script

python tools/convert_datasets/gta.py /your/path/
python tools/convert_datasets/cityscapes.py /your/path/
python tools/convert_datasets/synthia.py /your/path/

Training

For convenience, provides and annotated config file of the adaptation model
Before training the data path in the datset config file should be modifed with your data path.

A training job can be launched using:

python run_experiment.py --config configs/daformer/gta2cs_uda_lc_msm.py

Evaluating

The checkpoint will be sevaed automatically in work_dirs, else you set a directory for it.

sh test.sh path/to/checkpoint/directory

lc-msm's People

Contributors

2u1 avatar

Stargazers

 avatar  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.