yassouali / CCT

:page_facing_up: Semi-Supervised Semantic Segmentation with Cross-Consistency Training (CVPR 2020).
https://yassouali.github.io/cct_page/
MIT License
396 stars 58 forks source link

Question about the plot of Figure 2 in the paper #71

Open Hugo-cell111 opened 9 months ago

Hugo-cell111 commented 9 months ago

Hi! In the caption of Figure 2, you have mentioned "the average euclidean distance between each patch of size 20 × 20 centered at a given spatial location extracted from the input images, and its 8 neighboring patches", could you please give a more detailed illustration? Or could you provide the code? Thanks!

yassouali commented 9 months ago

Hi @Hugo-cell111

For the features, at each spatial location, fetch the 8 neighboring features (so 3 x 3 window) and compute the average of the L2 distances between the center and the 8 neighboring features, so for each feature, you will get a scalar representing the distance between it and its neighboors; then normalize them and plot them.

Same for the images, just this time, instead of a single vector of features (1xC), you'll have an 8x8 patch of RBG values

Hope this helps.