Segmentation realize Deeperlab only segmentation part
This project aims at providing a fast, modular reference implementation for semantic segmentation models using PyTorch.
pip3 install torch torchvision
pip3 install easydict
sudo apt-get install ninja-build
pip3 install tqdm
because I only realize the segmentation part,I tested its results on voc Method | Backbone | TrainSet| EvalSet | Mean IoU(ss) | Mean IoU(msf) :--:|:--:|:--:|:--:|:--:|:--: deeperlab(ours+SBD) | R101v1c | *trainaug* | val | 79.71 | 80.26 deeperlab(ours) | R101v1c | *trainaug* | val | 73.28 | 74.11
bash make link make otherssoft link to data,pretrain,log,logger
txt path-of-the-image path-of-the-groundtruth
config.pyaccording to your requirements
We use the official
torch.distributed.launchin order to launch multi-gpu training. This utility function from PyTorch spawns as many Python processes as the number of GPUs we want to use, and each Python process will only use a single GPU.
For each experiment, you can just run this script:
bash export NGPUS=8 python -m torch.distributed.launch --nproc_per_node=$NGPUS train.py
The above performance are all conducted based on the non-distributed training. For each experiment, you can just run this script:
bash bash train.sh
In train.sh, the argument of
dmeans the GPU you want to use.
In the evaluator, we have implemented the multi-gpu inference base on the multi-process. In the inference phase, the function will spawns as many Python processes as the number of GPUs we want to use, and each Python process will handle a subset of the whole evaluation dataset on a single GPU. 1. evaluate a trained network on the validation set:
bash bash eval.sh2. input arguments in shell:
bash usage: -e epoch_idx -d device_idx -c save_csv [--verbose ] [--show_image] [--save_path Pred_Save_Path]
if you are interested my algorithm, you can see my realized segmentation tool(dfn,deeperlab,deeplabv3 plus and so on):
because my device is 1080, we can't use 7*7 conv in two 4096 channel due to out of memory. so if you use it. you can change it in model/deeperlab.py