A marine pollution early warning method based on image recognition

By collecting ocean bottom images and using parallel LSTM to enhance feature fusion neural networks, it solves the problem that existing technology cannot analyze the pollution in the ocean and predict future ocean pollution, and achieves accurate analysis and early warning of ocean pollution.

CN118379611BInactive Publication Date: 2024-08-23GUANGDONG OCEAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410790912.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing ocean pollution early warning methods based on image recognition cannot analyze the pollution situation in the ocean, and cannot predict the future pollution situation of the ocean.

Method used

Collect underwater images in the ocean, segment them by color smoothing values ​​of pixels, and obtain seagrass areas, seawater areas, and flocculent areas, calculate ocean pollution values, and use parallel LSTM enhanced feature fusion neural networks to process samples to predict future ocean pollution. value.

Benefits of technology

It realizes the analysis of the current ocean pollution situation and the accurate prediction of future ocean pollution values, provides early warning of ocean pollution, and improves the accuracy of pollution prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118379611B
    Figure CN118379611B
Patent Text Reader

Abstract

The invention discloses an ocean pollution early warning method based on image recognition, and belongs to the technical field of image processing. The invention collects underwater images in the ocean, segments the underwater images according to color smoothing values ​​of pixel points, obtains seagrass areas, seawater areas and flocculent areas, calculates ocean pollution values ​​according to color values ​​of the seagrass areas, color values ​​of the seawater areas and concentration values ​​of the flocculent areas, thereby realizing analysis of current ocean pollution conditions, adopts a parallel LSTM enhanced feature fusion neural network to process samples, realizes prediction of future ocean pollution values ​​by integrating ocean pollution values ​​at various historical moments, seagrass area change rates and flocculent area change rates, adopts a parallel LSTM enhanced feature fusion neural network to extract features of changes at various moments, improves the accuracy of predicting future ocean pollution values, and carries out early warning of ocean pollution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an ocean pollution early warning method based on image recognition. Background Art

[0002] Marine pollution refers to the phenomenon that various harmful substances enter the marine environment through different pathways, causing the balance of the marine ecosystem to be disrupted and biodiversity to be damaged. With the accelerated development of industrialization and urbanization, the problem of marine pollution is becoming increasingly serious, posing a huge threat to the ecological environment and human health.

[0003] In the process of marine pollution, seagrass and flocs are two typical pollution indicators. Seagrass is an important primary producer in the marine ecosystem, which provides energy and oxygen for marine organisms through photosynthesis. However, when the ocean is polluted, the growth and reproduction of seagrass are affected, resulting in a decrease or even disappearance of seagrass populations.

[0004] Flocs refer to the flocculent structure formed by the aggregation of suspended particles in seawater, which is usually composed of microorganisms, organic matter and inorganic salts. In the process of marine pollution, flocs will be seriously affected.

[0005] Existing marine pollution early warning methods based on image recognition mainly use remote sensing technology to obtain image information of the ocean surface, and then process and analyze the images through computer vision and deep learning algorithms to analyze the pollution situation on the ocean surface, but cannot analyze the pollution situation in the ocean, and cannot predict the future pollution situation of the ocean. Summary of the invention

[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides an ocean pollution early warning method based on image recognition, which solves the problem that the prior art cannot analyze the pollution situation in the ocean and cannot predict the future pollution situation in the ocean.

[0007] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a marine pollution early warning method based on image recognition, comprising the following steps:

[0008] S1, collecting underwater images in the ocean, segmenting the underwater images based on the color smoothing values ​​of the pixels to obtain seaweed areas, seawater areas and flocculent areas;

[0009] S2. Calculate the ocean pollution value based on the color value of the seaweed area, the color value of the seawater area and the concentration value of the flocculent area;

[0010] S3, normalizing the ocean pollution value, seagrass area change rate and flocculent area change rate at each moment to obtain a sample;

[0011] S4, using parallel LSTM enhanced feature fusion neural network to process samples and obtain the future pollution value of the ocean;

[0012] S5. Issue an early warning when the future pollution value of the ocean exceeds the pollution threshold.

[0013] The beneficial effects of the present invention are as follows: the present invention collects underwater images in the ocean, segments the underwater images according to the color smoothing values ​​of the pixel points, obtains seagrass areas, seawater areas and flocculent areas, calculates the ocean pollution value according to the color value of the seagrass area, the color value of the seawater area and the concentration value of the flocculent area, thereby realizing the analysis of the current ocean pollution situation, adopts the parallel LSTM enhanced feature fusion neural network to process the samples, realizes the prediction of the ocean pollution value in the future by integrating the ocean pollution value at each moment in history, the change rate of the seagrass area and the change rate of the flocculent area, reflects the change of ocean pollution through the ocean pollution value at each moment, reflects the change of seagrass through the change rate of the seagrass area, reflects the change of floccules through the change rate of the flocculent area, and adopts the parallel LSTM enhanced feature fusion neural network to extract the features of the changes at each moment, improves the accuracy of predicting the future pollution value of the ocean, and provides early warning of ocean pollution.

[0014] Furthermore, the S1 comprises the following sub-steps:

[0015] S11, collecting underwater images in the ocean;

[0016] S12, performing denoising processing on the underwater image to obtain an underwater denoised image;

[0017] S13, identifying the seawater area from the underwater denoised image according to the color smoothing value of the pixel point;

[0018] S14, removing the seawater area from the underwater denoised image to obtain multiple independent closed sub-images;

[0019] S15. Identify each independent closed subgraph to obtain the seagrass area and the flocculent area.

[0020] The beneficial effect of the above-mentioned further scheme is as follows: after collecting underwater images in the ocean, the present invention performs denoising on the underwater images to remove the influence of noise points, and first identifies the seawater area from the underwater denoised image according to the color smoothness of each pixel point, and then eliminates the seawater area from the underwater denoised image, and then segments the remaining area to obtain seaweed area and flocculent area.

[0021] Furthermore, the S13 comprises the following sub-steps:

[0022] S131, calculating the color smoothing value of each pixel in the underwater denoised image;

[0023] S132, selecting pixel points whose color smoothing values ​​are lower than the smoothing threshold as candidate pixel points;

[0024] S133, clustering the candidate pixels according to the color distance of each candidate pixel to obtain multiple classifications;

[0025] S134. The classification containing the most candidate pixels is regarded as the seawater area.

[0026] Furthermore, the formula for calculating the color smoothing value in S131 is:

[0027] ,

[0028] Among them, S is the color smoothing value, R o is the R channel value of the pixel, G o is the G channel value of the pixel, B o is the B channel value of the pixel, R o,i is the i-th R channel value in the pixel neighborhood, G o,i is the i-th G channel value in the pixel neighborhood, B o,i is the i-th B channel value in the neighborhood of the pixel point, | | is the absolute value, N is the number of R channel values, G channel values ​​or B channel values ​​in the neighborhood, and i is a positive integer.

[0029] The beneficial effect of the above-mentioned further scheme is as follows: the present invention first calculates the color smoothing value of each pixel point according to the multiple R channel values, G channel values ​​and B channel values ​​within the neighborhood range of each pixel point. The smaller the color smoothing value, the more uniform the color transition is, while the color changes in the seaweed area and the flocculent area are greater. At the same time, after the candidate pixels are selected, the candidate pixels are clustered according to the color distance of each candidate pixel point, and the largest classification is selected as the seawater area to avoid interference of the smooth areas in some seaweed areas and flocculent areas with the seawater area.

[0030] Furthermore, the S15 comprises the following sub-steps:

[0031] S151, the largest independent closed subgraph is taken as the seagrass area;

[0032] S152 . Select an independent closed subgraph whose area is smaller than an area threshold from the remaining multiple independent closed subgraphs as a flocculent area.

[0033] The beneficial effect of the above further scheme is: in S14, the seawater area is eliminated from the underwater denoised image, so the remaining area to be segmented is composed of multiple independent closed sub-graphs. In the ocean, seagrass is connected to the seabed and occupies a large proportion in the image. The independent closed sub-graph with the largest area is taken as the seagrass area, and then the independent closed sub-graphs with an area less than the area threshold are selected from the remaining multiple independent closed sub-graphs, thereby screening out the flocs distributed in the seawater, and the independent closed sub-graphs with an area greater than the area threshold are discarded to avoid interference from fish.

[0034] Furthermore, the calculation formula for the concentration value of the flocculent area in S2 is:

[0035] ,

[0036] Among them, μ is the concentration value of the flocculent area, E F is the area of ​​the flocculent region, E S is the area of ​​the seawater area;

[0037] The formula for calculating the ocean pollution value in S2 is:

[0038] ,

[0039] Among them, γ is the ocean pollution value, C G is the color value of the seagrass area, is the color standard value of the seagrass area, C S is the color value of the seawater area, is the color standard value of seawater area, is the standard value of flocculent area concentration, α1 is the first weighting coefficient, α2 is the second weighting coefficient, and α3 is the third weighting coefficient.

[0040] The beneficial effect of the above further scheme is: the present invention comprehensively considers the difference between the color value of the seagrass area and the color standard value of the seagrass area, the difference between the color value of the seawater area and the color standard value of the seawater area, and the difference between the concentration value of the flocculent area and the concentration standard value of the flocculent area, and performs weighted processing to obtain the marine pollution value, which reflects whether there are abnormalities in the ocean from three aspects.

[0041] Furthermore, the calculation formula for the seagrass area change rate in S3 is:

[0042] ,

[0043] Among them, V G,t is the seagrass area change rate at time t, E G,t is the seagrass area at time t, E G,t-1 is the area of ​​the seagrass area at time t-1, and T is the length of the interval;

[0044] The calculation formula for the change rate of the flocculent area in S3 is:

[0045] ,

[0046] Among them, V F,t is the change rate of the flocculent area at the tth moment, E F,t is the area of ​​the flocculent region at the tth moment, E F,t-1 is the area of ​​the flocculent zone at the t-1th moment, and t is the number of the moment.

[0047] The beneficial effect of the above further scheme is: the present invention calculates the change rate of the seagrass area and the change rate of the flocculent area. The change rate of the seagrass area reflects whether there is a rapid change in the seagrass area in a short period of time, and the change rate of the flocculent area reflects whether there is a rapid change in the flocculent area in a short period of time. When the seagrass area and the flocculent area change rapidly, it can indicate that the environment in the ocean is changing rapidly.

[0048] Furthermore, the parallel LSTM enhanced feature fusion neural network in S4 includes: a first LSTM extraction unit, a second LSTM extraction unit, a third LSTM extraction unit, a Concat layer and a fully connected layer;

[0049] The input end of the first LSTM extraction unit is used to input the ocean pollution value at each moment;

[0050] The input end of the second LSTM extraction unit is used to input the seagrass area change rate at each moment;

[0051] The input end of the third LSTM extraction unit is used to input the flocculent area change rate at each moment;

[0052] The input end of the Concat layer is connected to the output end of the first LSTM extraction unit, the output end of the second LSTM extraction unit and the output end of the third LSTM extraction unit respectively; the input end of the fully connected layer is connected to the output end of the Concat layer, and its output end serves as the output end of the parallel LSTM enhanced feature fusion neural network.

[0053] The beneficial effect of the above-mentioned further scheme is as follows: the LSTM layer includes multiple cell units. The present invention inputs the ocean pollution value at each moment into the first LSTM extraction unit to capture the correlation of the ocean pollution value at each moment, inputs the seagrass area change rate at each moment into the second LSTM extraction unit to capture the correlation of the seagrass area change rate at each moment, inputs the flocculent area change rate at each moment into the third LSTM extraction unit to capture the correlation of the flocculent area change rate at each moment, and then splices the output features of the three LSTM extraction units through the Concat layer, and uses the fully connected layer to output the future pollution value of the ocean.

[0054] Furthermore, the first LSTM extraction unit, the second LSTM extraction unit and the third LSTM extraction unit each include: an LSTM layer, a significant feature enhancement layer and an average pooling layer;

[0055] The input end of the LSTM layer is used as the input end of the first LSTM extraction unit, the second LSTM extraction unit or the third LSTM extraction unit, and the output end thereof is connected to the input end of the significant feature enhancement layer; the input end of the average pooling layer is connected to the output end of the significant feature enhancement layer, and the output end thereof is used as the output end of the first LSTM extraction unit, the second LSTM extraction unit or the third LSTM extraction unit;

[0056] Each cell unit in the LSTM layer of the first LSTM extraction unit is used to input the ocean pollution value at a moment;

[0057] Each cell unit in the LSTM layer of the second LSTM extraction unit is used to input the change rate of the seagrass area at a moment;

[0058] In the LSTM layer of the third LSTM extraction unit, each cell unit is used to input the flocculent area change rate at a moment.

[0059] Furthermore, the expression of the salient feature enhancement layer is:

[0060] ,

[0061] Among them, Y is the output feature of the salient feature enhancement layer, MaxPool is the maximum pooling operation, σ is the Sigmoid activation function, H is the input feature of the salient feature enhancement layer, is element-wise multiplication.

[0062] The beneficial effect of the above further scheme is as follows: the present invention uses the maximum pooling operation to extract the significant eigenvalues ​​output by the LSTM layer, and then uses the Sigmoid activation function to calculate the weight ratio of the significant eigenvalues ​​to multiply the corresponding significant eigenvalues ​​to achieve adaptive enhancement of the significant eigenvalues, and then uses the average pooling layer to extract the global features of each enhanced significant eigenvalue. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 This is a flow chart of a marine pollution early warning method based on image recognition;

[0064] Figure 2 This is a schematic diagram of the structure of the parallel LSTM enhanced feature fusion neural network;

[0065] Figure 3Schematic diagram of the structures of the first LSTM extraction unit, the second LSTM extraction unit and the third LSTM extraction unit. DETAILED DESCRIPTION

[0066] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0067] like Figure 1 As shown, a marine pollution early warning method based on image recognition includes the following steps:

[0068] S1, collecting underwater images in the ocean, segmenting the underwater images based on the color smoothing values ​​of the pixels to obtain seaweed areas, seawater areas and flocculent areas;

[0069] S2. Calculate the ocean pollution value based on the color value of the seaweed area, the color value of the seawater area and the concentration value of the flocculent area;

[0070] S3, normalizing the ocean pollution value, seagrass area change rate and flocculent area change rate at each moment to obtain a sample;

[0071] S4, using parallel LSTM enhanced feature fusion neural network to process samples and obtain the future pollution value of the ocean;

[0072] S5. Issue an early warning when the future pollution value of the ocean exceeds the pollution threshold.

[0073] Seagrasses are an important component of marine ecosystems. They form vast meadows on the seafloor, providing habitat and food sources for many marine organisms. However, when the ocean is polluted, the growth and reproduction of seagrasses are affected. Pollutants may reduce the photosynthesis efficiency of seagrasses, hinder their growth, or even cause their death. In addition, some pollutants may change the genes of seagrasses, affecting the growth and survival ability of their offspring.

[0074] Healthy seaweed is usually emerald green and lush. When the water is polluted, the seaweed may lack sunlight or nutrients, causing its growth to be stunted and its color may become dull or yellow.

[0075] The color of seawater is an important indicator of the state of the marine environment. Healthy seawater usually appears clear blue or green. When pollution occurs, such as oil spills or industrial wastewater discharges, the color of the seawater may turn black, brown or other abnormal colors.

[0076] The S1 comprises the following sub-steps:

[0077] S11, collecting underwater images in the ocean;

[0078] S12, performing denoising processing on the underwater image to obtain an underwater denoised image;

[0079] S13, identifying the seawater area from the underwater denoised image according to the color smoothing value of the pixel point;

[0080] S14, removing the seawater area from the underwater denoised image to obtain multiple independent closed sub-images;

[0081] S15. Identify each independent closed subgraph to obtain the seagrass area and the flocculent area.

[0082] After collecting underwater images in the ocean, the present invention performs denoising on the underwater images to remove the influence of noise points, and first identifies the seawater area from the underwater denoised images according to the color smoothness of each pixel point, then removes the seawater area from the underwater denoised images, and then segments the remaining areas to obtain seaweed areas and flocculent areas.

[0083] In the present invention, the underwater image captured includes two parts: seaweed and seawater, which are distributed in the seawater in a flocculent state.

[0084] The S13 comprises the following sub-steps:

[0085] S131, calculating the color smoothing value of each pixel in the underwater denoised image;

[0086] S132, selecting pixel points whose color smoothing values ​​are lower than the smoothing threshold as candidate pixel points;

[0087] S133, clustering the candidate pixels according to the color distance of each candidate pixel to obtain multiple classifications;

[0088] S134. The classification containing the most candidate pixels is regarded as the seawater area.

[0089] In this embodiment, the color distance may be calculated by the difference between a pixel value of a candidate pixel and a pixel value of another candidate pixel.

[0090] The formula for calculating the color smoothing value in S131 is:

[0091] ,

[0092] Among them, S is the color smoothing value, R o is the R channel value of the pixel, G o is the G channel value of the pixel, B o is the B channel value of the pixel, Ro,i is the i-th R channel value in the pixel neighborhood, G o,i is the i-th G channel value in the pixel neighborhood, B o,i is the i-th B channel value in the neighborhood of the pixel point, | | is the absolute value, N is the number of R channel values, G channel values ​​or B channel values ​​in the neighborhood, and i is a positive integer.

[0093] The present invention first calculates the color smoothing value of each pixel point according to multiple R channel values, G channel values ​​and B channel values ​​within the neighborhood of each pixel point. The smaller the color smoothing value, the more uniform the color is, while the color changes in the seaweed area and the flocculent area are greater. At the same time, after the candidate pixels are selected, the candidate pixels are clustered according to the color distance of each candidate pixel point, and the largest classification is selected as the seawater area to avoid the interference of the smooth areas in some seaweed areas and flocculent areas on the seawater area.

[0094] In this embodiment, the neighborhood range size is .

[0095] The S15 comprises the following sub-steps:

[0096] S151, the largest independent closed subgraph is taken as the seagrass area;

[0097] S152 . Select an independent closed subgraph whose area is smaller than an area threshold from the remaining multiple independent closed subgraphs as a flocculent area.

[0098] The flocculent region is composed of multiple independent closed subgraphs.

[0099] In S14, the seawater area is removed from the underwater denoised image. Therefore, the remaining area to be segmented is composed of multiple independent closed subgraphs. In the ocean, seagrass is connected to the seabed and occupies a large proportion in the image. The independent closed subgraph with the largest area is taken as the seagrass area, and then the independent closed subgraphs with an area smaller than the area threshold are selected from the remaining multiple independent closed subgraphs, so as to screen out the flocs distributed in the seawater. The independent closed subgraphs with an area larger than the area threshold are discarded to avoid interference from fish.

[0100] The calculation formula for the concentration value of the flocculent area in S2 is:

[0101] ,

[0102] Among them, μ is the concentration value of the flocculent area, E F is the area of ​​the flocculent region, E S is the area of ​​the seawater area;

[0103] The formula for calculating the ocean pollution value in S2 is:

[0104] ,

[0105] Among them, γ is the ocean pollution value, C G is the color value of the seagrass area, is the color standard value of the seagrass area, C S is the color value of the seawater area, is the color standard value of seawater area, is the standard value of flocculent area concentration, α1 is the first weighting coefficient, α2 is the second weighting coefficient, and α3 is the third weighting coefficient.

[0106] In this embodiment, the color standard value of the seaweed area, the color standard value of the seawater area, and the concentration standard value of the flocculent area are set values ​​according to the marine environment or values ​​stored when the ocean is not polluted.

[0107] In this embodiment, the first weighting coefficient, the second weighting coefficient and the third weighting coefficient are weighting values ​​set according to demand or experience.

[0108] The present invention comprehensively considers the difference between the color value of the seagrass area and the color standard value of the seagrass area, the difference between the color value of the seawater area and the color standard value of the seawater area, and the difference between the concentration value of the flocculent area and the concentration standard value of the flocculent area, and performs weighted processing to obtain the marine pollution value, which reflects whether there is abnormality in the ocean from three aspects.

[0109] The calculation formula for the change rate of the seagrass area in S3 is:

[0110] ,

[0111] Among them, V G,t is the seagrass area change rate at time t, E G,t is the seagrass area at time t, E G,t-1 is the area of ​​the seagrass area at time t-1, and T is the length of the interval;

[0112] The calculation formula for the change rate of the flocculent area in S3 is:

[0113] ,

[0114] Among them, V F,t is the change rate of the flocculent area at the tth moment, E F,t is the area of ​​the flocculent region at the tth moment, E F,t-1 is the area of ​​the flocculent zone at the t-1th moment, and t is the number of the moment.

[0115] The present invention calculates the change rate of the seagrass area and the change rate of the flocculent area. The change rate of the seagrass area reflects whether there is a rapid change in the seagrass area in a short period of time, and the change rate of the flocculent area reflects whether there is a rapid change in the flocculent area in a short period of time. When the seagrass area and the flocculent area change rapidly, it can be shown that the environment in the ocean is changing rapidly.

[0116] like Figure 2 As shown, the parallel LSTM enhanced feature fusion neural network in S4 includes: a first LSTM extraction unit, a second LSTM extraction unit, a third LSTM extraction unit, a Concat layer and a fully connected layer;

[0117] The input end of the first LSTM extraction unit is used to input the ocean pollution value at each moment;

[0118] The input end of the second LSTM extraction unit is used to input the seagrass area change rate at each moment;

[0119] The input end of the third LSTM extraction unit is used to input the flocculent area change rate at each moment;

[0120] The input end of the Concat layer is connected to the output end of the first LSTM extraction unit, the output end of the second LSTM extraction unit and the output end of the third LSTM extraction unit respectively; the input end of the fully connected layer is connected to the output end of the Concat layer, and its output end serves as the output end of the parallel LSTM enhanced feature fusion neural network.

[0121] The LSTM layer includes multiple cell units. The present invention inputs the ocean pollution value at each moment into the first LSTM extraction unit to capture the correlation of the ocean pollution value at each moment, inputs the seagrass area change rate at each moment into the second LSTM extraction unit to capture the correlation of the seagrass area change rate at each moment, inputs the flocculent area change rate at each moment into the third LSTM extraction unit to capture the correlation of the flocculent area change rate at each moment, then concatenates the output features of the three LSTM extraction units through the Concat layer, and uses the fully connected layer to output the future ocean pollution value.

[0122] like Figure 3 As shown, the first LSTM extraction unit, the second LSTM extraction unit and the third LSTM extraction unit all include: an LSTM layer, a significant feature enhancement layer and an average pooling layer;

[0123] The input end of the LSTM layer is used as the input end of the first LSTM extraction unit, the second LSTM extraction unit or the third LSTM extraction unit, and the output end thereof is connected to the input end of the significant feature enhancement layer; the input end of the average pooling layer is connected to the output end of the significant feature enhancement layer, and the output end thereof is used as the output end of the first LSTM extraction unit, the second LSTM extraction unit or the third LSTM extraction unit;

[0124] Each cell unit in the LSTM layer of the first LSTM extraction unit is used to input the ocean pollution value at a moment;

[0125] Each cell unit in the LSTM layer of the second LSTM extraction unit is used to input the change rate of the seagrass area at a moment;

[0126] In the LSTM layer of the third LSTM extraction unit, each cell unit is used to input the flocculent area change rate at a moment.

[0127] The expression of the salient feature enhancement layer is:

[0128] ,

[0129] Among them, Y is the output feature of the salient feature enhancement layer, MaxPool is the maximum pooling operation, σ is the Sigmoid activation function, H is the input feature of the salient feature enhancement layer, is element-wise multiplication.

[0130] The present invention adopts the maximum pooling operation to extract the significant eigenvalues ​​output by the LSTM layer, and then uses the Sigmoid activation function to calculate the weight ratio of the significant eigenvalues, and multiplies them with the corresponding significant eigenvalues ​​to realize adaptive enhancement of the significant eigenvalues, and then uses the average pooling layer to extract the global features of each enhanced significant eigenvalue.

[0131] In this embodiment, all thresholds are set based on experience or experiments.

[0132] The present invention collects underwater images in the ocean, segments the underwater images according to the color smoothing values ​​of the pixel points, obtains seagrass areas, seawater areas and flocculent areas, calculates the ocean pollution value according to the color value of the seagrass area, the color value of the seawater area and the concentration value of the flocculent area, thereby realizing the analysis of the current ocean pollution situation, and adopts a parallel LSTM enhanced feature fusion neural network to process the samples, so as to realize the prediction of the future ocean pollution value by integrating the ocean pollution value at various historical moments, the seagrass area change rate and the flocculent area change rate. The present invention reflects the change of ocean pollution through the ocean pollution value at various moments, reflects the change of seagrass through the seagrass area change rate, reflects the change of floccules through the flocculent area change rate, and adopts a parallel LSTM enhanced feature fusion neural network to extract the features of the changes at various moments, improves the accuracy of predicting the future ocean pollution value, and provides early warning of ocean pollution.

[0133] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A marine pollution early warning method based on image recognition, characterized in that: The following steps are involved: S1, collecting underwater images in the ocean, segmenting the underwater images based on the color smoothing values ​​of the pixels to obtain seaweed areas, seawater areas and flocculent areas; S2. Calculate the ocean pollution value based on the color value of the seaweed area, the color value of the seawater area and the concentration value of the flocculent area; S3, normalizing the ocean pollution value, seagrass area change rate and flocculent area change rate at each moment to obtain a sample; S4, using parallel LSTM enhanced feature fusion neural network to process samples and obtain the future pollution value of the ocean; S5. Issue early warning when the ocean pollution value exceeds the pollution threshold; The parallel LSTM enhanced feature fusion neural network in S4 includes: a first LSTM extraction unit, a second LSTM extraction unit, a third LSTM extraction unit, a Concat layer and a fully connected layer; The input end of the first LSTM extraction unit is used to input the ocean pollution value at each moment; The input end of the second LSTM extraction unit is used to input the seagrass area change rate at each moment; The input end of the third LSTM extraction unit is used to input the flocculent area change rate at each moment; The input end of the Concat layer is connected to the output end of the first LSTM extraction unit, the output end of the second LSTM extraction unit, and the output end of the third LSTM extraction unit respectively; the input end of the fully connected layer is connected to the output end of the Concat layer, and its output end serves as the output end of the parallel LSTM enhanced feature fusion neural network; The first LSTM extraction unit, the second LSTM extraction unit and the third LSTM extraction unit each include: an LSTM layer, a significant feature enhancement layer and an average pooling layer; The input end of the LSTM layer is used as the input end of the first LSTM extraction unit, the second LSTM extraction unit or the third LSTM extraction unit, and the output end thereof is connected to the input end of the significant feature enhancement layer; the input end of the average pooling layer is connected to the output end of the significant feature enhancement layer, and the output end thereof is used as the output end of the first LSTM extraction unit, the second LSTM extraction unit or the third LSTM extraction unit; Each cell unit in the LSTM layer of the first LSTM extraction unit is used to input the ocean pollution value at a moment; Each cell unit in the LSTM layer of the second LSTM extraction unit is used to input the change rate of the seagrass area at a moment; In the LSTM layer of the third LSTM extraction unit, each cell unit is used to input the change rate of the flocculent area at a moment; The expression of the salient feature enhancement layer is: , Among them, Y is the output feature of the salient feature enhancement layer, MaxPool is the maximum pooling operation, σ is the Sigmoid activation function, H is the input feature of the salient feature enhancement layer, is element-wise multiplication.

2. The marine pollution early warning method based on image recognition according to claim 1 is characterized in that: The S1 comprises the following sub-steps: S11, collecting underwater images in the ocean; S12, performing denoising processing on the underwater image to obtain an underwater denoised image; S13, identifying the seawater area from the underwater denoised image according to the color smoothing value of the pixel point; S14, removing the seawater area from the underwater denoised image to obtain multiple independent closed sub-images; S15. Identify each independent closed subgraph to obtain the seagrass area and the flocculent area.

3. The marine pollution early warning method based on image recognition according to claim 2 is characterized in that: The S13 comprises the following sub-steps: S131, calculating the color smoothing value of each pixel in the underwater denoised image; S132, selecting pixel points whose color smoothing values ​​are lower than the smoothing threshold as candidate pixel points; S133, clustering the candidate pixels according to the color distance of each candidate pixel to obtain multiple classifications; S134. The classification containing the most candidate pixels is regarded as the seawater area.

4. The marine pollution early warning method based on image recognition according to claim 3 is characterized in that: The formula for calculating the color smoothing value in S131 is: , Among them, S is the color smoothing value, R o is the R channel value of the pixel, G o is the G channel value of the pixel, B o is the B channel value of the pixel, R o,i is the i-th R channel value in the pixel neighborhood, G o,i is the i-th G channel value in the pixel neighborhood, B o,i is the i-th B channel value in the neighborhood of the pixel point, | | is the absolute value, N is the number of R channel values, G channel values ​​or B channel values ​​in the neighborhood, and i is a positive integer.

5. The marine pollution early warning method based on image recognition according to claim 2 is characterized in that: The S15 comprises the following sub-steps: S151, the largest independent closed subgraph is taken as the seagrass area; S152 . Select an independent closed subgraph whose area is smaller than an area threshold from the remaining multiple independent closed subgraphs as a flocculent area.

6. The marine pollution early warning method based on image recognition according to claim 1 is characterized in that: The calculation formula for the concentration value of the flocculent area in S2 is: , Among them, μ is the concentration value of the flocculent area, E F is the area of ​​the flocculent region, E S is the area of ​​the seawater zone; The formula for calculating the ocean pollution value in S2 is: , Among them, γ is the ocean pollution value, C G is the color value of the seagrass area, is the color standard value of the seagrass area, C S is the color value of the seawater area, is the color standard value of seawater area, is the standard value of flocculent area concentration, α1 is the first weighting coefficient, α2 is the second weighting coefficient, and α3 is the third weighting coefficient.

7. The marine pollution early warning method based on image recognition according to claim 1 is characterized in that: The calculation formula for the change rate of the seagrass area in S3 is: , Among them, V G,t is the seagrass area change rate at time t, E G,t is the seagrass area at time t, E G,t-1 is the area of ​​the seagrass area at time t-1, and T is the length of the interval; The calculation formula for the change rate of the flocculent area in S3 is: , Among them, V F,t is the change rate of the flocculent area at the tth moment, E F,t is the area of ​​the flocculent region at the tth moment, E F,t-1 is the area of ​​the flocculent zone at the t-1th moment, and t is the number of the moment.