TransResNet: Integrating the Strengths of ViTs and CNNs for High Resolution Medical Image Segmentation via Feature Grafting
Muhammad Hamza Sharif, Dmitry Demidov, Asif Hanif, Mohammad Yaqub, Min Xu
TL;DR
TransResNet tackles high-resolution medical image segmentation by combining parallel CNN and Transformer encoders with a Cross Grafting Module that fuses local details and global semantics. The CGM aligns and integrates feature maps from ResNet-18 and Swin-B to produce grafted features used in decoding, with a joint loss incorporating segmentation, attention, and auxiliary terms. Evaluations across ten high-resolution datasets (skin lesions, retinal vessels, and polyps) show state-of-the-art or competitive performance, highlighting improved information flow for precise masks while acknowledging higher computational cost. The approach is open-sourced, offering a strong foundation for high-resolution medical image analysis and future extensions to multi-class tasks and efficiency optimizations.
Abstract
High-resolution images are preferable in medical imaging domain as they significantly improve the diagnostic capability of the underlying method. In particular, high resolution helps substantially in improving automatic image segmentation. However, most of the existing deep learning-based techniques for medical image segmentation are optimized for input images having small spatial dimensions and perform poorly on high-resolution images. To address this shortcoming, we propose a parallel-in-branch architecture called TransResNet, which incorporates Transformer and CNN in a parallel manner to extract features from multi-resolution images independently. In TransResNet, we introduce Cross Grafting Module (CGM), which generates the grafted features, enriched in both global semantic and low-level spatial details, by combining the feature maps from Transformer and CNN branches through fusion and self-attention mechanism. Moreover, we use these grafted features in the decoding process, increasing the information flow for better prediction of the segmentation mask. Extensive experiments on ten datasets demonstrate that TransResNet achieves either state-of-the-art or competitive results on several segmentation tasks, including skin lesion, retinal vessel, and polyp segmentation. The source code and pre-trained models are available at https://github.com/Sharifmhamza/TransResNet.
