Geological radar image identification method and system based on principal component analysis BP neural network
Technical Field
The invention belongs to the field of geological radar image processing, and particularly relates to a geological radar image identification method and system based on principal component analysis (BP) neural network.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
In the prior tunnel advanced geological prediction methods, the geological radar has the characteristics of high efficiency, no damage to targets, high detection data resolution, strong anti-interference capability and the like, and is widely applied. The principle of geological radar detection is that when an abnormal medium and a medium around the abnormal medium are different in electrical property, pulse electromagnetic waves emitted by the geological radar are reflected when being transmitted to an abnormal interface, and reflected signals are received and recorded by a receiving antenna. By analyzing the reflected signal, information such as the spatial position and the buried depth of the anomaly can be inferred.
The inventor finds that in the actual detection process of the geological radar, the working environment is usually disordered, and the influence of noise is added, so that the imaging quality of the radar is low, and the abnormality is difficult to accurately identify, so that the accuracy of abnormality detection excessively depends on the experience and level of technicians; and when the tunnel is long or the data volume is large, a large amount of time and manpower are consumed for abnormity identification, so that the application and popularization of the geological radar technology are limited to a certain extent.
Disclosure of Invention
In order to solve the problems, the invention provides a geological radar image recognition method and system based on a principal component analysis BP neural network, which realize intelligent recognition of geological radar image abnormity, greatly improve recognition accuracy, avoid the defect of recognition depending on experience, save time and improve efficiency.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a geological radar image recognition method based on principal component analysis (BP) neural network, which comprises the following steps:
labeling a label of a geological radar image, wherein the label comprises complete rocks, a fault fracture zone, a fissure zone, a water-rich zone and a karst cave;
sequentially carrying out noise elimination, binarization and morphological edge detection on the geological radar image marked with the label to obtain a digital image and form a sample data set;
reducing the dimensionality of the sample data set by using a principal component analysis algorithm, and simultaneously keeping the characteristics of the sample data set which have the maximum contribution to the variance;
performing cyclic training on the BP neural network by using the sample data set after dimensionality reduction;
and receiving a geological radar image in real time, sequentially performing noise elimination, binarization, morphological edge detection and dimension reduction, inputting the image into a trained BP neural network, and outputting a geological radar image recognition result.
A second aspect of the present invention provides a geological radar image recognition system based on principal component analysis BP neural network, comprising:
the image label marking module is used for marking labels of the geological radar image, and the labels comprise complete rocks, fault fracture zones, water-rich zones and karst caves;
the sample data set construction module is used for sequentially carrying out noise elimination, binarization and morphological edge detection on the geological radar image marked with the label to obtain a digital image and form a sample data set;
a dimensionality reduction module for reducing the dimensionality of the sample data set using a principal component analysis algorithm while preserving features in the sample data set that contribute most to variance;
the BP neural network training module is used for carrying out cyclic training on the BP neural network by using the sample data set after dimensionality reduction;
and the image real-time identification module is used for receiving the geological radar image in real time, sequentially performing noise elimination, binarization, morphological edge detection and dimension reduction processing, inputting the processed image into a trained BP neural network, and outputting a geological radar image identification result.
A third aspect of the present invention provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps in the method for geological radar image recognition based on principal component analysis, BP, neural network as described above.
A fourth aspect of the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps of the geological radar image recognition method based on principal component analysis BP neural network as described above.
The invention has the beneficial effects that:
sequentially carrying out noise elimination, binarization and morphological edge detection on a geological radar image marked with a label to obtain a digital image and form a sample data set; reducing the dimensionality of the sample data set by using a principal component analysis algorithm, and simultaneously keeping the characteristics of the sample data set which have the maximum contribution to the variance; performing cyclic training on the BP neural network by using the sample data set after dimensionality reduction; and finally, receiving a geological radar image in real time, sequentially performing noise elimination, binarization, morphological edge detection and dimension reduction, inputting the image into a BP neural network after training, and outputting a geological radar image recognition result, so that the intelligent recognition of geological radar image abnormity is realized, the recognition accuracy is greatly improved, the defect of recognition by depending on experience is avoided, the time is saved, and the efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
FIG. 1 is a flow chart of a geological radar image recognition method based on principal component analysis (BP) neural network provided by the embodiment of the invention;
fig. 2 is a schematic diagram of a BP neural network with a 5-layer structure according to an embodiment of the present invention.
Detailed Description
The invention is further described with reference to the following figures and examples.
It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
Example one
As shown in fig. 1, the present embodiment provides a geological radar image recognition method based on principal component analysis BP neural network, which includes:
step S101: and labeling a label of the geological radar image, wherein the label comprises complete rocks, a fault fracture zone, a fissure zone, a water-rich zone and a karst cave.
In specific implementation, the waveform characteristics of the geological radar image and the change rule of the frequency, the amplitude, the phase and the electromagnetic wave energy absorption condition and other detailed characteristics can represent different geological phenomena. Among them, in engineering investigation, the common unfavorable geological phenomena are: fault fracture zone, fissure zone, water-rich zone, karst cave and lithology change zone.
The general medium of intact rock mass is relatively even, and the electrical property difference is very little, does not have obvious reflection interface, and radar image and wave form characteristic usually show: the energy clusters are uniformly distributed or strong reflection fine and bright stripes exist only in local parts; generally, a low-amplitude reflection wave group is formed, the waveform is uniform, disordered reflection is avoided, and the automatic gain gradient is relatively small.
The fault is a destructive geological structure, broken rock mass, mud or underground water and the like usually develop in the fault, the medium is extremely uneven, the electric difference is large, and the rock masses at two sides of the fault usually develop joints and folds and have poor medium uniformity. The fracture zone usually exists in fault affected zone, dike and weak interlayer, and the fracture also has various non-uniform fillings and large dielectric difference. The geological radar image shows that the fault and crack interface reflection is strong, the amplitude near the reflecting surface is obviously enhanced and greatly changed, the energy mass is unevenly distributed, diffraction and scattering are often generated in a broken zone and a crack zone, the waveform is disordered, the in-phase axis is broken, and the deep part is even blurred.
The water-rich zone appears in the geological radar image as follows: the geological radar wave generates strong amplitude reflection on the surface of the aquifer, and the electromagnetic wave generates multiple strong reflection with a certain rule when penetrating the aquifer, so as to generate diffraction and scattering in the water-rich zone.
The karst cave appears in geological radar images as follows: the cavity is composed of a plurality of hyperbolic strong reflection waves, and multiple reflection wave groups with high amplitude, low frequency and equal spacing are generally arranged on the side wall of the cavity, and particularly the reflection waves are stronger when no filler is filled or water is filled.
Step S102: and sequentially carrying out noise elimination, binarization and morphological edge detection on the geological radar image marked with the label to obtain a digital image and form a sample data set.
Specifically, before denoising the geological radar image, the method further comprises: and carrying out image enhancement processing on the original geological radar image, enhancing useful information in the image and improving the visual effect of the image.
In specific implementation, noise in the original geological radar image is eliminated by adopting low-pass filtering, and the influence of noise generated by interference in the acquisition and transmission processes on the radar image is reduced; and high-pass filtering is adopted to enhance the high-frequency signal information of the target body outline in the geological radar image, so that the useful image characteristics are highlighted.
Specifically, edge extraction is carried out on the geological radar image by using a Canny edge detection algorithm; the process is as follows:
reducing noise by using Gaussian smoothing processing;
calculating the gradient strength and direction of each pixel point in the image, and reserving the maximum gradient value and direction at each point;
utilizing non-maximum value to inhibit and eliminate spurious response caused by edge detection;
determining true and potential edges using dual threshold detection; the specific process of determining true and potential edges using dual threshold detection is to use a large threshold to detect more confident edge points. The tracking is then performed along the previously derived gradient direction, using a smaller threshold in the tracking, until the original starting point is returned. Obtaining a binary image, wherein each point represents whether an edge point exists or not;
edge detection is finally accomplished by suppressing isolated weak edges.
Among them, the Canny edge detection algorithm is optimal for step-type edges affected by white noise. The purpose of the Canny edge detection algorithm is to return a binary image, with non-zero values indicating the presence of edges in the image, and scale and direction information relating to the edges.
Step S103: the dimensionality of the sample data set is reduced using a principal component analysis algorithm while preserving features in the sample data set that contribute most to variance.
In this embodiment, the process of reducing the dimensionality of the sample data set by using the principal component analysis algorithm while maintaining the features in the sample data set that contribute most to the variance is as follows:
normalizing the samples in the sample data set;
solving a covariance matrix of the sample characteristics;
selecting k maximum eigenvalues to form an eigenvector matrix; wherein k is a positive integer greater than or equal to 2;
and projecting the sample data onto the eigenvector matrix to determine principal components.
Thus, the original multidimensional problem is reduced in dimensionality and greatly simplified.
Step S104: and performing cyclic training on the BP neural network by using the sample data set after dimensionality reduction.
For example: the BP neural network of this embodiment is a 5-layer BP neural network structure, as shown in fig. 2.
Specifically, the process of performing cyclic training on the BP neural network by using the sample data set after dimensionality reduction comprises the following steps:
initializing a weight value and a threshold value, wherein the weight value and the threshold value are random values in a (-1, 1) interval;
the input signal is transmitted in the forward direction, the square of the detection error is calculated to correct the weight and the threshold, the error information is transmitted in the reverse direction from the output layer, and each weight is corrected to reduce the error;
and when the square error is smaller than the preset target error value, finishing iteration and outputting a weight vector, otherwise, continuously transmitting the input signal in the forward direction until the square error is smaller than the preset target error value or the preset iteration times are reached.
Step S105: and receiving a geological radar image in real time, sequentially performing noise elimination, binarization, morphological edge detection and dimension reduction, inputting the image into a trained BP neural network, and outputting a geological radar image recognition result.
In the embodiment, denoising, binarization and morphological edge detection processing are sequentially carried out on a geological radar image marked with a label to obtain a digital image and form a sample data set; reducing the dimensionality of the sample data set by using a principal component analysis algorithm, and simultaneously keeping the characteristics of the sample data set which have the maximum contribution to the variance; performing cyclic training on the BP neural network by using the sample data set after dimensionality reduction; and finally, receiving a geological radar image in real time, sequentially performing noise elimination, binarization, morphological edge detection and dimension reduction, inputting the image into a BP neural network after training, and outputting a geological radar image recognition result, so that the intelligent recognition of geological radar image abnormity is realized, the recognition accuracy is greatly improved, the defect of recognition by depending on experience is avoided, the time is saved, and the efficiency is improved.
Example two
The embodiment provides a geological radar image recognition system based on principal component analysis (BP) neural network, which comprises:
(1) the image label marking module is used for marking labels of the geological radar image, and the labels comprise complete rocks, fault fracture zones, water-rich zones and karst caves;
in specific implementation, the waveform characteristics of the geological radar image and the change rule of the frequency, the amplitude, the phase and the electromagnetic wave energy absorption condition and other detailed characteristics can represent different geological phenomena. Among them, in engineering investigation, the common unfavorable geological phenomena are: fault fracture zone, fissure zone, water-rich zone, karst cave and lithology change zone.
The general medium of intact rock mass is relatively even, and the electrical property difference is very little, does not have obvious reflection interface, and radar image and wave form characteristic usually show: the energy clusters are uniformly distributed or strong reflection fine and bright stripes exist only in local parts; generally, a low-amplitude reflection wave group is formed, the waveform is uniform, disordered reflection is avoided, and the automatic gain gradient is relatively small.
The fault is a destructive geological structure, broken rock mass, mud or underground water and the like usually develop in the fault, the medium is extremely uneven, the electric difference is large, and the rock masses at two sides of the fault usually develop joints and folds and have poor medium uniformity. The fracture zone usually exists in fault affected zone, dike and weak interlayer, and the fracture also has various non-uniform fillings and large dielectric difference. The geological radar image shows that the fault and crack interface reflection is strong, the amplitude near the reflecting surface is obviously enhanced and greatly changed, the energy mass is unevenly distributed, diffraction and scattering are often generated in a broken zone and a crack zone, the waveform is disordered, the in-phase axis is broken, and the deep part is even blurred.
The water-rich zone appears in the geological radar image as follows: the geological radar wave generates strong amplitude reflection on the surface of the aquifer, and the electromagnetic wave generates multiple strong reflection with a certain rule when penetrating the aquifer, so as to generate diffraction and scattering in the water-rich zone.
The karst cave appears in geological radar images as follows: the cavity is composed of a plurality of hyperbolic strong reflection waves, and multiple reflection wave groups with high amplitude, low frequency and equal spacing are generally arranged on the side wall of the cavity, and particularly the reflection waves are stronger when no filler is filled or water is filled.
(2) The sample data set construction module is used for sequentially carrying out noise elimination, binarization and morphological edge detection on the geological radar image marked with the label to obtain a digital image and form a sample data set;
specifically, before denoising the geological radar image, the method further comprises: and carrying out image enhancement processing on the original geological radar image, enhancing useful information in the image and improving the visual effect of the image.
In specific implementation, noise in the original geological radar image is eliminated by adopting low-pass filtering, and the influence of noise generated by interference in the acquisition and transmission processes on the radar image is reduced; and high-pass filtering is adopted to enhance the high-frequency signal information of the target body outline in the geological radar image, so that the useful image characteristics are highlighted.
Specifically, edge extraction is carried out on the geological radar image by using a Canny edge detection algorithm; the process is as follows:
reducing noise by using Gaussian smoothing processing;
calculating the gradient strength and direction of each pixel point in the image, and reserving the maximum gradient value and direction at each point;
utilizing non-maximum value to inhibit and eliminate spurious response caused by edge detection;
determining true and potential edges using dual threshold detection; the specific process of determining true and potential edges using dual threshold detection is to use a large threshold to detect more confident edge points. The tracking is then performed along the previously derived gradient direction, using a smaller threshold in the tracking, until the original starting point is returned. Obtaining a binary image, wherein each point represents whether an edge point exists or not;
edge detection is finally accomplished by suppressing isolated weak edges.
Among them, the Canny edge detection algorithm is optimal for step-type edges affected by white noise. The purpose of the Canny edge detection algorithm is to return a binary image, with non-zero values indicating the presence of edges in the image, and scale and direction information relating to the edges.
(3) A dimensionality reduction module for reducing the dimensionality of the sample data set using a principal component analysis algorithm while preserving features in the sample data set that contribute most to variance;
in this embodiment, the process of reducing the dimensionality of the sample data set by using the principal component analysis algorithm while maintaining the features in the sample data set that contribute most to the variance is as follows:
normalizing the samples in the sample data set;
solving a covariance matrix of the sample characteristics;
selecting k maximum eigenvalues to form an eigenvector matrix; wherein k is a positive integer greater than or equal to 2;
and projecting the sample data onto the eigenvector matrix to determine principal components.
Thus, the original multidimensional problem is reduced in dimensionality and greatly simplified.
(4) The BP neural network training module is used for carrying out cyclic training on the BP neural network by using the sample data set after dimensionality reduction;
for example: the BP neural network of this embodiment is a 5-layer BP neural network structure, as shown in fig. 2.
Specifically, the process of performing cyclic training on the BP neural network by using the sample data set after dimensionality reduction comprises the following steps:
initializing a weight value and a threshold value, wherein the weight value and the threshold value are random values in a (-1, 1) interval;
the input signal is transmitted in the forward direction, the square of the detection error is calculated to correct the weight and the threshold, the error information is transmitted in the reverse direction from the output layer, and each weight is corrected to reduce the error;
and when the square error is smaller than the preset target error value, finishing iteration and outputting a weight vector, otherwise, continuously transmitting the input signal in the forward direction until the square error is smaller than the preset target error value or the preset iteration times are reached.
(5) And the image real-time identification module is used for receiving the geological radar image in real time, sequentially performing noise elimination, binarization, morphological edge detection and dimension reduction processing, inputting the processed image into a trained BP neural network, and outputting a geological radar image identification result.
In the embodiment, denoising, binarization and morphological edge detection processing are sequentially carried out on a geological radar image marked with a label to obtain a digital image and form a sample data set; reducing the dimensionality of the sample data set by using a principal component analysis algorithm, and simultaneously keeping the characteristics of the sample data set which have the maximum contribution to the variance; performing cyclic training on the BP neural network by using the sample data set after dimensionality reduction; and finally, receiving a geological radar image in real time, sequentially performing noise elimination, binarization, morphological edge detection and dimension reduction, inputting the image into a BP neural network after training, and outputting a geological radar image recognition result, so that the intelligent recognition of geological radar image abnormity is realized, the recognition accuracy is greatly improved, the defect of recognition by depending on experience is avoided, the time is saved, and the efficiency is improved.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the principal component analysis BP neural network-based geological radar image recognition method as described above.
Example four
The embodiment provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps in the geological radar image recognition method based on the principal component analysis (BP) neural network.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.