TFboys-lzz / MPSCL

This repository contains code for the paper "Margin Preserving Self-paced Contrastive Learning Towards Domain Adaptation for Medical Image Segmentation", published at IEEE JBHI 2022
29 stars 1 forks source link

shape error #11

Closed iTomxy closed 10 months ago

iTomxy commented 10 months ago

Hi, I'm pretraining the deeplabv2 to generate prototypes on another dataset. I find that the prediction is down-sampled to 33 $\times$ 33 but not up-sampled. Why is that? Did you also down-sample labels? But it seems that you did not down-sample labels before calculating BCE and dice loss in train_UDA.py.

Note that I notice that there is a label_downsample function in train_UDA.py. But it is only used in the update_class_center_iter function, and that does not affect the shape of labels used for BCE and dice loss calculation.

Thanks.

TFboys-lzz commented 10 months ago

we have defined the interp function as: https://github.com/TFboys-lzz/MPSCL/blob/bb58bde64e904f167cad9ed7b6f4f64d3977be1e/domain_adaptation/train_UDA.py#L189

iTomxy commented 10 months ago

Oh, my bad. Thanks. You're really responsive.