1. Introduction
Water is the source of life and an important resource for the survival and development of human beings. However, with increasing human activities and climatic changes, water resources have experienced unprecedented threats, including nutrient enrichment, and inorganic and organic pollution [
1]. Water eutrophication has been occurring frequently with the intensification of nitrogen and phosphorus pollution, and one of the severely disastrous consequences is the globally increasing frequency of cyanobacterial blooms [
2]. In recent years, a large number of cyanobacterial blooms have erupted in worldwide rivers and lakes, such as Taihu Lake and Dianchi Lake in China, Lake Erie in the USA, and Wood Lake in Canada [
3,
4,
5,
6], causing a series of serious ecological problems and posing a huge impact on people’s production and lives. Specifically, cyanobacterial blooms can produce a variety of toxins which cause a range of diseases when ingested by organisms [
7]. Moreover, the microbial degradation of cyanobacterial blooms reduce oxygen levels in lakes, resulting in the deaths of fish and inhibiting the growth of aquatic vegetation [
8,
9]. Mounting evidence shows that cyanobacterial blooms are highly likely to expand further, owing to ongoing eutrophication, in the future [
10]. Obviously, it is especially important to perform real-time monitoring and quantification of cyanobacterial blooms.
Currently, routine methods for analyzing cyanobacterial blooms have been widely applied through field sampling and laboratory analysis [
11]. However, this traditional method is highly time-consuming, laborious and expensive. Moreover, it cannot obtain comprehensive information on cyanobacterial blooms, so it is not intended for real-time monitoring of large-scale cyanobacterial blooms. Instead, most of the worldwide research results on cyanobacterial-bloom detection are achieved using remote-sensing hyperspectral technology [
12]. In these studies, researchers mainly use a variety of vegetation indices to extract spectral features for detecting cyanobacterial blooms, including the Normalized Difference Vegetation Index (NDVI), Atmospherically Resistant Vegetation Index (ARVI), and Enhanced Vegetation Index (EVI) [
13,
14,
15]. In recent years, scholars have also proposed some improved vegetation-index methods to detect cyanobacterial blooms. Hu et al. [
16] proposed a new Floating Algae Index (FAI) based on NDVI and EVI to detect floating algae in the open-ocean environment. This approach addresses the sensitivity of traditional vegetation indices to changes in environmental and observational conditions. Huang et al. [
17] investigated the variation in chlorophyll concentration distribution in Lake Taihu using the band ratio method, based on Geostationary Ocean Color Imager’s data. Cannizzaro et al. [
18] proposed a new quantitative method for cyanobacterial-bloom detection by improving the index based on the analysis of the optical properties of cyanobacterial blooms in Florida Bay. Sachidananda et al. [
19] proposed a cyanobacterial index algorithm named CIcyano to detect cyanobacterial blooms in the lakes of eleven states in the United States, and verified the effectiveness of the algorithm.
However, the above applications of vegetation index are all performed with the help of satellite image data, which require a long acquisition period and are inadequate in monitoring low-concentration algal bloom areas in real time. Small UAV remote-sensing technology, which has the advantages of low cost, low risk, high timeliness, and high resolution, is widely used in various scenarios and has become a research hotspot in recent years [
20,
21,
22]. It can effectively make up for the shortcomings of traditional methods, such as long acquisition time period and low detection efficiency. Nevertheless, the vegetation indices mentioned in previous literature are less capable of detecting cyanobacterial blooms in complex river-surface environments, because low-altitude remote-sensing technology will certainly amplify space interference. Moreover, there are still no commercially available preprocessing methods designed for aquatic purposes and UAV close-range remote sensing [
20]. Therefore, this paper proposes a new vegetation-index method based on improved feature-band and detail fusion to robustly extract the multispectral features of cyanobacterial blooms using low-altitude airborne detection technology.
In addition, due to the influence of reflections, shadows, and floating objects on the river surface, the detection thresholds of cyanobacterial blooms in different channels are not consistent. Obviously, only using a vegetation index to quantify cyanobacterial blooms is not effective enough, and a more robust algorithm is needed to assist in the detection of cyanobacterial blooms. Deep learning is a powerful and adaptive learning method that can classify or predict non-linear data accurately under complex conditions, which makes it a promising tool in performing image-level semantic segmentation of cyanobacterial blooms. Here, semantic segmentation is necessary and advantageous because of the irregular shape of cyanobacterial blooms. Jonathan et al. [
23] from the University of California, Berkeley proposed the Fully Convolutional Network (FCN), pioneering the use of deep learning for image semantic segmentation, but the proposed networks were not sensitive enough to detect details and failed to consider pixels without any spatial coherence. A team from the University of Cambridge developed a deep network for image semantic segmentation named SegNet to segment the regions in an image where objects were located, with accuracy down to the pixel level [
24]. Thus far, image semantic segmentation methods based on deep learning have been widely used in autonomous driving, medical image classification and other fields [
25,
26,
27,
28], as well as in the detection of cyanobacterial blooms. Yang et al. [
29] proposed a deep generative adversarial network (DGAN), which demonstrated a better segmentation result on irregular cyanobacterial-bloom regions. Using an illumination processing algorithm based on a deep neural network (DCNN), Luo et al. [
30] normalized the illumination intensity of images to a reasonable range, and thus, effectively improved the accuracy of cyanobacteria detection under the condition of strong light. Xiang et al. [
31] adopted the attention module and the number of residual blocks to streamline the structure based on a residual attention network model, and their detection model could discriminate various species of cyanobacterial blooms in Taihu Lake accurately and swiftly.
It is worth noting that few previous studies have paid attention to the phenomenon in which the boundary classifications of cyanobacterial blooms and other objects often give incorrect results. Among the many deep-learning algorithms, the transformer model has a strong model generalization ability. It has a flexible structure and makes essentially no assumptions about the structural errors in the input data, and can be pre-trained to handle large amounts of unlabeled data. More importantly, the attention mechanism will make the semantic association between adjacent pixels better [
32]. Therefore, a new transformer model based on feature enhancement and area correction is proposed to overcome the influence of complex environmental factors and boundary misclassification in cyanobacterial-bloom detection.
In this paper, a multispectral detection model for cyanobacterial blooms based on a transformer network is proposed. The spectral features of the multispectral data of cyanobacterial blooms captured by UAV were extracted using an improved vegetation-index method. To classify the feature boundary, feature-enhancement and region-correction modules were added to the original transformer model. The proposed method not only improved the accuracy of detection of cyanobacterial blooms, but also allowed for assessment of the extent of cyanobacterial-bloom pollution and its proportion out of the total size. The results of this study can provide a reference for the control of cyanobacterial blooms in the fields of ecology and the environment.
5. Conclusions
This work introduced a multispectral detection model for cyanobacterial blooms based on deep learning. Images were preprocessed with adaptive median filtering and light masks. The traditional vegetation-index method was improved to extract the multispectral features of cyanobacterial blooms, and then the transformer neural network was used for the first time to perform pixel-level semantic recognition of cyanobacterial blooms. Finally, the algorithm was applied to multiple rivers to accurately evaluate their pollution area and pollution levels. This method not only greatly reduced the sampling time, but also improved the accuracy and efficiency of the cyanobacterial-bloom detection algorithm, providing the possibility for online monitoring of cyanobacterial blooms. The research results of this paper contribute to the fields of water-quality anomaly detection, remote-sensing technology and deep learning. On the one hand, the improved vegetation index showed a better feature extraction effect than other indices in the dataset of this paper, and may expand the applicability of vegetation indices in the field of low-level multispectral cyanobacterial-bloom monitoring. On the other hand, the transformer neural network was first applied in the detection of cyanobacterial blooms, and showed good results when modifying the corresponding network structure. The work of this paper has certain enlightenment significance for the application of the transformer model in the multispectral detection of cyanobacterial blooms, and provids strong support for the application of neural networks in the field of environmental monitoring.
For future work, research on preprocessing methods can be introduced to eliminate insignificant environmental interference before feature extraction. In addition, higher sampling frequency may reveal the trends of cyanobacterial blooms, and a corresponding early-warning model, with the help of time series analysis, is recommended to develop a method of predicting future growth trends of cyanobacterial blooms; this is significant for early warnings and the rapid treatment of cyanobacterial blooms.