charlesCXK / TorchSemiSeg

[CVPR 2021] CPS: Semi-Supervised Semantic Segmentation with Cross Pseudo Supervision
MIT License
504 stars 74 forks source link

Reproduce the results with a newer version of pytorch #27

Closed lliuz closed 3 years ago

lliuz commented 3 years ago

When I use pytorch 1.0, apex DDP will automatically exit without error message, so I try to run this code with pytorch 1.8.1. However I got similar results reported in #14 (72.0±0.2 mIU for cps, 1/8 voc r50 setting), can anyone figure out the possible reason that causes the performance decay? @yh-pengtu, @frank-xwang

lliuz commented 3 years ago

Hi @charlesCXK

I have tried pytorch 1.1, 1.6 and 1.8.1, none of them can reach higher than 72.6 meanIU for voc8.res50v3+.CPS setting (which is 73.281 in your log file).

I am sure I do not modify any code except the data path and I have tested your checkpoints without any problem.

I use 4x V100 for this expriment with CUDA 10.0 CUDNN 7.6 for pytorch 1.1 and CUDA 10.2 CUDNN 8 for pytorch higher than 1.6. Unfortunately, I cannot train the model with pytorch==1.0.0 to align with your envriment, since the script will exit once it run into this line.

Can you train this experiment with higher pytorch version or just give me a hand?

charlesCXK commented 3 years ago

Hi, we used docker to run our experiments before and here is the docker we used: charlescxk/ssc:2.0 . You could pull it from https://hub.docker.com/ and mount your local file system to it.

charlesCXK commented 3 years ago

Have you also tried to (1) calculate CPS loss only on the unlabeled data? In this case, the CPS weight is 1.0 on VOC and the performance is similar to calculating CPS on both the labeled and unlabeled data. (2) set different CPS weights such as 1.0/2.0 ?

lliuz commented 3 years ago

Thanks for your timely reply, I will use your docker image and update the results soon.

lliuz commented 3 years ago

I can reproduce your results with your docker image finally. Thanks for your help.

ChrisLiang2020 commented 2 years ago

@lliuz I'm sorry to bother you. Did you run the program successfully on windows? How do you configure the environment on Windows system, especially the installation of apex.