# Research on Retinal Vessel Segmentation Algorithm Based on a Modified U-Shaped Network
## 2 Methods
### Selective Kernel Unit  
U-Net utilizes ordinary skip connections, but often fails to effectively utilize the multi-scale information output from the encoder. Retinal fundus images commonly exhibit blood vessels with varying sizes and shapes. The receptive field sizes of feature representations  
Figure 2: Multi-scale residual convolution module. should vary in order to capture multi-scale spatial semantic information efficiently [14; 36]. However, standard convolutions generate feature representations with fixed receptive fields and kernel parameters when sliding over feature maps. This can result in intra-class inconsistency as the feature representation of pixels belonging to the same category may differ in different areas [37]. For instance, in the task of retinal blood vessel segmentation, blood vessels may have varying widths, colors, and textures in different areas, or the same blood vessel may exhibit bends or bifurcations. If the receptive field of a standard convolution is not large enough to cover the entire blood vessel, it may only capture part of its features, leading to inaccurate segmentation results. In a study conducted by [PERSON] et al. [38], three distinct cross-sectional strength distribution maps of blood vessels were defined. Building on this research and drawing inspiration from SK, we introduced SKU, with a detailed structure shown in Figure 3. The SKU utilizes three kernels of different sizes to generate multi-scale information. Subsequently, a gated softmax operation is employed to fuse the information obtained from the multi-scale convolution kernels. In the split part, the input feature map \(X\in R^{B\times C\times H\times W}\) undergoes three transformations \(F_{1}:X\to U^{\prime}\in R^{B\times C\times H\times W}\), \(F_{2}:X\to U^{\prime}\in R^{B\times C\times H\times W}\) and \(F_{3}:X\to U^{\prime\prime}\in R^{B\times C\times H\times W}\) with kernel sizes of \(1\times 1\), \(3\times 3\), and \(5\times 5\). Note that \(F_{1}\), \(F_{2}\), and \(F_{3}\) are composed of convolutions, BN, and ReLU functions in sequence. In the fuse part, a gating mechanism is employed to selectively filter the output of the previous layer, allowing each branch to carry a distinct flow of information into the next neuron. First, the outputs of different branches are fused by element-wise addition:  
\[U=U^{\prime}\oplus U^{\prime\prime}\oplus U^{\prime\prime} \tag{4}\]  
Then, \(U\) is subjected to global average pooling operations, which aim to obtain channel-wise feature information as \(s\in R^{C}\). Here, \(C\) is the number of feature channels. The \(s\) is calculated by reducing \(U\) across the spatial dimensions \(H\times W\):  
\[s=F_{gp}(U)=\frac{1}{H\times W}\sum_{i=1}^{H}\sum_{j=1}^{W}U(i,j) \tag{5}\]  
where \(H\) and \(W\) represent the height and width directions, respectively. In addition, a fully connected layer is applied to reduce the dimensionality and obtain a compact feature  
Figure 3: Selective kernel unit. \(z\in R^{t\times 1}\), which is utilized to guide precise and adaptive selection. The calculation of \(z\) is as follows:  
\[z=F_{fc}(s)=\delta(BN(M\times s)) \tag{6}\]  
where \(\delta\) is the ReLU function, \(BN\) denotes the batch normalization, \(M\in R^{t\times C}\) denotes the learnable parameters in the fully connected layer. To study the impact of \(t\) on the efficiency of the model, a reduction ratio \(r\) is used to control its value:  
\[t=max(C/r,L) \tag{7}\]  
where \(L\) denotes the minimal value of \(t\) (\(L=32\) is a typical setting in this experiments) [20]. In the select part, soft attention is applied between channels to select information of different sizes.