Blue-green algae identification and quantification method and device based on unmanned aerial vehicle remote sensing image and deep learning, and medium

By combining geometric correction and deep learning with GIS vectorization of UAV imagery, the accuracy problem of cyanobacteria identification in UAV remote sensing imagery has been solved, enabling efficient and automated monitoring of cyanobacterial blooms and improving the accuracy of area calculation and the scientific nature of environmental management.

CN121788931APending Publication Date: 2026-04-03TAIHU BASIN HYDROLOGY & WATER RESOURCES MONITORING CENT (TAIHU BASIN WATER ENVIRONMENT MONITORING CENT)
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously solve the problems of geometric correction of UAV remote sensing images and high-precision identification of cyanobacteria areas, resulting in low accuracy of cyanobacteria area measurement and a large amount of human intervention, which makes it difficult to meet the ecological environment management needs of lakes and other water bodies.

Method used

By extracting camera parameters and attitude angle information from UAV images for coarse orthorectification, and combining deep learning models to automatically identify cyanobacterial bloom areas, accurate area calculation is performed using GIS vectorization. This includes geometric projection models of camera parameters and attitude angle information, feature extraction using the ResNet architecture, instance mask generation using an attention-based feature pyramid network and a region proposal network, and finally, area measurement is performed using GIS spatial projection.

Benefits of technology

The entire process of cyanobacteria identification and quantification has been automated, improving monitoring efficiency and accuracy, reducing calculation errors, and ensuring the safety and scientific management of the aquatic ecological environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121788931A_ABST
    Figure CN121788931A_ABST
Patent Text Reader

Abstract

The invention discloses a blue-green algae identification and quantification method and device based on unmanned aerial vehicle remote sensing images and deep learning and a medium, and relates to the technical field of information data processing. Combining meteorological data and water quality monitoring data to construct an adaptive dynamic environment algorithm to extract EXIF metadata including camera parameters and attitude angle information, and establishing a geometric projection model to perform coarse orthographic correction on an original aerial image; the method comprises the following steps: extracting a multi-scale cyanobacterial bloom image feature map by stages based on a ResNet architecture and in combination with a feature pyramid network FPN fused with an attention mechanism, and obtaining an instance mask of cyanobacterial bloom through an anchor-free region proposal network, ROI Align and a head network; based on an improved GIS space projection and deep learning algorithm, carrying out high-precision area measurement and calculation on a binary mask image converted from the instance mask; according to the method, the influence of irrelevant interference on blue-green algae identification can be reduced, and the accuracy and comparability of blue-green algae identification and area calculation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information data processing technology, and in particular relates to a method, device and medium for identifying and quantifying cyanobacteria based on UAV remote sensing images and deep learning. Background Technology

[0002] With the development of UAV (Unmanned Aerial Vehicle) technology, cyanobacteria identification based on UAV imagery has become a monitoring method that combines high resolution and flexibility. UAVs can capture high-resolution images at relatively low altitudes, and combined with deep learning algorithms, they can quickly extract the distribution areas of cyanobacteria. However, in actual aerial photography, UAV cameras are often affected by factors such as flight attitude, wind force, and lake surface reflection, resulting in varying degrees of tilt and distortion in the images. If area calculations are performed directly based on tilted images, it will lead to inconsistent projection ratios and severe geometric distortion, resulting in significant measurement errors.

[0003] Identifying cyanobacterial blooms is inherently complex. In visible light images, cyanobacteria exhibit color characteristics similar to water, duckweed, and shadows. Traditional segmentation algorithms based on thresholds or color spaces (such as RGB, HSV, and NDVI) are highly sensitive to changes in illumination and reflection noise, resulting in poor stability of identification results. In recent years, with the development of artificial intelligence and deep learning technologies, convolutional neural networks (CNNs) and visual transformers (ViTs) have demonstrated superior feature extraction and classification capabilities in semantic segmentation tasks. Deep learning models can automatically learn multi-scale semantic features of images, accurately distinguishing cyanobacterial blooms from complex targets such as water, shadows, shorelines, and floating objects in an end-to-end manner, effectively improving the accuracy and robustness of cyanobacterial identification. Deep learning-based semantic segmentation has gradually become the mainstream method in the field of cyanobacterial identification.

[0004] Current methods for calculating cyanobacteria area are typically based on simple pixel counting, without considering geometric distortion caused by aerial tilt. To eliminate distortion, high-precision orthorectification using digital elevation models (DEMs) or digital surface models (DSMs) is required. However, acquiring DEM / DSM data is costly and the processing is complex. Furthermore, traditional methods mostly remain at the image level and do not incorporate GIS spatial projection systems, which cannot guarantee the geographic accuracy of the area and makes it difficult to overlay and analyze with other geographic elements.

[0005] To address the problems in existing technologies, a technical solution is needed that can simultaneously solve image geometric correction and intelligent identification of cyanobacteria regions. This solution should be designed to develop efficient methods for cyanobacteria identification and quantification, thereby improving the accuracy and efficiency of cyanobacterial bloom monitoring and providing high-precision, automated technical support for the ecological environment management and dynamic monitoring of cyanobacteria in lakes, reservoirs, and other water bodies. Summary of the Invention

[0006] During UAV-based monitoring of cyanobacterial blooms, issues such as image tilt distortion, lighting variations, and water surface reflection interference arise. Despite advancements in UAV remote sensing and deep learning technologies, existing methods struggle to simultaneously achieve both geometric image correction and high-precision identification of cyanobacterial regions, resulting in low area calculation accuracy and significant manual intervention. To overcome this challenge, this invention provides a method for cyanobacterial identification and quantification based on UAV remote sensing imagery and deep learning. This method extracts camera parameters and attitude angle information from UAV images for coarse orthorectification, utilizes a deep learning model to automatically identify cyanobacterial bloom regions, and combines this with GIS vectorization for precise area calculation, effectively improving the accuracy of cyanobacterial identification and the reliability of area calculation. This method automates the entire process from image acquisition to area calculation, enhancing the efficiency and accuracy of cyanobacterial monitoring while reducing manual intervention and calculation errors, which is crucial for ensuring the safety and scientific management of aquatic ecosystems.

[0007] To address the shortcomings of the existing technologies, this invention provides a method, device, and medium for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning. The method includes the following steps: S1, using a UAV equipped with a high-resolution camera to conduct aerial photography of a lake area to acquire high-resolution images containing cyanobacterial blooms, and constructing an adaptive dynamic environment algorithm based on meteorological data and water quality monitoring data to extract EXIF ​​metadata from the images. The EXIF ​​metadata includes camera parameters and attitude angle information, wherein the camera parameters include flight altitude and focal length, and the attitude angle information includes pitch angle, yaw angle, and roll angle.

[0008] S2. Based on the camera parameters and attitude angle information, establish a geometric projection model, perform coarse orthorectification on the original aerial image, and generate an orthophoto with geographic reference.

[0009] S3. Based on the ResNet architecture and utilizing the fusion attention mechanism, the feature pyramid network FPN inputs the orthophoto into the adaptive feature selection module to extract multi-scale cyanobacterial bloom image feature maps in stages.

[0010] S4. Input the extracted cyanobacterial bloom image feature map into the anchorless region proposal network, bilinear interpolation ROIAlign and head network to obtain the instance mask of the cyanobacterial bloom, and convert the instance mask into the corresponding semantic binary mask map.

[0011] S5. Based on the improved GIS spatial projection and combined with deep learning algorithms, the area of ​​the binary mask map is calculated with high precision, and the distribution range and area of ​​the cyanobacterial bloom are displayed through visualization tools.

[0012] An input vector is established based on the aforementioned high-resolution imagery, meteorological data, and water quality monitoring data, and is represented as follows: ,in, For high-resolution images containing features of cyanobacterial blooms, For meteorological data, This is water quality monitoring data.

[0013] Construct an improved neural network model, comprising: an input layer that accepts an input vector X; and at least one hidden layer containing E neurons, wherein each neuron, after the first... Layer weights and the Layer bias After processing, a nonlinear transformation is performed using the activation function σ. Layer output vector Represented as: Output layer, generating dynamic parameters A for cyanobacterial blooms. dynamic Predicted value O , represented as: O =W (L) H (L-1) +b (L) Among them, W (L) b represents the weight matrix connecting the hidden layer and the output layer. (L) H represents the bias term of the output layer. (L-1) Let L represent the vector output by the previous layer, and L represent the number of layers in the neural network. The loss function, which evaluates the difference between the predicted and actual values, is expressed as: .

[0014] in, N This indicates the number of samples representing the dynamic parameters of cyanobacterial blooms. This represents the actual target value of the r-th dynamic parameter sample for cyanobacterial blooms. O (r) This represents the predicted value of the r-th dynamic parameter sample of cyanobacterial bloom, where r is a positive integer greater than or equal to 1 and less than or equal to N.

[0015] The neural network model is trained and its weights are updated using either the Adam adaptive moment estimation algorithm or the RMSprop optimization algorithm. and bias , represented as ,in, Indicates the first Layer weights, Indicates the first Layer bias, ← represents the learning rate, and ← represents the update process. The loss function is represented relative to the first... The gradient of the layer weights, The loss function is represented relative to the first... The gradient of layer bias, It is a positive integer greater than zero and less than L.

[0016] EXIF metadata of high-resolution images containing cyanobacterial blooms is extracted based on a trained neural network model.

[0017] The method further includes image correction based on EXIF ​​metadata extracted from high-resolution images to eliminate image distortion caused by UAV attitude changes. This includes: calculating the field of view angle and scaling ratio of the image based on the flight altitude to ensure that the appearance of cyanobacteria areas in the image is consistent with the actual situation; and using a 3D rotation matrix to transform each coordinate point in the image from the original coordinate system to the corrected coordinate system. The calculation method for image correction using the 3D rotation matrix is ​​expressed as follows: in, It is a rotation matrix. T Indicates the yaw angle. Y Indicates pitch angle, R Indicates the roll angle. Original coordinates The coordinates are corrected; and the image contrast is improved by histogram equalization.

[0018] The method further includes extracting features from the corrected image, including color distribution and texture features, and reconstructing the input vector based on meteorological data and water quality monitoring data. , is represented as: ;in, These are image features that have undergone correction processing. It's meteorological data. It's water quality data.

[0019] Based on the adjusted Retrain the neural network model.

[0020] The specific steps for establishing a geometric projection model based on the camera parameters and attitude angle information to perform coarse orthorectification on the original aerial image are as follows.

[0021] Based on the pinhole imaging model, the projection relationship from pixel coordinates to ground coordinates is established, and the back projection is achieved through the following geometric relationship: .

[0022] in, Here is the attitude angle rotation matrix, and T is the geographic coordinate of the camera center. This is the projection of pixel coordinates onto the camera coordinate system. f Indicates focal length. These are spatial coordinates in the ground coordinate system.

[0023] Using the affine or perspective transformations of the cross-platform computer vision library OpenCV, a geometric transformation from the original image to the ground projection plane is achieved. The corresponding points of the four corner points of the image in the ground coordinate system are selected, and then the mapping matrix of the four sets of points is calculated according to the relationship between the attitude angle and the projection. The entire image is geometrically resampled, and finally an orthorectified approximate image is obtained.

[0024] The orthophoto image is added to the spatial reference set geographic coordinate system using the Geospatial Data Abstraction Library (GDAL), and the affine transformation matrix is ​​calculated based on the latitude and longitude of the shooting center and the ground sampling distance (GSD). It is represented as follows.

[0025] .

[0026] .

[0027] .

[0028] Where GSDx and GSDy represent the geographic distance of a pixel in the x and y directions, H is the flight altitude, and S... x S y Indicates the physical dimensions of the sensor in the X and Y directions, f represents the focal length, and N represents the focal length. x N y This indicates the pixel resolution of the image in the X and Y directions, lon0 represents the longitude of the shooting center, and lat0 represents the latitude of the shooting center.

[0029] Map pixel coordinates to geographic coordinates, and output the GeoTIFF format, which contains complete georeferenced information.

[0030] The feature pyramid network FPN, which is based on the ResNet architecture and utilizes a fusion attention mechanism, inputs the orthophoto into the adaptive feature selection module to extract multi-scale cyanobacterial bloom image feature maps in stages. The specific steps are as follows.

[0031] The coarsely orthorectified cyanobacterial bloom image is input into ResNet to obtain feature maps C1, C2, C3, C4, and C5 at different levels.

[0032] By utilizing the channel attention mechanism, global average pooling is performed on feature maps at different levels to obtain channel-level features and channel weights. Then, the channel weights are multiplied element-wise with the original features to enhance important channels and suppress minor channels, as shown below: .

[0033] Where GAP represents global average pooling, and z represents the channel-level feature vector. W 1 The weight matrix is ​​the linear transformation weight matrix of the first fully connected layer.W 2 Let σ be the weight matrix for the linear transformation of the second fully connected layer, σ be the Sigmoid activation function, δ be the ReLU activation function, and s be the channel weights. For channel element-wise multiplication, X is a set of feature maps C1, C2, C3, C4, and C5 at different levels. This is a feature map enhanced by an attention mechanism.

[0034] Feature maps enhanced by attention mechanisms The input is fed into the Feature Pyramid Network (FPN) for top-down fusion, represented as: ; .

[0035] Among them, Conv 3×3 and Conv 1×1 These represent convolution operations of 3x3 and 1x1, respectively. This represents the feature map enhanced by the attention mechanism in layer 5, where Up is the upsampling operation, resulting in multi-scale fused feature maps F2, F3, F4, and F5; F u F represents the multi-scale fused feature map of the u-th layer. u+1 This represents the multi-scale fused feature map of the (u+1)th layer. This represents the feature map of the u-th layer enhanced by the attention mechanism, where u is the layer index of the feature pyramid.

[0036] The extracted cyanobacterial bloom image feature map is input into an anchorless region proposal network, a bilinear interpolation ROIAlign network, and a head network to obtain an instance mask of the cyanobacterial bloom. The instance mask is then converted into a corresponding semantic binary mask map. This includes: extracting a candidate region set P using anchorless regions, and extracting the number of prediction heads H at each location in the feature map F. prop Parallel prediction of classification vectors, centrality scalars, and bounding box regression vectors, and decoding of the bounding box regression vectors into initial bounding boxes. The candidate region set P is calculated and represented as follows: ; .

[0037] in, For classification vectors, For centrality scalar, N is the bounding box regression vector. p For the final candidate region B p The number, N soft (.) is the Soft-NMS filtering function, where i,j represents each position in the feature map F.

[0038] For each candidate region set P, target region RoI feature extraction and parallel head prediction are performed. Using standard bilinear interpolation RoI Align operation The This indicates that for each B from the feature map F p Extracting feature maps of fixed size F p The extracted feature map F p Simultaneously input into the classification and bounding box regression header H box and mask prediction header H mask In, it is represented as: ; .

[0039] in, For the classification score vector, Represents a K+1 dimensional vector space. For the bounding box regression increment, F represents a 4K-dimensional vector space. p This represents the extracted feature map. For multi-class mask prediction results, express m×m×K A dimensional vector space, where m and K are positive integers greater than zero.

[0040] Using classification scores from parallel prediction results The proposals are screened and categorized, and the regression increments for the corresponding categories are used. To pinpoint the exact location of the bounding box, we obtain the final detection box. Simultaneously, for each detection result, the image channel belonging to its category is selected. ,Will Upsampling to the final detection box The size, and apply a threshold. Binarize it; for all the obtained instance masks M k The execution logic generates the final semantic binary graph S, represented as: .

[0041] ; .

[0042] in, I(.) is an indicator function, M k This is the Kth binary mask obtained after applying a threshold. For logical OR operation, S is the final generated semantic binary graph.

[0043] The specific steps of the area calculation method based on GIS spatial projection for calculating the area of ​​the obtained binary mask map of cyanobacterial blooms are as follows: Align the binary mask map of cyanobacteria with the orthophoto in the same projection coordinate system to ensure that each pixel corresponds to a unique geographical location.

[0044] The continuous cyanobacterial pixel region in the binary mask image is converted into a vector polygon object by a raster vectorization algorithm. Each polygon has spatial coordinates, representing the actual geographical range of a cyanobacterial bloom.

[0045] The converted vector data undergoes topological correction to remove isolated pixels, fill holes, and smooth boundaries, ensuring geometric continuity and measurement stability.

[0046] The vector polygons are projected onto an equal-area projection coordinate system to avoid area distortion caused by latitudinal differences. Geometric calculation functions are then invoked within the GIS environment to automatically calculate the geographic area A of each cyanobacterial polygon. The areas of all cyanobacterial regions are then summed to obtain the total area of ​​the cyanobacterial bloom. , respectively, are represented as follows. . .

[0047] Where, x Let y and y be the set of coordinate points of the polygon. A v For the first v The area of ​​each cyanobacteria vector polygon, where n represents the total number of cyanobacteria vector polygons. v This represents the vector polygon index for cyanobacteria.

[0048] A device for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning includes: at least one processor; and at least one memory including computer program code, wherein the at least one memory and the computer program code are configured together with the at least one processor to enable the device to execute: a method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning.

[0049] A computer-readable storage medium storing a computer program that, when executed by a processor, implements: a method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning.

[0050] Compared with the prior art, the present invention has the following beneficial effects.

[0051] By constructing a neural network model that combines image features, meteorological and water quality data, comprehensive analysis and real-time response are provided, and input parameters are dynamically adjusted. This not only improves the model's accuracy in detecting cyanobacterial blooms, but also enhances the model's adaptability to environmental changes.

[0052] Based on the attitude parameters and intrinsic parameters of UAV imagery, coarse orthorectification is achieved without DEM / DSM by combining OpenCV perspective transformation and GDAL geographic affine matrix correction, which significantly reduces the cost of data acquisition and computation.

[0053] We employ ResNet as the backbone and integrate an attention mechanism into FPN for staged multi-scale feature extraction. This approach retains the advantages of ResNet in terms of representation ability and training stability, while enhancing selective attention to the spatial morphology and spectral texture differences of cyanobacterial blooms through attention enhancement. At the same time, FPN's top-down and lateral fusion mechanism effectively alleviates the feature imbalance problem between small-scale and large-scale targets, improves the perception of cyanobacterial patches and edge details at different scales, and reduces the impact of irrelevant background interference on feature representation.

[0054] Multi-scale features are input into the Region Proposal Network (RPN), ROI Align, and head network to obtain high-quality cyanobacterial bloom instance masks, which are then further converted into semantic binary mask maps, achieving a seamless connection from instance-level detection to pixel-level segmentation. This process combines the advantages of accurate localization and refined contours, and can effectively distinguish adjacent or contiguous cyanobacterial patches.

[0055] Unlike traditional pixel-count-based GSD area estimation methods, GIS vectorization-based calculation converts cyanobacteria binary mask rasters into vector polygons and directly calculates the true geometric area in the projected coordinate system. This significantly reduces boundary jaggedness errors and improves the accuracy and comparability of area calculations. Furthermore, the output cyanobacteria boundary data can be directly used for overlay analysis on GIS platforms, time-series change monitoring, and water quality management systems. Attached Figure Description

[0056] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. In the drawings, several embodiments of this disclosure are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts.

[0057] Figure 1 This is a general flowchart of a specific embodiment of the present invention.

[0058] Figure 2 This is a block diagram illustrating a method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning according to an embodiment of the present invention.

[0059] Figure 3 This is a schematic diagram of the segmentation model structure based on multi-scale attention fusion in a specific embodiment.

[0060] Figures 4-7This is a schematic diagram of an aerial image of a lake area taken by a drone.

[0061] Figure 8 This is a schematic diagram illustrating the cyanobacteria identification status. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0063] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” used in the embodiments of this invention and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise; “multiple” generally includes at least two. It should be understood that although the terms first, second, third, etc., may be used to describe… in the embodiments of this invention, these… should not be limited to these terms. These terms are used only to distinguish… For example, first… can also be referred to as second… without departing from the scope of the embodiments of this invention, and similarly, second… can also be referred to as first… The term “and / or” used herein is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character “ / ” in this document generally indicates that the preceding and following related objects are in an “or” relationship. Depending on the context, the words “if” or “when” as used herein can be interpreted as “when…” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases "if determined" or "if detected (the stated condition or event)" can be interpreted as "when determined" or "in response to determined" or "when detected (the stated condition or event)" or "in response to detected (the stated condition or event)". It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.

[0064] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0065] Figure 1 The overall workflow is presented. Given images of cyanobacterial bloom areas taken by high-resolution cameras mounted on drones, containing EXIF ​​metadata information, it is necessary to eliminate geometric distortions caused by the shooting through a geometric projection model, accurately segment the cyanobacterial bloom areas in the images using deep learning methods, and calculate the area using GIS spatial projection area measurement methods, thereby achieving high-precision identification and quantitative calculation of the area of ​​cyanobacterial bloom areas.

[0066] like Figure 2 As shown, this invention discloses a method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning. The method includes: S1, using a UAV equipped with a high-resolution camera to conduct aerial photography of a lake area to obtain high-resolution images containing cyanobacterial blooms, and constructing an adaptive dynamic environment algorithm to extract EXIF ​​metadata of the images by combining meteorological data and water quality monitoring data. The EXIF ​​metadata includes camera parameters and attitude angle information, wherein the camera parameters include flight altitude and focal length, and the attitude angle information includes pitch angle, yaw angle, and roll angle.

[0067] Using drones equipped with high-resolution cameras to conduct aerial photography of lake areas can efficiently capture clear images, including those of cyanobacterial blooms. These high-resolution images allow for accurate monitoring of the distribution and spread of cyanobacterial blooms, enabling timely detection of water quality problems, such as... Figures 4-7 The image shown is an aerial photograph of a lake area taken by a drone. Furthermore, by combining meteorological and water quality monitoring data, an adaptive dynamic environment algorithm was constructed. This algorithm can analyze and extract EXIF ​​metadata from the images in real time, providing rich environmental information. The acquired camera parameters and attitude angle information provide precise technical support for subsequent data analysis and decision-making, improving the scientific rigor and effectiveness of monitoring, thereby promoting water protection and management.

[0068] Specifically, in one embodiment, a DJI Matrice 300 RTK drone equipped with a Zenmuse H20T gimbal camera (supporting 23x optical zoom) is used as the specific data acquisition platform, supporting 4.5-103.5mm optical zoom, which can meet the requirements of accurate environmental monitoring.

[0069] by Figure 3Taking the input cyanobacteria image as an example, the image data information of the lake area taken by the drone with a high-resolution camera is shown in Table 1 below. The EXIF ​​metadata includes information such as flight altitude 120 m, focal length 24 mm, pitch angle -5°, yaw angle 45°, and roll angle 0°.

[0070] Table 1 shows the image data of a lake area collected by drones, as follows.

[0071]

[0072] Specifically, in one embodiment, the step of constructing an adaptive dynamic environment algorithm by combining meteorological data and water quality monitoring data to extract EXIF ​​metadata from the image includes: establishing an input vector based on the high-resolution image, meteorological data, and water quality monitoring data, represented as: ,in, For high-resolution images containing features of cyanobacterial blooms, For meteorological data, This is water quality monitoring data.

[0073] Construct an improved neural network model, comprising: an input layer that accepts an input vector X; and at least one hidden layer containing E neurons, wherein each neuron, after the first... Layer weights and the Layer bias After processing, a nonlinear transformation is performed using the activation function σ. Layer output vector Represented as: Output layer, generating dynamic parameters A for cyanobacterial blooms. dynamic Predicted value O , represented as: O =W (L) H (L-1) +b (L) Among them, W (L) b represents the weight matrix connecting the hidden layer and the output layer. (L) H represents the bias term of the output layer. (L-1) Let L represent the vector output by the previous layer, and L represent the number of layers in the neural network. The loss function, which evaluates the difference between the predicted and actual values, is expressed as: .

[0074] in, N This indicates the number of samples representing the dynamic parameters of cyanobacterial blooms. This represents the actual target value of the r-th dynamic parameter sample for cyanobacterial blooms. O (r) This represents the predicted value of the r-th dynamic parameter sample of cyanobacterial bloom, where r is a positive integer greater than or equal to 1 and less than or equal to N.

[0075] The neural network model is trained and its weights are updated using either the Adam adaptive moment estimation algorithm or the RMSprop optimization algorithm. and bias , represented as ,in, Indicates the first Layer weights, Indicates the first Layer bias, ← represents the learning rate, and ← represents the update process. The loss function is represented relative to the first... The gradient of the layer weights, The loss function is represented relative to the first... The gradient of layer bias, It is a positive integer greater than zero and less than L.

[0076] EXIF metadata of high-resolution images containing cyanobacterial blooms is extracted based on a trained neural network model.

[0077] By combining meteorological and water quality monitoring data, an adaptive dynamic environment algorithm is constructed. An improved neural network model is used to effectively extract EXIF ​​metadata from high-resolution images. The input vector integrates cyanobacterial bloom characteristics, meteorological conditions, and water quality information, making the analysis more comprehensive and accurate. An optimized neural network is used to improve the model's fitting ability through nonlinear transformation, thereby more accurately predicting the dynamic parameters of cyanobacterial blooms. The model is trained using optimization algorithms such as Adam or RMSprop, which not only improves learning efficiency but also dynamically updates weights and biases, enhancing the model's robustness.

[0078] Specifically, in one embodiment, image correction based on extracting EXIF ​​metadata from high-resolution images to eliminate image distortion caused by UAV attitude changes includes: calculating the field of view angle and scaling ratio of the image according to the flight altitude to ensure that the appearance of the cyanobacteria area in the image is consistent with the actual situation; and using a 3D rotation matrix to transform each coordinate point in the image from the original coordinate system to the corrected coordinate system. The calculation method of the 3D rotation matrix for image correction is expressed as follows. Where R(T,Y,R) is the rotation matrix, T represents the yaw angle, Y represents the pitch angle, and R represents the roll angle. Original coordinates The coordinates are corrected; and the image contrast is improved by histogram equalization.

[0079] Features, including color distribution and texture features, are extracted from the corrected image, and the input vector is reconstructed based on meteorological and water quality monitoring data. , is represented as: .in, These are image features that have undergone correction processing. It's meteorological data. It's water quality data.

[0080] Based on the adjusted Retrain the neural network model.

[0081] By extracting EXIF ​​metadata from high-resolution imagery and performing geometric correction, and calculating the field-of-view angle and zoom ratio based on flight altitude, the representation of cyanobacteria areas in the imagery is ensured to be consistent with the actual situation, thereby improving the reliability and accuracy of the data. A rotation matrix transformation is employed to eliminate distortion caused by changes in UAV attitude, resulting in clearer and more realistic final images. Histogram equalization enhances image contrast, facilitating feature extraction. The extracted and corrected image features are combined with meteorological and water quality data to form a new input vector X', which can be used to retrain the neural network model, further improving the accuracy and analytical capabilities of cyanobacteria monitoring.

[0082] S2. Based on the camera parameters and attitude angle information, establish a geometric projection model, perform coarse orthorectification on the original aerial image, and generate an orthophoto with geographic reference.

[0083] By establishing a geometric projection model based on camera parameters and attitude angle information, coarse orthorectification is performed on the original aerial imagery, achieving the generation of georeferenced orthophotos with significant advantages and benefits. An accurate geometric projection model effectively eliminates image distortion caused by shooting angle and UAV movement, thereby improving the spatial accuracy of the imagery; orthophotos provide accurate geographic location information, making subsequent analysis and measurement more reliable; and georeferenced imagery facilitates integration with data from other geographic information systems, providing a strong data foundation for environmental monitoring, resource management, and decision support.

[0084] Specifically, in one embodiment, the step of establishing a geometric projection model based on the camera parameters and attitude angle information to perform coarse orthorectification on the original aerial image includes: establishing a projection relationship from pixel coordinates to ground coordinates based on the pinhole imaging model, and achieving back projection through the following geometric relationship: .

[0085] in, Let T be the attitude angle rotation matrix, and T be the geographic coordinates of the camera center. p ,y p () represents the projection of pixel coordinates onto the camera coordinate system. f Indicates focal length. These are spatial coordinates in the ground coordinate system.

[0086] Using the affine or perspective transformations of the cross-platform computer vision library OpenCV, a geometric transformation from the original image to the ground projection plane is achieved. The corresponding points of the four corner points of the image in the ground coordinate system are selected, and then the mapping matrix of the four sets of points is calculated according to the relationship between the attitude angle and the projection. The entire image is geometrically resampled, and finally an orthorectified approximate image is obtained.

[0087] The orthophoto image is added to the spatial reference system using the Geospatial Data Abstraction Library (GDAL). The affine transformation matrix GeoTransform is calculated based on the latitude and longitude of the image center and the ground sampling distance GSD, and is expressed as: , . .

[0088] Where GSDx and GSDy represent the geographic distance of a pixel in the x and y directions, H is the flight altitude, and S... x S y Indicates the physical dimensions of the sensor in the X and Y directions, f represents the focal length, and N represents the focal length. x N y This indicates the pixel resolution of the image in the X and Y directions, lon0 represents the longitude of the shooting center, and lat0 represents the latitude of the shooting center.

[0089] Map pixel coordinates to geographic coordinates, and output the GeoTIFF format, which contains complete georeferenced information.

[0090] By establishing a geometric projection model based on camera parameters and attitude angle information, coarse orthorectification is performed on the original aerial imagery. A pinhole imaging model is used to achieve accurate projection and backprojection from pixel coordinates to ground coordinates, ensuring high accuracy of ground feature positions in the imagery. Geometric transformations are performed using OpenCV's affine or perspective transformations, ensuring accurate mapping of the four corner points of the imagery and providing a reliable foundation for geometric resampling of the entire imagery. Spatial reference settings are added using GDAL software, converting the generated orthophoto into GeoTIFF format with complete georeferenced information, facilitating its application in geographic information systems.

[0091] S3. Based on the ResNet architecture and utilizing the fusion attention mechanism, the feature pyramid network FPN inputs the orthophoto into the adaptive feature selection module to extract multi-scale cyanobacterial bloom image feature maps in stages.

[0092] By using a Feature Pyramid Network (FPN) based on the ResNet architecture and incorporating a fusion attention mechanism, orthophotos were input into an adaptive feature selection module, enabling refined feature extraction from multi-scale cyanobacterial bloom images. ResNet's deep residual learning enhances the model's feature extraction capabilities and effectively avoids the gradient vanishing problem; the fusion attention mechanism allows the model to dynamically focus on important features, improving the accuracy of cyanobacterial bloom identification; and FPN's multi-scale feature extraction capabilities provide the model with greater flexibility and accuracy when processing cyanobacterial blooms of different sizes.

[0093] Specifically, in one embodiment, the Feature Pyramid Network (FPN) based on the ResNet architecture and utilizing a fusion attention mechanism inputs the orthophoto image into an adaptive feature selection module to extract multi-scale cyanobacterial bloom image feature maps in stages, including: inputting the coarsely orthorectified cyanobacterial bloom image into ResNet to obtain feature maps C1, C2, C3, C4, and C5 at different levels.

[0094] By utilizing the channel attention mechanism, global average pooling is performed on feature maps at different levels to obtain channel-level features and channel weights. Then, the channel weights are multiplied element-wise with the original features to enhance important channels and suppress minor channels, as shown below: .

[0095] Where GAP represents global average pooling, and z represents the channel-level feature vector. W 1 The weight matrix is ​​the linear transformation weight matrix of the first fully connected layer. W 2 Let σ be the weight matrix for the linear transformation of the second fully connected layer, σ be the Sigmoid activation function, δ be the ReLU activation function, and s be the channel weights. For channel element-wise multiplication, X is a set of feature maps C1, C2, C3, C4, and C5 at different levels. This is a feature map enhanced by an attention mechanism.

[0096] Feature maps enhanced by attention mechanisms The input is fed into the Feature Pyramid Network (FPN) for top-down fusion, represented as: ; .

[0097] Among them, Conv 3×3 and Conv 1×1 These represent convolution operations of 3x3 and 1x1, respectively. This represents the feature map enhanced by the attention mechanism in layer 5, where Up is the upsampling operation, resulting in multi-scale fused feature maps F2, F3, F4, and F5; F uF represents the multi-scale fused feature map of the u-th layer. u+1 This represents the multi-scale fused feature map of the (u+1)th layer. This represents the feature map of the u-th layer enhanced by the attention mechanism, where u is the layer index of the feature pyramid.

[0098] By leveraging ResNet and the Feature Pyramid Network (FPN) with a fusion attention mechanism to extract multi-scale cyanobacterial bloom image feature maps in stages, and inputting the coarsely orthorectified cyanobacterial bloom image into ResNet, rich feature maps can be obtained from different levels, enhancing the model's ability to learn complex image information. The channel attention mechanism, through global average pooling and dynamic adjustment of channel weights, strengthens important features and suppresses secondary features, thereby improving the representation ability of key features. The use of FPN for top-down feature fusion makes multi-scale learning more efficient and takes into account the recognition of cyanobacterial blooms of different sizes.

[0099] S4. Input the extracted cyanobacterial bloom image feature map into the anchorless region proposal network, bilinear interpolation ROIAlign and head network to obtain the instance mask of the cyanobacterial bloom, and convert the instance mask into the corresponding semantic binary mask map.

[0100] By inputting the extracted cyanobacterial bloom image feature maps into the anchorless region proposal network, ROI Align, and head network, accurate detection at the instance level of cyanobacterial blooms is achieved. The anchorless region proposal network can flexibly generate candidate regions, eliminating the dependence on preset anchors and enhancing the model's adaptability in handling diverse cyanobacterial morphologies. The high-precision feature alignment of ROIAlign ensures the accuracy of instance mask generation, which helps to improve the detail of subsequent segmentation results. Converting the instance mask into a semantic binary mask map makes subsequent analysis and processing more intuitive and efficient.

[0101] Specifically, in one embodiment, the extracted cyanobacterial bloom image feature map is input into an anchorless region proposal network, a bilinear interpolation ROI Align network, and a head network to obtain an instance mask of the cyanobacterial bloom. The instance mask is then converted into a corresponding semantic binary mask map, including: extracting a candidate region set P using anchorless regions, including extracting the number of prediction heads H at each location in the feature map F. prop Parallel prediction of classification vectors, centrality scalars, and bounding box regression vectors, and decoding of the bounding box regression vectors into initial bounding boxes. The candidate region set P is calculated and represented as: . .

[0102] in, For classification vectors, For centrality scalar, N is the bounding box regression vector. p For the final candidate region B p The number, N soft (.) is the Soft-NMS filtering function, where i,j represents each position in the feature map F.

[0103] For each candidate region set P, target region RoI feature extraction and parallel head prediction are performed. Using standard bilinear interpolation RoI Align operation The This indicates that for each B from the feature map F p Extracting feature maps of fixed size F p The extracted feature map F p Simultaneously input into the classification and bounding box regression header H box and mask prediction header H mask The specific calculation formula is expressed as follows: ; .

[0104] in, For the classification score vector, express K+1 dimensional vector space, For the bounding box regression increment, express 4K 3D vector space, This represents the extracted feature map. For multi-class mask prediction results, express m×m×K A dimensional vector space, where m and K are positive integers greater than zero.

[0105] Using classification scores from parallel prediction results The proposals are screened and categorized, and the regression increments for the corresponding categories are used. To pinpoint the exact location of the bounding box, we obtain the final detection box. Simultaneously, for each detection result, the image channel belonging to its category is selected. ,Will Upsampling to the final detection box The size, and apply a threshold. Binarize it; for all the obtained instance masks M k The execution logic generates the final semantic binary graph S, represented as: .

[0106] .

[0107] .

[0108] in, I(.) is an indicator function, M k This is the Kth binary mask obtained after applying a threshold. For logical OR operation, S is the final generated semantic binary graph.

[0109] By utilizing an anchorless region proposal network, ROI Align, and a head network, instance masks of cyanobacterial blooms are obtained and converted into corresponding semantic binary mask maps. The anchorless region proposal network flexibly generates candidate regions, which can adapt to the characteristics of different cyanobacterial blooms and enhance the model's ability to recognize diverse morphologies. Through RoI feature extraction and parallel head prediction of candidate regions, this scheme achieves efficient and accurate classification and bounding box regression, ensuring the fineness of the instance mask. The logical generation of the final semantic binary map makes subsequent analysis more intuitive.

[0110] S5. Based on the improved GIS spatial projection and combined with deep learning algorithms, the area of ​​the binary mask map is calculated with high precision, and the distribution range and area of ​​the cyanobacterial bloom are displayed through visualization tools.

[0111] By combining improved GIS spatial projection with deep learning algorithms, high-precision area calculations are performed on binary mask images. The improved GIS projection ensures the spatial accuracy of the calculations, making the distribution range and area data of cyanobacterial blooms more reliable. The application of deep learning algorithms improves the accuracy of area calculations, enables the processing of complex geographic information, and enhances analytical capabilities. Through visualization tools, users can intuitively understand the distribution and impact range of cyanobacterial blooms, providing strong visualization support for water body management and decision-making.

[0112] Specifically, in one embodiment, the area calculation method based on GIS spatial projection calculates the area of ​​the obtained binary mask image of cyanobacterial blooms, including: aligning the binary mask image of cyanobacteria with the orthophoto image in the same projection coordinate system to ensure that each pixel corresponds to a unique geographical location.

[0113] The continuous cyanobacterial pixel region in the binary mask image is converted into a vector polygon object by a raster vectorization algorithm. Each polygon has spatial coordinates, representing the actual geographical range of a cyanobacterial bloom.

[0114] The converted vector data undergoes topological correction to remove isolated pixels, fill holes, and smooth boundaries, ensuring geometric continuity and measurement stability.

[0115] The vector polygons are projected onto an equal-area projection coordinate system to avoid area distortion caused by latitudinal differences. Geometric calculation functions are then invoked within the GIS environment to automatically calculate the geographic area A of each cyanobacterial polygon. The areas of all cyanobacterial regions are then summed to obtain the total area A of the cyanobacterial bloom. total , respectively represented as: .

[0116] .

[0117] Where x and y are the sets of coordinate points of the polygon, A v For the first v The area of ​​each cyanobacteria vector polygon, where n represents the total number of cyanobacteria vector polygons. v This represents the vector polygon index for cyanobacteria.

[0118] like Figure 8 The diagram shows a schematic representation of cyanobacteria identification status. Based on a GIS spatial projection-based area calculation method, the area of ​​the binary mask image of cyanobacterial blooms is accurately calculated. The binary mask image is aligned with the orthophoto image to ensure that each pixel corresponds to a unique geographical location, increasing the accuracy of the spatial data. A raster vectorization algorithm converts continuous cyanobacterial pixel regions into vector polygons with spatial coordinates, accurately representing the actual geographical extent of each cyanobacterial bloom. A topology correction step ensures geometric continuity and stability, eliminating isolated pixels and holes, improving the reliability of the calculation. The use of equal-area projection avoids area distortion caused by latitudinal differences, resulting in more accurate calculation results.

[0119] This invention acquires high-resolution images containing cyanobacterial blooms through aerial photography and constructs an adaptive dynamic environment algorithm based on meteorological and water quality monitoring data to extract EXIF ​​metadata, including camera parameters and attitude angle information. A geometric projection model is then established to perform coarse orthorectification on the original aerial images. Based on the ResNet architecture and incorporating a fusion attention mechanism, a Feature Pyramid Network (FPN) extracts multi-scale cyanobacterial bloom image feature maps in stages. An anchorless region proposal network, ROIAlign, and a head network are used to obtain instance masks of the cyanobacterial blooms. Based on an improved GIS spatial projection and deep learning algorithm, high-precision area calculations are performed on the binary mask map converted from the instance masks. This invention reduces the influence of irrelevant interference, improving the accuracy and comparability of cyanobacterial identification and area calculation.

[0120] The present invention also provides a device for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning, comprising: at least one processor; and at least one memory including computer program code, wherein the at least one memory and the computer program code are configured together with the at least one processor to enable the device to perform a method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning.

[0121] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning.

[0122] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0123] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0124] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0125] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0126] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0127] The preferred embodiments of the present invention have been described above to make the spirit of the present invention clearer and easier to understand, and are not intended to limit the present invention. All modifications, substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope summarized by the appended claims.

Claims

1. A method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning, comprising the following steps: S1. Use a drone equipped with a high-resolution camera to take aerial photos of the lake area and obtain high-resolution images containing cyanobacterial blooms. Combine meteorological data and water quality monitoring data to construct an adaptive dynamic environment algorithm to extract EXIF ​​metadata of the images. The EXIF ​​metadata includes camera parameters and attitude angle information. The camera parameters include flight altitude and focal length, and the attitude angle information includes pitch angle, yaw angle and roll angle. S2. Based on the camera parameters and attitude angle information, establish a geometric projection model, perform coarse orthorectification on the original aerial image, and generate an orthophoto with geographic reference. S3. Based on the ResNet architecture and utilizing the fusion attention mechanism, the feature pyramid network FPN inputs the orthophoto into the adaptive feature selection module to extract multi-scale cyanobacterial bloom image feature maps in stages. S4. Input the extracted cyanobacterial bloom image feature map into the anchorless region proposal network, bilinear interpolation ROI Align and head network to obtain the instance mask of the cyanobacterial bloom, and convert the instance mask into the corresponding semantic binary mask map. S5. Based on the improved GIS spatial projection and combined with deep learning algorithms, the area of ​​the binary mask map is calculated with high precision, and the distribution range and area of ​​the cyanobacterial bloom are displayed through visualization tools.

2. The method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning as described in claim 1, characterized in that, The adaptive dynamic environment algorithm constructed by combining meteorological data and water quality monitoring data to extract EXIF ​​metadata from the image includes: An input vector is established based on the aforementioned high-resolution imagery, meteorological data, and water quality monitoring data, represented as: X=[I image D weather Q water Among them, I image For high-resolution images containing features of cyanobacterial blooms, D weather For meteorological data, Q water For water quality monitoring data; Construct an improved neural network model, comprising: an input layer that accepts an input vector X; and at least one hidden layer containing E neurons, wherein each neuron, after the first... Layer weights and the Layer bias After processing, a nonlinear transformation is performed using the activation function σ. Layer output vector Represented as: Output layer, generating dynamic parameters A for cyanobacterial blooms. dynamic Predicted value O , represented as: O =W (L) H (L-1) +b (L) Among them, W (L) b represents the weight matrix connecting the hidden layer and the output layer. (L) H represents the bias term of the output layer. (L-1) Let L represent the vector output by the previous layer, and L represent the number of layers in the neural network. The loss function, which evaluates the difference between the predicted and actual values, is expressed as: ; in, N This indicates the number of samples representing the dynamic parameters of cyanobacterial blooms. This represents the actual target value of the r-th dynamic parameter sample for cyanobacterial blooms. O (r) This represents the predicted value of the r-th dynamic parameter sample of cyanobacterial bloom, where r is a positive integer greater than or equal to 1 and less than or equal to N; The neural network model is trained and its weights are updated using either the Adam adaptive moment estimation algorithm or the RMSprop optimization algorithm. and bias , represented as ,in, Indicates the first Layer weights, Indicates the first Layer bias, This represents the learning rate, and ← indicates the update process. The loss function is represented relative to the first... The gradient of the layer weights, The loss function is represented relative to the first... The gradient of layer bias, A positive integer greater than zero and less than L; EXIF metadata of high-resolution images containing cyanobacterial blooms is extracted based on a trained neural network model.

3. The method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning as described in claim 2, characterized in that: The method of image correction based on extracting EXIF ​​metadata from high-resolution images to eliminate image distortion caused by UAV attitude changes includes: calculating the field of view angle and scaling ratio of the image based on the flight altitude to ensure that the appearance of cyanobacteria areas in the image is consistent with the actual situation; and using a 3D rotation matrix to transform each coordinate point in the image from the original coordinate system to the corrected coordinate system. The calculation method of the 3D rotation matrix for image correction is expressed as follows: Where R(T,Y,R) is the rotation matrix, T represents the yaw angle, Y represents the pitch angle, and R represents the roll angle. Original coordinates The coordinates are corrected; and the image contrast is improved by histogram equalization.

4. The method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning as described in claim 3, characterized in that: The process involves extracting features from the corrected image, including color distribution and texture features, and reconstructing the input vector based on meteorological data and water quality monitoring data. ; The calculation formula is expressed as follows: ;in, These are image features that have undergone correction processing. It's meteorological data. It is water quality data; Based on the adjusted Retrain the neural network model.

5. The method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning as described in claim 1, characterized in that, Based on the camera parameters and attitude angle information, a geometric projection model is established, and coarse orthorectification is performed on the original aerial image. The specific steps are as follows: Based on the pinhole imaging model, the projection relationship from pixel coordinates to ground coordinates is established, and the back projection is achieved through the following geometric relationship: ;in, Let T be the attitude angle rotation matrix, and T be the geographic coordinates of the camera center. p ,y p () represents the projection of pixel coordinates onto the camera coordinate system. f Indicates focal length. These are spatial coordinates in the ground coordinate system. Using the affine or perspective transformation of the cross-platform computer vision library OpenCV, a geometric transformation from the original image to the ground projection plane is achieved. The corresponding points of the four corner points of the image in the ground coordinate system are selected, and then the mapping matrix of the four sets of points is obtained according to the relationship between the attitude angle and the projection. The entire image is geometrically resampled, and finally an orthorectified approximate image is obtained. The orthophoto image is added to the spatial reference system using the Geospatial Data Abstraction Library (GDAL). The affine transformation matrix GeoTransform is calculated based on the latitude and longitude of the image center and the ground sampling distance GSD, and is expressed as: , ; Where GSDx and GSDy represent the geographic distance of a pixel in the x and y directions, H is the flight altitude, and S is the distance to the target pixel. x S y Indicates the physical dimensions of the sensor in the X and Y directions, f represents the focal length, and N represents the focal length. x N y This indicates the pixel resolution of the image in the X and Y directions, lon0 represents the longitude of the shooting center, and lat0 represents the latitude of the shooting center; Map pixel coordinates to geographic coordinates, and output the GeoTIFF format, which contains complete georeferenced information.

6. The method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning as described in claim 1, characterized in that, The Feature Pyramid Network (FPN), based on the ResNet architecture and utilizing a fusion attention mechanism, inputs the orthophoto into the adaptive feature selection module to extract multi-scale cyanobacterial bloom image feature maps in stages. The specific steps are as follows: The coarsely orthorectified images of cyanobacterial blooms are input into the ResNet residual network to obtain feature maps C1, C2, C3, C4, and C5 at different levels. By utilizing the channel attention mechanism, global average pooling is performed on feature maps at different levels to obtain channel-level features and channel weights. Then, the channel weights are multiplied element-wise with the original features to enhance important channels and suppress minor channels, as shown below: Where GAP is global average pooling, and z is the channel-level feature vector. W 1 The weight matrix is ​​the linear transformation weight matrix of the first fully connected layer. W 2 Let σ be the weight matrix for the linear transformation of the second fully connected layer, σ be the Sigmoid activation function, δ be the ReLU activation function, and s be the channel weights. For channel element-wise multiplication, X is a set of feature maps C1, C2, C3, C4, and C5 at different levels. The feature map is enhanced by the attention mechanism; Feature maps enhanced by attention mechanisms The input is fed into the Feature Pyramid Network (FPN) for top-down fusion, represented as: ; ; Among them, Conv 3×3 and Conv 1×1 These represent convolution operations of 3x3 and 1x1, respectively. This represents the feature map enhanced by the attention mechanism in layer 5, where Up is the upsampling operation, resulting in multi-scale fused feature maps F2, F3, F4, and F5; F u F represents the multi-scale fused feature map of the u-th layer. u+1 This represents the multi-scale fused feature map of the (u+1)th layer. This represents the feature map of the u-th layer enhanced by the attention mechanism, where u is the layer index of the feature pyramid.

7. The method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning as described in claim 1, characterized in that, The process involves inputting the extracted cyanobacterial bloom image feature map into an anchorless region proposal network, bilinear interpolation ROI Align, and a head network to obtain an instance mask of the cyanobacterial bloom, and then converting the instance mask into a corresponding semantic binary mask map. This includes: extracting a candidate region set P using anchorless regions, including extracting the number of prediction heads H at each location in the feature map F. prop Parallel prediction of classification vectors, centrality scalars, and bounding box regression vectors, and decoding of the bounding box regression vectors into initial bounding boxes. The candidate region set P is calculated and represented as: ; ;in, For classification vectors, For centrality scalar, N is the bounding box regression vector. p For the final candidate region B p The number, N soft (.) represents the Soft-NMS filtering function, where i,j represent each position in the feature map F; For each candidate region set P, target region RoI feature extraction and parallel head prediction are performed. Using standard bilinear interpolation RoI Align operation The This indicates that for each B from the feature map F p Extracting feature maps of fixed size F p The extracted feature map F p Simultaneously input into the classification and bounding box regression header H box and mask prediction header H mask In, it is represented as: ; ;in, For the classification score vector, Represents a K+1 dimensional vector space. For the bounding box regression increment, F represents a 4K-dimensional vector space. p This represents the extracted feature map. For multi-class mask prediction results, express m×m×K A three-dimensional vector space, where m and K are positive integers greater than zero; Using classification scores from parallel prediction results The proposals are screened and categorized, and the regression increments for the corresponding categories are used. To pinpoint the exact location of the bounding box, we obtain the final detection box. Simultaneously, for each detection result, the image channel belonging to its category is selected. ,Will Upsampling to the final detection box The size, and apply a threshold. Binarize it; for all the obtained instance masks M k The execution logic generates the final semantic binary graph S, represented as: ; ; ; in, I(.) is an indicator function, M k This is the Kth binary mask obtained after applying a threshold. For logical OR operation, S is the final generated semantic binary graph.

8. The method for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning as described in claim 1, characterized in that, The specific steps of the area calculation method based on GIS spatial projection for calculating the area of ​​the obtained binary mask map of cyanobacterial blooms are as follows: Align the binary mask image of cyanobacteria with the orthophoto image in the same projection coordinate system to ensure that each pixel corresponds to a unique geographical location. The continuous cyanobacterial pixel region in the binary mask image is converted into a vector polygon object by a raster vectorization algorithm. Each polygon has spatial coordinates, representing the actual geographical range of a cyanobacterial bloom. The converted vector data undergoes topological correction to remove isolated pixels, fill holes, and smooth boundaries, ensuring geometric continuity and measurement stability. The vector polygons are projected onto an equal-area projection coordinate system to avoid area distortion caused by latitudinal differences. Geometric calculation functions are then invoked within the GIS environment to automatically calculate the geographic area A of each cyanobacterial polygon. The areas of all cyanobacterial regions are then summed to obtain the total area A of the cyanobacterial bloom. total , respectively represented as: ; Where x and y are the set of coordinate points of the polygon, A v For the first v The area of ​​each cyanobacteria vector polygon, where n represents the total number of cyanobacteria vector polygons. v This represents the vector polygon index for cyanobacteria.

9. A device for identifying and quantifying cyanobacteria based on UAV remote sensing imagery and deep learning, comprising: At least one processor; as well as At least one memory including computer program code, wherein the at least one memory and the computer program code are configured, together with the at least one processor, to cause the apparatus to perform the method of any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the method of any one of claims 1-8.

Citation Information

Cited By

  • Tablet flaw detection and elimination system and method, medium, product and terminal

    CN122098950A