yyliu01 / PS-MT

[CVPR'22] Perturbed and Strict Mean Teachers for Semi-supervised Semantic Segmentation
https://arxiv.org/pdf/2111.12903.pdf
MIT License
187 stars 17 forks source link

Clarification on Inference Implementation in VOC (inference.py) #43

Closed codevisioner closed 1 month ago

codevisioner commented 1 month ago

Hi,

Thank you for the fantastic work and for making the code available. I have a question regarding the inference.py script in the VOC implementation.

Based on the paper, you mentioned that the soft segmentation map is generated by the ensemble of the mean teachers (Equation 4 in the paper) during inference. However, in the current implementation, it seems that only the prediction from Teacher 1 is being used. Below is the relevant code snippet from inference.py:

with torch.no_grad():
    prediction = model.module.decoder1(model.module.encoder1(data),
                                       data_shape=[data.shape[-2], data.shape[-1]],
                                       req_feature=True)

prediction = torch.nn.functional.interpolate(prediction, size=(H, W),
                                             mode='bilinear', align_corners=True)

Shouldn't the inference consider the predictions from both teachers to align with the ensemble approach described in the paper? Or am I misunderstanding something?

I would appreciate your clarification on this. Thanks

yyliu01 commented 1 month ago

Hi @codevisioner

Sorry for the late reply.

One of the reviewers for this paper raised concerns about the fairness of the comparison, stating that utilising two networks to produce an ensemble result is not fair compared to other works, especially under the sliding evaluation scenario. Therefore, the results for the Cityscape dataset are based on a single teacher. Please note that with the ensemble results of the two teachers, I believe you will achieve a better mIoU, and you are welcome to use them if you wish.

Thanks for your interest of the work.


Edit:

Sorry, in the VOC dataset, we do utilise two teachers for the validation, please see the code.

Cheers, Yuyuan