# Unsupervised Image Segmentation on 2D Echocardiogram
## 3 Methods
### Architecture  
The network architecture is shown in Figure 1, with the core segmentation process built on the U-Net architecture, chosen for its effectiveness in medical image segmentation tasks. The encoder-decoder structure, coupled with skip connections, allows it to preserve spatial information and provide pixel-wise predictions, making it well-suited for segmenting the complex structures in echocardiographic images. This design facilitates precise segmentation without relying on predefined features, which is crucial for capturing fine anatomical details ([PERSON] et al., 2016; [PERSON] et al., 2016; [PERSON] et al., 2016). Convolutions are a fundamental operation in deep learning models, especially for image processing tasks like segmentation. A convolutional layer applies a set of learnable filters (kernels) to the input image. These kernels slide across the image, performing element-wise multiplications with the pixel values and producing a feature map. Each kernel helps in detecting specific patterns like edges, textures, or other spatial features of the image. In our U-Net architecture, the size of each kernel is \(3\times 3\), meaning that each convolutional layer applies a small window of \(3\times 3\) pixels at a time to capture features in the image. These convolutions maintain the spatial dimensions of the image due to padding. Each convolution is followed by a ReLU (Rectified Linear Unit) activation function, which introduces non-linearity to the model by replacing negative values with zero. The ReLU function ensures that the network learns complex patterns by allowing the model to retain only positive values, improving the speed of convergence during training. Additionally, the network architecture is designed to have the following components:  
* Contracting Path (Down-sampling): This path reduces the spatial dimensions of the input while capturing high-level features. Each stage applies two 3 \(\times\) 3 convolutions followed by ReLU activation, then down-samples with 2 \(\times\) 2 max pooling. This reduces resolution but increases the number of channels, capturing more complex features. * Bottleneck (Middle Layer): The bottleneck captures the most abstract features, using two 3 \(\times\) 3 convolutions with ReLU activation. It processes the reduced feature map before the expanding path begins, preserving the essential information needed for reconstruction. * Expanding Path (Up-sampling): The expanding path up-samples the feature maps with transposed convolutions, restoring spatial resolution. Skip connections from the contracting path help retain fine-grained details, ensuring the final output preserves spatial information. * Final Layer: A 1 \(\times\) 1 convolution reduces the feature maps to the required number of output channels, generating a segmentation mask with the same size as the input image. Softmax activation provides class probabilities for each pixel. * Reconstruction Layer: The reconstruction layer outputs a 3-channel image using a 1 \(\times\) 1 convolution, helping to regularize the training process by preserving sufficient spatial information. The U-Net architecture efficiently combines local details from the down-sampling path with global context from the up-sampling path through its skip connections. The use of 3 \(\times\) 3 kernels in the convolutions allows the model to focus on small, local regions of the image, while the max pooling and up-sampling operations handle the overall structure. ReLU activation after each convolution ensures that the model learns non-linear patterns that are critical for the accurate segmentation of medical images. Figure 1: Diagram of the neural network architecture used for unsupervised segmentation. The network consists of an encoder–decoder structure with skip connections, downsampling and upsampling layers, and convolutional operations.