Haochen-Wang409 / U2PL

[CVPR'22] Semi-Supervised Semantic Segmentation Using Unreliable Pseudo-Labels
Apache License 2.0
426 stars 59 forks source link

Contrastive loss #80

Closed Yussef93 closed 2 years ago

Yussef93 commented 2 years ago

Hello, I'd like to know how do you map the feature representation to a given pixel in order to construct the anchor pixels (positive samples) and negative samples ? please clarify more as the feature dimension should be much smaller than the original image dimension

Haochen-Wang409 commented 2 years ago

Do you mean that how to assign labels to each patch of the feature map based on pixel-level semantic ground-truths?

We just downsample the HxW ground-truths to H/4 x W/4. https://github.com/Haochen-Wang409/U2PL/blob/main/train_semi.py#L456-L465

Yussef93 commented 2 years ago

yes, exactly, thank you !