kazuto1011 / deeplab-pytorch

PyTorch re-implementation of DeepLab v2 on COCO-Stuff / PASCAL VOC datasets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A question about pascal voc pre-trained model

RumengYi opened this issue · comments

Hi, why you load train2_iter_20000.caffemodel instead of init.caffemodel from http://liangchiehchen.com/projects/released/deeplab_aspp_resnet101/prototxt_and_model.zip as initial weights? I think the latter should be loaded.

The model is initialized with init.caffemodel.

state_dict = torch.load(CONFIG.MODEL.INIT_MODEL)

INIT_MODEL: data/models/coco/deeplabv1_resnet101/caffemodel/deeplabv1_resnet101-coco.pth

The deeplabv1_resnet101-coco.pth file are converted from init.caffemodel as mentioned in README.

Thank you for your reply, but on PASCAL VOC 2012, the model is initialized with train2_iter_20000.caffemodel, https://github.com/kazuto1011/deeplab-pytorch/blob/master/convert.py#L170, why you load train2_iter_20000.caffemodel instead of init.caffemodel?

Yes, python convert.py --dataset voc12 loads train2_iter_20000.caffemodel trained on PASCAL VOC 2012 already, however, the converted weights are not used in training. This is just for those who do not want to train by themselves.
Please run python convert.py --dataset coco to produce the initial weights from init.caffemodel.