# Solar Filament Detection Based on an Improved Deep Learning Model
## 2 Dataset
### Dataset Building  
To avoid the impact of unreliable dataset annotations, we built a new solar filament dataset. It includes 150 pairs of full-disk H\(\alpha\) images and their annotations, observed by BBSO from 2012 to 2014. BBSO provides two types of full-disk H\(\alpha\) images, as shown in Figure 2. One is the raw, unprocessed images, as depicted in Figure 2a. The other is the preprocessed images, with limb darkening and brightness inhomogeneity removed, as shown in Figure 2b. It can be observed that the preprocessed images exhibit clearer filament structures. Therefore, we adopted the preprocessed full-disk H\(\alpha\) images.  
Figure 1: Annotations of the two datasets. (**a**,**b**) full-disk H\(\alpha\) image; (**c**,**d**) annotation image; (**a**,**c**) are taken from Dataset 1, while (**b**,**d**) are taken from Dataset 2. The white boxes indicate sunspots, the yellow boxes indicate background noise, and the red boxes indicate omitted solar filaments.  
Solar observations can be affected by various factors, including the rotation and revolution of the Earth, atmospheric conditions, and lighting environments. Consequently, position of the solar disk may vary in different images. Therefore, we performed preprocessing on the full-disk H\(\alpha\) images. First, the solar disk is shifted to the center of the image. Both the Hough circle detection method and the least squares fitting method are used to get the position of solar disk. Then the solar disk will be moved to the center of the image. If the fitting results obtained by the two methods differ by more than five pixels, a manual adjustment is performed. Images where the solar disk position exceeds the image edge are discarded. Next, pixels outside the solar disk are set to gray to avoid interference from prominences. Finally, the ROF denoise is applied. The images before and after preprocessing are shown in Figure 3. It can be observed from Figure 3 that the preprocessed images are more conducive to the detection of solar filaments.  
We manually annotated filaments using the LabelMe tool. Repeated manual inspections of the annotation results were conducted to prevent the omission of filaments during the annotation process. Figure 4 presents an example of a full-disk H\(\alpha\) image along with its corresponding filament annotation.  
Figure 3: Comparison of Images Before and After Preprocessing. On the (**left**) is the image before preprocessing, and on the (**right**) is the image after preprocessing.  
Figure 2: Two different types of images provided by BBSO. Where (**a**) is an unprocessed image and (**b**) is a preprocessed image. The images were observed on 8 November 2013, at 18:23:13 UT.  
The dataset includes 150 sets of H\(\alpha\) images and their corresponding manual annotation images, all 512 \(\times\) 512 in size and in PNG format. The H\(\alpha\) images were observed between 2012 and 2014. The annotation images are binary images, representing two classes: The white pixels represent filament annotations, while the black pixels represent non-filament areas. The dataset differs from those used in other semantic segmentation applications. In the annotations, filament annotations only account for an average of 8% of total images, and they are small in size. Therefore, it is necessary to specifically design methods tailored for filament detection. More features related to filaments will be introduced in Section 3.