calmiLovesAI / Segmentation.pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation.pytorch

1. Installation

1.1 Prepare the Datasets

Put the VOC2012 dataset in the following path:

data
  |---VOCdevkit
       |---VOC2012
            |-------Annotations
            |-------Imagesets
            |-------JPEGImages
            |-------SegmentationClass
            |-------SegmentationObject

Put the Semantic Boundaries Dataset in the following path:

data
  |---SBD
       |---cls
       |---img
       |---inst
       |---train.txt
       |---val.txt

1.2 Train

  • Train on Semantic Boundaries Dataset (DeeplabV3+ for example)
python train.py --cfg experiments/deeplabv3plus_sbd.yaml

During training, you can use the command

tensorboard --logdir=runs

in the console to enter the tensorboard panel to visualize the training process.

  • Resume training
python train.py --cfg experiments/deeplabv3plus_sbd.yaml --ckpt checkpoint_filepath

1.3 Evaluate

  • Evaluate on Semantic Boundaries Dataset (DeeplabV3+ for example)
python train.py --cfg experiments/deeplabv3plus_sbd.yaml --mode valid --ckpt outputs/DeeplabV3Plus_SBD_weights.pth

1.4 Test

  • Test on single image or several images (DeeplabV3+ for example)
python test.py --cfg experiments/deeplabv3plus_sbd.yaml --ckpt outputs/DeeplabV3Plus_SBD_weights.pth

2. Results

3. Deployment

Acknowledgments

About

License:Apache License 2.0


Languages

Language:Python 100.0%