TransDualSegNet: transformer dual segment network for retinal vasculature segmentation in OCT
Original Article

TransDualSegNet: transformer dual segment network for retinal vasculature segmentation in OCT

Ligang Jiang1#, Jing Hu2,3#, Zhuoran Wang2,3, Guohui Yuan2,3, Chongjun Huang2,3, Zhiming Xiong2,3, Meizhen Zhang4 ORCID logo, Weihua Yang5 ORCID logo, Yuhua Tong1

1Department of Ophthalmology, The Quzhou Affiliated Hospital of Wenzhou Medical University, Quzhou People’s Hospital, Quzhou, China; 2Yangtze Delta Region Institute (Quzhou), University of Electronic Science and Technology of China, Quzhou, China; 3School of Information and Communication Engineering, University of Electronic Science and Technology of China, Chengdu, China; 4Quzhou Kecheng People’s Hospital, Quzhou, China; 5Shenzhen Eye Hospital, Shenzhen Eye Medical Center, Southern Medical University, Shenzhen, China

Contributions: (I) Conception and design: L Jiang; (II) Administrative support: Y Tong, W Yang; (III) Provision of study materials or patients: M Zhang; (IV) Collection and assembly of data: L Jiang; (V) Data analysis and interpretation: J Hu, Z Wang, G Yuan, C Huang, Z Xiong; (VI) Manuscript writing: All authors; (VII) Final approval of manuscript: All authors.

#These authors contributed equally to this work as co-first authors.

Correspondence to: Meizhen Zhang, BS. Quzhou Kecheng People’s Hospital, No. 172, Shuanggang Road, Kecheng District, Quzhou 324000, China. Email: 1604469453@qq.com; Weihua Yang, MD. Shenzhen Eye Hospital, Shenzhen Eye Medical Center, Southern Medical University, No. 18 Zetian Road, Futian District, Shenzhen 518040, China. Email: benben0606@139.com; Yuhua Tong, MM. Department of Ophthalmology, The Quzhou Affiliated Hospital of Wenzhou Medical University, Quzhou People’s Hospital, No. 100, Minjiang Avenue, Kecheng District, Quzhou 324000, China. Email: yuhuatong@wmu.edu.cn.

Background: The early diagnosis and treatment of eye diseases is crucial for preserving vision, and optical coherence tomography (OCT) has become a common non-invasive technique for eye examinations. In particular, retinal vessel segmentation in OCT images is a critical task that provides detailed information such as vessel diameter and wall thickness, serving as important diagnostic aids for ophthalmologists. This study aimed to develop an efficient and accurate retinal vessel segmentation method in OCT images to improve the diagnosis and treatment of eye diseases.

Methods: Transformer Dual Segment Network (TransDualSegNet) involves several key steps: firstly, the OCT images are preprocessed through denoising and brightness adjustment to enhance the performance of subsequent segmentation algorithms. Secondly, we introduce an encoder-decoder model with the Pyramid Vision Transformer as the encoding layer, which automatically learns the feature representation of retinal vessels to improve segmentation accuracy and robustness. The decoder utilizes a dual-branch convolutional network that incorporates and emphasizes the edge information of retinal vessel OCT images as complementary information for vessel segmentation. Finally, a feature fusion module (FFM) is applied to fuse the global features and edge features, which are fed into the edge extraction module to generate the final edge probability map and obtain the segmentation results.

Results: Experimental results on the OCT vessel segmentation dataset showed that the proposed model outperformed U-Net, Attention U-Net, and Trans U-Net, with accuracy (ACC) 91.13%±0.11%, sensitivity (SE) 90.02%±0.38%, Jaccard similarity (JS) 93.92%±0.13%, and Dice coefficient (DICE) 90.26%±0.25% all higher than comparisons. The model has 9.82 M parameters, falling between the comparison models, and a forward inference time of 20.3 ms, faster than Attention U-Net and Trans U-Net, balancing high accuracy and efficiency. Ablation experiments showed that it outperformed all sub-models in metrics such as ACC, SE, specificity (SP), Intersection over Union (IOU), and area under the curve (AUC), with IOU reaching 93.92%±0.13% and AUC 93.04%±0.34%, verifying the synergistic effectiveness of each component.

Conclusions: TransDualSegNet, with its innovative architecture and outstanding segmentation performance, offers a novel solution for retinal vessel segmentation. Although there is room for optimization, its technical advantages and clinical potential provide valuable insights for advancing medical image processing and ophthalmic diagnostic technologies. Precise retinal vessel segmentation aids in diagnosing diabetic retinopathy and hypertensive retinopathy, facilitating automatic measurement of parameters such as vessel diameter and wall thickness to offer more accurate treatment recommendations for patients.

Keywords: Ophthalmic medical image processing; optical coherence tomography (OCT); ultra-fine semantic segmentation; deep learning; artificial intelligence


Submitted Dec 14, 2024. Accepted for publication Aug 05, 2025. Published online Sep 22, 2025.

doi: 10.21037/qims-2024-2842


Introduction

Optical coherence tomography (OCT) image segmentation (1) is a crucial task in the field of medical image processing. Its objective is to segment the structures or tissues in OCT images into different regions to assist doctors in disease diagnosis and treatment planning. OCT images provide high-resolution cross-sectional images of ocular tissues, which are of great significance for the diagnosis and monitoring of ophthalmic diseases (2,3).

Research on OCT image segmentation involves various methods and techniques, including thresholding, edge detection, region growing, and graph cuts (4-6). Among these, deep learning-based methods have made significant advancements in OCT image segmentation (7,8). Deep learning methods train neural network models to learn the features and contextual information of ocular tissues, enabling them to better handle complex structures and noise in images (9-14).

In early clinical practice, some traditional manual methods, such as full width at half maximum (FWHM) (15-18), have been used to measure the diameter of blood vessels, but such methods do not easily deal with a large number of OCT images.

In recent years, the application of artificial intelligence (AI) in the field of ophthalmology has made remarkable progress and has gradually become an important branch of the field (19-21). One commonly used method for OCT image segmentation is U-Net (22,23), which is a segmentation framework based on convolutional neural networks (CNNs) (24,25). The U-Net architecture and its variants U-Net++ (26), U-Net3+ (27), and Attention U-Net (14,28) consist of an encoder and a decoder. The encoder is responsible for extracting image features, whereas the decoder maps the features back to the original image size. By training U-Net models, precise segmentation of different structures in OCT images, such as the retina, macula, and vitreous, can be achieved. Another popular method is based on fully convolutional networks (FCNs) (29,30), which modify the traditional CNN architecture to accept input images of arbitrary sizes and produce segmentation results with the same size as the input image. The FCN structure allows pixel-level classification of the entire image, thereby achieving accurate segmentation of ocular tissues.

Research in OCT image segmentation also involves many improvement and optimization methods, such as the introduction of attention mechanisms (31), multi-scale analysis (32), conditional generative adversarial networks (33), and others. These methods further enhance the accuracy and robustness of segmentation.

To address the aforementioned challenges, we propose the Transformer Dual Segment Network (TransDualSegNet), a deep learning framework based on the Pyramid Vision Transformer (PVT) (34-36), for precise segmentation of OCT images (Figure 1). Our method mainly uses PVT and the Edge enhance model with a dual train approach to better extract the edge geometric information. The Edge enhance model considers both the global features and edge features. Finally, we use the Feature Fusion Module (FFM) to fuse global features and edge features and output them to the edge extraction module, generating the final edge probability map. In this way, our method can well reflect the local correlation between global information and edge information. Global features combined with edge features can make up for the loss of some feature information during sampling.

Figure 1 Schematic diagram of the overall architecture of TransDualSegNet. (A) The architecture of the proposed TransDualSegNet, which is composed of a PVT framework and dual train model with FFM model. (B) The architecture of the feature fusion model FFM. (C) The architecture of the encoding model PVT. TransDualSegNet, Transformer Dual Segmentation Network; PVT, Pyramid Vision Transformer; FFM, feature fusion module.

In summary, the main contributions of this paper are as follows:

  • The backbone of the model replaces the traditional U-Net convolutional encoding layers with PVT. PVT exhibits strong generalization ability, enabling it to learn rich features of retinal vessels from large-scale training data and accurately segment vessels in OCT images under different pathological changes and lighting conditions.
  • The decoder adopts the Edge enhance model with a dual train approach, utilizing and emphasizing edge information of OCT vessel images as complementary information for vessel segmentation.
  • Feature fusion is performed using the FFM. The FFM module fuses global features and edge features and outputs them to the edge extraction module, generating the final edge probability map.

Methods

PVT

PVT is a computer vision model that combines the strengths of both transformer networks and multi-scale feature pyramids. It aims to leverage the expressive power of transformers while capturing multi-level visual information for more accurate and robust image understanding.

Traditionally CNNs have been widely used in computer vision tasks for their ability to capture hierarchical features through different layers (37). However, transformers have shown great success in natural language processing tasks by modeling long-range dependencies using self-attention mechanisms. PVT applies the transformer architecture to computer vision by introducing self-attention mechanisms to capture global context information. For the input matrix Key, Query, Value, the calculation method of self-attention mechanism is shown as Eq. [1]:

Attention=(Q,K,V)=softmax(QKTdk)V

Where dk is the dimension of the K matrix.

The multi-head attention (MHA) can jointly process information from different positions in the model, shown as Eq. [2]:

MultiHead=(Q,K,V)=Concat(head 1,,head h)WO

In addition to self-attention, PVT utilizes multi-scale feature pyramids to capture features at multiple levels of granularity. This involves extracting features from different spatial resolutions and combining them to form a comprehensive representation. By incorporating these multi-scale features, PVT achieves better localization and segmentation performance.

PVT follows a hierarchical architecture where the input image is down sampled progressively, allowing the model to capture both fine-grained details and high-level semantics. The self-attention layers operate on these feature maps to learn contextual relationships and capture long-range dependencies. This enables PVT to understand the global structure of the image while maintaining local details.

By combining the power of transformers and multi-scale feature pyramids, PVT demonstrates state-of-the-art performance on various computer vision tasks, such as object detection, image classification, and instance segmentation. It provides a versatile and effective framework for analyzing and understanding visual information in complex scenes (38).

Edge enhance

The Edge enhance model is a method that utilizes the edge information of OCT vessel images as supplementary information to segment eye vessels. This approach adopts the dual train method by combining a traditional vessel segmentation model with an edge enhancement model to improve segmentation performance (39). In traditional vessel segmentation models, there are certain challenges due to the specific nature of OCT vessel images. To overcome these challenges, an edge enhancement model is employed to emphasize the edge information of OCT vessel images. The goal of the edge enhancement model is to make the vessel edges clearer and more prominent for better segmentation.

Using the dual train method means training the original vessel segmentation model and the edge enhancement model separately. First, the traditional vessel segmentation model is trained to obtain the basic vessel segmentation results. Then, these results are used as inputs to simultaneously train the edge enhancement model, which extracts and enhances the edge information of OCT vessel images. Finally, the final vessel segmentation result is generated by utilizing the shared output from both models.

The advantage of this Edge enhance model lies in its ability to fully utilize the edge information of OCT vessel images and use it as supplementary information to enhance the accuracy and robustness of vessel segmentation. By introducing the edge enhancement model and employing the dual train method, this approach has achieved significant improvements in eye vessel segmentation tasks and provided valuable tools for ophthalmic medical research and clinical applications (40).

FFM

To better integrate global information and edge information, we adopt the FFM module (41). FFM is a module designed to effectively merge global information and edge information in a system or model. The purpose is to combine the output features provided by the global and edge models, taking into consideration the differences between these two types of features.

In the FFM, the global and edge features are not simply weighted and added together, as their characteristics may vary significantly. Instead, a concatenation operation is performed, where the two sets of feature maps are stacked together. This allows for a comprehensive representation of both global and edge information. The calculation details are shown in Eq. [3]:

FFusion=Conv(FGlobal)(Conv(FGlobal)FEdge)

After the concatenation, a weighted feature calculation is applied using a method similar to the Squeeze-and-Excitation module. The Squeeze-and-Excitation module helps the system selectively emphasize important features and suppress those that are less relevant (42). Similarly, the FFM utilizes a similar mechanism to perform feature selection and combination, enabling it to effectively fuse the global and edge features.

By leveraging the FFM, systems or models can achieve improved integration of both global and edge information, leading to enhanced performance in our semantic segmentation.

OCT image acquisition

The optical coherence tomography angiography (OCTA) (Heidelberg Engineering, Inc, Heidelberg, Germany) is used for fundus OCT image acquisition. The following parameters are applied: scanning light source wavelength: 870 nm; axial resolution: 12 µm; lateral resolution 6 µm; scanning depth 2.0 mm. This study was approved by the Institutional Review Board of Quzhou People’s Hospital (No. 2021-061). It was conducted in accordance with the Declaration of Helsinki and its subsequent amendments. The OCTA examinations of all participants were performed by the same senior professional technicians, and written informed consent was provided by all participants.

The specific operation is as follows (7,18): the patient sits in front of the OCTA instrument with their head placed on the jaw rest, and is asked to fixate on the cursor in the scanner. Retinal vessel scanning was performed using a special positioning ring (Figure 2A). Initially, the scanning site was defined as zone B (Figure 2B) for the following reasons. On the one hand, the characteristics of vessels in zone B are more consistent with the description of arterioles and venules. On the other hand, after retinal vessels originate from the center of the optic disc, there is less arteriovenous crossing and retinal artery pulsation in zone B, which does not affect the measurement of retinal artery and vein diameter. Concentric circles were made on a transparent plastic film to determine zone B. Based on the magnification of the fundus image on OCT, the center circle was used to determine the optic disc diameter, and then two concentric circles were drawn with 1 disc diameter and 1.5-disc diameters, respectively. The second and third circles define the boundaries of zone B in terms of diameter, and vessels within zone B were scanned. The plastic film with the positioning circle was attached to the computer screen, and the position was adjusted to center on the optic disc to determine the location of zone B. The blood vessels in this area were scanned vertically. If the blood vessels had branched prior to zone B, the blood vessels were scanned before the branch. Only images that can clearly show the vessel wall can be selected for the next study (Figure 2C). The ideal upper and lower edges and diameters of the vessels are shown in Figure 2D. At least 5 clear OCT images per vessel were scanned for analysis. Images with poor quality, segmentation errors, and artifacts were excluded. Measurements were performed on both eyes, but only data obtained from the right eye were evaluated. If the imaging of the right eye was disturbed by pathology or it was not possible to obtain images of sufficient quality, the left eye was included in the study.

Figure 2 Schematic diagram of fundus retinal vessel scanning localization and structure. (A) Scanning and positioning of retinal blood vessels in the fundus by the special positioning ring. (B) Schematic diagram of zone B positioning. The scanning line runs perpendicular to the axis of a retinal vessel in zone B with the red arrow indicating the artery and the blue arrow indicating the vein. (C) Schematic diagram of blood vessels in retinal cross section: red arrow represents arterial cross section and blue arrow represents venous cross section. (D) Schematic diagram of the vessel edge and lumen: yellow dashed line is the central axis of the vessel, red dashed line is the outer wall of the vessel, blue dashed line is the inner wall of the vessel, red solid line is the outer diameter of the vessel, and blue solid line is the diameter of the vessel lumen.

Results

OCT vessel segmentation dataset

We constructed an OCT vascular image dataset based on the fundus OCT images collected above, as shown in Figure 3. The OCT vessel segmentation dataset contains 248 images from different patients in total. Three experienced ophthalmologists helped to complete the OCT vessel annotation. Specifically, to minimize interobserver variability, the final annotation results needed the agreement of all three ophthalmologists.

Figure 3 Comparison of representative segmentation results among different methods.

In Figure 4, we can see that the inner and outer boundaries of the blood vessels in two samples are segmented separately (the top row represents the inner diameter, and the bottom row represents the outer diameter). It can be observed that the results obtained by the U-Net and Attention U-Net networks have significant noise, and the boundary produced by Trans U-Net is not precise enough. In contrast, our method effectively reduces noise interference, accurately analyzes overall and boundary features, and accurately segments the blood vessel boundaries.

Figure 4 Visual comparison of retinal vessel segmentation by diverse methods.

In Figure 5, the shaded areas of green and red represent the inner and outer diameters of the blood vessels manually marked by the doctor, and the labels represent the blood vessels. The green lines and red lines represent the internal and external diameters of the blood vessels after segmentation by our method, respectively (in order to more clearly indicate the accuracy and thickness of the upper and lower blood vessel walls, the partitioned polygons were processed and finally presented in the form of circles). As can be seen from Figure 5, the location and thickness of the blood vessel wall segmented by our method are very close to that of the label, which fully validates the effectiveness and practicability of our model.

Figure 5 Representative segmentation results achieved by our method.

Implementation details

In our implementation, three state-of-the-art methods are compared, U-Net, Attention U-Net, and Trans U-Net (43,44). All compared methods and our methods are implemented using PyTorch (Python Software Foundation, Wilmington, DE, USA) and trained on four RTX 3060 Ti GPUs. Random center crop, random rotation, and axial flipping are adopted for data augmentation to improve robustness and avoid over fitting. In the training, Adam optimizer is adopted and the initial learning rate and momentum are set to 2×10−4 and 0.5, respectively. The total number of training epochs is 200, and the batch size is 4. All the images are resized to 512×512 for input. h×w of the group Transformer unit is set to 8×8.

In the field of OCT medical image analysis, accurate segmentation of retinal vessels and quantitative analysis of their morphological parameters have key clinical guiding value for the early diagnosis and disease evaluation of retinal vascular abnormalities related to systemic vascular diseases. In order to comprehensively, deeply, and objectively evaluate the performance of segmentation models in specific tasks, we systematically evaluate the performance of segmentation models from multiple dimensions (20). This comprehensive evaluation method can reflect the actual ability of the model in different situations more carefully and accurately, and provide solid data support for the subsequent optimization, improvement, and clinical application of the model.

Accuracy (ACC) is the proportion of samples correctly diagnosed by the algorithm in the total sample:

ACC=TP+TNTP+FP+TN+FN

Where TP is the number of samples that were actually positive that were correctly identified as positive, TN is the number of samples that were actually negative that were correctly identified as negative, FP is the number of samples that were false positive, and FN is the number of samples that were false negative.

Sensitivity (SE), also known as Recall (R), recall rate, is the proportion of true positive samples in all positive samples:

SE=TPTP+FN

Where FN is the number of samples that were actually positive that were incorrectly identified as negative.

Specificity (SP), the proportion of true negative samples to total negative samples:

SP=TNTN+FP

Where FP is the number of samples that are actually negative but are incorrectly identified as positive.

Dice coefficient (DICE) and Jaccard similarity (JS) are used to evaluate the accuracy of physiological structure or lesion region segmentation. DICE is the ratio of the intersection of the segmented contour and the reference standard contour of the structural region to the average of the segmented contour and the reference standard contour:

DICE(X,Y)=|XY|12(|X|+|Y|)=2×TP(TP+FN)+(TP+FP)

JS is the proportion of the intersection of the segmentation contour and the reference standard contour in the union of the segmentation contour and the target contour, also known as the Intersection over Union (IoU):

JS(X,Y)=IoU(X,Y)=|XY||XY|=TPTP+FN+FP

Where |XY| is the intersection between X and Y, |X| and |Y| denote the number of elements of X and Y.

In addition to the above evaluation metrics, 3-fold cross validation was used to test the segmentation performance on the OCT vessel segmentation dataset.

We compared the complexity of our model with other segmentation networks by evaluating the number of parameters and forward time. As shown in Table 1, our network has a smaller model size compared to Attention U-Net and Trans U-Net, which are based on attention mechanism. This is because the way we construct the encoder part in our model is simpler and more effective than that of other models. Additionally, our model has fewer convolutional layers, making it more lightweight. Although our network has a shorter forward time compared to Attention U-Net and Trans U-Net, it has a longer forward time compared to U-Net due to the use of lightweight attention network to extract fine edge features from images. Overall, our network is more concise than Attention U-Net and Trans U-Net and has higher classification accuracy.

Table 1

Comparison of the number of parameters, forward time, and overall accuracy among different segmentation networks

Methods #Parameters (million) Forward time (ms) Overall accuracy (mean ± SD), %
U-Net 9.16 18.5 87.83±0.83
Attention U-Net 10.81 31.2 88.12±0.52
Trans U-Net 12.32 38.4 88.34±0.23
Ours 9.82 20.3 91.13±0.11

SD, standard deviation.

Ablation analysis

As shown in Table 2, we generated three submodels from our model, which are described in detail below. Model 1 replaces the PVT encoding module with a normal convolutional encoding module. Model 2 only has global features, without edge enhancement features. Model 3 replaces the PVT encoding module with a normal Transformer encoding module. The results obtained under optimal parameter conditions demonstrate the effectiveness of different components in our model. By changing the experimental setup of the encoder model and the dual train model, we show that PVT and multi-scale feature extraction can improve the accuracy of the segmentation results. From the comparison of our method with Model 1, we conclude that the PVT can reasonably integrate the high-dimensional features and avoid feature redundancy to improve segmentation accuracy. Model 2 lacks edge features, so it does not fully extract fuzzy edge features, which results in lower segmentation accuracy. We draw the conclusion that the edge features can well represent the adjacency relationship between pixels. Edge feature matrices can reflect the relationships between pixels and better represent the overall characteristics of retinal vasculature in OCT.

Table 2

The evaluation performance of all models on the OCT vessel segmentation dataset

Models ACC (%) SE (%) SP (%) IOU AUC
Ours 91.13±0.11 90.02±0.38 92.14±0.35 93.92±0.13 93.04±0.34
Model 1 88.78±0.56 87.92±0.85 90.12±0.92 89.33±0.69 87.23±0.78
Model 2 89.02±0.28 89.38±0.49 91.02±0.35 91.93±0.42 88.32±0.36
Model 3 88.37±0.43 88.29±0.63 90.33±0.75 91.65±0.47 89.89±0.58

Model 1 replaces the PVT encoding module with a normal convolutional encoding module. Model 2 only has global features, without edge enhancement features. Model 3 replaces the PVT encoding module with a normal Transformer encoding module. ACC, accuracy; AUC, area under the curve; IOU, Intersection over Union; OCT, optical coherence tomography; PVT, Pyramid Vision Transformer; SE, sensitivity; SP, specificity.

Experimental results

The average results with standard deviations of all methods are reported in Table 3. From this table, it can be summarized that our proposed TransDualSegNet achieves the best ACC, SE, JS, and DICE. In Figure 4, we qualitatively compare the segmentation results on two OCT images. It can be evidently seen that our method obtained the best segmentation results on the blurred boundaries. In Figure 5, the dual train model can be effectively applied to the segmentation task with a fuzzy boundary but a similar shape by implicitly restricting the shape of the segmentation result with the anatomical prior knowledge.

Table 3

The evaluation performance of all methods on the OCT vessel segmentation dataset

Methods ACC (%) SE (%) SP (%) JS (%) DICE (%)
U-Net 87.83±0.83 87.36±0.68 89.36±0.68 85.62±1.30 87.32±1.01
Attention U-Net 88.12±0.52 86.46±1.30 93.60±0.80 87.85±1.28 88.35±0.76
Trans U-Net 88.34±0.23 86.97±0.74 92.35±0.68 87.75±0.65 89.09±0.49
Ours 91.13±0.11 90.02±0.38 92.14±0.35 93.92±0.13 90.26±0.25

ACC, accuracy; DICE, Dice coefficient; JS, Jaccard similarity; OCT, optical coherence tomography; SE, sensitivity; SP, specificity.


Discussion

In systemic-associated retinal vascular pathologies (e.g., diabetic retinopathy and hypertensive retinopathy), there is a significant correlation between their occurrence, development, and alterations in the fine structure of retinal vessels. Traditional image segmentation methods such as U-Net and FCN face challenges when handling medical images with complex pathological features and noise. These methods may struggle to accurately capture fine vascular changes, especially in cases of overlapping or blurred vessel boundaries, resulting in suboptimal segmentation outcomes.

Chen et al. (45) integrated Transformers into the U-Net architecture for medical image segmentation. Their model, Trans U-Net, employs Transformer encoders to extract global context from CNN feature maps and uses Transformer decoders to refine candidate regions through cross-attention between proposals and U-Net features. This study highlighted the encoder’s strength in modeling interactions among multiple abdominal organs and the decoder’s effectiveness in addressing small targets such as tumors. Agarwal (46) introduced a dual-channel decoder capable of capturing multi-scale features, enhancing the model’s ability to learn features of different scales through two parallel convolution-based encoders. Although it was shown to excel in liver tumor and spleen segmentation tasks, its performance in other biomedical image segmentation tasks remains to be validated further. Dai (47) proposed I2U-Net, which includes a Holistic Information Fusion and Augmentation (HIFA) module. This module enhances the information extracted by dual-path encoders, combining local and global operations to flexibly learn discriminative representations across a wider frequency range. Despite its superior performance across tasks like skin lesions, polyps, brain tumors, and abdominal multi-organ segmentation, the model’s generalizability to other types of biomedical images is an open question, requiring broader experimental validation.

This study proposes a dual-branch network, TransDualSegNet, based on Transformers, achieving notable success in retinal vessel segmentation. The method leverages the powerful feature extraction capability of the PVT and an edge enhancement model. By effectively integrating global and local features, it achieves high-precision segmentation of vessels with blurred boundaries. Retinal vessel segmentation holds significant value for diagnosing and treating ophthalmic diseases, especially for early screening of conditions such as diabetic retinopathy. Traditional methods, such as U-Net and FCN, are limited in handling complex pathological features and image noise. TransDualSegNet addresses these challenges through three key innovations: firstly, the PVT module extracts multi-level features, capturing both local details and global context to handle complex backgrounds and overlapping vascular regions effectively. Secondly, the edge enhancement model improves segmentation accuracy and robustness by combining global and local information to address unclear vessel boundaries. Thirdly, the FFM maximizes the synergy between global and edge features, reducing feature redundancy. This innovative design not only compensates for the limitations of traditional CNN architectures but also demonstrates the potential of Transformer architectures in medical image processing.

By conducting comparative experiments with advanced methods such as U-Net, Attention U-Net, and Trans U-Net, this study highlights the core technical advantages of TransDualSegNet. First, segmentation accuracy has significantly improved, with TransDualSegNet showing excellent performance in key metrics such as DICE and JS, particularly in segmenting vessels with blurred boundaries (Table 3). Second, the model is lightweight. Despite the integration of the PVT module, TransDualSegNet has fewer parameters compared to Attention U-Net and Trans U-Net and achieves optimized inference time of 20.3 ms, offering higher computational efficiency. Additionally, in multi-fold cross-validation, the model exhibits strong adaptability to various pathologies and image noise, proving its robust generalizability. These advantages not only make TransDualSegNet valuable for academic research but also provide critical support for clinical applications.

Key findings from the experimental results include the following: TransDualSegNet excels in segmenting blurred boundaries, such as the interface between vascular walls and surrounding tissues, thanks to the synergy between the edge enhancement module and the feature fusion module. This indicates the model’s ability to capture local geometric features accurately while maintaining the coherence of the overall vascular structure. The global context capture capability of PVT significantly reduces the influence of background noise on segmentation results—a highlight that is challenging to achieve with traditional CNN architectures. Ablation experiments further validated the effectiveness of the PVT encoder, dual-branch architecture, and FFM module (Table 2), revealing the sources of performance improvement at the component level.Despite its remarkable performance, TransDualSegNet has some limitations. First, the current dataset includes only 248 images. Although these images have been meticulously annotated by experts, the dataset’s limited size and diversity may affect generalizability. Future research should incorporate data from diverse devices and pathological conditions to enhance the model’s robustness. Second, under conditions of severe lesions (e.g., diabetic macular edema) or low-quality images, the model’s robustness needs to be verified through larger-scale experiments and further refinement. Developing more robust models for various image qualities, lesion types, and scanning techniques, along with long-term performance testing, is essential.


Conclusions

We have presented a novel approach for vessel segmentation in OCT vessel images using the TransDualSegNet. To achieve this, we incorporated the PVT as the backbone of the encoder, leveraging its powerful representation learning capabilities. Our proposed method was verified as effective through experimental results on our dataset outperforming state-of-the-art methods. Future research directions include exploring real-time performance and robustness of the algorithm to facilitate wider clinical adoption and dissemination.


Acknowledgments

We would like to acknowledge that certain descriptive passages in this manuscript share similarities with our previously published conference paper (reference: J. Hu, X. Wang, Z. Liao and T. Xiao, “M-GCN: Multi-scale Graph Convolutional Network for 3D Point Cloud Classification”, 2023 IEEE International Conference on Multimedia and Expo (ICME), Brisbane, Australia, 2023, pp. 924–929.). This overlap arises from the reuse of some foundational background descriptions and methodological procedural statements, which are necessary for contextual clarity. However, it is important to emphasize that the present work differs substantially from the aforementioned conference paper in both research focus and core content. All results, analyses, and conclusions presented herein are original and have not been published elsewhere.


Footnote

Data Sharing Statement: Available at https://qims.amegroups.com/article/view/10.21037/qims-2024-2842/dss

Funding: This research was supported by Zhejiang Provincial Basic Public Welfare Project of China (No. LGF22H120017), Medico-Engineering Cooperation Funds from University of Electronic Science and Technology of China (No. ZYGX2021YGLH214), Quzhou City Science and Technology Project under Grant No. ZD2020155, the Municipal Government of Quzhou (Nos. 2023D001, 2023D020, and No. 2022D026).

Conflicts of Interest: All authors have completed the ICMJE uniform disclosure form (available at https://qims.amegroups.com/article/view/10.21037/qims-2024-2842/coif). The authors have no conflicts of interest to declare.

Ethical Statement: The authors are accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved. This study was approved by the Institutional Review Board of Quzhou People’s Hospital (No. 2021-061). It was conducted in accordance with the Declaration of Helsinki and its subsequent amendments. Informed consent was obtained from all the participants.

Open Access Statement: This is an Open Access article distributed in accordance with the Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License (CC BY-NC-ND 4.0), which permits the non-commercial replication and distribution of the article with the strict proviso that no changes or edits are made and the original work is properly cited (including links to both the formal publication through the relevant DOI and the license). See: https://creativecommons.org/licenses/by-nc-nd/4.0/.


References

  1. Jiang Q, Fan Y, Li M, Fang S, Zhu W, Xiang D, Peng T, Chen X, Xu X, Shi F. HyFormer: a hybrid transformer-CNN architecture for retinal OCT image segmentation. Biomed Opt Express 2024;15:6156-70. [Crossref] [PubMed]
  2. Wong TY, Klein R, Sharrett AR, Schmidt MI, Pankow JS, Couper DJ, Klein BE, Hubbard LD, Duncan BB. ARIC Investigators. Retinal arteriolar narrowing and risk of diabetes mellitus in middle-aged persons. JAMA 2002;287:2528-33. [Crossref] [PubMed]
  3. Ishibazawa A, Nagaoka T, Takahashi A, Omae T, Tani T, Sogawa K, Yokota H, Yoshida A. Optical Coherence Tomography Angiography in Diabetic Retinopathy: A Prospective Pilot Study. Am J Ophthalmol 2015;160:35-44.e1. [Crossref] [PubMed]
  4. Zhu H, Crabb DP, Schlottmann PG, Ho T, Garway-Heath DF. FloatingCanvas: quantification of 3D retinal structures from spectral-domain optical coherence tomography. Opt Express 2010;18:24595-610. [Crossref] [PubMed]
  5. Pan L, Guan L, Chen X. Segmentation Guided Registration for 3D Spectral-Domain Optical Coherence Tomography Images. IEEE Access 2019;7:138833-45.
  6. Pilch M, Wenner Y, Strohmayr E, Preising M, Friedburg C, Meyer Zu Bexten E, Lorenz B, Stieger K. Automated segmentation of retinal blood vessels in spectral domain optical coherence tomography scans. Biomed Opt Express 2012;3:1478-91. [Crossref] [PubMed]
  7. Jiang L, Ji Y, Liu M, Fang R, Zhu Z, Zhang M, Tong Y. Exploring the effect of gestational diabetes mellitus on retinal vascular morphology by PKSEA-Net. Front Cell Dev Biol 2024;12:1532939. [Crossref] [PubMed]
  8. Feng HW, Chen JJ, Zhang ZC, Zhang SC, Yang WH. Bibliometric analysis of artificial intelligence and optical coherence tomography images: research hotspots and frontiers. Int J Ophthalmol 2023;16:1431-40. [Crossref] [PubMed]
  9. Linde G, Rodrigues de Souza W Jr, Chalakkal R, Danesh-Meyer HV, O’Keeffe B, Chiong Hong S. A comparative evaluation of deep learning approaches for ophthalmology. Sci Rep 2024;14:21829. [Crossref] [PubMed]
  10. Zhang T, Wei Q, Li Z, Meng W, Zhang M, Zhang Z. Segmentation of paracentral acute middle maculopathy lesions in spectral-domain optical coherence tomography images through weakly supervised deep convolutional networks. Comput Methods Programs Biomed 2023;240:107632. [Crossref] [PubMed]
  11. Wang M, Zhu W, Yu K, Chen Z, Shi F, Zhou Y, Ma Y, Peng Y, Bao D, Feng S, Ye L, Xiang D, Chen X. Semi-Supervised Capsule cGAN for Speckle Noise Reduction in Retinal OCT Images. IEEE Trans Med Imaging 2021;40:1168-83. [Crossref] [PubMed]
  12. Chu X, Wang X, Zhang C, Liu H, Li F, Li G, Zhao S. A deep learning-based model for automatic segmentation and evaluation of corneal neovascularization using slit-lamp anterior segment images. Quant Imaging Med Surg 2023;13:6778-88. [Crossref] [PubMed]
  13. Zhang L, Xu C, Li Y, Liu T, Sun J. MCSE-U-Net: multi-convolution blocks and squeeze and excitation blocks for vessel segmentation. Quant Imaging Med Surg 2024;14:2426-40. [Crossref] [PubMed]
  14. Jiang L, Li W, Xiong Z, Yuan G, Huang C, Xu W, Zhou L, Qu C, Wang Z, Tong Y. Retinal Vessel Segmentation Based on Self-Attention Feature Selection. Electronics 2024;13:3514.
  15. Tong YH, Zhu TP, Zhao ZL, Zhan HJ, Jiang FZ, Lian HL. Retinal Arteriolar Morphometry Based on Full Width at Half Maximum Analysis of Spectral-Domain Optical Coherence Tomography Images. PLoS One 2015;10:e0144437. [Crossref] [PubMed]
  16. Brinchmann-Hansen O, Engvold O. Microphotometry of the blood column and the light streak on retinal vessels in fundus photographs. Acta Ophthalmol 1986;64:9-19.
  17. Brinchmann-Hansen O, Heier H. Theoretical relations between light streak characteristics and optical properties of retinal vessels. Acta Ophthalmol 1986;64:33-7.
  18. Jiang L, Liu M, Yu M, Lu W, Zhang Z, Tong Y. Application of the full-width-at-half-maximum image segmentation method to analyse retinal vascular changes in patients with internal carotid artery stenosis. Front Cell Dev Biol 2024;12:1467374. [Crossref] [PubMed]
  19. Feng HW, Chen JJ, Zhang ZC, Zhang SC, Yang WH. Bibliometric analysis of artificial intelligence and optical coherence tomography images: research hotspots and frontiers. Int J Ophthalmol 2023;16:1431-40. [Crossref] [PubMed]
  20. Yang WH, Shao Y, Xu YW. Guidelines on clinical research evaluation of artificial intelligence in ophthalmology (2023). Int J Ophthalmol 2023;16:1361-72. [Crossref] [PubMed]
  21. Gong D, Li WT, Li XM, Wan C, Zhou YJ, Wang SJ, Wang JT, Xu YW, Zhang SC, Yang WH. Development and research status of intelligent ophthalmology in China. Int J Ophthalmol 2024;17:2308-15. [Crossref] [PubMed]
  22. Benedetti P, Femminella M, Reali G. Mixed-Sized Biomedical Image Segmentation Based on U-Net Architectures. Appl Sci 2023;13:329.
  23. Vijayakumar S, Aarthy S, Deepa D, Suresh P. Sustainable framework for automated segmentation and prediction of lung cancer in CT image using CapsNet with U-net segmentation. Biomedical Signal Processing and Control 2025;99:106873.
  24. Zhao H, Alachiotis N. Data preprocessing methods for selective sweep detection using convolutional neural networks. Methods 2025;233:19-29. [Crossref] [PubMed]
  25. Kattenborn T, Leitloff J, Schiefer F, Hinz S. Review on Convolutional Neural Networks (CNN) in vegetation remote sensing. ISPRS Journal of Photogrammetry and Remote Sensing 2021;173:24-49.
  26. Zhou Z, Siddiquee MMR, Tajbakhsh N, Liang J. UNet++: A Nested U-Net Architecture for Medical Image Segmentation. Deep Learn Med Image Anal Multimodal Learn Clin Decis Support (2018) 2018;11045:3-11. [Crossref] [PubMed]
  27. Qian L, Wen C, Li Y, Hu Z, Zhou X, Xia X, Kim SH. Multi-scale context UNet-like network with redesigned skip connections for medical image segmentation. Comput Methods Programs Biomed 2024;243:107885. [Crossref] [PubMed]
  28. Zhang Y, Yu X, Hu Q, Zhang X, Yang Y, Xiao H. An attention mechanism-based lightweight UNet for musculoskeletal ultrasound image segmentation. Med Phys 2025;52:400-13. [Crossref] [PubMed]
  29. Su Z, Adam A, Nasrudin MF, Prabuwono AS. Proposal-Free Fully Convolutional Network: Object Detection Based on a Box Map. Sensors (Basel) 2024.
  30. Xu Y, Quan R, Xu W, Huang Y, Chen X, Liu F. Advances in Medical Image Segmentation: A Comprehensive Review of Traditional, Deep Learning and Hybrid Approaches. Bioengineering (Basel) 2024.
  31. Liu X, Bai Y, Cao J, Yao J, Zhang Y, Wang M. Joint disease classification and lesion segmentation via one-stage attention-based convolutional neural network in OCT images. Biomed Signal Proces 2022;71:103087.
  32. Xia C, Lv J. MPCCN: A Symmetry-Based Multi-Scale Position-Aware Cyclic Convolutional Network for Retinal Vessel Segmentation. Symmetry 2024;16:1189.
  33. Yao B, Jin L, Hu J, Liu Y, Yan Y, Li Q, Lu Y. Noise-imitation learning: unpaired speckle noise reduction for optical coherence tomography. Phys Med Biol 2024;
  34. Huang C, Wang Z, Yuan G, Xiong Z, Hu J, Tong Y. PKSEA-Net: A prior knowledge supervised edge-aware multi-task network for retinal arteriolar morphometry. Comput Biol Med 2024;172:108255. [Crossref] [PubMed]
  35. Zhang X, Zhang Y. Conv-PVT: a fusion architecture of convolution and pyramid vision transformer. International Journal of Machine Learning and Cybernetics 2023;14:2127-36.
  36. Meng L, Li Y, Duan W. Three-stage polyp segmentation network based on reverse attention feature purification with Pyramid Vision Transformer. Comput Biol Med 2024;179:108930. [Crossref] [PubMed]
  37. Kugelman J, Alonso-Caneiro D, Read SA, Vincent SJ, Collins MJ. Automatic segmentation of OCT retinal boundaries using recurrent neural networks and graph search. Biomed Opt Express 2018;9:5759-77. [Crossref] [PubMed]
  38. Quan H, Li X, Hu D, Nan T, Cui X. Dual-Channel Prototype Network for Few-Shot Pathology Image Classification. IEEE J Biomed Health Inform 2024;28:4132-44. [Crossref] [PubMed]
  39. Huang H, Shang Z, Yu C. FRD-Net: a full-resolution dilated convolution network for retinal vessel segmentation. Biomed Opt Express 2024;15:3344-65. [Crossref] [PubMed]
  40. Li J, Li A, Liu Y, Yang L, Gao G. An adaptive fundus retinal vessel segmentation model capable of adapting to the complex structure of blood vessels. Biomedical Signal Processing and Control 2025;101:107150.
  41. Zhu YF, Xu X, Zhang XD, Jiang MS. CCS-UNet: a cross-channel spatial attention model for accurate retinal vessel segmentation. Biomed Opt Express 2023;14:4739-58. [Crossref] [PubMed]
  42. Wang J, Li X, Lv P, Shi C. SERR-U-Net: Squeeze-and-Excitation Residual and Recurrent Block-Based U-Net for Automatic Vessel Segmentation in Retinal Image. Comput Math Methods Med 2021;2021:5976097. [Crossref] [PubMed]
  43. Qiu Y, Zhang H, Song C, Zhao X, Li H, Wang X. GKE-TUNet: Geometry-Knowledge Embedded TransUNet Model for Retinal Vessel Segmentation Considering Anatomical Topology. IEEE J Biomed Health Inform 2024;28:6725-37. [Crossref] [PubMed]
  44. Zhang Y, Chung ACS. Retinal Vessel Segmentation by a Transformer-U-Net Hybrid Model With Dual-Path Decoder. IEEE J Biomed Health Inform 2024;28:5347-59. [Crossref] [PubMed]
  45. Chen J, Mei J, Li X, Lu Y, Yu Q, Wei Q, Luo X, Xie Y, Adeli E, Wang Y, Lungren MP, Zhang S, Xing L, Lu L, Yuille A, Zhou Y. TransUNet: Rethinking the U-Net architecture design for medical image segmentation through the lens of transformers. Med Image Anal 2024;97:103280. [Crossref] [PubMed]
  46. Agarwal R, Ghosal P, Sadhu AK, Murmu N, Nandi D. Multi-scale dual-channel feature embedding decoder for biomedical image segmentation. Comput Methods Programs Biomed 2024;257:108464. [Crossref] [PubMed]
  47. Dai D, Dong C, Yan Q, Sun Y, Zhang C, Li Z, Xu S I. (2)U-Net: A dual-path U-Net with rich information interaction for medical image segmentation. Med Image Anal 2024;97:103241. [Crossref] [PubMed]
Cite this article as: Jiang L, Hu J, Wang Z, Yuan G, Huang C, Xiong Z, Zhang M, Yang W, Tong Y. TransDualSegNet: transformer dual segment network for retinal vasculature segmentation in OCT. Quant Imaging Med Surg 2025;15(10):9338-9350. doi: 10.21037/qims-2024-2842

Download Citation