资源算法piwise

piwise

2019-09-10 | |  97 |   0 |   0

PiWiSe

Pixel-wise segmentation on the VOC2012 dataset using pytorch.

  • [x] [FCN](https://arxiv.org/abs/1605.06211)

  • [x] [SegNet](https://arxiv.org/abs/1511.00561)

  • [ ] [PSPNet](https://arxiv.org/abs/1612.01105)

  • [x] [UNet](https://arxiv.org/abs/1505.04597)

  • [ ] [RefineNet](https://arxiv.org/abs/1611.06612)

For a more complete implementation of segmentation networks checkout semseg.

Note:

  • FCN differs from original implementation see this issue

  • SegNet does not match original paper performance see here

  • PSPNet misses "atrous convolution" (conv layers of ResNet101 should be amended to preserve image size)

Keeping this in mind feel free to PR. Thank you!

Setup

See dataset examples here.

Download

Download image archive and extract and do:

mkdir data
mv VOCdevkit/VOC2012/JPEGImages data/images
mv VOCdevkit/VOC2012/SegmentationClass data/classes
rm -rf VOCdevkit

Install

We recommend using pyenv:

pyenv virtualenv 3.6.0 piwise
pyenv activate piwise

then install requirements with pip install -r requirements.txt.

Usage

For latest documentation use:

python main.py --help

Supported model parameters are fcn8fcn16fcn32unetsegnet1segnet2pspnet.

Training

If you want to have visualization open an extra tab with:

python -m visdom.server -port 5000

Train the SegNet model 30 epochs with cuda support, visualization and checkpoints every 100 steps:

python main.py --cuda --model segnet2 train --datadir data 
    --num-epochs 30 --num-workers 4 --batch-size 4 
    --steps-plot 50 --steps-save 100

Evaluation

Then we want to do semantic segmentation on foo.jpg:

python main.py --model segnet2 --state segnet2-30-0 eval foo.jpg foo.png

The segmented class image can now be found at foo.png.

上一篇:AttGAN

下一篇:pspnet-pytorch

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...