hzhupku / RegionContrast

Region-aware Contrastive Learning for Semantic Segmentation, ICCV 2021
MIT License
44 stars 8 forks source link

some inconsistency with the paper #5

Open Okazaki86 opened 1 year ago

Okazaki86 commented 1 year ago
  1. in the paper it calculates class centers within a single image, but implements as within a batch, which just return a matrix of (class, feature dim) for method dec_deeplabv3_contrast.contrast_region.
  2. the variable _lpos in dec_deeplabv3_contrast.forward when calculating contrast loss should be a similarity score of 1 dim, but it shows still 256 dim in the code.
liangfengyouxingii commented 1 year ago

@Okazaki86 hello, I also notice this problem, do you solve it?

liangfengyouxingii commented 1 year ago

may l_pos = query.unsqueeze(0) @ eval("self.queue" + str(cls_ind)).clone().detach()

Okazaki86 commented 1 year ago

@Okazaki86 hello, I also notice this problem, do you solve it?

我按论文里的方法进行了改正