Coder Social home page Coder Social logo

lednet's Introduction

LEDNet

This is an unofficial implement of LEDNet.

the official version:LEDNet-official

Environment

  • Python 3.6
  • PyTorch 1.1

Performance

  • Base Size 1024, Crop Size 768, only fine. (new-version, with dropout)
Model Paper OHEM Drop-rate lr Epoch val (crop) val
LEDNet / 0.1 0.0005 800 60.32/94.51 66.29/94.40
LEDNet / 0.1 0.005 600 61.29/94.75 66.56/94.72
LEDNet / 0.3 0.01 800 63.84/94.83 69.09/94.75

Note:

  • The paper only provide the test results: 69.2/86.8 (class mIoU/category mIoU).
  • And the training setting is a little different with original paper (original paper use 1024x512)

Some things you can use to improve the performance:

  1. use larger learning rate (like 0.01)
  2. use more epochs (like 1000)
  3. use larger training input size (like Base Size 1344, Crop Size 1024)

Demo

Please download pretrained model first

$ python demo.py [--input-pic png/demo.png] [--pretrained your-root-of-pretrained] [--cuda true]

Evaluation

The default data root is ~/.torch/datasets (You can download dataset and build a soft-link to it)

$ python eval.py [--mode testval] [--pretrained root-of-pretrained-model] [--cuda true]

Training

Recommend to using distributed training.

$ export NGPUS=4
$ python -m torch.distributed.launch --nproc_per_node=$NGPUS train.py [--dataset citys] [--batch-size 8] [--base-size 1024] [--crop-size 768] [--epochs 800] [--warmup-factor 0.1] [--warmup-iters 200] [--log-step 10] [--save-epoch 40] [--lr 0.005]

Prepare data

Your can reference gluon-cv-cityspaces to prepare the dataset

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.