基于SAM的中药粉末显微图像分阶段框监督实例分割方法
A Staged Box-Supervised Instance Segmentation Method Based on SAM for TCM Powder Microscopy Images
DOI: 10.12677/csa.2026.1610319, PDF,   
作者: 马景鑫, 赵 晶, 江 宁, 谢怡宁:东北林业大学控制与信息工程学院,黑龙江 哈尔滨
关键词: SAM;图像分割;框监督学习;SAM; Image Segmentation; Box-Supervised Learning
摘要: 针对中药粉末显微图像中实例分割面临的目标密集分布、背景杂质干扰与矩形框标注缺乏像素级边界信息等问题,本文提出一种基于Segment Anything Model (SAM)的分阶段框监督实例分割框架。该框架依次包含三个阶段:首先,利用网格提示SAM自动生成高召回候选掩码,并通过面积约束去除明显碎片,解决目标密集场景下的实例召回问题;其次,构建形状与外观双分支候选拒识网络,外观分支以候选区域RGB图像与掩码为四通道输入,利用轻量卷积网络学习纹理判别特征;形状分支提取17维几何特征,包括紧致度、凸实度、Hu不变矩等,利用多层感知机学习轮廓判别特征;两分支在logit空间进行加权融合,有效抑制背景杂质和过分割碎片造成的假阳性;最后,利用内缩框构造伪掩码微调SAM的掩码解码器,以选择性补全不完整掩码,并引入精修前后掩码的自一致性交并比self-IoU门控机制防止精修漂移。在包含3191幅中药粉末显微图像、约44.7万个标注实例的数据集上的实验结果表明,本文方法在仅使用矩形框标注的条件下,F1分数达到0.863,实例级平均交并比mIoU达到0.809,显著优于多个主流方法。此外,消融实验也验证了各组件的独立贡献与有效性。
Abstract: To address the challenges of dense target distribution, background impurity interference, and the lack of pixel level boundary information from bounding box annotations in instance segmentation of traditional Chinese medicine powder microscopy images, this paper proposes a staged, box supervised instance segmentation framework built upon the Segment Anything Model. The framework comprises three stages. First, a grid prompted SAM automatically generates high recall candidate masks, and an area constraint removes obvious debris to address the instance recall problem in dense target scenarios. Second, a shape appearance dual branch candidate rejection network is constructed: the appearance branch takes a four channel input combining RGB image patches of candidate regions with their masks, and employs a lightweight convolutional network to learn texture discriminative features; the shape branch extracts a 17 dimensional geometric feature vector including compactness, solidity, Hu invariant moments, and so forth, and employs a multi layer perceptron to learn contour discriminative features. The two branches are fused in logit space via weighted summation, effectively suppressing false positives caused by background impurities and over segmentation fragments. Finally, shrunken box pseudo masks are leveraged to fine tune the SAM mask decoder for selective completion of incomplete masks, and a self IoU gating mechanism comparing masks before and after refinement is introduced to prevent refinement drift. Experimental results on a dataset containing 3191 TCM powder microscopy images with approximately 447,000 annotated instances demonstrate that, using only bounding box annotations, the proposed method achieves an F1 score of 0.863 and an instance level mean IoU of 0.809, significantly outperforming multiple mainstream methods. In addition, ablation studies validate the individual contributions and effectiveness of each component.
文章引用:马景鑫, 赵晶, 江宁, 谢怡宁. 基于SAM的中药粉末显微图像分阶段框监督实例分割方法[J]. 计算机科学与应用, 2026, 16(10): 156-170. https://doi.org/10.12677/csa.2026.1610319

参考文献

[1] Zhao, Z., Liang, Z. and Ping, G. (2011) Macroscopic Identification of Chinese Medicinal Materials: Traditional Experiences and Modern Understanding. Journal of Ethnopharmacology, 134, 556-564.
https://doi.org/10.1016/j.jep.2011.01.018
[2] Miao, X.S., Cui, Q.Y., Wang, Z.Y., et al. (2017) Advance in Quality Assessment of Chinese Materia Medica Using Microscopic and Morphological Methods. Chinese Journal of Natural Medicines, 15, 653-663.
https://doi.org/10.1016/s1875-5364(17)30094-8
[3] Ichim, M.C., Häser, A. and Nick, P. (2020) Microscopic Authentication of Commercial Herbal Products in the Globalized Market: Potential and Limitations. Frontiers in Pharmacology, 11, Article 876.
https://doi.org/10.3389/fphar.2020.00876
[4] Wang, H., Zou, H., Cheng, C., Wang, W., Wang, S., Wang, D., et al. (2023) Authentication of bistortae Rhizoma and Its Three Adulterants Based on Their Macroscopic Morphology and Microscopic Characteristics. Microscopy Research and Technique, 86, 359-367.
https://doi.org/10.1002/jemt.24277
[5] Ma, Y., Zhong, Y., Su, Q., Xu, L., Song, H. and Wen, C. (2023) Study on Identification Algorithm of Traditional Chinese Medicinals Microscopic Image Based on Convolutional Neural Network. Medicine, 102, e34085.
https://doi.org/10.1097/md.0000000000034085
[6] Zhu, X., Pang, G., He, X., Chen, Y. and Yu, Z. (2024) A Segmentation-Combination Data Augmentation Strategy and Dual Attention Mechanism for Accurate Chinese Herbal Medicine Microscopic Identification. Frontiers in Plant Science, 15, Article 1442968.
https://doi.org/10.3389/fpls.2024.1442968
[7] Shelhamer, E., Long, J. and Darrell, T. (2017) Fully Convolutional Networks for Semantic Segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39, 640-651.
https://doi.org/10.1109/tpami.2016.2572683
[8] Ronneberger, O., Fischer, P. and Brox, T. (2015) U-Net: Convolutional Networks for Biomedical Image Segmentation. In: Lecture Notes in Computer Science, Springer, 234-241.
https://doi.org/10.1007/978-3-319-24574-4_28
[9] He, K., Gkioxari, G., Dollar, P. and Girshick, R. (2020) Mask R-CNN. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42, 386-397.
https://doi.org/10.1109/tpami.2018.2844175
[10] Dai, J., He, K. and Sun, J. (2015) BoxSup: Exploiting Bounding Boxes to Supervise Convolutional Networks for Semantic Segmentation. 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, 7-13 December 2015, 1635-1643.
https://doi.org/10.1109/iccv.2015.191
[11] Tian, Z., Shen, C., Wang, X. and Chen, H. (2021) BoxInst: High-Performance Instance Segmentation with Box Annotations. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, 20-25 June 2021, 5439-5448.
https://doi.org/10.1109/cvpr46437.2021.00540
[12] Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., et al. (2023) Segment Anything. 2023 IEEE/CVF International Conference on Computer Vision (ICCV), Paris, 1-6 October 2023, 3992-4003.
https://doi.org/10.1109/iccv51070.2023.00371
[13] Mazurowski, M.A., Dong, H., Gu, H., Yang, J., Konz, N. and Zhang, Y. (2023) Segment Anything Model for Medical Image Analysis: An Experimental Study. Medical Image Analysis, 89, Article 102918.
https://doi.org/10.1016/j.media.2023.102918
[14] Ma, J., He, Y., Li, F., Han, L., You, C. and Wang, B. (2024) Segment Anything in Medical Images. Nature Communications, 15, Article No. 654.
https://doi.org/10.1038/s41467-024-44824-z
[15] Archit, A., Freckmann, L., Nair, S., Khalid, N., Hilt, P., Rajashekar, V., et al. (2025) Segment Anything for Microscopy. Nature Methods, 22, 579-591.
https://doi.org/10.1038/s41592-024-02580-4
[16] Schmidt, U., Weigert, M., Broaddus, C. and Myers, G. (2018) Cell Detection with Star-Convex Polygons. In: Lecture Notes in Computer Science, Springer, 265-273.
https://doi.org/10.1007/978-3-030-00934-2_30
[17] Stringer, C., Wang, T., Michaelos, M. and Pachitariu, M. (2021) Cellpose: A Generalist Algorithm for Cellular Segmentation. Nature Methods, 18, 100-106.
https://doi.org/10.1038/s41592-020-01018-x
[18] Marks, M., Israel, U., Dilip, R., Li, Q., Yu, C., Laubscher, E., et al. (2025) CellSAM: A Foundation Model for Cell Segmentation. Nature Methods, 22, 2585-2593.
https://doi.org/10.1038/s41592-025-02879-w
[19] VandeLoo, A.D., Malta, N.J., Sanganeriya, S., Aponte, E., van Zyl, C., Xu, D., et al. (2025) SAMCell: Generalized Label-Free Biological Cell Segmentation with Segment Anything. PLOS ONE, 20, e0319532.
https://doi.org/10.1371/journal.pone.0319532
[20] Alam, M.S., Jackson, M., Lord, M. and Meijering, E. (2026) Cell Segmentation in Microscopy Images Using a Sam-Based U-Net Architecture and a Novel Dataset. Computer Methods and Programs in Biomedicine, 285, Article 109470.
https://doi.org/10.1016/j.cmpb.2026.109470
[21] Cheng, T., Wang, X., Chen, S., Zhang, Q. and Liu, W. (2023) BoxTeacher: Exploring High-Quality Pseudo Labels for Weakly Supervised Instance Segmentation. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, 17-24 June 2023, 3145-3154.
https://doi.org/10.1109/cvpr52729.2023.00307
[22] Wang, J. and Xia, B. (2024) Weakly Supervised Image Segmentation Beyond Tight Bounding Box Annotations. Computers in Biology and Medicine, 169, Article 107913.
https://doi.org/10.1016/j.compbiomed.2023.107913
[23] Xu, G., Qian, X., Shao, H., Luo, J., Lu, W. and Zhang, Y. (2025) A Segment Anything Model-Guided and Match-Based Semi-Supervised Segmentation Framework for Medical Imaging. Medical Physics, 52, 4513-4527.
https://doi.org/10.1002/mp.17785
[24] Huang, Y., Yang, X., Liu, L., Zhou, H., Chang, A., Zhou, X., et al. (2024) Segment Anything Model for Medical Images? Medical Image Analysis, 92, Article 103061.
https://doi.org/10.1016/j.media.2023.103061
[25] Wu, J., Wang, Z., Hong, M., Ji, W., Fu, H., Xu, Y., et al. (2025) Medical SAM Adapter: Adapting Segment Anything Model for Medical Image Segmentation. Medical Image Analysis, 102, Article 103547.
https://doi.org/10.1016/j.media.2025.103547
[26] Gyawali, R., Dhakal, A., Wang, L. and Cheng, J. (2024) CryoSegNet: Accurate Cryo-Em Protein Particle Picking by Integrating the Foundational AI Image Segmentation Model and Attention-Gated U-Net. Briefings in Bioinformatics, 25, bbae282.
https://doi.org/10.1093/bib/bbae282
[27] Gaillochet, M., Noori, M., Dastani, S., Desrosiers, C. and Lombaert, H. (2026) Prompt Learning with Bounding Box Constraints for Medical Image Segmentation. IEEE Transactions on Biomedical Engineering, 73, 359-368.
https://doi.org/10.1109/tbme.2025.3582749