形状增强:1)使用伪标签的roi信息生成对应的point prompts,使用SAM(vit_b)模型对图像进行分割推理得到类别不可知的分割masks。2)由于SAM分割粒度未知,需要对SAM分割得到的masks与伪标签进行匹配;参考Personalize SAM with one shot,我们通过对每个mask的下image encoder的embedding与伪标签下image encoder的embedding进行相似度匹配并设置threshold,高于该阈值的即认为是目标类别mask,最终融合多个符合条件的mask得到fused mask;3)进一步使用fused mask生成point prompts,box prompts以及mask prompts通过SAM模型进行两次边缘微调,得到最后的伪标签。
不完全标注的伪标签学习:对于以上得到的伪标签,我们假设已标注的像素点都是positive label,未标注的则是negativa label or positive label。参考ShapePU,我们采用EM算法估计每个类别的标注比率,然后通过标注比率区分正负样本,接着最大化估计得到的负样本的边缘概率进行负样本监督,另一边对已标注的正样本进行正样本监督,以此对模型进行微调,提高分割质量。
@article{gao2022luss,
title={Large-scale Unsupervised Semantic Segmentation},
author={Gao, Shanghua and Li, Zhong-Yu and Yang, Ming-Hsuan and Cheng, Ming-Ming and Han, Junwei and Torr, Philip},
journal=TPAMI,
year={2022}
}
@article{kirillov2023segany,
title={Segment Anything},
author={Kirillov, Alexander and Mintun, Eric and Ravi, Nikhila and Mao, Hanzi and Rolland, Chloe and Gustafson, Laura and Xiao, Tete and Whitehead, Spencer and Berg, Alexander C. and Lo, Wan-Yen and Doll{```
a}r, Piotr and Girshick, Ross},
journal={arXiv:2304.02643},
year={2023}
}
@article{zhang2023personalize,
title={Personalize Segment Anything Model with One Shot},
author={Zhang, Renrui and Jiang, Zhengkai and Guo, Ziyu and Yan, Shilin and Pan, Junting and Dong, Hao and Gao, Peng and Li, Hongsheng},
journal={arXiv preprint arXiv:2305.03048},
year={2023}
}
@inproceedings{zhang2022shapepu,
title={Shapepu: A new pu learning framework regularized by global consistency for scribble supervised cardiac segmentation},
author={Zhang, Ke and Zhuang, Xiahai},
booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
pages={162--172},
year={2022},
organization={Springer}
}
jittor2023-赛题二-SCU_MILab
简介
本项目包含了第三届计图挑战赛 - 大规模无监督语义分割赛题的代码实现。 主要步骤为:
安装
PASS模型的环境要求:第一步: 安装计图
计图的安装可以参考以下文档Jittor install
第二步: 安装依赖
训练
测试
or
SAM权重转换
我们发现直接使用jittor 加载SAM模型进行推理,有较大的精度损失,这里我们将pytorch版本的SAM(vit-b)权重转换为jittor版本,并存储为pickle格式。
模型checkpoint及SAM权重下载
可通过百度云盘下载。
引用