# Render U-Net: A Unique Perspective on Render to Explore Accurate Medical Image Segmentation
## 3 Methodology
### Attention Gate
The point-sampling method consists of the following steps:

1. The encoder-decoder architecture takes an input image (black arrows) and extracts features from the encoder (green arrows and grids). 2. The lightweight coarse decoder yields a coarse mask prediction for the target object (red arrows) and upsamples features (blue arrows and grids) using bilinear interpolation. 3. To refine the coarse mask, the Point-sampling method selects some uncertain points from the coarse predicted mask, as shown by the red points in the figure. 4. A simple MLP is set to extract the point-features of each point independently and predict their labels. 5. The point-features are mapped to the size of the encoder feature (dashed gray arrows), and the feature at the corresponding position is replaced (dashed red arrows) to obtain the point-sampling features (red grids). 6. The encoder-features are concatenated with the upsampling features and attention selected point-sampling features. Figure 3: Diagram of Attention gate between convolutional block \(X_{3\_0}\) and \(X_{3\_1}\). The feature of \(X_{4\_0}\) is used as a gate signal to focus regions in the encoder feature of \(X_{3\_0}\). These two features are added after the convolution and BatchNorm layers.After activation by ReLU, the result is sent to the convolution and BatchNorm layers to extract features. Finally, the attention coefficient \(\alpha\) is obtained through the sigmoid function and then it dot-products, pixel by pixel, by using the upsampling feature to get the feature after attention selection, which is \(X_{3\_1}\). The concatenated features are input into the fine decoder (black arrows) to obtain the fine prediction result. From the above steps, the point-sampling method is different from the traditional upsampling method. The point-sampling method increases the selection of uncertain points (step 3) and the extraction of point-features (step 4). Therefore, the key of the point-sampling method consists of two parts. The first part is how to flexibly and adaptively select uncertain points in the image. The second part is how to extract the corresponding point-features to enhance segmentation. The detailed analysis of point-sampling method is in Figure 4.

**Point selection strategy. ** The main idea of our selection strategy is that uncertainty points are mostly in areas where it is difficult to classify objects. After the coarse mask is predicted by coarse decoder, there are N most uncertain points on the image plane. We believe that the selection of the most uncertain points should focus not only on the uncertain areas (e.g., the boundaries between different classes), but it should also retain a certain degree of uniform coverage. Such a design can achieve the greatest degree of accurate segmentation and enhance anti-interference ability. To achieve the above goal, we referred to the following principles in [29] for point selection and balance. * Over generation: First, randomly sample kN points from a uniformly distributed point set. These kN points will be used to over-generate candidate points, and k should be greater than \(1\). * Important sampling: Then, we will coarsely predict the segmentation class of the above kN points. After that, we will perform interpolation and calculate the uncertainty estimation of all selected points. Next, we will select the top \(\beta\)N points with the highest uncertainty. These points are considered important points. * Unimportant sampling: After removing the above-mentioned important points from kN points, (\(1-\beta\)) N points remain. These points are regarded as unimportant points sampled from a uniform distribution. In this way, we obtain the fine predicted mask from low resolution, and this procedure is shown in Figure 5.

Figure 4: Detailed analysis of the Point-sampling method (red arrows, dots, and grids) applied to image semantic segmentation. A set of uncertain points from coarse prediction is selected to extract point-features.