This repository is a semantic segmentation part implement of Kaiming He, Panoptic Feature Pyramid Networks .
##dataset Train on Cityscapes Dataset
- for Cityscapes dataset, make directory "Cityscapes" and put "gtFine" in "Cityscapes/gtFine_trainvaltest" folder, put "test", "train", "val" in "Cityscapes/leftImg8bit" foloder.
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
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
if you want to inference the pciture you want,put the picture in the project path(the same directory with train_val.py),run:
sh text.sh