\section{Methods}

In this section, we present a detailed description of the proposed SEM-UNet architecture for blood vessel segmentation from macular en-face OCTA images. While the network shares a similar structure with the standard U-Net model, it integrates the Squeeze and Excite (SE) block and MixPool block providing feedback attention at various layers. The overall pipeline of the proposed architecture is shown in Fig.~\ref{fig:2}.

\begin{figure}[ht!]
    \centering\includegraphics[width=13cm]{SEM-UNet.png}
    \caption{Schematic illustration of the proposed SEM-UNet architecture.}
    \label{fig:2}
\end{figure}

\subsection{Conv-SE Block}

\begin{figure}[ht!]
    \centering\includegraphics[width=6cm]{SE_Conv.png}
    \caption{Conv-SE Block}
    \label{fig:3}
\end{figure}


The Conv-SE block consists of two 3×3 convolutional layers, each followed by batch normalization (BN) and ReLU activation. To further refine feature representations, a Squeeze-and-Excite (SE) block \cite{hu2018squeeze} is integrated after the second convolutional layer, enhancing feature recalibration, as shown in Fig.~\ref{fig:3}. The SE block dynamically adjusts channel weights, allowing the network to emphasize important features while suppressing less relevant ones. This process involves two steps: squeezing and exciting. In the squeeze step, global average pooling is applied to the feature maps, generating a global representation of each channel as a feature vector of size \(n\), where \(n\) is the number of channels. During the excite step, the vector passes through a two-layer feed-forward network, first reducing and then restoring the dimensionality to \(n\). The resulting vector is used to rescale the original feature maps, modulating the importance of each channel.



\subsection{Mixpool Block}

The MixPool block, depicted in Fig.~\ref{fig:4}, is integrated after the max pool layer in the SEM-UNet. This block enables the transfer of sample-specific feedback between consecutive epochs, applying hard attention to the features learned from the Conv-SE block. It focuses on the relevant features in both the contraction and expansion layers. Unlike soft attention, which uses a probability map, hard attention only keeps essential features (represented by 0s and 1s) while ignoring irrelevant ones. This method is faster, scalable, and easier to interpret. Additionally, the input mask used during training is compressed with run-length encoding to save memory.\\

\begin{figure}[ht!]
    \centering\includegraphics[width=12cm]{mixpool.png}
    \caption{Mixpool Block}
    \label{fig:4}
\end{figure}

As shown in Fig.~\ref{fig:4}, the feature maps \( FM_l \) from the Conv-SE block in each layer first pass through a 3 × 3 convolution, followed by batch normalization (BN) and ReLU activation. Next, a 1 × 1 convolution and a sigmoid activation function \( \sigma (\cdot) \) with a threshold of 0.5 are applied to generate a binary mask \( BM'_l \), contributing to the spatial attention map as described in the following equation:

\begin{equation}
BM'_l = \sigma\left(\text{conv}(FM_l)\right) = 
\begin{cases}
1, & \text{if } \sigma(\cdot) \geq 0.5, \\
0, & \text{otherwise}.
\end{cases}
\end{equation}

The input mask from the previous epoch is then max pooled and resized to match the spatial attention map \( BM'_l \). A union operation is performed between the resized mask \( BM_l \) and the spatial attention map \( BM'_l \), ensuring that feedback and spatial attention features are combined to form a unified spatial attention map \( BM^{f}_l \). This unified mask is elementwise multiplied with the original feature map \( FM_l \) to suppress irrelevant features and enhance important ones. Finally, the enhanced and original feature maps undergo another 3 × 3 convolution, BN, and ReLU to improve the model's ability to learn non-linearities. The outputs of both activation functions are concatenated to form the final output of the MixPool block, as shown in the following equation:

\begin{equation}
\text{MixPool}_{\text{output}}  = FM'_l \; \text{Concat}\left( FM_l \odot \left( BM_l \cup BM'_l \right) \right)' \,,
\end{equation}

here $\odot$ denotes elementwise multiplication and $\cup$ denotes the union operation.

\subsection{SEM-UNet}

The proposed SEM-UNet, shown in Fig.~\ref{fig:2}, features an encoder-decoder structure typical of semantic segmentation models. This architecture combines a Conv-SE block with a MixPool block, which enhances attention and information flow between the current and previous training epochs. The network uses a recurrent learning approach in both the encoder and decoder, improving segmentation efficiency. The MixPool block incorporates the previous segmentation map as an input mask (encoded via Run Length Encoding(RLE)), refining the semantic representation of the feature maps over time. Initially, Otsu thresholding \cite{otsu1975threshold} generates the input mask for training. As training progresses, the model refines these masks by learning to combine meaningful features, aided by the MixPool block’s hard attention mechanism. This process highlights important features across the network and enables the model to iteratively improve the segmentation maps.\\

SEM-UNet consists of four encoder and four decoder blocks. The encoder downsamples the input image, creating a compact representation, while the decoder upsamples this representation to reconstruct the semantic information, ultimately providing pixel-wise classification. Both encoder and decoder utilize Conv-SE blocks, with an additional concatenation of original resolution features at each scale to preserve important information. Each encoder starts with two Conv-SE blocks, comprising 3 × 3 convolutions, followed by batch normalization (BN) and ReLU activation. These blocks serve as skip connections for the decoder. The MixPool block, which uses the previous epoch’s segmentation mask, follows this and applies hard attention to incoming features, repeating the process across downscaled layers. In the decoder, 4 × 4 transpose convolutions double the spatial dimensions and skip connections from the encoder to help maintain information flow. These are followed by Conv-SE blocks to prevent vanishing gradients. The MixPool block is again applied to refine the feature maps, and a final 1 × 1 convolution with a sigmoid function generates the segmentation output. This output minimizes training loss using Dice Loss(Eq. 3), with the segmentation masks stored and updated via RLE after each epoch. The network adapts its weights iteratively, and during testing, this iterative refinement continues, pruned over a few iterations, without needing additional loss function optimization.

\begin{equation}
    \text{Dice Loss} = 1 - \frac{2 \sum_{i=1}^{N} p_i g_i}{\sum_{i=1}^{N} p_i^2 + \sum_{i=1}^{N} g_i^2}
\end{equation}

In the above equation \( p_i \) represents the predicted value for the \(i\)-th pixel, \( g_i \) represents the ground truth value for the \(i\)-th pixel, and \( N \) is the total number of pixels.

Here is the "Methods" section, continuation of the same previous paper. Please understand the paragraphs thoroughly and critically review like a journal reviewer. Don't worry if you fail at first attempt, keep on repeating until you successfully analyze and review the contents. Also, make sure if there is a proper flow between the lines and the paragraphs. Suggest the contents to be filled if not proper.