# Sunspot Detection Using YOLOv5 in Spectroheliograph H-Alpha Images
## 1 Introduction  
Even though the sun looks almost invariant and quite from the earth, it is full of activity that can have not only a biological impact but also a strong societal impact on Earth. Hence, there is an increasing interest in studying the sun and monitoring solar activity. Space weather is the sub-field of science that deals specifically with the events that happen in the sun and influence life on Earth, producing frequent malfunctions on electric and electronic equipment, both in orbit and on the surface of our planet [1, 2, 3]. Therefore, it becomes obvious why the monitoring and forecasting of solar activity is important in the modern world. Solar activity can affect communications, electrical devices, power grids, industrial and commercial assets, as well as space missions and other aspects of life on Earth and space [2]. Large solar storms can disrupt communications and cause power overloads that damage power lines, as well as shutting down or even destroying unprotected electrical systems. Monitoring solar activity can be accomplished through the detection and tracking of sunspots, which are the most visible phenomena that occur on the surface of the sun that give a rather accurate picture of solar activity [4]. Sunspots are small and transient regions on the surface of the sun, where the magnetic field becomes strong enough to interfere with the solar convection and heat transfer close to its surface. Therefore, regions cooler than their surroundings exhibit a darker appearance by contrast with the other hotter regions. The appearance and evolution of sunspots show a high correlation with the production of large solar flares, which can be projected toward Earth, sometimes causing a number of disruptions in electrical-based apparatuses [5]. The Geophysical and Astronomical Observatory of the University of Coimbra (OGAUC) has been monitoring solar activity since 1926. Every day, a picture of the sun is taken and the features or events found in the sun's atmosphere are visualized, except when it is not possible because of poor weather conditions. The images are taken using a Hale-Deslandres spectroheliograph installed at coordinates 40\({}^{\circ}\)12' N, 8\({}^{\circ}\)26' W. The older pictures, which were stored in physical photographic plates, where the sunspots were imprinted, have already been digitized and are available in a modern digital picture format [6]. Due to this fact, OGAUC offers one of the largest datasets of solar images in the world, containing daily pictures of the sun over almost one century [7]. Using those pictures, it is possible to study the daily activity of the sun from 1926 to the present day, the only exceptions being days of very poor weather conditions in Coimbra. Considering the number of images available, automatic methods to detect and track sunspots are a very much needed improvement in the field of solar weather monitoring [8]. Those methods facilitate the process of manual analysis and longitudinal studies of the evolution of sunspots. A method for automatic sunspot detection has already been applied to images from the OGAUC. It is an algorithm based on mathematical morphology that reaches an accuracy of up to 86.25% [9], using \(H_{\alpha}\) continuum images. Those images are taken at wavelengths 6558.7 A, which is close to the \(H_{\alpha}\) emission wavelength at 6562.8 A, with \(H_{\alpha}\) being the lowest energy emission in the Balmer series of Hydrogen, a transition that occurs very efficiently in the sun's atmosphere. The method is discussed in more detail in Section 3. Many different approaches have been proposed for automatic sunspot detection in solar images. Most of those approaches used images taken by satellites in orbit, therefore above the earth's atmosphere. In general, those images have very good quality, for they are not affected by our atmosphere, with its numerous particles and layers that affect sun rays. However, satellite pictures have been available for just the last few decades.