Pytorch-Deeplab icon indicating copy to clipboard operation
Pytorch-Deeplab copied to clipboard

Slightly lower validation accuracy in Pytorch 1.0.0

Open yzou2 opened this issue 5 years ago • 6 comments

Hi @speedinghzl ,

I used your pytorch deeplab v2 implementation, same setting, with pytorch version of 1.0.0. The validation mIoU of VOC_scenes_20000.pth is 71.1. Is this degradation due to randomness? Could you give me any comments? Here is the parameter I used:

BATCH_SIZE = 10 DATA_DIRECTORY = './dataset/voc12' DATA_LIST_PATH = './dataset/list/train_aug.txt' IGNORE_LABEL = 255 INPUT_SIZE = '321,321' LEARNING_RATE = 2.5e-4 MOMENTUM = 0.9 NUM_CLASSES = 21 NUM_STEPS = 20000 POWER = 0.9 RANDOM_SEED = 1234 RESTORE_FROM = './dataset/MS_DeepLab_resnet_pretrained_COCO_init.pth' SAVE_NUM_IMAGES = 2 SAVE_PRED_EVERY = 1000 SNAPSHOT_DIR = './snapshots/' WEIGHT_DECAY = 0.0005

Thank you for your help!

yzou2 avatar Jan 10 '19 01:01 yzou2

Maybe you should set align_corners=True for Upsample for Pytroch > 0.4.

speedinghzl avatar Jan 10 '19 04:01 speedinghzl

Maybe you should set align_corners=True for Upsample for Pytroch > 0.4.

Thanks for your prompt reply. Actually the evaluate.py I used, which is your up-to-dated implementation, already set align_corners=True. So I don't think this is the reason for the performance degradation. Do you have any other ideas? Really appreciate your help.

yzou2 avatar Jan 10 '19 05:01 yzou2

Do you evaluate the VOC_scenes_20000.pth I provided?

speedinghzl avatar Jan 10 '19 05:01 speedinghzl

Do you evaluate the VOC_scenes_20000.pth I provided?

I just evaluated the provided VOC_scenes_20000.pth. It can only get 70.4 which is slightly worse than the model fine-tuned in my computer. Any idea why this happen?

yzou2 avatar Jan 10 '19 06:01 yzou2

I retrained the whole model and get 73.58 IoU at 20k iter, slightly lower but understandable.

WilliamLwj avatar Jul 05 '19 10:07 WilliamLwj

@WilliamLwj Thanks for your feedback and your produced results. I'm not sure whether the performance gap is caused by the different Pytorch versions (0.2 vs 1.0).

speedinghzl avatar Jul 06 '19 18:07 speedinghzl