semisup-semseg icon indicating copy to clipboard operation
semisup-semseg copied to clipboard

Smaller batch size modifications

Open avolisacado opened this issue 4 years ago • 2 comments

Hello, thank you very much for sharing the code! I tried to reproduce the results with the PASCAL-VOC dataset, but due to memory constraints I can only use a batch size of 5. With that batch size I got very bad results (meanIOU between 0.006 and 0.24). Then I tried to reduce the learning rate to 1.125e-4 for the segmentation network and to 5e-5 for the discriminator, but there was no improvement in the results. Do you maybe have suggestions from experience about what I could try to reach a comparable result with using a batch size of 5 instead of 8?

avolisacado avatar Aug 02 '20 13:08 avolisacado

Hi, I just ran the same experiment using the given repo. I used a batch size of 5. For a 0.125 labeled data ratio, I get 64.5 mIoU after 30k iterations. Can you share your command line arguments.

sud0301 avatar Aug 10 '20 18:08 sud0301

Thank you for trying out and sorry for my late answer. It is indeed very weird that I do not get your results. I used the command line arguments from the readme file:

  1. For semi-supervised training: python train_s4GAN.py --dataset pascal_voc
    --checkpoint-dir ./checkpoints/voc_semi_0_125
    --labeled-ratio 0.125
    --ignore-label 255 For this one I had to skip the --num-classes 21 argument, because it threw a Python error: unrecognized argument. But I think it has no impact as 21 is the default number of classes in the code.

  2. For validation: python evaluate.py --dataset pascal_voc
    --num-classes 21
    --restore-from ./checkpoints/voc_semi_0_125/VOC_30000.pth And I get results like this after 30k iterations: image

avolisacado avatar Aug 23 '20 19:08 avolisacado