目的 肾小球图像的准确分割对肾脏病理学的疾病诊断和定量分析起到关键作用，然而全染色肾脏切片图像存在由肾小球个体差异大导致的空间尺度和上下文形状变化大，以及图像分辨率过高的问题，给高精度、高性能分割任务带来挑战。为此，提出一种边界信息保持的全染色肾脏切片多粒度分割方法。方法 使用一种多粒度上下文的空间注意力机制生成多粒度和多形状变化的空间注意力图，以限制上下文特征，减弱背景对目标的影响，强化网络对目标的感知能力，使网络更多地关注小目标特征；将原图像切分为若干小图来解决全染色图像分辨率高的问题，使用增广路径边界补零策略处理卷积核存在的贡献偏移效应，解决了肾小球目标处于图像边界所导致的分割困难问题，保证图像块的信息无损失地向高层传递，提高处于图像块边界的肾小球目标的分割精度；进一步地，针对图像块拼接带来的边缘肾小球容易漏检、计算开销大的问题，采用特征复用的概率累积滑窗策略，同时提高了分割精度和效率。结果 在小鼠肾脏细胞切片和HuBMAP（human biomolecular atlas program）人体肾脏数据上，本文方法提高了分割精度，并使预测速度提高50%左右。结论 对于全染色肾脏切片的肾小球分割问题，多粒度上下文特征和增广路径边界补零策略解决了边界区域肾小球目标分割困难、分割精度低的问题，并通过概率累积滑窗策略提高分割速度，相较传统的分割方法有更优秀的性能。
Boundary-preserving multi-scale glomerulus segmentation for full-stained kidney slice
Objective Medical image segmentation is a key issue in determining whether medical images can provide reliable information in treatment and clinical diagnosis. The accurate segmentation of glomeruli plays a key role in diagnosing and quantitatively analyzing diseases in renal pathology. Traditional methods used in glomerular image segmentation include traditional pattern recognition and machine learning-based recognition. However，these methods required handcrafted features. Segmentation methods based on convolutional neural networks（CNNs）have shown strong generalization performance with features learned by networks. Early diagnosis is conducive to treating kidney disease. However，a fullstained kidney slice suffers from significant variations in the scale，shape，and texture of objects. Moreover，the high image resolution brings challenges to prediction efficiency. Therefore，CNN-based glomerulus segmentation plays an important role in clinical applications. Method This paper proposes a method for glomerular segmentation in full-stained kidney slices. A multi-granularity spatial attention mechanism is designed to deal with the diverse appearances of the glomerulus. This mechanism generates multiple scales and shape-changing feature maps for each pixel to focus on its context area instead of a fixed rectangular area as in traditional networks. For glomerulus with different sizes，the features of these feature maps should be fused at different scales，and the spatial information of features should be extracted by networks. Multigranularities context feature maps are generated to pay attention to small objects using the context-based spatial attention mechanism，which can control the receptive field to obtain multi-granularities information and reduce background interference. The problem of high image resolution is addressed by cutting the original image into image patches. To detect the glomerulus located on the edge of two image patches，a padding strategy is formulated based on an augmented path. The disadvantages of the zero-padding strategy in standard convolution operation are then analyzed，and the contribution shifting effect is highlighted. The proposed padding strategy ensures that the boundary information of image patches is transferred to high levels of the network without information loss. Furthermore，given the very large resolution of the complete stained kidney slice，a window should be sliced along the image to predict objects. However，small objects are sensitive to the positions，thereby leading to different predictive probabilities. Sliding a window in an image also involves high computation complexity. To address these problems，this paper proposes a sliding window strategy that uses probability accumulation to fill those objects that are missing in stitching image patches. This strategy has high computation efficiency and can improve the detection accuracy of small objects in full-stained kidney slices. Result The proposed method achieves a higher segmentation accuracy on the mouse kidney cell and human biomolecular atlas program（HuBMAP）human kidney datasets compared with state-of-art methods. Specifically，the segmentation accuracy increases by 1% in Dice compared with U-Net after using a multi-granularities context-based spatial attention mechanism，and the number of missing and false objects is also reduced. The padding strategy based on an augmented path improves the predictive accuracy with only a few additional FLOPs（floating-point aperations per second）. The probabilistic cumulative strategy is also compared with the nonprobabilistic cumulative sliding window strategy. Result show that the probabilistic cumulative sliding window strategy saves 52. 83% of the time in the first layer of the network and 49. 98% in the second layer compared with the nonprobabilistic sliding window strategy. Overall，the proposed method increases the prediction speed by about 50%. Conclusion The probabilistic accumulation sliding window strategy improves prediction efficiency and glomerulus segmentation accuracy compared with the state-of-the-art methods. The proposed multi-granularity context spatial attention mechanism fuses the information of multiple scales through multi-granularity receptive fields to enhance the relevant features and suppress the irrelevant features of the glomerulus. The proposed padding strategy based on an augmented path can deal with information attenuation and contribution-shifting issues in traditional zero padding and effectively preserve information when objects are located on the boundary of patches. Combining multi-grained context features with the proposed padding strategy also improves object segmentation in fully stained kidney images. During network inference，the proposed sliding window with probability accumulation reuses features to significantly increase the prediction efficiency. This method is also beneficial in detecting small objects that are sensitive to the position. Experimental results on different datasets show that the proposed method outperforms the state-of-the-art methods and is both stable and robust. Meanwhile，the sliding window with probability accumulation improves segmentation accuracy and greatly reduces the calculation time. The role of local window size learning in the multi-granularity spatial attention mechanism will be explored in future work. In addition， given that some objects in a glomerulus slice are too small to predict，additional training samples must be generated using the generative adversarial network to further improve prediction accuracy.