## 5 Conclusions  
This paper proposes a new method based on medical image segmentation, achieving good segmentation results in rectal polyp and skin melanoma segmentation tasks. The method comprises three steps. First, in order to obtain more essential image features, we use contrast enhancement and wavelet transform to initially process the input image. Next, a fuzzy block is creatively used to blur the input image through a fuzzy membership function to suppress irrelevant regions, and it is fused with the original image to generate an uncertainty map as input. Finally, the Swin Transformer V2 and ResNet50 networks are introduced to extract image features, and channel attention and spatial attention are used to enhance global key information and local details, respectively. Experimental results on public datasets, such as Kvasir, ClinicDB, ISIC 2017, and ISIC 2018, show that the method proposed in this paper is superior to other models in terms of accuracy. In particular, the method exhibits significant improvements and robustness when dealing with small melanin regions and blurred polyp boundaries.  
This study primarily focuses on addressing the challenge of fuzzy boundary segmentation in tasks involving skin lesions and polyp segmentation. We aim to extract comprehensive global semantic information without compromising the underlying contextual features. However, it is important to acknowledge that our proposed method has certain limitations. For example, it demonstrates significant advantages over other techniques mainly when dealing with datasets of specific resolutions and cases where boundaries are less distinct. Consequently, our future research endeavors will concentrate on refining our model by enhancing the feature extraction mechanisms for challenging regions and advancing methods for contextual information retrieval. Our goal is to transform our approach into a versatile medical image segmentation model capable of accommodating a broad spectrum of lesion types.  
Figure 8: Comparison of the CAMs obtained using the representative algorithms. (**a**) Original image. (**b**) CAMs generated by U-Net. (**c**) CAMs generated by U-Net++. (**d**) CAMs generated by TransFuse. (**e**) CAMs generated by **our method**. (**f**) Ground truth (grayscale).  
**Author Contributions:** Conceptualization, R.L. and S.D.; methodology, R.L. and S.D.; software, S.D.; validation, L.X., L.L. and J.L.; formal analysis, R.L. and J.L.; investigation, L.X.; resources, L.L.; data curation, S.D. and L.X.; writing--original draft preparation, S.D.; writing--review and editing, R.L., S.D., L.X., L.L. and Y.Z.; visualization, S.D.; supervision, R.L. and Y.Z.; project administration, R.L. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This research was funded by the Chongqing Natural Science Foundation Project (Grant No. CSTB2023 NSCQ-MSX0319) and the Science and Technology Project of Chongqing Municipal Education Commission (Grant No. KJQN202001129).  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The data that support the findings of this study are available from the corresponding author upon reasonable request.  
**Conflicts of Interest:** The authors declare no conflicts of interest.