# SIPNet & SAHI: Multiscale Sunspot Extraction for High-Resolution Full Solar Images
## 1 Introduction
In recent years, some deep learning methods have been used in the field of sunspots, for example, sunspot extraction from Chinese sunspot drawings [21; 22]. [PERSON] [23] adopted  
Figure 1: A high-resolution, full-disk continuum image observed by SDO/HMI on 24 October 2014 at 4:00 UT. It can be seen that there are sunspots of multiple scales, which some representative sunspots marked with boxes from a to f. The regions marked as d, e, and f have the same magnification of 6. AlexNet for classifying sun images into an active sun or quiet sun. [PERSON] [24] built a traditional convolutional neural network to detect sunspot groups for predicting solar flares. He [25] adopted a CornerNet-Saccade deep learning method for classifying sunspot groups based on Mount Wilson classification. [PERSON] [26] applied the YOLOv5 network to detect sunspots; however, only clearly visible sunspots were detected correctly. The solar images were multiplied down-sampled by these deep learning methods without exception because deep convolution requires a lot of memory. This is not a problem when only sunspots clearly distinguished in active regions are the focus. However, it is unfriendly to smaller sunspots. For instance, a sunspot occupying 256 pixels, 10 millionths of a 4096 \(\times\) 4096 pixel\({}^{2}\) image, and an area of about 22 msh corresponds to an equivalent diameter of 18 pixels. If the image is down-sampled to 1024 \(\times\) 1024 pixels\({}^{2}\), it will be reduced to a target occupied by 16 pixels corresponding to an equivalent diameter of 4 pixels. If the image is down-sampled continually to 256 \(\times\) 256 pixels\({}^{2}\), it remains a mere 1 \(\times\) 1 pixel\({}^{2}\), and even disappears. In fact, we hope that such small sunspots can also be detected for the aim of studying solar magnetic fields more comprehensively. In the field of target detection and segmentation, targets that are about a thousandth of the size can be called small targets. So, the tiny sunspots in these high-resolution solar images, smaller than one in ten thousand or even smaller than one in a million, can be called ultra-small targets. Until now, it has been a major challenge in the field of detection and segmentation of ultra-small targets, whether using the deep learning method or other well-known segmentation methods that use variational techniques, such as the Chan-Vese model [27], Geodesic active contours [28], Generalized Fast marching [29], Segmentation under geometric constraints [30], deformable models [31; 32], and so on. This paper proposes a new deep learning model, SIPNet, in which a new Switchable Atrous Spatial Pyramid Pooling (SASPP) is proposed, and an IoU-aware dense object detector and prototype mask generation are adopted. Furthermore, an open-source framework called Slicing Aided Hyper Inference (SAHI) is integrated on top of the trained SIPNet model. SAHI provides a generic slicing aided inference for small object detection on high-resolution images while maintaining higher memory utilization. The results and comparison show that such an integrated system achieves good performance for multiscale sunspots, especially for small and ultra-small sunspots. The structure of this paper is as follows. In Section 2, we introduce the data set. Section 3 explains SIPNet and (and represents integration) SAHI in detail, including how to train and test SIPNet. The results and discussion are detailed in Section 4. In Section 5, the conclusions are presented.