All Projects → mapleneverfade → Pytorch Semantic Segmentation

mapleneverfade / Pytorch Semantic Segmentation

Licence: mit
segmentation repo using pytorch

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytorch Semantic Segmentation

Multiclass Semantic Segmentation Camvid
Tensorflow 2 implementation of complete pipeline for multiclass image semantic segmentation using UNet, SegNet and FCN32 architectures on Cambridge-driving Labeled Video Database (CamVid) dataset.
Stars: ✭ 67 (-10.67%)
Mutual labels:  semantic-segmentation, fcn
DL Notes
DL & CV & Neural Network
Stars: ✭ 29 (-61.33%)
Mutual labels:  fcn, semantic-segmentation
tf-semantic-segmentation-FCN-VGG16
Semantic segmentation for classifying road. "Fully Convolutional Networks for Semantic Segmentation (2015)" implemented using TF
Stars: ✭ 30 (-60%)
Mutual labels:  fcn, semantic-segmentation
Pytorch Fcn Easiest Demo
PyTorch Implementation of Fully Convolutional Networks (a very simple and easy demo).
Stars: ✭ 138 (+84%)
Mutual labels:  semantic-segmentation, fcn
Semseg
常用的语义分割架构结构综述以及代码复现
Stars: ✭ 624 (+732%)
Mutual labels:  semantic-segmentation, fcn
Fcn For Semantic Segmentation
Implemention of FCN-8 and FCN-16 with Keras and uses CRF as post processing
Stars: ✭ 155 (+106.67%)
Mutual labels:  semantic-segmentation, fcn
FCN-Segmentation-TensorFlow
FCN for Semantic Image Segmentation achieving 68.5 mIoU on PASCAL VOC
Stars: ✭ 34 (-54.67%)
Mutual labels:  fcn, semantic-segmentation
Fashion-Clothing-Parsing
FCN, U-Net models implementation in TensorFlow for fashion clothing parsing
Stars: ✭ 29 (-61.33%)
Mutual labels:  fcn, semantic-segmentation
Piwise
Pixel-wise segmentation on VOC2012 dataset using pytorch.
Stars: ✭ 365 (+386.67%)
Mutual labels:  semantic-segmentation, fcn
TensorFlow-Advanced-Segmentation-Models
A Python Library for High-Level Semantic Segmentation Models based on TensorFlow and Keras with pretrained backbones.
Stars: ✭ 64 (-14.67%)
Mutual labels:  fcn, semantic-segmentation
Segmentation
Tensorflow implementation : U-net and FCN with global convolution
Stars: ✭ 101 (+34.67%)
Mutual labels:  semantic-segmentation, fcn
Seg Mentor
TFslim based semantic segmentation models, modular&extensible boutique design
Stars: ✭ 43 (-42.67%)
Mutual labels:  semantic-segmentation, fcn
Pytorch Fcn
PyTorch Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)
Stars: ✭ 1,351 (+1701.33%)
Mutual labels:  semantic-segmentation, fcn
Fcn
Chainer Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)
Stars: ✭ 211 (+181.33%)
Mutual labels:  semantic-segmentation, fcn
Deep Residual Unet
ResUNet, a semantic segmentation model inspired by the deep residual learning and UNet. An architecture that take advantages from both(Residual and UNet) models.
Stars: ✭ 97 (+29.33%)
Mutual labels:  semantic-segmentation, fcn
DDUnet-Modified-Unet-for-WMH-with-Dense-Dilate
WMH segmentaion with unet, dilated_unet, and with ideas from denseNet
Stars: ✭ 23 (-69.33%)
Mutual labels:  fcn, semantic-segmentation
Pytorch Auto Drive
Segmentation models (ERFNet, ENet, DeepLab, FCN...) and Lane detection models (SCNN, SAD, PRNet, RESA, LSTR...) based on PyTorch 1.6 with mixed precision training
Stars: ✭ 32 (-57.33%)
Mutual labels:  semantic-segmentation, fcn
Fcn Googlenet
GoogLeNet implementation of Fully Convolutional Networks for Semantic Segmentation in TensorFlow
Stars: ✭ 45 (-40%)
Mutual labels:  semantic-segmentation, fcn
Jacinto Ai Devkit
Training & Quantization of embedded friendly Deep Learning / Machine Learning / Computer Vision models
Stars: ✭ 49 (-34.67%)
Mutual labels:  semantic-segmentation
Global convolutional network
Pytorch implementation of GCN architecture for semantic segmentation
Stars: ✭ 63 (-16%)
Mutual labels:  semantic-segmentation

Pytorch-Semantic-Segmentation

Reference

Network

  • fcn
  • segnet
  • erfnet
  • pspnet
  • unet

Environment

  • pytorch 0.2.0
  • torchvision 0.2.0
  • python 3.5.2
  • cython

Download

Recommand you use virtualenv.

virtualenv -p python3 YourVirtualEnv --no-site-packages

git clone https://github.com/mapleneverfade/pytorch-semantic-segmentation.git

Install CSUPPORT (Options)

To speed up calculating IoU:

cd ./utils/cityscape/

python setup.py install

Train

If gpu is available:

CUDA_VISIBLE_DEVICES=0 python3 train.py --datadir ./data/ --savedir ./save_models/ --model segnet
else:

python3 train.py --cuda False --datadir ./data/ --savedir ./save_models/ --model segnet

There are some example pictures in ./data, so you could just run the command to test whether it work.

More Training Options

--model        model to use ['segnet fcn8 fcn16 fcn32 erfnet pspnet unet'] [default=segnet]·
--datadir      where you store [train/val].In my case, './data' should have subfolders './data/train/' and './data/val/' where store image.txt' and 'label.txt'. [default='./data/']
--savedir      path to savedir [default='./save_models/']
--lr           learning rate [default=5e-4]·
--num-epochs   epochs [default=150]·
--num-classes  number of labels, pascalvoc is 21, cityscape is 20. change it when you training your own dataset.[default=21] 

Test

CUDA_VISIBLE_DEVICES=0 python3 test.py --datadir ./data/test --model segnet --model-dir ./save_models/segnet_50.pth --save-dir ./results/
"--model-dir" is the path to your trained model

More Testing Options

--model        [default=segnet]
--model-dir    path to your trained model. For example './save_models/segnet/segnet_epoch_5.pth'
--datadir      [default='./data/test/']
--num-classes  number of labels, pascalvoc is 21, cityscape is 20. change it when you training your own dataset.[default=21]
--size         reshape size [default=(672,480)]
--savedir      [default='./results/']

Options

split_train_val.py mainly to split original [image.txt,label.txt] into './train/[image.txt,label.txt]' and './val/[image.txt,label.txt]'

Options for split:

--savedir        [default='./data/']
--imagepath      path to your own image.txt
--labelpath      path to your own label.txt
--random-state   random seed [default=10000]
--train-size     ratio of train set [default=0.7]
--val-size       ratio of val set   [default=0.3]

For example, if your original folder like this :

./data
      image.txt
      label.txt

After run 'python3 split_train_val.py --savedir ./data --imagepath ./data/image.txt --labelpath ./data/label.txt', you will see this:

./data
      ./train
             image.txt
             label.txt
      ./val   
             image.txt
             label.txt

Detail

  1. More train and test options see ./options
  2. datadir include image.txt and label.txt, and the default datasets is for pascalvoc
  3. If you want train your own data. Remember to modify your data labels in ./utils/cityscapes/helpers/labels,and NUM_CLASSES in options.
  4. You can change the way the model load data in ./dataloader/ to fit your format of dataset.
  5. test.py would calculate the mIoU and save the result of segmented picture in --savedir.

ToDo

  1. More Network
  2. Clean up the code.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].