Skip to content

ElephantGit/SemanticSegmentationUsingFPN_PanopticFeaturePyramidNetworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic Segmentation using FPN

This repository is an unofficial semantic segmentation part implementation of Kaiming He, Panoptic Feature Pyramid Networks .

To do

  • Semantic Segmentation Branch
    • Multiple GPUs training
    • Train on CamVid Dataset
    • Train on Cityscapes Dataset
    • Train on NYUD v2 Dataset
    • Train on PASCAL Context Dataset

results

Not as good as the result in the paper, I am tring to improve it.

Dataset mIoU Pixel Acc FWIoU Backbone Trained model
CamVid 0.570 0.920 0.861 ResNet101 CamVid
Cityscapes 0.605 0.928 0.872 ResNet101 CityScapes

Training

Prepare data

  • default dataset is CamVid

download pytorch 1.0.0 from pytorch.org

download CamVid dataset or Cityscapes dataset

  • for CamVid dataset, make directory "data\CamVid" and put "701_StillsRaw_full", "LabeledApproved_full" in "CamVid", then run:
python data/CamVid_utils.py    
  • for Cityscapes dataset, make directory "Cityscapes" and put "gtFine" in "Cityscapes/gtFine_trainvaltest" folder, put "test", "train", "val" in "Cityscapes/leftImg8bit" foloder.

Train the network

train with CamVid dataset:

change to your own CamVid dataset path in mypath.py, then run:

python train_val.py --dataset CamVid --save_dir /path/to/run

for multiple GPUs training, change to your own CamVid dataset path in mypath.py, then run:

python train_val.py --dataset CamVid --save_dir /path/to/run --mGPUs True --gpu_ids 0,1,2

train with Cityscapes(default) dataset: change to your own CityScapes dataset path in mypath.py, then run:

python train_val.py --dataset Cityscapes --save_dir /path/to/run

for multiple GPUs training, change to your own CityScapes dataset path in mypath.py, then run:

python train_val.py --dataset Cityscapes --save_dir /path/to/run --mGPUs True --gpu_ids 0,1,2

Test

Test with CamVid dataset(val), run:

python test --dataset CamVid --exp_dir /path/to/experiment_x

Test with Cityscapes dataset(val), run:

python test.py --dataset Cityscapes --exp_dir /path/to/experiment_x

If you want to plot the color semantic segmentation prediction of the test input color image, please set --plot=True, for example:

python test.py --dataset Cityscapes --exp_dir /path/to/experiment_x --plot True

Acknowledgment

FCN-pytorch

pytorch-deeplab-xception

pytorch-fpn

fpn.pytorch

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE_MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages