Coder Social home page Coder Social logo

ddrnet-pytorch's Introduction

Pytorch Implementation of Deep Dual-resolution Networks DDRNet for Real-time and Accurate Semantic Segmentation

python-image pytorch-image lic-image

This project aims at providing a concise, simple, easy-to-use reference implementation for DDRNet semantic segmentation models on Cityscapes using PyTorch.

Installation

# python dependencies can be installed by running
pip install -r requirements.txt

# follow PyTorch installation in https://pytorch.org/get-started/locally/

# for CUDA 10.0 with anaconda
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch

Usage

The Official implementation provides pretrained models which reproduces the results mentioned in the paper. Please refer to their documentation on how to use their pretrained models. This repository focuses on training DDRNet models locally. Right now, it uses single gpu to train the models but multi-gpu support will be added very soon.

Dataset

This project uses Cityscapes as the training data for DDRNet models. It requires Cityscapes dataset to be downloaded and stored in the following hierarchical order.

.{DATA_ROOT}
├── leftImg8bit
│   ├── test
│   ├── train
│   └── val
├── gtFine
│   ├── test
│   ├── train
│   └── val

Train


  • Single GPU training
# for example, train DDRNet_23:
python train.py --model ddrnet_23 --lr 0.001 --epochs 50 --data-path=/path/to/dataset/root
  • Multi-GPU training
Coming Soon!

Evaluation


  • Single GPU evaluating
# for example, evaluate DDRNet_23
python eval.py --model ddrnet_23 --data-path=/path/to/dataset/root
  • Multi-GPU evaluating
Coming Soon!

Support

Model

.{SEG_ROOT}
├── models
|   ├── DDRNet_23_slim.py
|   ├── DDRNet_23.py
│   ├── DDRNet_39.py

Result

The models have been trained with a single GeForce RTX 2070 Super gpu. The results from the original paper can be reproduced by following their specific training settings. It was not possible to follow the authors provided training settings because of resource constraints. However, the results achieved using the following settings-

Models EvalSet crops_size initial lr batch_size epochs MIoU
DDRNet_23 val 1024 0.003 5 250 77.382
DDRNet_23_slim val -- -- -- -- --
DDRNet_39 val -- -- -- -- --

To Do

  • add multi-gpu support
  • add tensorboard logging
  • make syncbn dynamic

References

ddrnet-pytorch's People

Contributors

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