The project is an reimplementation of DeepLabV2-ResNet in Pytorch for semantic image segmentation on the PASCAL VOC dataset.
Attention:
- This proj is based on pytorch-deeplab-resnet.
- In this proj, we change the loss-calculate method, which ignores the background labels.
- Evaluation of a single-scale model on the PASCAL VOC validation dataset leads to
74.95%
mIoU VOC12_50000.pth which is almost equal to75.1
reimplemented by DrSleep.
- The running means and variances of
batch normalization
layer of ResNet will be updated. I will try to usefor i in self.bn.parameters(): i.requires_grad = False
for ResNet layer to verify the performance. - Pytorch is more flexible to use multi-gpu than TensorFlow, just use
torch.nn.DataParallel(model).cuda()
. But for BatchNorm synchronization across multipe GPUs I will try it later.
- python 3
- pytorch 0.3.1
- numpy
- opencv
- pillow
- Download this proj
git clone https://github.com/CarryJzzZ/pithy-conky-colors.git
and enter it. - Download the
init.pth
which contains MS COCO trained weights. init.pth and put it intodataset
folder. - Change
DATA_DIRECTORY
line 24 oftrain.py
to VOC2012 where you store the pascal voc12 dataset. (trainning dataset is based on SBD) - run
python train.py --random-mirror --random-scale --gpu 0
- change
RESTORE_FROM
ofevaluate.py
to your trained .pth file or you can download demo weights - run
python evaluate.py
- predictions are stored in
outputs