SegmentationBLWX / sssegmentation

SSSegmentation: An Open Source Supervised Semantic Segmentation Toolbox Based on PyTorch.
https://sssegmentation.readthedocs.io/en/latest/
Apache License 2.0
795 stars 107 forks source link

关于MCIBI++代码的context_within_image_cfg的is_on设置为false #29

Closed NJNUCS closed 1 year ago

NJNUCS commented 2 years ago

您好,感谢你卓越的贡献,我想请问关于MCIBI++代码的context_within_image_cfg的is_on设置为false,跟论文里面的不一致,请问可以帮我解答一下嘛,谢谢

CharlesPikachu commented 2 years ago

Could you provide the detailed config and running command?

NJNUCS commented 2 years ago

您好,我想复现的是基于backbone是resnet50条件下,mcibi++在Cityscapes数据集上的结果,在配置文件为configs/base_config.py中第84行将context_within_image的is_on设置为false,并且在configs/memorynetv2/memorynetv2_resnet50os8_cityscapes.py中也没有配置is_on为True,但我发现其他的配置文件中将is_on重新设置为True,可以帮我解答一下嘛

NJNUCS commented 2 years ago

您好,我还有个问题,我没有找到FCN+MCIBI++的配置文件,好像只有ASPP,PPM,UPERNET+MCIBI++的配置文件

CharlesPikachu commented 2 years ago

https://github.com/SegmentationBLWX/sssegmentation/tree/main/docs/performances/memorynetv2 table里都有对应的config路径

CharlesPikachu commented 2 years ago

您好,我想复现的是基于backbone是resnet50条件下,mcibi++在Cityscapes数据集上的结果,在配置文件为configs/base_config.py中第84行将context_within_image的is_on设置为false,并且在configs/memorynetv2/memorynetv2_resnet50os8_cityscapes.py中也没有配置is_on为True,但我发现其他的配置文件中将is_on重新设置为True,可以帮我解答一下嘛

你运行命令是?

NJNUCS commented 2 years ago

不好意思,之前我看错了,我还有个问题,就是你代码的modules/models/segmentors/memorynet/memory.py中的第214行代码,这个relation和argmax对应的变量是什么意思呀,可以为我解答一下嘛,谢谢您。 ` assert strategy in ['cosine_similarity']

----(K, C) * (C, num_feats_per_cls) --> (K, num_feats_per_cls)

            relation = torch.matmul(
                F.normalize(feats_cls, p=2, dim=1), 
                F.normalize(self.memory[clsid].data.permute(1, 0).contiguous(), p=2, dim=0),
            )
            argmax = relation.argmax(dim=1)# 返回最大值的索引
            # ----for saving memory during training
            for idx in range(self.num_feats_per_cls):
                mask = (argmax == idx)
                feats_cls_iter = feats_cls[mask]
                memory_cls_iter = self.memory[clsid].data[idx].unsqueeze(0).expand_as(feats_cls_iter)
                similarity = F.cosine_similarity(feats_cls_iter, memory_cls_iter)
                weight = (1 - similarity) / (1 - similarity).sum()
                feats_cls_iter = (feats_cls_iter * weight.unsqueeze(-1)).sum(0)
                self.memory[clsid].data[idx].copy_(self.memory[clsid].data[idx] * (1 - momentum) + feats_cls_iter * momentum)`
H1NATA111 commented 2 years ago

您好,感谢你卓越的贡献,我想请问关于MCIBI++代码的context_within_image_cfg的is_on设置为false,跟论文里面的不一致,请问可以帮我解答一下嘛,谢谢

您好,我也在学习MCIBI++,但是我之前并未使用过sssegmentation,在工具箱运行方面遇到了一些问题,想跟您请教一下,也方便之后一起探讨和进步,如果您有时间的话,可以加一下我的微信:ankeas,万分感谢!!!!!我目前在北京理工大学学习