Segment Anything in Medical Images
Jun Ma1, Yuting He2, Feifei Li3, Lin Han4, Chenyu You5, Bo Wang6
1 Peter Munk Cardiac Centre, University Health Network; Department of Laboratory Medicine and Pathobiology, University of Toronto; Vector Institute, Toronto, Canada
2 the Department of Computer Science, Johns Hopkins University, USA
3 the Department of Cell and Systems Biology, University of Toronto, Canada
4 Tandon School of Engineering, New York University, USA
5 the Department of Electrical Engineering, Yale University, USA
6 Peter Munk Cardiac Centre, University Health Network; Department of Laboratory Medicine and Pathobiology and Department of Computer Science, University of Toronto; Vector Institute, Toronto, Canada
paper | code
Segment Anything
Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C. Berg, Wan-Yen Lo, Piotr Dollar, Ross Girshick
Meta AI Research, FAIR
paper | code
SAM-Med2D
Junlong Cheng1,2, Jin Ye2, Zhongying Deng2, Jianpin Chen2, Tianbin Li2, Haoyu Wang2, Yanzhou Su2, Ziyan Huang2, Jilong Chen1, Lei Jiang1, Hui Sun2, Junjun He2, Shaoting Zhang2, Min Zhu1, Yu Qiao2
1 Sichuan University
2 Shanghai AI Laboratory
paper | code
PyQt5 5.15.10
python 3.9
- 下载模型权重至 checkpoints 的对应文件夹中
checkpoints/MedSAM/medsam_vit_b.pth
: https://drive.google.com/drive/folders/1ETWmi4AiniJeWOt6HAsYgTjYv_fkgzoN?usp=drive_linkcheckpoints/MedSAM/sam_vit_b_01ec64.pth
: https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pthcheckpoints/MedSAM/sam-med2d_b.pth
: https://drive.google.com/file/d/1ARiB5RkSsWmAB_8mqWnwDF8ZKTtFwsjl/view?usp=drive_link
- 运行代码
python app.py
Note
└─ Models(SAM 系列模型结构放置地) ├─ MedSAM(模型名称) │ Copy from [MedSAM](https://github.com/bowang-lab/MedSAM/tree/main/segment_anything) ├─ SAM │ Copy from [SAM](https://github.com/facebookresearch/segment-anything/tree/main/segment_anything) ├─ SAMMed │ Copy from [SAMMed](https://github.com/OpenGVLab/SAM-Med2D/tree/main/segment_anything) └─ checkpoints(SAM 系列模型权重放置地) ├─ MedSAM │ medsam_vit_b.pth ├─ SAM │ sam_vit_b_01ec64.pth ├─ SAMMed │ sam-med2d_b.pth └─ results(分割结果放置地) ├─ example_bbox_84.0_58.0_127.0_100.0(图像名称 + 提示类型 + 坐标) │ example.png(原始图像) │ example_GT.png(金标准图像) │ example_medsam_mask.png(MedSAM 分割结果) │ example_sam_mask.png(SAM 分割结果) │ example_sammed_mask.png(SAMMed 分割结果) └─ data(数据存放地) ├ example.png(示例图像) │ example_GT.png(示例图像金标准) └─ annotation_info_file.txt(提示点、边框坐标存放地) └─ app.py(主程序)
- 2023-11-03:上传项目。
- 2023-11-05:加入 dice 和 iou 计算。
- 单点,单框提示分割
- 单点前景、背景提示
- 多点,多框,点框提示分割
- 文本提示分割
- 加入更多的交互型分割大模型
- 加入非交互型分割大模型