CN115984269A - Non-invasive local water ecological safety detection method and system - Google Patents

Non-invasive local water ecological safety detection method and system Download PDF

Info

Publication number
CN115984269A
CN115984269A CN202310265357.1A CN202310265357A CN115984269A CN 115984269 A CN115984269 A CN 115984269A CN 202310265357 A CN202310265357 A CN 202310265357A CN 115984269 A CN115984269 A CN 115984269A
Authority
CN
China
Prior art keywords
underwater
biological
organism
probability distribution
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310265357.1A
Other languages
Chinese (zh)
Other versions
CN115984269B (en
Inventor
王陈浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Changli Shangyang Technology Co ltd
Original Assignee
Hunan Changli Shangyang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Changli Shangyang Technology Co ltd filed Critical Hunan Changli Shangyang Technology Co ltd
Priority to CN202310265357.1A priority Critical patent/CN115984269B/en
Publication of CN115984269A publication Critical patent/CN115984269A/en
Application granted granted Critical
Publication of CN115984269B publication Critical patent/CN115984269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/80Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in fisheries management
    • Y02A40/81Aquaculture, e.g. of fish

Landscapes

  • Image Processing (AREA)

Abstract

The invention relates to the technical field of ecological safety detection, and discloses a non-invasive local water ecological safety detection method and system, wherein the method comprises the following steps: inputting underwater biological images acquired by an underwater robot into an underwater biological identification model to obtain an underwater biological identification result, and carrying out number statistics on different types of underwater organisms to obtain real-time probability distribution of the underwater organisms; acquiring underwater organism safety probability distribution under a safe local water ecological environment, and calculating in real time to obtain an underwater organism distribution difference value; if the difference value of the underwater biological distribution is larger than the specified threshold value, the current underwater biological distribution is changed greatly, and the risk of ecological potential safety hazard exists. According to the invention, the real-time probability distribution of underwater organisms is obtained by carrying out underwater organism identification on the underwater image, and the ecological safety is detected by calculating the difference value between the real-time probability distribution of the underwater organisms and the safety probability distribution of the underwater organisms, so that the non-invasive local water ecological safety detection based on the underwater image is realized.

Description

Non-invasive local water ecological safety detection method and system
Technical Field
The invention relates to the technical field of ecological safety detection, in particular to a non-invasive local water ecological safety detection method and system.
Background
With the popularization and enhancement of ecological environmental awareness, more and more people pay attention to the ecological safety of local water. For example, foreign species such as the alligator finless eel and the like generate great threat to the diversity of local aquatic ecological species such as lakes and the like, and the aquatic ecological safety is seriously influenced. The existing method for detecting the water ecological safety mainly adopts modes of pumping out lake water and the like, has the problems of time and labor consumption, strong invasiveness and the like, and seriously influences the living environment of protozoic organisms. Aiming at the problem, the invention provides a non-invasive local water ecological safety detection method and a non-invasive local water ecological safety detection system, which analyze the water ecological safety by intelligently sensing the biological fluctuation condition in the local water ecology to realize non-invasive detection.
Disclosure of Invention
In view of the above, the invention provides a non-invasive local water ecological safety detection method, and aims to 1) construct an underwater biological recognition model by combining a convolution module, a residual error unit and an SE attention module, filter redundant information of an underwater environment by using the SE attention module, enable the model to be more concentrated on underwater biological characteristics, fully fuse shallow layer characteristics and deep layer characteristics of an underwater biological image by using the residual error unit, enhance extraction of the underwater biological characteristics, and introduce parameters into a full connection layer
Figure SMS_1
The output result of the full-connection layer is smoothed, so that the model is effectively not limited to a training set, other test sets have good performance, the dependence of the model on training labels excessively can be effectively reduced after smoothing, and the accuracy of underwater biological category prediction is improved; 2) According to the underwater organism identification result of the underwater organism identification model, counting the number of different types of underwater organisms to obtain the underwater organismsAnd (3) real-time probability distribution, calculating underwater organism distribution difference values based on the underwater organism real-time probability distribution and the underwater organism safety probability distribution, and if the underwater organism distribution difference values are larger than a specified threshold value, indicating that the underwater organism real-time probability distribution and the underwater organism safety probability distribution have larger difference, indicating that the current underwater organism distribution has larger change and has ecological potential safety hazard risk.
In order to achieve the purpose, the invention provides a non-invasive local water ecological safety detection method, which comprises the following steps:
s1: constructing an underwater biological recognition model, wherein the underwater biological recognition model takes an underwater biological image as input and takes an underwater biological recognition result as output;
s2: the underwater robot patrols in local water ecology and collects underwater organism images in real time, the collected underwater organism images are input into an underwater organism identification model to obtain an underwater organism identification result, and the number statistics is carried out on different types of underwater organisms to obtain the real-time probability distribution of the underwater organisms;
s3: acquiring underwater organism safety probability distribution under a safe local water ecological environment, and calculating underwater organism distribution difference values based on the underwater organism real-time probability distribution and the underwater organism safety probability distribution;
s4: if the difference value of the underwater organism distribution is larger than the specified threshold value, the current underwater organism distribution is changed greatly, and the risk of ecological potential safety hazard exists.
As a further improvement of the method of the invention:
optionally, the constructing an underwater biological recognition model in the S1 step includes: constructing an underwater biological identification model, wherein the underwater biological identification model comprises an input layer, a feature extraction layer and an identification result output layer, the input layer is used for receiving an underwater biological image and inputting the underwater biological image into the feature extraction layer, the feature extraction layer consists of 8 convolution residual error units, each convolution residual error unit comprises a convolution module, a residual error unit and an SE attention module, the underwater biological image input into the feature extraction layer sequentially passes through the 8 convolution residual error units to obtain an underwater biological feature map for filtering irrelevant information, and the underwater biological feature map is input into the identification result output layer to obtain a corresponding underwater biological identification result, and the underwater biological identification result is the category of underwater organisms in the underwater biological image;
the underwater biological recognition process based on the underwater biological recognition model comprises the following steps:
the input layer receives the underwater biological image x and transmits the underwater biological image x to the feature extraction layer;
sequentially carrying out feature extraction processing on received contents by 8 convolution residual error units in the feature extraction layer, wherein the content received by the first convolution residual error unit is an underwater biological image x, the contents received by the other convolution residual error units are output results of the previous convolution residual error unit, and the result output by the last convolution residual error unit is an underwater biological feature map corresponding to the underwater biological image x
Figure SMS_2
Said ^ h->
Figure SMS_3
The calculation formula of each convolution residual unit is as follows:
Figure SMS_4
wherein:
Figure SMS_7
indicates the fifth->
Figure SMS_9
The output result of the convolution residual unit is/are->
Figure SMS_11
Represents an underwater biometric image x, < > or >>
Figure SMS_6
Represents the underwater biological characteristic graph corresponding to the underwater biological image x>
Figure SMS_10
;/>
Figure SMS_12
Indicates utilization->
Figure SMS_13
Convolution processing is performed with a convolution kernel of pixel size, greater or lesser than>
Figure SMS_5
Indicates utilization->
Figure SMS_8
Carrying out convolution processing on convolution kernels with the pixel size;
Figure SMS_14
expressing that the convolution processing result is subjected to normalization processing;
Figure SMS_15
representing a ReLU activation function;
in the embodiment of the invention, the convolution module is used for performing convolution processing operation, the residual error unit is used for fusing the convolution processing result with the output result of the previous convolution residual error unit, and the SE attention module is used for performing Squeeze operation of normalization processing and processing activation functions associated with other channels to realize the Excitation operation; the feature extraction layer extracts underwater biological feature map
Figure SMS_17
Inputting the result into an identification result output layer, wherein the identification result output layer has a structure of a full connection layer, and the underwater biological identification result based on the identification result output layer is ^ and/or greater>
Figure SMS_21
Wherein->
Figure SMS_24
Represents the weight matrix in the output layer of the recognition result, based on the evaluation result>
Figure SMS_18
Representing underwater creatures identified in an underwater creature image xClass, wherein>
Figure SMS_19
Is calculated as->
Figure SMS_22
Each number corresponding to an underwater creature, N represents the total number of categories of underwater creatures, and ` H `>
Figure SMS_25
Represents a smaller positive number>
Figure SMS_16
Indicating a rounding process. In an embodiment of the invention, the present solution is based on the incorporation of a parameter +>
Figure SMS_20
The output result of the full connection layer is smoothly processed, so that the model is not limited to a training set any more and is subjected to pair->
Figure SMS_23
After the function is adjusted, the model has good performance on other test sets, the dependence of the model on the number excessively can be effectively reduced after smoothing treatment, and the accuracy of number prediction is improved.
Optionally, the training process of the underwater biological recognition model includes:
constructing underwater biological category collections
Figure SMS_26
Wherein->
Figure SMS_27
Representing the nth underwater creature, setting the number of the nth underwater creature as N, wherein N represents the total number of categories of the underwater creature; in the embodiment of the invention, the underwater organisms comprise various fishes, mallow, jellyfish, coral worm, cuttlefish, snail, octopus, crustacean, dolphin, whale and the like, and the numbers of the underwater organisms belonging to the same genus are similar;
collecting organisms containing different types of underwater organismsThe images form a training set data, a training Loss function Loss is constructed, and parameter optimization is carried out on the underwater biological recognition model based on the constructed training set and the Loss function, wherein parameters to be optimized in the underwater biological recognition model
Figure SMS_28
The method comprises the following steps of (1) including convolution kernel weight parameters and a weight matrix in an identification result output layer; the training Loss function Loss is:
Figure SMS_29
wherein:
Figure SMS_32
represents any image in the training set data, and->
Figure SMS_35
Represents an image pick>
Figure SMS_37
Corresponds to an image &>
Figure SMS_31
The category of aquatic organisms; />
Figure SMS_34
Indicates that the image is to be pick>
Figure SMS_36
Input into based on the parameter->
Figure SMS_38
In the underwater organism recognition model, the underwater organism type output by the model; />
Figure SMS_30
Indicating based on a parameter->
Figure SMS_33
Loss of the underwater biometric model of (a);
solving the training loss function to obtainOptimum parameters
Figure SMS_39
And based on the optimum parameter>
Figure SMS_40
Constructing an underwater biological recognition model, and then based on the optimal parameters>
Figure SMS_41
The underwater biological recognition model is a model obtained by training, and the solving process of the training loss function is as follows: s11: setting the initial value of the iterative solving times t of a training loss function as 1, and randomly generating an initial parameter->
Figure SMS_42
(ii) a S12: calculating a training loss function ^ at the tth iteration>
Figure SMS_43
Gradient (2):
Figure SMS_44
wherein:
Figure SMS_46
represents the loss function ^ at the tth iteration>
Figure SMS_49
A gradient of (a); />
Figure SMS_52
Representing parameters of the underwater biological recognition model at the t-1 th iteration; if/or>
Figure SMS_47
Less than a preset gradient threshold, a parameter is present>
Figure SMS_48
Stabilizes and holds the parameter>
Figure SMS_51
As optimum parameter +>
Figure SMS_53
Terminating the iterative solution process of the training loss function, otherwise turning to the step S13; s13: calculating an exponential moving average exponent for the gradient at the tth iteration->
Figure SMS_45
:/>
Figure SMS_50
Wherein:
Figure SMS_54
indicates the gradient at the tth iteration->
Figure SMS_55
Is based on an exponential moving average of->
Figure SMS_56
;/>
Figure SMS_57
Represents an exponential decay rate, which is set to 0.91; wherein:
Figure SMS_58
an exponential moving average index representing the square of the gradient at the t-th iteration, device for selecting or keeping>
Figure SMS_59
;/>
Figure SMS_60
Represents an exponential decay rate, which is set to 0.99;
s15: updating underwater biological recognition model parameters obtained by the t-th iteration solution
Figure SMS_61
Figure SMS_62
Wherein:
Figure SMS_63
learning rate, which is set to 0.01;
s16: order to
Figure SMS_64
The process returns to step S12.
Optionally, in the S2 step, the underwater robot patrols in the local water ecology and acquires the underwater biological image in real time, including:
setting a cruising route of the underwater robot, wherein the underwater robot patrols in a local water ecology according to the cruising route and shoots underwater images in real time, wherein the shooting time interval of two adjacent underwater images is 0.3 second; judging whether underwater organisms exist in the underwater images by using a motion difference algorithm between the adjacent images, collecting the underwater images with the underwater organisms, and acquiring underwater organism images, wherein the process of judging whether the underwater organisms exist in the underwater images by using the motion difference algorithm between the adjacent images comprises the following steps:
s21: obtaining an underwater background image without underwater creatures, and constructing an underwater background model, wherein the underwater background model represents a set of any m pixel points in the underwater background image, and m is>30, of a nitrogen-containing gas; s22: calculating the pixel value difference value between a pixel point in any underwater image and m pixel points in the underwater background model, if the pixel value difference value between 12 pixel points in the underwater background model and the pixel point in the underwater image is less than a preset threshold value, marking the pixel point as a background pixel point, and the pixel point has probability
Figure SMS_65
Adding the background pixels into an underwater background model, and repeating the current step until all background pixels in all underwater images are marked;
s23: taking any non-background pixel point p in any underwater image shot by an underwater robot as a center, constructing a circular area with the radius of 3, sequentially comparing the pixel value of the p point with the pixel values of 16 pixel points on a selected circular neighborhood, and if the difference value between the pixel value of more than 10 pixel points on the neighborhood and the pixel value of the p point exceeds a set threshold value, marking the p as a characteristic point of the underwater image;
s24: connecting adjacent characteristic points in the underwater images to obtain a closed characteristic region image, and calculating to obtain a characteristic region difference image of the adjacent underwater images, wherein the characteristic region difference image is a difference value of the characteristic region images in the adjacent underwater images, if the characteristic region difference image is smaller than a threshold value, the characteristic region images in the two adjacent underwater images are similar in pixel distribution and have a larger possibility of underwater creatures, and the larger characteristic region image is used as an acquired underwater creature image.
Optionally, the step S2 of inputting the acquired underwater biological image into an underwater biological recognition model to obtain an underwater biological recognition result, and performing number statistics on different types of underwater organisms to obtain real-time probability distribution of the underwater organisms includes:
inputting the collected underwater organism image into an underwater organism identification model to obtain the underwater organism category identified in the underwater organism image, counting the number of underwater organisms of different categories in a time range T to obtain the real-time probability distribution of the underwater organisms
Figure SMS_66
Figure SMS_67
Wherein:
Figure SMS_68
indicates the nth underwater creature->
Figure SMS_69
The probability distribution in the time range T, the probability distribution of N underwater organisms form the real-time probability distribution->
Figure SMS_70
,/>
Figure SMS_71
Represents the total number of underwater organisms identified in the time frame T, based on the comparison of the measured values>
Figure SMS_72
Represents the nth underwater creature recognized within the time frame T>
Figure SMS_73
The number of (2); the time range T represents the time range ^ based on the current time>
Figure SMS_74
Optionally, in the step S3, calculating a difference value between the underwater organism distributions based on the real-time probability distribution of the underwater organism and the safety probability distribution of the underwater organism includes:
obtaining underwater biosafety probability distribution under safe local water ecological environment, wherein the underwater biosafety probability distribution is
Figure SMS_75
,/>
Figure SMS_76
Represents the nth underwater creature recognized within a time range T under a safe local water ecosystem>
Figure SMS_77
In the number of>
Figure SMS_78
Represents the total number of underwater organisms identified in the time range T in the safe local water ecological environment, and/or the number of underwater organisms identified in the safe local water ecological environment>
Figure SMS_79
Representing an nth underwater creature>
Figure SMS_80
Probability distribution in a safe local water ecological environment;
calculating underwater organism distribution difference values based on underwater organism real-time probability distribution and underwater organism safety probability distribution, wherein the calculation formula of the underwater organism distribution difference values is as follows:
Figure SMS_81
;/>
wherein:
Figure SMS_82
representing a real-time probability distribution of an underwater organism->
Figure SMS_83
Probability distribution of safety of underwater living things
Figure SMS_84
The difference in underwater biodistribution. Optionally, in the step S4, if the underwater biodistribution difference is greater than a specified threshold, it indicates that the current underwater biodistribution has changed greatly, including:
if underwater organism distribution difference value
If the probability distribution is larger than a specified threshold value, the real-time probability distribution of the underwater creatures is represented
Figure SMS_85
With underwater biosafety probability distribution>
Figure SMS_86
The large difference indicates that the current underwater biological distribution is changed greatly, the ecological potential safety hazard risk exists, and the alarm processing is carried out. In order to solve the above problems, the present invention provides a non-invasive local water ecology safety detection system, comprising:
the underwater biological recognition module is used for controlling the underwater robot to tour in local water ecology, acquiring underwater biological images in real time and inputting the acquired underwater biological images into the underwater biological recognition model to obtain an underwater biological recognition result;
the underwater organism distribution determining device is used for counting the number of different types of underwater organisms to obtain real-time probability distribution of the underwater organisms;
the ecological safety detection module is used for acquiring underwater biological safety probability distribution under a safe local water ecological environment, calculating underwater biological distribution difference values based on the underwater biological real-time probability distribution and the underwater biological safety probability distribution, and if the underwater biological distribution difference values are larger than a specified threshold value, the current underwater biological distribution is proved to have larger change, and the ecological safety hidden danger risk exists.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the non-invasive local water ecological safety detection method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, which stores at least one instruction, where the at least one instruction is executed by a processor in an electronic device to implement the non-invasive local water ecology safety detection method described above.
Compared with the prior art, the invention provides a non-invasive local water ecological safety detection method, which has the following advantages: firstly, the scheme provides an underwater biological recognition model which comprises an input layer, a feature extraction layer and a recognition result output layer, wherein the input layer is used for receiving an underwater biological image and inputting the underwater biological image into the feature extraction layer, the feature extraction layer consists of 8 convolution residual error units, each convolution residual error unit comprises a convolution module, a residual error unit and an SE attention module, the underwater biological image input into the feature extraction layer sequentially passes through the 8 convolution residual error units to obtain an underwater biological feature map for filtering irrelevant information, and the underwater biological feature map is input into the recognition result output layer to obtain a corresponding underwater biological recognition result, and the underwater biological recognition result is the category of underwater organisms in the underwater biological image; the underwater biological recognition process based on the underwater biological recognition model comprises the following steps: the input layer receives the underwater biological image x and transmits the underwater biological image x to the feature extraction layer; feature(s)Sequentially performing feature extraction processing on received contents by 8 convolution residual error units in the extraction layer, wherein the contents received by the first convolution residual error unit are underwater biological images x, the contents received by the other convolution residual error units are output results of the previous convolution residual error unit, and the result output by the last convolution residual error unit is an underwater biological feature map corresponding to the underwater biological images x
Figure SMS_95
Said ^ h->
Figure SMS_100
The calculation formula of each convolution residual unit is as follows:
Figure SMS_115
wherein: />
Figure SMS_90
Indicates the fifth->
Figure SMS_110
The output result of the convolution residual unit is/are->
Figure SMS_96
Represents an underwater biometric image x, < > or >>
Figure SMS_114
Represents the underwater biological characteristic graph corresponding to the underwater biological image x>
Figure SMS_97
;/>
Figure SMS_108
Indicates utilization->
Figure SMS_92
Convolution processing is performed with a convolution kernel of pixel size, greater or lesser than>
Figure SMS_112
Indicates utilization->
Figure SMS_91
Carrying out convolution processing on convolution kernels with the pixel sizes; />
Figure SMS_109
Expressing that the convolution processing result is subjected to normalization processing; />
Figure SMS_98
Representing a ReLU activation function; the feature extraction layer combines the underwater biological feature map>
Figure SMS_117
Inputting the result into an identification result output layer, wherein the identification result output layer is in a full-connection layer structure, and the underwater biological identification result based on the identification result output layer is
Figure SMS_89
Wherein->
Figure SMS_106
Represents the weight matrix in the output layer of the recognition result, based on the evaluation result>
Figure SMS_99
Represents the underwater biological category identified in the underwater biological image x, wherein &>
Figure SMS_107
Is calculated as->
Figure SMS_87
Each number corresponding to an underwater creature, N represents the total number of categories of underwater creatures, and ` H `>
Figure SMS_103
Indicates a smaller positive number, is present>
Figure SMS_102
Representing a rounding process. According to the scheme, the convolution module, the residual error unit and the SE attention module are combined to construct the underwater biological recognition model, redundant information of an underwater environment is filtered by the SE attention module, the model is more concentrated on underwater biological characteristics, and the residual error unit is fully fusedShallow layer characteristics and deep layer characteristics of the underwater biological image enhance extraction of the underwater biological characteristics, parameters are introduced into the full connection layer to carry out smoothing processing on output results of the full connection layer, the model can be effectively not limited to a training set, good performance can be achieved on other test sets, dependence of the model on training labels excessively can be effectively reduced after smoothing processing, and accuracy of underwater biological category prediction is improved. Therefore, the scheme provides an underwater ecological safety detection method, which comprises the steps of inputting the collected underwater biological image into an underwater biological recognition model to obtain the underwater biological type recognized in the underwater biological image, counting the number of underwater organisms with different types in a time range T to obtain the real-time probability distribution->
Figure SMS_118
:/>
Figure SMS_101
Wherein: />
Figure SMS_113
Representing the nth species of underwater living being
Figure SMS_94
The probability distribution in the time range T, the probability distribution of N underwater organisms form the real-time probability distribution->
Figure SMS_116
,/>
Figure SMS_93
Represents the total number of underwater organisms identified in the time frame T, based on the comparison of the measured values>
Figure SMS_111
Represents the nth underwater creature recognized within the time frame T>
Figure SMS_123
The number of (2); the time range T represents the time range ^ based on the current time>
Figure SMS_125
. Obtaining an underwater biosafety probability distribution under a safe local water ecological environment, wherein the underwater biosafety probability distribution is->
Figure SMS_120
,/>
Figure SMS_126
Represents the nth underwater creature recognized within a time range T under a safe local water ecosystem>
Figure SMS_105
The number of the (c) is,
Figure SMS_121
representing the total number of underwater organisms identified in the time range T under the safe local water ecological environment,
Figure SMS_119
representing an nth underwater creature>
Figure SMS_124
Probability distribution in a safe local water ecological environment; calculating underwater organism distribution difference values based on underwater organism real-time probability distribution and underwater organism safety probability distribution, wherein the calculation formula of the underwater organism distribution difference values is as follows: />
Figure SMS_122
Wherein:
Figure SMS_127
representing a real-time probability distribution for an underwater organism>
Figure SMS_88
Probability distribution of underwater organism safety>
Figure SMS_104
The difference in underwater biodistribution. According to the scheme, different types of underwater organisms are subjected to underwater organism identification according to the underwater organism identification result of the underwater organism identification modelThe method comprises the steps of counting the number of organisms to obtain real-time probability distribution of underwater organisms, calculating difference values of the underwater organism distribution based on the real-time probability distribution of the underwater organisms and the safety probability distribution of the underwater organisms, and if the difference values of the underwater organism distribution are larger than a specified threshold value, indicating that the real-time probability distribution of the underwater organisms and the safety probability distribution of the underwater organisms have larger difference, indicating that the current underwater organism distribution has larger change and has ecological safety hidden danger, realizing non-invasive local water ecological safety detection based on an underwater image, and not needing to add extra ecological safety detection equipment. />
Drawings
Fig. 1 is a schematic flow chart of a non-invasive local water ecological safety detection method according to an embodiment of the present invention;
FIG. 2 is a functional block diagram of a non-invasive local water ecology safety detection system according to an embodiment of the present invention; fig. 3 is a schematic structural diagram of an electronic device for implementing a non-invasive local water ecological safety detection method according to an embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The embodiment of the application provides a non-invasive local water ecological safety detection method. The execution subject of the non-invasive local water ecological safety detection method includes, but is not limited to, at least one of electronic devices such as a server, a terminal and the like that can be configured to execute the method provided by the embodiments of the present application. In other words, the non-invasive local water ecology safety detection method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Example 1
S1: and constructing an underwater biological recognition model, wherein the underwater biological recognition model takes an underwater biological image as input and takes an underwater biological recognition result as output.
The step S1 of constructing an underwater biological recognition model comprises the following steps:
constructing an underwater biological identification model, wherein the underwater biological identification model comprises an input layer, a feature extraction layer and an identification result output layer, the input layer is used for receiving an underwater biological image and inputting the underwater biological image into the feature extraction layer, the feature extraction layer consists of 8 convolution residual error units, each convolution residual error unit comprises a convolution module, a residual error unit and an SE attention module, the underwater biological image input into the feature extraction layer sequentially passes through the 8 convolution residual error units to obtain an underwater biological feature map with irrelevant information filtration, and the underwater biological feature map is input into the identification result output layer to obtain a corresponding underwater biological identification result, and the underwater biological identification result is the category of underwater organisms in the underwater biological image;
the underwater biological recognition process based on the underwater biological recognition model comprises the following steps:
the input layer receives the underwater biological image x and transmits the underwater biological image x to the feature extraction layer;
sequentially carrying out feature extraction processing on received contents by 8 convolution residual error units in the feature extraction layer, wherein the content received by the first convolution residual error unit is an underwater biological image x, the contents received by the other convolution residual error units are output results of the previous convolution residual error unit, and the result output by the last convolution residual error unit is an underwater biological feature map corresponding to the underwater biological image x
Figure SMS_128
Said ^ h->
Figure SMS_129
The calculation formula of each convolution residual unit is as follows:
Figure SMS_130
wherein:
Figure SMS_131
indicates the fifth->
Figure SMS_132
The output result of the convolution residual unit is/are->
Figure SMS_133
Represents an underwater biometric image x, < > or >>
Figure SMS_134
Represents the underwater biological characteristic graph corresponding to the underwater biological image x>
Figure SMS_135
Figure SMS_136
Indicates utilization->
Figure SMS_137
Convolution processing is performed with a convolution kernel of pixel size, greater or lesser than>
Figure SMS_138
Representation utilization
Figure SMS_139
Carrying out convolution processing on convolution kernels with the pixel size; />
Figure SMS_140
Expressing that the convolution processing result is subjected to normalization processing;
Figure SMS_141
representing a ReLU activation function;
in the embodiment of the invention, the convolution module is used for performing convolution processing operation, the residual error unit is used for fusing the convolution processing result with the output result of the previous convolution residual error unit, and the SE attention module is used for performing Squeeze operation of normalization processing and processing the activation functions associated with other channels to realize actual convolution processingAn existing exception operation; the feature extraction layer extracts underwater biological feature map
Figure SMS_144
Inputting the result into an identification result output layer, wherein the identification result output layer has a structure of a full connection layer, and the underwater biological identification result based on the identification result output layer is ^ and/or greater>
Figure SMS_145
In which>
Figure SMS_148
Represents the weight matrix in the output layer of the recognition result, based on the evaluation result>
Figure SMS_143
Represents the underwater biological category identified in the underwater biological image x, wherein &>
Figure SMS_146
Is calculated as->
Figure SMS_147
Each number corresponding to an underwater creature, N represents the total number of categories of underwater creatures, and ` H `>
Figure SMS_149
Indicates a smaller positive number, is present>
Figure SMS_142
Indicating a rounding process. The training process of the underwater biological recognition model comprises the following steps:
constructing a set of underwater biological categories
Figure SMS_150
Wherein->
Figure SMS_151
Representing the nth underwater creature, setting the number of the nth underwater creature as N, wherein N represents the total number of the categories of the underwater creatures; in the embodiment of the invention, the underwater organisms comprise various fishes, mallow, jellyfish, coral worm, cuttlefish, snail and chapletFish, crustaceans, dolphins, whales, etc., and are similar to the underwater organisms belonging to a genus in number;
acquiring images containing different types of underwater organisms to form training set data, constructing a training Loss function Loss, and performing parameter optimization on an underwater organism recognition model based on the constructed training set and Loss function, wherein parameters to be optimized in the underwater organism recognition model
Figure SMS_152
The method comprises the following steps of (1) including convolution kernel weight parameters and a weight matrix in an identification result output layer;
the training Loss function Loss is:
Figure SMS_153
wherein:
Figure SMS_154
represents any image in the training set data, and->
Figure SMS_155
Represents an image pick>
Figure SMS_156
Corresponds to an image &>
Figure SMS_157
The category of the aquatic organisms;
Figure SMS_158
representing an image +>
Figure SMS_159
Input into based on the parameter->
Figure SMS_160
In the underwater organism recognition model, the underwater organism type output by the model;
Figure SMS_163
the representation is based onParameter->
Figure SMS_165
Loss of the underwater biometric model; solving a training loss function to obtain an optimal parameter->
Figure SMS_167
And based on the optimum parameter->
Figure SMS_162
Constructing an underwater biological recognition model, and then based on the optimal parameters>
Figure SMS_164
The underwater biological recognition model is a model obtained by training, and the solving process of the training loss function is as follows: s11: setting the initial value of the iterative solving times t of the training loss function as 1, and randomly generating an initial parameter ^ on the underwater biological recognition model>
Figure SMS_166
(ii) a S12: calculating a training loss function ^ at the tth iteration>
Figure SMS_168
Gradient (2): />
Figure SMS_161
Wherein:
Figure SMS_169
represents the loss function ^ at the tth iteration>
Figure SMS_170
A gradient of (a); />
Figure SMS_171
Representing parameters of the underwater biological recognition model at the t-1 iteration; if/or>
Figure SMS_172
Less than a preset gradient threshold, a parameter is present>
Figure SMS_173
Stabilizes and holds the parameter>
Figure SMS_174
As optimum parameter->
Figure SMS_175
Terminating the iterative solution process of the training loss function, otherwise turning to the step S13;
s13: calculating the index moving average index of the gradient at the t-th iteration
Figure SMS_176
:/>
Figure SMS_177
Wherein:
Figure SMS_178
represents the gradient at the t-th iteration +>
Figure SMS_179
Is based on an exponential moving average of->
Figure SMS_180
;/>
Figure SMS_181
Represents an exponential decay rate, which is set to 0.91;
s14: calculating the exponential moving average index of the gradient square at the t-th iteration
Figure SMS_182
Figure SMS_183
;/>
Wherein:
Figure SMS_184
an exponential moving average index representing the square of the gradient at the t-th iteration, device for selecting or keeping>
Figure SMS_185
Figure SMS_186
Represents an exponential decay rate, which is set to 0.99;
s15: updating the parameters of the underwater biological recognition model obtained by the t-th iteration solution
Figure SMS_187
Figure SMS_188
Wherein:
Figure SMS_189
to learn rate, set it to 0.01; s16: make->
Figure SMS_190
The process returns to step S12. S2: the underwater robot patrols in local water states, collects underwater organism images in real time, inputs the collected underwater organism images into an underwater organism identification model to obtain underwater organism identification results, and performs number statistics on different types of underwater organisms to obtain underwater organism real-time probability distribution.
In the S2 step, the underwater robot patrols in the local water ecology and collects underwater biological images in real time, and the method comprises the following steps:
setting a cruising route of the underwater robot, wherein the underwater robot patrols in a local water ecology according to the cruising route and shoots underwater images in real time, wherein the shooting time interval of two adjacent underwater images is 0.3 second; judging whether underwater organisms exist in the underwater images by using a motion difference algorithm between the adjacent images, collecting the underwater images with the underwater organisms, and acquiring underwater organism images, wherein the process of judging whether the underwater organisms exist in the underwater images by using the motion difference algorithm between the adjacent images comprises the following steps:
s21: acquiring an underwater background image without underwater creatures, and constructing an underwater background model, wherein the underwater background model represents a set of any m pixel points in the underwater background image, and m is greater than 30;
s22: calculating the pixel value difference value between a pixel point in any underwater image and m pixel points in the underwater background model, if the pixel value difference value between 12 pixel points in the underwater background model and the pixel point in the underwater image is less than a preset threshold value, marking the pixel point as a background pixel point, and the pixel point has probability
Figure SMS_191
Adding the background pixels into an underwater background model, and repeating the current step until all background pixels in all underwater images are marked; s23: taking any non-background pixel point p in any underwater image shot by an underwater robot as a center, constructing a circular area with the radius of 3, sequentially comparing the pixel value of the p point with the pixel values of 16 pixel points on a selected circular neighborhood, and marking the p as a characteristic point of the underwater image if the difference value between the pixel value of more than 10 pixel points on the neighborhood and the pixel value of the p point exceeds a set threshold value;
s23: taking any non-background pixel point p in any underwater image shot by an underwater robot as a center, constructing a circular area with the radius of 3, sequentially comparing the pixel value of the p point with the pixel values of 16 pixel points on a selected circular neighborhood, and if the difference value between the pixel value of more than 10 pixel points on the neighborhood and the pixel value of the p point exceeds a set threshold value, marking the p as a characteristic point of the underwater image; s24: connecting adjacent characteristic points in the underwater images to obtain a closed characteristic region image, and calculating to obtain a characteristic region difference image of the adjacent underwater images, wherein the characteristic region difference image is a difference value of the characteristic region images in the adjacent underwater images, if the characteristic region difference image is smaller than a threshold value, the characteristic region images in the two adjacent underwater images are similar in pixel distribution and have a larger possibility of underwater creatures, and the larger characteristic region image is used as an acquired underwater creature image.
In the step S2, the collected underwater organism image is input into an underwater organism recognition model to obtain an underwater organism recognition result, and the number statistics is carried out on different types of underwater organisms to obtain the real-time probability distribution of the underwater organisms, wherein the method comprises the following steps:
inputting the collected underwater organism image into an underwater organism identification model to obtain the underwater organism category identified in the underwater organism image, counting the number of underwater organisms of different categories in a time range T to obtain the real-time probability distribution of the underwater organisms
Figure SMS_192
:/>
Figure SMS_193
Wherein:
Figure SMS_194
indicates the nth underwater creature->
Figure SMS_195
The probability distribution in the time range T, the probability distribution of N underwater organisms form the real-time probability distribution->
Figure SMS_196
,/>
Figure SMS_197
Represents the total number of underwater organisms identified in the time frame T, based on the comparison of the measured values>
Figure SMS_198
Represents the nth underwater creature recognized within the time frame T>
Figure SMS_199
The number of (2); the time range T represents the time range ^ based on the current time>
Figure SMS_200
.3: and acquiring underwater organism safety probability distribution under the safe local water ecological environment, and calculating underwater organism distribution difference values based on the underwater organism real-time probability distribution and the underwater organism safety probability distribution.
In the step S3, the difference value of the underwater organism distribution is calculated based on the real-time probability distribution of the underwater organisms and the safety probability distribution of the underwater organisms, and the method includes:
obtaining underwater biosafety probability distribution under safe local water ecological environment, wherein the underwater biosafety probability distribution is
Figure SMS_201
,/>
Figure SMS_202
Represents the nth underwater creature recognized within a time range T under a safe local water ecosystem>
Figure SMS_203
Is greater than or equal to>
Figure SMS_204
Representing the total number of underwater organisms identified in the time range T under the safe local water ecological environment,
Figure SMS_205
representing an nth underwater creature>
Figure SMS_206
Probability distribution in a safe local water ecological environment;
calculating underwater organism distribution difference values based on underwater organism real-time probability distribution and underwater organism safety probability distribution, wherein the calculation formula of the underwater organism distribution difference values is as follows:
Figure SMS_207
wherein:
Figure SMS_208
representing a real-time probability distribution of an underwater organism->
Figure SMS_209
Probability distribution of safety of underwater living things
Figure SMS_210
Poor distribution of underwater organismsAnd (4) carrying out anomaly value.
S4: if the difference value of the underwater biological distribution is larger than the specified threshold value, the current underwater biological distribution is changed greatly, and the risk of ecological potential safety hazard exists. In the step S4, if the difference value of the underwater biodistribution is greater than the specified threshold, it indicates that the current underwater biodistribution is changed greatly, including:
if underwater organism distribution difference value
Figure SMS_211
Greater than a specified threshold, a real-time probability distribution of the underwater organism is indicated>
Figure SMS_212
With underwater biosafety probability distribution>
Figure SMS_213
The large difference indicates that the current underwater biological distribution is changed greatly, the ecological potential safety hazard risk exists, and the alarm processing is carried out.
Example 2
Fig. 2 is a functional block diagram of a non-invasive local water ecological safety detection system according to an embodiment of the present invention, which can implement the non-invasive local water ecological safety detection method in embodiment 1.
The non-invasive local water ecology safety detection system 100 of the present invention may be installed in an electronic device. According to the realized functions, the non-invasive local water ecological safety detection system can comprise an underwater organism identification module 101, an underwater organism distribution determination device 102 and an ecological safety detection module 103. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform a fixed function, and are stored in a memory of the electronic device.
The underwater biological recognition module 101 is used for controlling the underwater robot to tour in local water ecology, collecting underwater biological images in real time and inputting the collected underwater biological images into the underwater biological recognition model to obtain an underwater biological recognition result;
the underwater organism distribution determining device 102 is used for counting the number of different types of underwater organisms to obtain real-time probability distribution of the underwater organisms;
the ecological safety detection module 103 is configured to obtain underwater biological safety probability distribution in a safe local water ecological environment, calculate an underwater biological distribution difference value based on the underwater biological real-time probability distribution and the underwater biological safety probability distribution, and if the underwater biological distribution difference value is greater than a specified threshold, indicate that the current underwater biological distribution has a large change, and an ecological safety hidden danger risk exists.
In detail, in the embodiment of the present invention, when the modules in the non-invasive local water ecological safety detecting system 100 are used, the same technical means as the non-invasive local water ecological safety detecting method described in fig. 1 above are adopted, and the same technical effects can be produced, which are not described again here.
Example 3
Fig. 3 is a schematic structural diagram of an electronic device for implementing a non-invasive local water ecological safety detection method according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication interface 13 and a bus, and may further comprise a computer program, such as a program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the program 12, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (programs 12 for implementing ecological security detection, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication interface 13 may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), and is generally used to establish a communication connection between the electronic device 1 and other electronic devices and to implement connection communication between internal components of the electronic devices.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, apparatus, article, or method that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A non-invasive local water ecological safety detection method is characterized by comprising the following steps:
s1: constructing an underwater biological recognition model, wherein the underwater biological recognition model takes an underwater biological image as input and takes an underwater biological recognition result as output;
s2: the underwater robot patrols in local water ecology and collects underwater organism images in real time, the collected underwater organism images are input into an underwater organism identification model to obtain an underwater organism identification result, and the number statistics is carried out on different types of underwater organisms to obtain the real-time probability distribution of the underwater organisms;
s3: acquiring underwater organism safety probability distribution under a safe local water ecological environment, and calculating underwater organism distribution difference values based on the underwater organism real-time probability distribution and the underwater organism safety probability distribution;
s4: if the difference value of the underwater biological distribution is larger than the specified threshold value, the current underwater biological distribution is changed greatly, and the risk of ecological potential safety hazard exists.
2. The non-invasive local water ecology safety detection method according to claim 1, wherein the constructing of the underwater biological recognition model in the step S1 comprises:
constructing an underwater biological identification model, wherein the underwater biological identification model comprises an input layer, a feature extraction layer and an identification result output layer, the input layer is used for receiving an underwater biological image and inputting the underwater biological image into the feature extraction layer, the feature extraction layer consists of 8 convolution residual error units, each convolution residual error unit comprises a convolution module, a residual error unit and an SE attention module, the underwater biological image input into the feature extraction layer sequentially passes through the 8 convolution residual error units to obtain an underwater biological feature map with irrelevant information filtration, and the underwater biological feature map is input into the identification result output layer to obtain a corresponding underwater biological identification result, and the underwater biological identification result is the category of underwater organisms in the underwater biological image;
the underwater biological recognition process based on the underwater biological recognition model comprises the following steps:
the input layer receives the underwater biological image x and transmits the underwater biological image x to the feature extraction layer; sequentially carrying out feature extraction processing on received contents by 8 convolution residual error units in the feature extraction layer, wherein the content received by the first convolution residual error unit is an underwater biological image x, the contents received by the other convolution residual error units are output results of the previous convolution residual error unit, and the result output by the last convolution residual error unit is an underwater biological feature map corresponding to the underwater biological image x
Figure QLYQS_1
In said first or second direction>
Figure QLYQS_2
The calculation formula of each convolution residual unit is as follows:
Figure QLYQS_3
wherein:
Figure QLYQS_4
represents a fifth or fifth party>
Figure QLYQS_5
Output result of convolution residual unit, based on the convolution value of the convolution value>
Figure QLYQS_6
Represents an underwater biometric image x, < > or >>
Figure QLYQS_7
Represents the underwater biological characteristic graph corresponding to the underwater biological image x>
Figure QLYQS_8
Figure QLYQS_9
Represents utilization>
Figure QLYQS_10
Convolution processing is performed with a convolution kernel of pixel size, greater or lesser than>
Figure QLYQS_11
Indicates utilization->
Figure QLYQS_12
Carrying out convolution processing on convolution kernels with the pixel sizes;
Figure QLYQS_13
expressing that the convolution processing result is subjected to normalization processing;
Figure QLYQS_14
representing a ReLU activation function;
the feature extraction layer extracts underwater biological feature map
Figure QLYQS_17
Inputting the result into an identification result output layer, wherein the identification result output layer has a structure of a full connection layer, and the underwater biological identification result based on the identification result output layer is ^ and/or greater>
Figure QLYQS_19
Wherein->
Figure QLYQS_21
Represents a weight matrix in the output layer of the recognition result, based on the weight matrix in the recognition result>
Figure QLYQS_16
Represents the underwater biological category identified in the underwater biological image x, wherein &>
Figure QLYQS_18
Is calculated as->
Figure QLYQS_20
Each number corresponding to an underwater creature, N represents the total number of categories of underwater creatures, and ` H `>
Figure QLYQS_22
Indicates a smaller positive number, is present>
Figure QLYQS_15
Indicating a rounding process. />
3. The method for detecting the safety of the local water ecology in the non-invasive manner as claimed in claim 2, wherein the training process of the underwater biological recognition model comprises:
constructing a set of underwater biological categories
Figure QLYQS_23
Wherein->
Figure QLYQS_24
Representing the nth underwater creature, setting the number of the nth underwater creature as N, wherein N represents the total number of categories of the underwater creature; collecting images containing different types of underwater organisms to form a training set data, constructing a training Loss function Loss, and performing parameter optimization on an underwater organism recognition model based on the constructed training set and the Loss function, wherein parameters to be optimized in the underwater organism recognition model are->
Figure QLYQS_25
The method comprises the following steps of (1) including convolution kernel weight parameters and a weight matrix in an identification result output layer;
the training Loss function Loss is as follows:
Figure QLYQS_26
wherein:
Figure QLYQS_28
represents any image in the training set data, and->
Figure QLYQS_31
Represents an image pick>
Figure QLYQS_34
Corresponds to the image->
Figure QLYQS_30
The category of the aquatic organisms; />
Figure QLYQS_32
Indicates that the image is to be pick>
Figure QLYQS_35
Input into a device based on a parameter>
Figure QLYQS_37
In the underwater organism recognition model, the underwater organism type output by the model;
Figure QLYQS_27
indicating based on a parameter->
Figure QLYQS_33
Loss of the underwater biometric model; solving the training loss function to obtain the optimal parameter->
Figure QLYQS_36
And based on the optimum parameter>
Figure QLYQS_38
If the underwater biological recognition model is constructed, the optimal parameter is based on>
Figure QLYQS_29
The underwater biological recognition model is a model obtained by training, and the solving process of the training loss function is as follows:
s11: setting the initial value of the iterative solving times t of the training loss function as 1, and randomly generating the initial parameters of the underwater biological recognition model
Figure QLYQS_39
Wherein:
Figure QLYQS_40
representing a loss function on the t-th iteration>
Figure QLYQS_41
A gradient of (a); />
Figure QLYQS_42
Representing parameters of the underwater biological recognition model at the t-1 th iteration; if/or>
Figure QLYQS_43
Less than a preset gradient threshold, a parameter is present>
Figure QLYQS_44
Stabilize and combine the parameter>
Figure QLYQS_45
As optimum parameter->
Figure QLYQS_46
Terminating the iterative solution process of the training loss function, otherwise turning to the step S13;
s13: calculating the index of the gradient at the t-th iteration
Figure QLYQS_47
:/>
Figure QLYQS_48
Wherein:
Figure QLYQS_49
represents a gradient at the tth iteration, <' >>
Figure QLYQS_50
Is based on an exponential moving average index, <' > based on>
Figure QLYQS_51
;/>
Figure QLYQS_52
Represents an exponential decay rate, which is set to 0.91;
s14: calculating the exponential moving average index of the gradient square at the t-th iteration
Figure QLYQS_53
Figure QLYQS_54
Wherein:
Figure QLYQS_55
an exponential moving average index representing the square of the gradient at the t-th iteration, device for selecting or keeping>
Figure QLYQS_56
Figure QLYQS_57
Represents an exponential decay rate, which is set to 0.99;
s15: updating the parameters of the underwater biological recognition model obtained by the t-th iteration solution
Figure QLYQS_58
Figure QLYQS_59
Wherein:
Figure QLYQS_60
to learn rate, set it to 0.01;
s16: order to
Figure QLYQS_61
The process returns to step S12.
4. The non-invasive local water ecology safety detection method according to claim 1, wherein the step S2 of patrolling the local water ecology by the underwater robot and acquiring the underwater organism image in real time comprises:
setting a cruising route of the underwater robot, wherein the underwater robot patrols in a local water ecology according to the cruising route and shoots underwater images in real time, wherein the shooting time interval of two adjacent underwater images is 0.3 second; judging whether underwater organisms exist in the underwater images by using a motion difference algorithm between the adjacent images, collecting the underwater images with the underwater organisms, and acquiring underwater organism images, wherein the process of judging whether the underwater organisms exist in the underwater images by using the motion difference algorithm between the adjacent images comprises the following steps:
s21: acquiring an underwater background image without underwater creatures, and constructing an underwater background model, wherein the underwater background model represents a set of any m pixel points in the underwater background image, and m is greater than 30;
s22: calculating the pixel value difference value between a pixel point in any underwater image and m pixel points in the underwater background model, if the pixel value difference value between 12 pixel points in the underwater background model and the pixel point in the underwater image is less than a preset threshold value, marking the pixel point as a background pixel point, and the pixel point has probability
Figure QLYQS_62
Adding the background pixels into an underwater background model, and repeating the current step until all background pixels in all underwater images are marked;
s23: taking any non-background pixel point p in any underwater image shot by an underwater robot as a center, constructing a circular area with the radius of 3, sequentially comparing the pixel value of the p point with the pixel values of 16 pixel points on a selected circular neighborhood, and if the difference value between the pixel value of more than 10 pixel points on the neighborhood and the pixel value of the p point exceeds a set threshold value, marking the p as a characteristic point of the underwater image;
s24: connecting adjacent characteristic points in the underwater images to obtain closed characteristic region images, and calculating to obtain characteristic region difference images of the adjacent underwater images, wherein the characteristic region difference images are difference values of the characteristic region images in the adjacent underwater images, if the characteristic region difference images are smaller than a threshold value, the characteristic region images in the two adjacent underwater images are similar in pixel distribution and have larger possibility of underwater living things, and the larger characteristic region images are used as the collected underwater living thing images.
5. The method for non-invasive local water ecological safety detection according to claim 4, wherein the step S2 is to input the collected underwater biological image into the underwater biological detectorObtaining underwater organism recognition results in the classification models, and carrying out number statistics on different types of underwater organisms to obtain real-time probability distribution of the underwater organisms, wherein the real-time probability distribution comprises the following steps: inputting the collected underwater organism image into an underwater organism identification model to obtain the underwater organism category identified in the underwater organism image, counting the number of underwater organisms of different categories in a time range T to obtain the real-time probability distribution of the underwater organisms
Figure QLYQS_63
Figure QLYQS_64
Wherein:
Figure QLYQS_65
indicates the nth underwater creature->
Figure QLYQS_66
The probability distribution in the time range T, the probability distribution of N underwater organisms forms the real-time probability distribution->
Figure QLYQS_67
,/>
Figure QLYQS_68
Represents the total number of underwater organisms identified in the time frame T, based on the comparison of the measured values>
Figure QLYQS_69
Represents the nth underwater creature recognized within the time frame T>
Figure QLYQS_70
The number of (2); the time range T represents the time range ^ based on the current time>
Figure QLYQS_71
6. The method for non-invasive local water ecological safety detection according to claim 5, wherein the step S3 of calculating the underwater organism distribution difference value based on the real-time probability distribution of the underwater organisms and the underwater organism safety probability distribution comprises: obtaining underwater biosafety probability distribution under safe local water ecological environment, wherein the underwater biosafety probability distribution is
Figure QLYQS_72
,/>
Figure QLYQS_73
Represents the nth underwater creature recognized within a time range T under a safe local water ecosystem>
Figure QLYQS_74
Is greater than or equal to>
Figure QLYQS_75
Represents the total number of underwater organisms identified in the time range T in the safe local water ecological environment, and/or the number of underwater organisms identified in the safe local water ecological environment>
Figure QLYQS_76
Indicates the nth underwater creature->
Figure QLYQS_77
Probability distribution in a safe local water ecological environment;
calculating underwater organism distribution difference values based on underwater organism real-time probability distribution and underwater organism safety probability distribution, wherein the calculation formula of the underwater organism distribution difference values is as follows:
Figure QLYQS_78
Figure QLYQS_79
representing a real-time probability distribution of an underwater organism->
Figure QLYQS_80
Probability distribution of underwater organism safety>
Figure QLYQS_81
The difference in underwater biodistribution.
7. The non-invasive local water ecology safety detection method according to claim 6, wherein the step S4 of indicating that the current underwater biodistribution is changed greatly if the difference value of the underwater biodistribution is greater than a specified threshold value comprises:
if the difference value of underwater biodistribution
Figure QLYQS_82
If the probability distribution is larger than a specified threshold value, the real-time probability distribution of the underwater creatures is represented
Figure QLYQS_83
With underwater biosafety probability distribution>
Figure QLYQS_84
The large difference indicates that the current underwater biological distribution is changed greatly, the ecological potential safety hazard risk exists, and the alarm processing is carried out.
8. A non-invasive local water ecology safety detection system, the system comprising:
the underwater biological recognition module is used for controlling the underwater robot to tour in local water ecology, acquiring underwater biological images in real time and inputting the acquired underwater biological images into the underwater biological recognition model to obtain an underwater biological recognition result;
the underwater organism distribution determining device is used for counting the number of different types of underwater organisms to obtain real-time probability distribution of the underwater organisms;
the ecological safety detection module is used for acquiring underwater biological safety probability distribution under a safe local water ecological environment, calculating underwater biological distribution difference values based on the underwater biological real-time probability distribution and the underwater biological safety probability distribution, and if the underwater biological distribution difference values are larger than a specified threshold value, the current underwater biological distribution is greatly changed, and the ecological safety hidden danger risks exist, so that the non-invasive local water ecological safety detection method is realized according to claims 1-7.
CN202310265357.1A 2023-03-20 2023-03-20 Non-invasive local water ecological safety detection method and system Active CN115984269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310265357.1A CN115984269B (en) 2023-03-20 2023-03-20 Non-invasive local water ecological safety detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310265357.1A CN115984269B (en) 2023-03-20 2023-03-20 Non-invasive local water ecological safety detection method and system

Publications (2)

Publication Number Publication Date
CN115984269A true CN115984269A (en) 2023-04-18
CN115984269B CN115984269B (en) 2023-07-14

Family

ID=85972532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310265357.1A Active CN115984269B (en) 2023-03-20 2023-03-20 Non-invasive local water ecological safety detection method and system

Country Status (1)

Country Link
CN (1) CN115984269B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116973922A (en) * 2023-08-29 2023-10-31 中国水产科学研究院珠江水产研究所 Underwater biodistribution characteristic analysis method based on underwater acoustic signal detection

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110363176A (en) * 2019-07-23 2019-10-22 中国科学院寒区旱区环境与工程研究所 A kind of image analysis method and device
CN111932482A (en) * 2020-09-25 2020-11-13 平安科技(深圳)有限公司 Method and device for detecting target object in image, electronic equipment and storage medium
US20220036124A1 (en) * 2020-07-31 2022-02-03 Sensetime Group Limited Image processing method and device, and computer-readable storage medium
CN114092793A (en) * 2021-11-12 2022-02-25 杭州电子科技大学 End-to-end biological target detection method suitable for complex underwater environment
CN114299332A (en) * 2021-12-22 2022-04-08 苏州热工研究院有限公司 Cold source marine organism intelligent detection method and system for nuclear power plant
US20220121871A1 (en) * 2020-10-16 2022-04-21 Tsinghua University Multi-directional scene text recognition method and system based on multi-element attention mechanism
US20220245381A1 (en) * 2021-01-29 2022-08-04 Iunu, Inc. Pest infestation detection for horticultural grow operations
CN115170529A (en) * 2022-07-20 2022-10-11 西安电子科技大学广州研究院 Multi-scale tiny flaw detection method based on attention mechanism

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110363176A (en) * 2019-07-23 2019-10-22 中国科学院寒区旱区环境与工程研究所 A kind of image analysis method and device
US20220036124A1 (en) * 2020-07-31 2022-02-03 Sensetime Group Limited Image processing method and device, and computer-readable storage medium
CN111932482A (en) * 2020-09-25 2020-11-13 平安科技(深圳)有限公司 Method and device for detecting target object in image, electronic equipment and storage medium
US20220121871A1 (en) * 2020-10-16 2022-04-21 Tsinghua University Multi-directional scene text recognition method and system based on multi-element attention mechanism
US20220245381A1 (en) * 2021-01-29 2022-08-04 Iunu, Inc. Pest infestation detection for horticultural grow operations
CN114092793A (en) * 2021-11-12 2022-02-25 杭州电子科技大学 End-to-end biological target detection method suitable for complex underwater environment
CN114299332A (en) * 2021-12-22 2022-04-08 苏州热工研究院有限公司 Cold source marine organism intelligent detection method and system for nuclear power plant
CN115170529A (en) * 2022-07-20 2022-10-11 西安电子科技大学广州研究院 Multi-scale tiny flaw detection method based on attention mechanism

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAO T等: "Brain tumor magnetic resonance image segmentation by a multiscale contextual attention module combined with a deep residual UNet (MCA-ResUNet)", 《PHYSICS IN MEDICINE & BIOLOGY》, vol. 67, no. 9, pages 1 - 14, XP020420680, DOI: 10.1088/1361-6560/ac5e5c *
于红: "水产动物目标探测与追踪技术及应用研究进展", 《大连海洋大学学报》, vol. 35, no. 6, pages 793 - 800 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116973922A (en) * 2023-08-29 2023-10-31 中国水产科学研究院珠江水产研究所 Underwater biodistribution characteristic analysis method based on underwater acoustic signal detection
CN116973922B (en) * 2023-08-29 2024-04-16 中国水产科学研究院珠江水产研究所 Underwater biodistribution characteristic analysis method based on underwater acoustic signal detection

Also Published As

Publication number Publication date
CN115984269B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN111382714B (en) Image detection method, device, terminal and storage medium
CN112183577A (en) Training method of semi-supervised learning model, image processing method and equipment
CN109472209B (en) Image recognition method, device and storage medium
US10776662B2 (en) Weakly-supervised spatial context networks to recognize features within an image
CN112016543A (en) Text recognition network, neural network training method and related equipment
CN110119709A (en) A kind of driving behavior recognition methods based on space-time characterisation
CN109559300A (en) Image processing method, electronic equipment and computer readable storage medium
CN106295521A (en) A kind of gender identification method based on multi output convolutional neural networks, device and the equipment of calculating
CN111950596A (en) Training method for neural network and related equipment
CN113159147A (en) Image identification method and device based on neural network and electronic equipment
CN111310671B (en) Heating furnace bottom water accumulation pit anomaly identification method, system and equipment based on deep learning
CN115984269A (en) Non-invasive local water ecological safety detection method and system
CN111936990A (en) Method and device for waking up screen
CN111476276B (en) Intelligent data classification method and device, electronic equipment and readable storage medium
CN113095475A (en) Neural network training method, image processing method and related equipment
CN110826624A (en) Time series classification method based on deep reinforcement learning
Desai et al. Image processing model with deep learning approach for fish species classification
CN112766229A (en) Human face point cloud image intelligent identification system and method based on attention mechanism
CN114821096A (en) Image processing method, neural network training method and related equipment
CN112016617B (en) Fine granularity classification method, apparatus and computer readable storage medium
CN114998838A (en) Real-time monitoring method and device for intelligent storage cabinet of hazardous chemical substances
CN111274937A (en) Fall detection method and device, electronic equipment and computer-readable storage medium
CN115389439A (en) River pollutant monitoring method and system based on big data
CN114091594A (en) Model training method and device, equipment and storage medium
CN112347526A (en) Information security protection method and device based on anti-shooting screen, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant