An image matching method based on fusion of manual features and deep features

By integrating the image matching method of manual features and deep features, and using the improved SIFT and DIOU_NMS algorithms and the coordinate attention residual network, the problems in the existing technology such as large amount of calculation, low number of matches, and low accuracy in image matching are solved. It achieves more efficient feature point matching and better robustness.

CN115937552BActive Publication Date: 2024-10-29SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211296680.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2024-10-29
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

Existing image matching methods have shortcomings such as large amount of calculation, low number of matches, and low accuracy. They especially perform poorly in complex image scenes. Moreover, deep learning methods require high computing resources and are difficult to be effective in all scenes. application.

Method used

An image matching method that fuses manual features and deep features is adopted. Manual features are extracted through the improved SIFT and DIOU_NMS algorithms. Deep features are extracted using the coordinate attention residual network CAR-HyNet, and decision-level fusion is performed. Combined with twin network and knowledge distillation training , using the hybrid similarity ternary loss function to train the optimal model, fully considering the confidence of both parties in feature extraction.

Benefits of technology

It improves the matching number and accuracy of image matching, enhances robustness, can be effectively applied in target reconnaissance and embedded devices with tight computing resources, and provides more stable feature point matching pairs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937552B_ABST
    Figure CN115937552B_ABST
Patent Text Reader

Abstract

The invention discloses an image matching method based on the fusion of manual features and deep features, comprising the following steps: extracting manual features of an image to generate a manual feature descriptor, performing L1 normalization on the obtained feature descriptor and calculating the square root of each element; reconstructing a scale pyramid of a color image, extracting a local image block on a corresponding pyramid layer, and rotating the image block to a main direction; using a coordinate attention residual network CAR-HyNet model to extract deep features from the local image block and generate a deep feature descriptor; training the CAR-HyNet model and using a ternary loss to train an optimal model; extracting the confidence levels of both the manual feature descriptor and the deep feature descriptor for feature points, performing decision-level fusion on the manual feature descriptor and the deep feature descriptor to generate new feature points; screening the features that are correctly matched in the images to be paired, and obtaining feature point pairs that are correctly matched in the two images to be paired.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image matching method based on the fusion of manual features and depth features. Background Art

[0002] Image matching is widely used in many fields such as image matching and image stitching due to its fundamental position in machine vision. Traditional image matching algorithms are mainly based on manually designed features, which are more interpretable, but cannot extract high-level semantics and perform poorly in some tasks. A heterogeneous image accurate matching method (CN201910298603.7) combines traditional feature extraction methods such as SIFT features, corner-based shape context features, and LPQ features to accurately match heterogeneous images in order to utilize features such as corners and textures. Since the semantics of the features are shallow, the matching performance will be greatly affected when the image is more complex. With the development of deep learning technology, target detection algorithms represented by deep learning have greatly improved the matching performance and accuracy due to their strong feature extraction capabilities for complex features such as morphology and texture, but they require a large number of scene samples and computing resources for training and reasoning stages, and the accuracy is positively correlated with the computing power and number of samples, which limits its application scenarios. A local feature extraction method based on deep learning (CN 202110611600.1) performs better than the latest methods. However, its training data set is hundreds of thousands, which is very difficult for most scenarios such as target matching of aerial images, and its model is relatively complex and requires high computing power. The combination of traditional machine vision technology with complementary advantages and deep learning has become popular in many fields. It is particularly practical in high-performance systems that need to be implemented quickly, and can provide more reliable feature point matching pairs for target matching scenarios. By using an image matching algorithm that combines traditional features and convolutional features, only one target query image is needed to detect whether there is a target and its specific location in the image, without a large number of specific training samples, and more and more stable feature point matching pairs can be obtained than a single feature. However, most existing methods only directly weight multiple features when fusing them, which can easily lead to feature cancellation. In a heterogeneous image precise matching method, different features are matched separately and then weighted and fused, which also leads to feature cancellation, and the robustness is average. Fully considering the correlation between different features and judging the confidence level of different feature extraction methods on feature points can effectively improve matching performance and retain more potential matching pairs. The literature (Key.Net: Keypoint Detection by Handcrafted and Learned CNN Filters) embeds traditional manual features into the neural network and trains them together, achieving good matching performance, but there is still room for improvement. Summary of the invention

[0003] The present invention improves the above problems, solves the defects in the existing image matching methods, and proposes an image matching method that integrates manual features and deep features. The improved SIFT and DIOU_NMS algorithms are used to preliminarily extract manual features, reconstruct the scale pyramid and extract local image blocks around the feature points, and the proposed coordinate attention residual network CAR-HyNet is used to extract deep features. The proposed feature matching algorithm is used to fuse the two features at the decision level; finally, DEGENSAC is used to complete the refined screening of features. The proposed CAR-HyNet model is trained in a twin network and knowledge distillation mode, and the optimal model is trained using ternary loss. The proposed feature fusion matching algorithm fully considers the confidence level of both parties in feature extraction on the feature points, and effectively improves the number of successful matches. The present invention can be conveniently applied to target reconnaissance, item delivery, and embedded devices with tight computing resources, and has very important practical significance for the development of image matching technology. An image matching method based on the fusion of manual features and deep features is provided, which solves the problems of large image matching calculation amount, low matching number, and low accuracy in the prior art.

[0004] The present invention is achieved by at least one of the following technical solutions.

[0005] An image matching method based on the fusion of manual features and deep features includes the following steps:

[0006] S1, extracting manual features of the image and generating manual feature descriptors, applying Hellinger kernel to the obtained feature descriptors for L1 normalization and taking the square root of each element;

[0007] S2, after screening the feature points, reconstruct the scale pyramid of the color image, extract the local image blocks on the corresponding pyramid layer around the feature points, and rotate the image blocks to the main direction;

[0008] S3, train the coordinate attention residual network CAR-HyNet model and use the ternary loss to train the optimal model;

[0009] S4. Use the trained coordinate attention residual network CAR-HyNet model to extract deep features from local image blocks and generate deep feature descriptors;

[0010] S5, using a feature matching algorithm, extracting the confidence levels of the feature points of the manual feature descriptor used to characterize the manual feature and the deep feature descriptor used to characterize the deep feature, performing decision-level fusion of the manual feature descriptor and the deep feature descriptor in the Euclidean space, and generating new feature points containing potential matching pairs;

[0011] S6. Filter the correctly matched features in the images to be paired, remove the incorrectly matched points, and obtain the correctly matched feature point pairs in the two images to be paired.

[0012] Furthermore, step S1 includes the following steps:

[0013] S101, use SIFT algorithm to construct scale space and detect extreme points;

[0014] S102, locate the key feature points and determine the direction of the key feature points. The calculation formula of the amplitude m(x, y) and the angle θ(x, y) is as follows, where L(·) represents the Gaussian Laplace operator;

[0015]

[0016] S103, using the SIFT algorithm to generate a 128-dimensional manual feature descriptor for characterizing manual features;

[0017] S104, use the Hellinger kernel to perform L1 normalization on the feature descriptor and calculate the square root of each element. The Hellinger kernel is:

[0018]

[0019] Where n represents the dimension of the feature descriptor, x and y are two n-dimensional feature descriptors with Euclidean distance specifications, x i and i They represent the values ​​of the i-th dimension respectively, and H(x,y) represents the Hellinger values ​​of x and y.

[0020] Further, step S2 includes the following steps:

[0021] S201, sorting the detected feature points in descending order according to their strengths;

[0022] S202, use the center point distance intersection-over-union non-maximum suppression algorithm DIOU-NMS to calculate the classification confidence of each feature point, remove abnormal points, and prevent feature points from being too crowded in one area. The formula is as follows:

[0023]

[0024] Among them, s i is the classification confidence, ∈ is the NMS threshold, M is the highest intensity box, B i is the intensity value of different boxes, R DIOU (M,B i ) is the distance between the center points of the two boxes, where b and b gt Represents the predicted box B and the real box B gtThe center point of , ρ(·) is the Euclidean distance, c is the diagonal length of the minimum bounding box covering the two boxes, and IoU represents the intersection over union ratio of the predicted box and the true box; S203, the strength of the feature points filtered by DIOU-NMS is sorted in descending order again, and a specified number of feature points are retained from high to low according to the strength, so as to control the number of feature points;

[0025] S204, reconstructing the scale pyramid of the color image according to the SIFT scale pyramid construction method;

[0026] S205, select the pyramid layer according to the feature point scale information, take the feature point as the center, and cut out the local area image block of a*a with a*a pixels as the side length, and scale it to b*bghy

[0027] S206: Rotate the image block to the main direction according to the angle information of the feature point.

[0028] Furthermore, the coordinate attention residual network CAR-HyNet model is based on the convolutional neural network HyNet, and adds a coordinate attention module CoorAtt to the third block in layer1 and the second block in layer2 to enhance the attention to position information, and adds a coordinate attention hourglass module in layer3 and layer6, which are connected in a residual manner.

[0029] Furthermore, the final output of the coordinate attention module is:

[0030]

[0031] Among them, i∈[0,W),j∈[0,H) represents the horizontal and vertical positions, x c (i,j) is the eigenvalue at channel c, horizontal i, and vertical j, and are the weights of the attention mechanism in the vertical direction h and horizontal direction w at channel c, respectively, c (i,j) is the corresponding x c (i,j) Output after adding weights.

[0032] Furthermore, the coordinate attention hourglass module superimposes the output features with the original input features.

[0033] The first layer uses a depth-wise separable convolution Dwise 3x3 with a size of 3x3 to extract features once;

[0034] The aforementioned coordinate attention module CoorAtt is placed after the first layer of 3x3 depth-separable convolution Dwise 3x3, and the features of the two are concatenated in a residual manner Cat; then a 1x1 convolution Conv 1x1 is used for dimensionality reduction; then a 1x1 convolution Conv 1x1 is used for dimensionality increase and restored to the input dimension; finally, the features of the previous step are superimposed on the original input features in a short connection manner.

[0035] Furthermore, the CAR-HyNet model is trained using a twin network structure, and weights are shared during the training process; self-distillation is performed with two identical CAR-HyNet models to improve the performance of the model.

[0036] Furthermore, the optimal model is trained using the mixed similarity ternary loss function. The loss function formula is as follows:

[0037]

[0038] Among them, γ is the regularization parameter, N is the dimension of the feature descriptor, and L Triplet is the ternary loss function, is the constraint before the L2 normalization operation, L is the final loss function, m is a constant greater than 0 set manually, ||x i || and represents a pair of positive descriptors before L2 normalization, θ represents the angle between feature descriptors, and s H (θ) is the mixed similarity measure, and Respectively represent the angles between the feature descriptors of the positive and negative samples in the i-th dimension, and denote the mixed similarity measure of positive and negative samples in the i-th dimension, s(·) and d(·) denote the support for positive and negative samples, respectively. α is a scalar ranging from 0 to +∞, which is used to adjust the ratio between s(·) and d(·). Z is the normalization factor.

[0039] Further, step S5 comprises the following steps:

[0040] S501: for the two images to be matched, the manual feature descriptors of the two images obtained after step S4 are respectively obtained. and And deep feature descriptors and

[0041] S502, for the two features, respectively calculate the distances of the feature points in the Euclidean space:

[0042]

[0043] Among them, dim represents the dimension of the feature descriptor, is a manual feature descriptor, is a deep feature descriptor.

[0044] S503: For the manual feature descriptor and the deep feature descriptor, respectively, the nearest neighbor ratio method is used to calculate their nearest neighbor points, and the Euclidean distance between the i-th feature point under the manual feature descriptor and other feature points is obtained. The Euclidean distance between the i-th feature point and other feature points under the deep feature Among them, m = 1, 2 represents the nearest neighbor and the next nearest neighbor;

[0045] The nearest neighbor distance ratio method is used to determine whether the match is successful. That is, when the ratio of the nearest neighbor distance to the next nearest neighbor distance is less than the specified value, the match is considered successful.

[0046] S504, first traverse the SIFT feature points in sequence, for each feature point's two nearest neighboring points, find the distance between the two points on the CAR-HyNet feature point, use the nearest neighbor distance ratio method to determine whether the feature point is successfully matched based on the manual feature descriptor and the deep feature descriptor, and automatically adjust the weight value w so that the one determined to be successful is retained;

[0047] S505, adjust the weight value w∈[0,1], fuse the Euclidean distance of the manual feature descriptor and the deep feature descriptor, and generate a new distance as the nearest neighbor of the pair of feature points and next nearest neighbor distance The fusion formula is as follows:

[0048]

[0049] S506, traverse the feature points of the CAR-HyNet model in turn, repeat step S505, complete cross-validation, and remove duplicate feature points in the previous execution of step S505 and the current execution of step S505.

[0050] S507, perform a nearest neighbor ratio method screening again with a stricter nearest neighbor distance ratio to filter out false matches as much as possible and generate new feature points containing potential matching pairs.

[0051] Furthermore, step S6 includes using a degenerate sampling consensus algorithm to complete feature screening, remove mismatched points, and finally obtain feature point pairs that contain correct matches in the two images to be paired.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] 1. A coordinate attention residual network CAR-HyNet is proposed for extracting deep features. The proposed CAR-HyNet model uses three-channel RGB image input to extract more effective information, adds a coordinate attention module to enhance the focus on location information, combines coordinate attention with an hourglass structure to effectively improve the performance of the model, increases the number of convolutional layers to enhance the nonlinearity of the model, and combines a residual structure to avoid gradient diffusion, making it more suitable for feature extraction scenarios. It is trained using a twin network and knowledge distillation method, and uses a hybrid similarity ternary loss function to train the optimal model.

[0054] 2. It combines the advantages of traditional manual features and deep features to effectively improve the number of matches and accuracy of image matching. The improved SIFT and DIOU_NMS algorithms are used to preliminarily extract manual feature descriptors for characterizing manual features, reconstruct the color image scale pyramid and extract local image blocks around feature points, and use CAR-HyNet to extract deep feature descriptors for characterizing deep features.

[0055] 3. A decision-level feature fusion and matching method based on Euclidean distance is proposed. The proposed feature fusion matching algorithm fully considers the confidence level of both parties in feature extraction and effectively improves the number of successful matches. It can extract more effective feature information and has better matching number, accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 It is a general algorithm flow chart of the image matching method based on the fusion of manual features and deep features in an embodiment of the present invention;

[0057] Figure 2 is a flow chart of SIFT feature point detection and screening in an embodiment of the present invention;

[0058] Figure 3 It is a comparison diagram of an image block centered on a feature point on a scale pyramid according to an embodiment of the present invention before and after it is rotated to the main direction;

[0059] Figure 4 It is a model structure diagram of the CAR-HyNet convolutional neural network proposed in an embodiment of the present invention;

[0060] Figure 5 is a model structure diagram of coordinate attention according to an embodiment of the present invention;

[0061] Figure 6 It is a structural diagram of a CA-SandGlass module combining coordinate attention and an hourglass structure according to an embodiment of the present invention;

[0062] Figure 7 It is a twin network structure diagram of an embodiment of the present invention;

[0063] Figure 8is a training curve diagram of the distance between positive and negative samples in an embodiment of the present invention;

[0064] Fig. 9 is a FPR curve diagram of an embodiment of the present invention on the Brown data set;

[0065] Fig.10 This is a schematic diagram of the previous direct weighted fusion method;

[0066] Fig.11 Schematic diagram of distance-based decision-level feature fusion matching according to an embodiment of the present invention;

[0067] Fig.12 This is the actual matching effect diagram of traditional manual features and the fusion of manual features and deep features;

[0068] Fig.13 This is a comparison chart of the correct matching numbers of the proposed CAR-HyNet model and other algorithms at different NNDR ratios;

[0069] Fig.14 This is a comparison chart of the correct match number and accuracy of the proposed CAR-HyNet model and other algorithms. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] Example 1

[0072] like Figure 1 As shown, this example discloses an image matching method based on the fusion of manual features and deep features. It mainly combines the manual feature descriptors extracted by the improved SIFT algorithm for characterizing manual features with the deep feature descriptors extracted by the proposed coordinate attention residual network CAR-HyNet for characterizing deep features. The proposed fusion matching algorithm is used to perform feature fusion based on Euclidean distance at the decision level and then match. Specifically, the following steps are included:

[0073] S1. First, use the SIFT algorithm to preliminarily extract features and generate feature descriptors. Apply the Hellinger kernel to the obtained feature descriptors for L1 normalization and calculate the square root of each element. The specific process is as follows:

[0074] S101. Use SIFT algorithm to construct scale space and detect extreme points. The scale space formula is as follows:

[0075] L(x,y,σ)=G(x,y,σ)*I(x,y) (1)

[0076]

[0077] Among them, x, y represent the image coordinates, x i ,y i is the i-th coordinate around x,y, I(x,y) represents the original image, G(x,y,σ) is a two-dimensional Gaussian function, σ is the scale coefficient reflecting the blur degree of the image, and its value is positively correlated with the blur degree. By setting different σ, images of different scales can be generated. G(x i ,y i ,σ) is in the image x i and i The two-dimensional Gaussian function at .

[0078] The extreme points are determined by comparing the Gaussian difference (DoG) values ​​between the adjacent upper and lower image pixels in the same group. The DoG Gaussian difference operator formula is as follows:

[0079]

[0080] in, and are the two-dimensional Gaussian functions when σ is equal to σ1 and σ2 respectively.

[0081] S102, accurately locate the feature key point and determine the direction of the feature key point, calculate the gradient amplitude m(x, y) and the angle θ(x, y) of each pixel point in a region centered on the feature point and with a radius of 3×1.5σ, and the calculation formulas of the amplitude and the angle are as follows, where L(·) represents the Gaussian Laplace operator;

[0082]

[0083] S103, using the SIFT algorithm to generate a 128-dimensional manual feature descriptor for characterizing manual features;

[0084] S104, normalize the feature descriptor so that the measurement method is more accurate than the Euclidean distance. The specific steps are as follows:

[0085] S10401, apply Hellinger kernel to normalize the feature vector x by l1 to obtain x ′ , the Hellinger kernel is:

[0086]

[0087] Where n represents the dimension of the feature descriptor, x and y are two n-dimensional feature descriptors with Euclidean distance specifications, x i and i They represent the values ​​of the i-th dimension respectively, and H(x,y) represents the Hellinger values ​​of x and y.

[0088] S10402, x ′ Find the square root of each element of ;

[0089] S10403, perform l2 normalization, optional;

[0090] S2. Filter the feature points to obtain a manual feature descriptor with better performance. Imitate the way SIFT constructs the scale pyramid, reconstruct the scale pyramid of the color image, extract local image blocks on the corresponding pyramid layer around the feature points, and rotate the image blocks to the main direction, so that the model has a certain scale and rotation invariance; Figure 2 As shown, the specific process is as follows:

[0091] S201, sorting the detected feature points in descending order according to their strengths;

[0092] S202, use the center point distance intersection-over-union non-maximum suppression algorithm DIOU-NMS to calculate the classification confidence of each feature point, remove abnormal points, and prevent feature points from being too crowded in one area. The formula is as follows:

[0093]

[0094] Among them, s i is the classification confidence, ∈ is the NMS threshold, M is the highest intensity box, B i is the intensity value of different boxes, R DIOU (M,B i ) is the distance between the center points of the two boxes. gt Represents the predicted box B and the real box B gt , p(·) is the Euclidean distance, c is the diagonal length of the minimum bounding box covering the two boxes, and IoU represents the intersection over union ratio of the predicted box to the true box.

[0095] S203, sorting the feature points filtered by DIOU-NMS in descending order again, retaining a specified number of feature points in descending order of intensity, thereby controlling the number of feature points and improving calculation efficiency and speed;

[0096] S204, reconstructing the scale pyramid of the color image by imitating the method of constructing the scale pyramid by SIFT;

[0097] S205, selecting the pyramid layer according to the feature point scale information, taking the feature point as the center and 64x64 pixels as the side length, cutting out a 64x64 local area image block, and scaling the size to 32x32;

[0098] S206: Rotate the image block to the main direction according to the angle information of the feature point, and compare the image block before and after the rotation. Figure 3 a, Figure 3 As shown in b, the new coordinates after rotation are:

[0099]

[0100] Among them, r is the radius of the feature point area after rotation, x, y∈[-r, r] represents the coordinates before rotation, θ is the main direction angle, σ is the scale factor of the layer where the feature point is located, and d represents the number of blocks into which the feature point area is divided.

[0101] S3. The coordinate attention residual network CAR-HyNet model is used to extract 128-dimensional deep features from local image blocks. The structure of the CAR-HyNet model is as follows: Figure 4 shown.

[0102] The coordinate attention residual network CAR-HyNet model is based on the convolutional neural network HyNet and consists of 9 layers. The initial input of the CAR-HyNet model uses a three-channel RGB image to extract more effective information, that is, the input dimension is 3. In the first layer layer1, the input is filtered by response normalization FRN and threshold linear unit TLU, and then passes through the convolution CONV 3x3 with a size of 3x3, the output dimension becomes 32, and then the input is enhanced by the filter response normalization FRN, coordinate attention module CoorAtt, and threshold linear unit TLU. In the second layer layer2, after the convolution CONV3x3 with a size of 3x3, the output dimension remains 32, and the extracted features are enhanced by the filter response normalization FRN, coordinate attention module CoorAtt, and threshold linear unit TLU. In the third layer layer3, after the coordinate attention hourglass module CA-SandGlass, the output dimension remains 32, and the output features are added to the features of the previous layer Add in a residual connection manner. The fourth layer layer4 passes through the convolution CONV 3x3 / 2 with a size of 3x3 and a stride of 2, and the output dimension becomes 64, and then the filter response normalization FRN and threshold linear unit TLU are performed. The fifth layer layer5 passes through the convolution CONV 3x3 with a size of 3x3, and the output dimension remains at 64, and then the filter response normalization FRN and threshold linear unit TLU are performed. The sixth layer layer6 passes through the coordinate attention hourglass module CA-SandGlass, and the output dimension remains at 64, and the output features are added to the features of the previous layer Add in a residual connection. The seventh layer layer7 passes through the convolution CONV 3x3 / 2 with a size of 3x3 and a stride of 2, and the output dimension becomes 128, and then the filter response normalization FRN and threshold linear unit TLU are performed. The eighth layer layer8 passes through the convolution CONV 3x3 with a size of 3x3, and the output dimension remains at 128, and then the filter response normalization FRN and threshold linear unit TLU are performed. The ninth layer layer9 undergoes a convolution CONV 3x3 of size 3x3, and the output dimension is kept at 128. Finally, batch normalization BN and regularization L2Norm are used to output a 128-dimensional deep feature descriptor.

[0103] In the third block of layer1 and the second block of layer2, the coordinate attention module CoorAtt is added to enhance the attention to the position information. CoorAtt divides the channel attention into two parallel one-dimensional feature encoding processes, horizontal W and vertical H, and captures long-range dependencies in one direction while retaining precise position information in the other direction. The complementary combination of the two can help the network locate the target of interest.

[0104] The structure of the coordinate attention module is as follows Figure 5 As shown. The final output of the coordinate attention module is:

[0105]

[0106] Among them, i∈[0,W),j∈[0,H) represents the horizontal and vertical positions, x c (i,j) is the eigenvalue at channel c, horizontal i, and vertical j, and are the weights of the attention mechanism in the vertical direction h and horizontal direction w at channel c, respectively, c (i,j) is the corresponding x c (i,j) Output after adding weights.

[0107] Add coordinate attention hourglass modules to layer3 and layer6 and connect them in a residual manner.

[0108] Combining the coordinate attention module with the hourglass structure, the CA-SandGlass module diagram is as follows: Figure 6 shown.

[0109] This structure can reduce the loss of features when the module extracts features, enhance the module's ability to extract features, and use less parameters and calculations. The specific structure of the coordinate attention hourglass module CA-SandGlass is as follows:

[0110] The first layer of CA-SandGlass uses a depth-wise separable convolution Dwise 3x3 with a size of 3x3 to extract features once;

[0111] The aforementioned coordinate attention module CoorAtt is placed after the first layer of 3x3 depth-separable convolution Dwise 3x3, and the features of the two are concatenated in a residual manner Cat; then a 1x1 convolution Conv 1x1 is used for dimensionality reduction; then a channel shuffle layer Channel Shuffle is used to rearrange the channels, merge the feature maps of different channels together, and enhance the feature representation; then a 1x1 convolution Conv 1x1 is used for dimensionality increase and restore to the input dimension; finally, the features of the previous step are added and superimposed with the original input features in a short connection manner.

[0112] S4. Train the CAR-HyNet model using twin networks and knowledge distillation, and use ternary loss to train the optimal model. The specific process is as follows:

[0113] S401. Use a twin network structure to share weights during training. The twin network structure used is as follows: Figure 7 As shown;

[0114] S402, performing collaborative training by self-distillation of two identical networks to improve the performance of the model;

[0115] S403, use the mixed similarity ternary loss function to train the optimal model, the loss function formula is as follows:

[0116]

[0117] Among them, γ is the regularization parameter, N is the dimension of the feature descriptor, and L Triplet is the ternary loss function, is the constraint before the L2 normalization operation, L is the final loss function, m is a constant greater than 0 set manually, ||x i || and represents a pair of positive descriptors before L2 normalization, θ represents the angle between feature descriptors, and s H (θ) is the mixed similarity measure, and Respectively represent the angles between the feature descriptors of the positive and negative samples in the i-th dimension, and denote the mixed similarity measure of positive and negative samples in the i-th dimension, s(·) and d(·) denote the support for positive and negative samples, respectively. α is a scalar ranging from 0 to +∞, which is used to adjust the ratio between s(·) and d(·). Z is a normalization factor to ensure that the maximum magnitude of the gradient is 1.

[0118] The training curve of the positive and negative sample distance is as follows Figure 8 As shown in a and b of , the FPR curve on the Brown data set is as follows Fig. 9 As shown in a and b.

[0119] S5. Using the proposed feature matching algorithm, fully consider the confidence level of both parties in the feature extraction, and fuse the two features at the decision level in the Euclidean space to generate new feature points. Fig.10 As shown in the figure, the proposed distance-based decision-level fusion matching diagram is shown in Fig.11 The specific process is as follows:

[0120] S501: for the two images to be matched, the manual feature descriptors of the two images obtained after steps S3 and S4 are respectively obtained. and And deep feature descriptors and

[0121] S502: For the two features, respectively calculate the distances of the feature points in the Euclidean space. The distance calculation formula is as follows:

[0122]

[0123] Among them, dim represents the dimension of the feature descriptor. Can be and Can be and

[0124] S503: For the two features, use the nearest neighbor ratio method to calculate their 2 nearest neighbor points, and obtain the Euclidean distance between the i-th feature point and other feature points under the manual feature descriptor. The Euclidean distance between the i-th feature point and other feature points under the deep feature Among them, m=1,2 represents the nearest neighbor and the next nearest neighbor. The nearest neighbor distance ratio method is used to determine whether the match is successful, that is, when the ratio of the nearest neighbor distance to the next nearest neighbor distance is less than the specified value, the match is considered successful. The ratio here first adopts a loose strategy to retain more implicit matching point pairs.

[0125] S504, first traverse the SIFT feature points in turn, for each feature point's two nearest neighboring points, find the distance between the two points on the CAR-HyNet feature point, use the nearest neighbor distance ratio method to determine whether the feature point is successfully matched based on the manual feature descriptor and the deep feature descriptor, and automatically adjust the weighting value w so that the one determined to be successful is retained.

[0126] S505, using the weighted value w∈[0,1] to fuse the Euclidean distance of the manual feature descriptor and the deep feature descriptor, and generate a new distance as the nearest neighbor of the pair of feature points and next nearest neighbor distance The fusion formula is as follows:

[0127]

[0128] S506, traverse the feature points of CAR-HyNet in turn, repeat step S505, complete cross-validation, and remove the duplicate feature points in the previous step S505 and the current step S505.

[0129] S507, performing a nearest neighbor ratio method screening with a stricter nearest neighbor distance ratio to filter out false matches as much as possible, thereby generating new feature points containing potential matching pairs;

[0130] S6. For the rough matching points, the DEGENerate SAmple Consensus (DEGENSAC) algorithm is used to complete the fine-grained screening of features. This algorithm is faster than the traditional RANSAC and has a higher average accuracy. Finally, the correct matching feature point pairs in the two images to be paired are obtained. The matching effect is as follows Fig.12 , Fig.13 and Fig.14 shown.

[0131] Example 2

[0132] The CAR-HyNet model of this embodiment inserts a layer after layer7 of embodiment 1. The eighth layer layer8 passes through the coordinate attention hourglass module CA-SandGlass, and the output dimension is kept at 128, and the output feature is added to the feature Add of the previous layer in a residual connection manner. The ninth layer layer9 passes through the convolution CONV 3x3 with a size of 3x3, and the output dimension is kept at 128, and then the filter response normalization FRN and threshold linear unit TLU are performed. The tenth layer layer10 passes through the convolution CONV 3x3 with a size of 3x3, and the output dimension is kept at 128. Finally, through batch normalization BN and regularization L2Norm, a 128-dimensional deep feature descriptor is output.

[0133] Example 3

[0134] The specific structure of the coordinate attention hourglass module CA-SandGlass in this example is as follows:

[0135] The first layer of CA-SandGlass uses a depth-wise separable convolution Dwise 3x3 with a size of 3x3 to extract features once;

[0136] The aforementioned coordinate attention module CoorAtt is placed after the first layer of 3x3 depth-separable convolution Dwise 3x3, and the features of the two are concatenated in a residual manner Cat; then a 1x1 convolution Conv 1x1 is used for dimensionality reduction; then a 1x1 convolution Conv 1x1 is used for dimensionality increase to restore it to the input dimension; finally, the features of the previous step are added to the original input features in a short connection manner.

[0137] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. An image matching method based on the fusion of manual features and deep features, characterized in that: The following steps are involved: S1. Use SIFT algorithm to extract manual features of the image and generate manual feature descriptors. Apply Hellinger kernel to perform L1 normalization on the obtained feature descriptors and calculate the square root of each element. S2, after screening the feature points, reconstruct the scale pyramid of the color image, extract the local image blocks on the corresponding pyramid layer around the feature points, and rotate the image blocks to the main direction; S3, train the coordinate attention residual network CAR-HyNet model and use the ternary loss to train the optimal model; S4. Use the trained coordinate attention residual network CAR-HyNet model to extract deep features from local image blocks and generate deep feature descriptors; S5, using a feature matching algorithm, extracting the confidence levels of the feature points of the manual feature descriptor used to characterize the manual feature and the deep feature descriptor used to characterize the deep feature, performing decision-level fusion of the manual feature descriptor and the deep feature descriptor in the Euclidean space, and generating new feature points containing potential matching pairs; S6, screening the correctly matched features in the to-be-paired images, removing the mismatched points, and obtaining pairs of correctly matched feature points in the two to-be-paired images; The coordinate attention residual network CAR-HyNet model is based on the convolutional neural network HyNet, and adds a coordinate attention module CoorAtt to the third block in layer1 and the second block in layer2 to enhance the attention to position information, and adds a coordinate attention hourglass module to layer3 and layer6, and connects them in a residual manner; The final output of the coordinate attention module is: Among them, i∈[0,W),j∈[0,H) represents the horizontal and vertical positions, x c (i,j) is the eigenvalue at channel c, horizontal i, and vertical j, and are the weights of the attention mechanism in the vertical direction h and horizontal direction w at channel c, respectively, c (i,j) is the corresponding x c (i,j) Output after adding weights; The coordinate attention hourglass module superimposes the output features with the original input features; The first layer uses a depth-wise separable convolution Dwise 3x3 with a size of 3x3 to extract features once; The aforementioned coordinate attention module CoorAtt is placed after the first layer of 3x3 depth-separable convolution Dwise 3x3, and the features of the two are spliced ​​in a residual manner Cat; then a 1x1 convolution Conv 1x1 is used for dimensionality reduction; then a 1x1 convolution Conv 1x1 is used for dimensionality increase to restore to the input dimension; finally, the features of the previous step are superimposed with the original input features in a short connection manner; Step S5 includes the following steps: S501: for the two images to be matched, the manual feature descriptors of the two images obtained after steps S3 and S4 are respectively obtained. and And deep feature descriptors and S502, for the two features, respectively calculate the distances of the feature points in the Euclidean space: Among them, dim represents the dimension of the feature descriptor, is a manual feature descriptor, is a deep feature descriptor; S503: For the manual feature descriptor and the deep feature descriptor, respectively, the nearest neighbor ratio method is used to calculate their nearest neighbor points, and the Euclidean distance between the i-th feature point under the manual feature descriptor and other feature points is obtained. The Euclidean distance between the i-th feature point and other feature points under the deep feature Among them, m = 1, 2 represents the nearest neighbor and the next nearest neighbor; The nearest neighbor distance ratio method is used to determine whether the match is successful. That is, when the ratio of the nearest neighbor distance to the next nearest neighbor distance is less than the specified value, the match is considered successful. S504, first traverse the SIFT feature points in sequence, for each feature point's two nearest neighboring points, find the distance between the two points on the CAR-HyNet feature point, use the nearest neighbor distance ratio method to determine whether the feature point is successfully matched based on the manual feature descriptor and the deep feature descriptor, and automatically adjust the weight value w so that the one determined to be successful is retained; S505, adjust the weight value w∈[0,1], fuse the Euclidean distance of the manual feature descriptor and the deep feature descriptor, and generate a new distance as the nearest neighbor of the pair of feature points and next nearest neighbor distance The fusion formula is as follows: S506, traverse the feature points of the CAR-HyNet model in turn, repeat step S505, complete cross-validation, and remove duplicate feature points in the previous execution of step S505 and the current execution of step S505.

2. The image matching method based on fusion of manual features and deep features according to claim 1 is characterized in that: Step S1 includes the following steps: S101, use SIFT algorithm to construct scale space and detect extreme points; S102, locate the key feature points and determine the direction of the key feature points. The calculation formula of the amplitude m(x, y) and the angle θ(x, y) is as follows, where L(·) represents the Gaussian Laplace operator; S103, using the SIFT algorithm to generate a 128-dimensional manual feature descriptor for characterizing manual features; S104, use the Hellinger kernel to perform L1 normalization on the feature descriptor and calculate the square root of each element. The Hellinger kernel is: Where n represents the dimension of the feature descriptor, x and y are two n-dimensional feature descriptors with Euclidean distance specifications, x i and i They represent the values ​​of the i-th dimension respectively, and H(x,y) represents the Hellinger values ​​of x and y.

3. The image matching method based on fusion of manual features and deep features according to claim 1 is characterized in that: Step S2 includes the following steps: S201, sorting the detected feature points in descending order according to their strengths; S202, use the center point distance intersection-over-union non-maximum suppression algorithm DIOU-NMS to calculate the classification confidence of each feature point, remove abnormal points, and prevent feature points from being too crowded in one area. The formula is as follows: Among them, s i is the classification confidence, ∈ is the NMS threshold, M is the highest intensity box, B i is the intensity value of different boxes, B DIOU (M,B i ) is the distance between the center points of the two boxes, where b and b gt Represents the predicted box B and the real box B gt , ρ(·) is the Euclidean distance, c is the diagonal length of the minimum bounding box covering the two boxes, and IoU represents the intersection over union ratio of the predicted box to the true box; S203, sorting the feature points filtered by DIOU-NMS in descending order again, retaining a specified number of feature points from high to low in terms of intensity, thereby controlling the number of feature points; S204, reconstructing the scale pyramid of the color image according to the SIFT scale pyramid construction method; S205, selecting the pyramid layer according to the feature point scale information, taking the feature point as the center and a*a pixels as the side length, cutting out a*a local area image block, and scaling the size to b*bghy; S206: Rotate the image block to the main direction according to the angle information of the feature point.

4. The image matching method based on fusion of manual features and deep features according to claim 1 is characterized in that: The CAR-HyNet model is trained using a twin network structure and weights are shared during the training process. Two identical CAR-HyNet models are used for self-distillation to improve the performance of the model.

5. The image matching method based on fusion of manual features and deep features according to any one of claims 1 to 4, characterized in that: The step S6 includes using a degenerate sampling consensus algorithm to complete feature screening, remove mismatched points, and finally obtain feature point pairs that contain correct matches in the two images to be paired.

Citation Information

Patent Citations

  • Heterologous image accurate matching method

    CN110097093A

  • A Deep Learning-Based Local Feature Extraction Method

    CN113361542B