# CCFNet: Collaborative Cross-Fusion Network for Medical Image Segmentation
## 3 Method
### CNN Branch  
The CNN branch adopts a feature pyramid structure. This is because while in the Transformer branch patch embedding is used to project image patches into vectors, which  
Figure 2: The overall architecture of the CCFNet model for medical image segmentation. The network follows a standard U-shaped structure and consists of four parts: CNN branch, Transformer branch, parallel fusion layer, and decoder. Among them, the CNN branch uses convolution to extract fine-grained features, the Transformer branch uses attention to capture global information, and the parallel fusion layer combines the CNN and Transformer in parallel to extract rich depth information.  
results in the loss of local details, in the CNN the convolution kernels slide across overlapping feature maps, which provides the possibility of preserving fine local features. As a result, the CNN branch is able to supply local feature details to the Transformer branch. Specifically, as the network depth increases in the CNN branch, the resolution of feature maps gradually decreases, the number of channels gradually increases, the number of channels gradually increases, the receptive field gradually increases, and the feature encoding changes from local to global. Given an input image \(x\in R^{H\times W\times D_{0}}\), its spatial resolution is \(H\times W\) and \(D_{0}\) is the number of channels, the feature map generated by \(F^{CNN}(\cdot)\) is represented as  
\[\{f_{l}\}_{l=1}^{L}=F_{l}^{CNN}(x;\Theta)\in R^{\frac{H}{2}\times\frac{W}{2} \times D_{l}}, \tag{1}\]  
where \(D\) represents the dimension of the feature map, \(\Theta\) represents the parameters of the CNN branch, and \(L\) represents the quantity of feature layers. Specifically, the first block \(f_{1}\) is made up of 2 convolutions (\(3\times 3\)) with strides 1 and 2, and each convolution block is followed by normalization and the GELU activation function to extract initial local features (such as edge and texture information). As shown in Figure 3a, \(f_{2}\) and \(f_{3}\) are stacked with SEConv blocks composed of three convolutional blocks and an SE module [6]. The number of SEConv blocks in \(f_{2}\) and \(f_{3}\) is 2 and 6, respectively. The efficient and lightweight SE module can be seamlessly integrated into the CNN architecture, which can help the CCFNet network to enhance local details, suppress irrelevant regions, correct channel features by modeling the relationship between channels, and improve the representational capacity of the neural network.  
The CNN branch of the parallel fusion layer consists of a six-layer stack of modules consisting of a DFE block and an SFI block. The feature map output \(C_{i}\) of each layer has the same resolution size (\(\frac{H}{16}\), \(\frac{W}{16}\), \(D_{4}\)), and the output of the \(i\)-th layer is expressed as  
\[C_{i}=\text{SFI}(\text{DFE}(C_{i-1}),T_{i}), \tag{2}\]  
where \(T_{i}\) is the \(i\)-th layer's CSF-block-coded image representation on the Transformer branch with the same resolution as \(C_{i-1}\). The structures of the DFE block and SFI block are shown in Figure 3b. More detailed operations are described in the parallel fusion layer.