A method of using geomagnetic anomaly to recognize objects based on HOG and 2D-AVMD

In order to identify the shape of underground small magnetic anomaly objects, we use Support Vector Machines (SVM) to identify the underground magnetic anomaly targets. Firstly, as the SVM needs a lot of training data, and we also need to make full use of the magnetic field signal, nine component signals including total magnetic intensity (TMI) and five independent components of tensor are calculated from the original detected magnetic signal. Secondly, the nine component signals are subjected respectively to two-dimensional adaptively variational mode decomposition (2D-AVMD), which is advanced based on the two indicators, namely Mutual information (MI) and empirical entropy (EE), and we can get the nine primary signals from the decomposition results of nine component signals called the Intrinsic Mode Function (IMF). Then, the Histogram of Oriented Gradients (HOG) of the nine primary signals is extracted, and the feature data would be constructed into feature vectors. In the end, Support Vector Machines (SVM) are adopted to process these feature vectors. The output of the SVM can indicate the result of small objects’ shape recognition under the ground. Experiments prove that the shape recognition accuracy of underground small magnetic anomaly object recognition reaches 90%.In order to identify the shape of underground small magnetic anomaly objects, we use Support Vector Machines (SVM) to identify the underground magnetic anomaly targets. Firstly, as the SVM needs a lot of training data, and we also need to make full use of the magnetic field signal, nine component signals including total magnetic intensity (TMI) and five independent components of tensor are calculated from the original detected magnetic signal. Secondly, the nine component signals are subjected respectively to two-dimensional adaptively variational mode decomposition (2D-AVMD), which is advanced based on the two indicators, namely Mutual information (MI) and empirical entropy (EE), and we can get the nine primary signals from the decomposition results of nine component signals called the Intrinsic Mode Function (IMF). Then, the Histogram of Oriented Gradients (HOG) of the nine primary signals is extracted, and the feature data would be constructed into feature vectors. In the end, Support Vector Machines (...


I. INTRODUCTION
So far, there is little research on detecting small ferromagnets underground for the specific and detailed information (exact shape, posture etc.). Geomagnetic signals are mostly used for remote sensing, localization and inversion. In the past two decades, the magnetic field gradient tensor has received extensive attention from scholars in various countries, which provides a new way of detecting and explaining the magnetic objects' shape, size, attitude and other information. [1][2][3][4][5][6][7] Currently, there is much research on magnetic field gradient tensor data, including interpretation and applications, 1 magnetic object localization [2][3][4][5][6] and other magnetic anomaly researches. [6][7][8][9][10][11][12][13] All of them require complicated theoretical derivation, formula calculus, algorithm design, and a lot of analytical magnetic data, and are limited by the accuracy of measured data and the design of algorithms based on magnetic data.
The Support Vector Machine [14][15][16] is an algorithm for Machine Learning based on Pattern Recognition, 17 which was first proposed by Cortes and Vapnik in 1995. In addition, there were also predecessors, who apply the SVM or Pattern Recognition ideas in the field of geophysics. [18][19][20][21] This not only solves the dependence of magnetic anomaly object recognition on signal accuracy, but also gets rid of complicated theoretical derivation and algorithm design.
In geophysics, mode decomposition has been applied to various applications, [22][23][24] because the detected original geomagnetic signal has a lot of mixed components and noise.
Based on the above background, this paper describes the application of the SVM with the 2D geomagnetic data. The experimental data was collected by 4 flux gate sensor cross array detectors we use. In addition to that, 2D-AVMD is used to process nine component signals calculated from the original magnetic anomaly signals, for adaptively extracting the primary signals. 20 That is the only one of the IMFs (results of the 2D-AVMD) that contains the most useful ARTICLE scitation.org/journal/adv information of one component signal. Then, the HOG features 25,26 of the primary signals are extracted. The characteristics of the data are constructed as feature vectors, and object recognition is subsequently performed using a SVM by feature vectors. Finally, the purpose of identifying the shape of the underground magnetic body is achieved effectively.

II. THEORY OF MAGNETIC GRADIENT TENSOR AND NINE COMPONENT SIGNALS
In geophysical data detection, the scale of prerequisite data, the type of analysis to be conducted, the type of magnetic anomaly signal to be detected and the relative costs should be considered. Usually, surveys are executed with the use of discrete points in accordance to a grid system 1-13 whose values can be detected and elaborated with a bi-dimensional array of real numbers represented by a number of finite grid. Here, in this paper, the process of magnetic anomaly detection and signal acquisition is briefly introduced, and the analytical formula of the magnetic gradient tensor and other components is obtained based on the equipment.
Formula (1) represented the formula of the relation among magnetic potential U, the magnetic field vector and magnetic gradient tensor, while Formula (2) concerns deriving the total magnetic intensity (TMI) from the magnetic field vector (in the formula, it is represented as Bt). Equation (3) is a calculation formula of two geometric invariants I 1 and I 2 of the tensor matrix G. [3][4][5][6][7][8][9][10][11] where λ1, λ2, λ3 are the eigenvalue of gradient tensor matrix. Figure 1 shows the 4 fluxgate sensor cross array detector we use. As a common geomagnetic signal measurement device with simple design and high accuracy, it is enough for our method.
From the three components (Bx, By, Bz) of the magnetic field vector measured by the flux gate directly, the total magnetic field modulus (TMI) can be solved according to equation (2). I 1 and I 2 can be solved according to equation (3). The magnetic gradient tensor algorithm is based on the flux gate position difference calculation. When the array of Figure 1 is taken as an example, the formula of the magnetic gradient tensor matrix G is shown in equation (4) Bij(i = 1, 2, 3, 4; j = x, y, z) represents the magnetic field vector of the i flux gate sensor in the j direction; d is the baseline distance. Figure 2 shows the design of the experimental bench. The whole is a square plane with a length of two meters, and a measuring point is set every 0.1 meter. There are 20 measuring points on each side, with a total of 20×20 measuring points. The design of the test bench can be reduced to a 20×20 grid. Each grid point is a measurement point, when assuming the grid coordinates are (1, 1), (1,2). . . (20,20). We can detect the data of each point by moving the fluxgate sensor (the white device in Figure 2) on the bench. The order is (1, 1), (1,2). . . (2,1). . . (20,20). Therefore, in the end, we get a 20×20 data grid, and each point in the grid has (Bx, By, Bz) components of the magnetic field vector only and directly from the sensor. The measured signal plane forms a 20-dimensional square matrix for subsequent decomposition. However, every point in the square matrix contains the information about the three components (Bx, By, Bz) of the magnetic field vector, and therefore, we can get the magnetic gradient tensor matrix for each point and its maximum eigenvalue. In addition, the TMI and the geometric invariant I 1 , I 2 can be calculated according to equations (1)-(4) on each point. Therefore, nine components, which contain total magnetic field modulus (TMI), the maximum eigenvalue of the gradient tensor matrix G (MEGM), two geometric invariants (I 1 ), and five tensor matrix independent elements (Bxx, Bxy, Bxz, Byy, Byz) 3-13 can be separated from the original signal. From the original signal, we separated nine component signals, when each of them is a 20-dimensional matrix, since the SVM requires a large number of data samples, and the magnetic field gradient tensor also contains extremely detailed object information. Just like Figure 9, as an example, there is the detected data that would be processed.
However, in the actual measurement process, as there is much noise from magnetic signal interference around, the signal is extremely rough and mixed by a variety of useful and useless signals.

III. THEORY OF VMD
Magnetic anomalies are not only the products of complex geological processes, but also a collection of deep information and shallow information, regional geological information and local prospecting information. Magnetic anomaly data are mixed with anomaly generated by different kinds or other magnetic sources. How to extract useful prospecting information from these multi-source mixed, nonlinear and non-stationary geoscience data is an important part of the interpretation of magnetic data. The predecessors have done a lot of work for this purpose. [27][28][29][30][31][32] However, the above method has not been applied to the field of 2D small geomagnetic anomalies. And because the decomposition methods used, such as EMD, have their own limitation. the decomposition effect still has potential. And VMD is better than EMD. 27 In our method, we innovatively apply the 2D-AVMD to decompose complex and mixed geomagnetic anomaly signals and select the Intrinsic Mode Function 1 (IMF1) 20,31 as a primary signal from the results of decomposition. The IMF1 has main information of the original signal, and it is the clearest, the most obvious features, the most representative one. Before us, no one has extracted geomagnetic signals like this. Simulation and experiment prove that our method is very effective.
Dragomiretskiy et al. 27 proposed a non-recursive adaptive signal decomposition method based on the traditional Wiener filtering-variational mode decomposition (VMD). The VMD method converts the signal decomposition problem into a constrained optimization problem. The amplitude-modulated frequency-modulated signal with instantaneous frequency is obtained with the minimum bandwidth as a constraint, and a complex signal is adaptively decomposed into the sum of several Intrinsic Mode Function (IMFs). VMD features have high accuracy and fast convergence, eliminating exponentially decaying DC offset. As a non-recursive fully adaptive method, the 2D VMD can sparsely decompose images in a mathematically robust manner. 20 K is defined as the total number of IMFs. 2D-AVMD is a constrained variational problem that can be described by the following equation: Where u AS,k (x) is a 2 dimension analyze signal. w k is a reference direction vector. One half-plane should be set to 0. f (x) is the 2D input signal. The objective function is the directional 2D analysis signal of the square H1 norm (the square L2 norm of the gradient) of the estimated bandwidth of the mode. Only the half-space frequency is moved to the baseband and mixed with the complex exponent of the current central frequency estimation. At the same time, the fidelity of the reconstructed signal is maintained. Quadratic penalty and Lagrangian multiplie are used to address the reconstruction constraint, which is proceeded by ADMM for further ARTICLE scitation.org/journal/adv optimization: 20,31 The unconstrained problem is Where α k is the balancing parameter of the data-fidelity constraint and λ is the Lagrangian multiplier. 20,31 {w k } is the middle of centre frequencies related to the modes after decomposed. {u k } is the set of intrinsic modes. The solution to the original constrained is taken as the saddle point of the augmented Lagrangian L in an iterative suboptimization sequence which is called alternate direction. (6) would be solved by multiplier alternate direction.
To simplify notation, the Lagrangian multiplier term L is included into the quadratic penalty term, and the objective expression is rewritten: In the frequency domain, the forecast pattern from the answer to the majorization indicates a Wiener filter as follow (9): Wheref (w),û(w) andλ(w) are the Fourier transforms of the f (x), u(x) and λ(x). n is the iteration time. A pattern similar to that of 1D-VMD updates the center frequencies w k , but the integration path is the half-plane Ω k . 20 Obviously, w n+1 k is the first instance of the power spectrum |û k (w)| 2 of the pattern on the half-plane Ω k . A criterion gradient ascent which has the regular time step λ is used to update the Lagrangian multiplier λ: The optimization algorithm is detailed in Ref. 33. However, the decomposition effect is dependent on the number of IMFs, which should be specified in advance. The number of IMFs can hardly be determined without sufficient predictions about the objects. Here, the optimal number of IMFs, MI and EE are determined according to two principles. The interdependency between two signals can be measured by MI. The MI of the two signals X and Y can be as: 20 p(x) and p(y) are the marginal probability distribution function of X and Y. p(x, y) is the joint probability distribution function of X and Y. When MI is equal to 0, no correlation is being between the two signals. The decomposition degree is measured according to the MI between the input signal and the excess after 2D-AVMD. If the MI is smaller than the preset threshold, the residual is considered to contain no valid information, indicating the completion of the decomposition. However, the problem of pattern mixing still exists in VMD pattern mixing, in which the physical meaning would loss and intensify the difficulty. The idea of EE is to gauge the level of pattern mixing. EE is an indicator of system disorder, which is defined as follows: pi = Ei/E total , Ei is the energy of the ith IMF, and E total is the energy of the original signal. If have not pattern-mixing phenomenon exist or the pattern-mixing level is quite low, the disorder degree of the system will increase the EE. But if the mode mixing arose among the IMFs, the EE would become small. 20 The completeness of the decomposition is measured by MI, and the uniformity of the decomposition is measured by EE. As large EE and small MI is the result we need, a criterion is defined as follows: Where EE ′ and MI ′ are the normalized values. The large value of MF indicates the decomposition performance is better. Along with the number of pre-designated IMFs, an image (2D signal) can be decomposed into different sets of IMFs by 2D-VMD. In addition, the MF is calculated for each choice of K (the numbers of IMFs), and the best one is chosen as the optimal choice of K. 20 The nine component signals can be decomposed with the K.
2D-AVMD processing is performed on nine component signals based on the above theory. The nine IMF1s which are the most similar with nine component signals are selected, and the major information of the original signals is contained as the primary signals.

IV. THE FEATURE EXTRACTION ALGORITHM
After the nine primary signals are obtained, the HOG features of the primary signals are extracted creatively, and there was no research on the feature of underground small magnetic anomaly signals, since SVMs only use simple feature vectors and most refined data to identify the targets. In this case, we need to extract the most suitable and refined feature of geomagnetic signal recognition, in order to recognize the shape of underground small magnetic anomaly objects. After that, simulations will be performed to verify the feasibility of HOG features.
Since the HOG is operated on the local grid unit of the image, it involves the calculation of the gradient direction histogram of the image's local area. Besides, we have just calculated the magnetic gradient tensor matrix in the geomagnetic signal for identification, which matches the HOG feature. The difference of the magnetic anomaly signal is concentrated in the subtle local space and boundary under the conditions of coarse spatial domain sampling, fine direction sampling and strong local normalization. These details can be well represented in the HOG feature. The HOG method relies on the calculation of a localized gradient histogram normalized in a dense mesh. 34 The basic of the method 25,26 is the idea that the figure and the shape of the objects can be well illustrated by the distribution of local gradients or edge directions, even if we don't know the position of the corresponding gradient and edge. In actual operation, the image is divided into small cells, and a one-dimensional gradient direction (or edge direction) histogram is calculated and accumulated in each cell. In order to have better invariance concerning illumination and shadows, the contrast normalization of the histogram is required, which can be achieved by grouping the cells into larger blocks and normalizing all the cells within the block. After normalized, the block descriptor becomes the HOG descriptor, as shown in Figure 3.
The HOG descriptors of all the blocks in the detection window are combined to form the final feature vector, and then the pedestrian detection is performed using the SVM classifier. 25,26 The HOG feature collection and classification algorithm is shown below:

Start
Step 1: Input the image; Step 2: Normalize gamma & color; Step 3: Compute gradients: Step 4: Divide the image into spatial and orientation cells; Step 5: Normalization over the overlap spatial blocks: Step 6: Collect the HOG's detection window; Step 7: Conduct per/non-person classification. End Through this algorithm, the HOG feature of a primary signal can be obtained, and its form is shown in Figure 7 as an example. All the HOG features of nine primary signals could be constructed into feature vectors. Then, all the feature vectors are taken into the SVM, and the output is the recognition result.

A. Simulation and analysis
Based on the theory presented above, we take simulations and experiments as examples, and the experiment signal is compared with simulated signals on the totally same condition for analysis.
Using the experiment table mentioned above, a group of data were measured. There are 3 models in our experiment in total. Two shapes of iron cylinders (0. Here we only simulate and analyze the magnetic anomaly signal of the first model. But in the next experiment, we will use all three model signals. In the meantime, we performed the magnetic anomaly signal simulation on MATLAB on the same conditions (include the local magnetization conditions. The local magnetic dip is 49 ○ and the magnetic declination is -9 ○ . Relative magnetic permeability is 300) as comparison, which is shown in Figure 6(b). Following the process above, we analyze the data.
When taking the TMI data we have detected as an example (As shown in Figure 5(a1)), we decompose the TMI data image using 2D-AVMD as follows, and select the IMF1 as the primary signal, as shown in Figure 5(a2): Figure 4 shows that when K=3, MF is the largest, so the optimal number of IMF is 3. We select K=3 to decompose the TMI data image with 2D-AVMD, and calculate all IMFs' power spectrum in order to analyze the decomposition effect.
In Figure 5(b), the 4 images are the power spectrum of the 4 signals. Then, it can be obtained that the TMI signals contain three complex ingredients with different frequencies, and 2D-AVMD successfully separates ingredients of different frequencies from the mixed original signal.
The original detected signal is composed of many signals of different frequencies. Different ferromagnets, depths, shapes and attitudes will generate different magnetic anomaly signals of various frequencies. It can be seen from Figure 5 and Figure 6 that the IMF1 is basically the same as the preset object both in shape and posture although the data is distorted to some extent under the complex magnetization conditions. It is indicated that 2D-AVMD can effectively decompose signals of different frequencies, and we can get our target signal with this method.
Thus, we choose the IMF1 as the primary signal, which contains the main information of original signals, and there are nine IMF1s that form nine component signals in total. Simulation just takes TMI as an example. Then, we try to extract the HOG feature of the TMI's primary signal, as shown in Figure 7.
Feature selection is one of the key steps in the SVM. The pros and cons of selected feature directly affect the results of classification. Two kinds of feature classification ability are defined: one is interclass discrimination. The larger the degree of features' aggregation between classes is, the better the classification ability is; the other is the intra-class aggregation. The greater the degree of features' aggregation within the classes is, the better the classification ability is. [35][36][37] In order to prove that the HOG feature has effective classification ability, and verify the feasibility of recognizing geomagnetic anomaly objects by the SVM and the HOG, we extract the HOG feature of the TMI's primary signal (IMF1) of the three models proposed in the previous section in experiment. Then, the distribution of the HOG features of the three models in the 3-dimensional are analyzed, as shown in Figure 8.
For example, as the HOG feature of Bxy, Byz, Bxz is 2, 3 and 4 respectively, the corresponding point's coordinate is (2,3,4). A set of HOG features has 36 values. So each shape can correspond to 36 3D points. Just like this, three component signals' HOG features which have sum 3 (components)×3 (shapes)×36 (feature) are in the three dimensional grid of coordinates in Figure 8. [35][36][37] We can judge whether the feature has the ability to classify objects with different shapes by observing the aggregation and dispersion of the data. In Figure 8, the point of each color is a type of HOG feature data of each shape. The axes of x, y, z represent component signals. The three kinds of components are randomly collaborating, and a three-dimensional scattergram is established. The purpose is to visually observe the classification effect of these features' ability to distinguish the 3 shapes. It can be seen that the HOG feature data of the 3 shapes is obviously divided. The interclass discrimination and intra-class aggregation are both great. We can obviously see the dispersion and aggregation between classes. It is shown that different types (HOG of different shapes) of data appear in different areas, and the same type of data is gathered. Thus, we can conclude that the HOG feature of different shapes can be used to identify the geomagnetic objects. Finally, we can construct the features from all originally detected signals into feature vectors, and the SVM can take pattern recognition by those vectors.

B. The classication experiment
In the experiment, two shapes of iron cylinders and an iron circular plate which are mentioned above are used as the identification object, which sets 1, 2 and 3 classification labels correspondingly. Each target sets 4 different postures (changing the depth and orientation). We detect the 12 sets of original signals to identify and distinguish these 3 targets with the method mentioned above. Figure 9 shows nine components' primary signal of the geomagnetic anomaly of an iron cylinder. For example, the white frame in images is the object we want to recognize.
According to the process, we calculate the nine component signals of the 12 original signals respectively. Then, we decompose the 9×12 two-dimensional image signals through 2D-AVMD, and get the 9×12 primary signals. After extracting the 36 HOG features of the 9×12 primary signals, we get the data of 36×9×12 that is randomly divided into training samples and test samples according to the classical ratios of 7:3, and the training samples were constructed into vectors to establish a support vector machine. Finally, the test samples are patterns recognized based on the SVM to classify the 3 targets. The actual labels are their own labels, and the predicted labels are the output of the SVM trained by the training samples. The comparison of actual labels and predicted labels can prove the accuracy.
As there is no other way to identify small magnetic anomalous objects in shallow layers, we cannot compare the accuracy of the method with others. The recognition results are just published, and the next figure shows the classification result: According to the classification result shown in the Figure 10, it comes to the conclusion that with the method, excellent classification effect can be obtained, and the recognition accuracy of 93% can be approved. Thus, it can be applied to the identification of underground small ferromagnetic objects. However, the data is still affected by the geomagnetic background field and the bigger ferromagnets, and the magnetic anomaly information of objects is  Progress EEMD firstly, and then extract the Haar feature. 4 Progress EEMD firstly, and then extract the HOG feature. 5 Progress 2D-AVMD firstly, and then extract the HOG feature. submerged and confused. The redundancy and interference of magnetic anomaly signals still affect the classification results. As a result, most of the classification errors of labels 1 and 2 are confused because the shapes are relatively close, which results in the cross mixture of classification results. In contrast, label 3 has a lower error.
In order to further prove the superiority of the method, five sets of comparison experiments are designed here. The conditions of experiment are designed as shown in Table I. The results of experiment are shown in Figure 11. Among them, EEMD has already been introduced in the introduction. And Local Binary Pattern (LBP), Haar and HOG are the three main features of image feature extraction. Comparing the combination of these methods, the superiority of the method is proved.

VI. CONCLUSION
(1) We take the idea of Pattern Recognition into the field of magnetic object recognition, and use the Support Vector Machine to identify the underground objects. We achieve a good recognition effect in the end, and the formula derivation and analytical calculation of a large number of magnetic measurement data are avoided. We reduced the workload and increased efficiency in the detection of small geomagnetic anomaly underground objects. (2) The nine component signals of the tensor matrix are extracted to identify the magnetic objects, and the magnetic anomaly data is further processed and extended, which compensates for the lack of accuracy of magnetic data, reduces highfrequency noise, improves data quality, and makes the features of data more prominent. All of them enhance the recognition ability. (3) We innovatively use 2D-AVMD to decompose the mixed magnetic anomaly signals and extract the most valuable signals for processing. Besides, it is the first time to extract the HOG feature of the magnetic anomaly image, which is used for the SVM. In the end, excellent results are achieved.