A training method for local descriptor networks for natural scene image matching

Through the training method of adversarial generation loss function and label confidence weighting, adversarial samples are generated and the descriptor network is optimized, which solves the problem of insufficient robustness of local descriptors in natural scenes and significantly improves the robustness and accuracy of image matching. performance, improving the performance of downstream tasks.

CN115018056BActive Publication Date: 2024-09-06HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210722014.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2024-09-06
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

Existing local descriptors are not robust enough in natural scenes and cannot effectively deal with complex interference factors, resulting in insufficient robustness and accuracy of image matching algorithms, limiting the effectiveness of tasks such as visual positioning and three-dimensional reconstruction.

Method used

The training method of adversarial generation loss function and label confidence weighting is used to generate adversarial samples through geometric perturbation, combined with the bilinear interpolation module and affine matrix in STN, to optimize the robustness and accuracy of the descriptor network, using hybrid distance and Dynamic sample weighting improves network performance.

Benefits of technology

It significantly improves the performance of the descriptor network under large interference conditions in natural scenes, improves the robustness and accuracy of image matching, and thus improves the effect of downstream tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115018056B
    Figure CN115018056B
Patent Text Reader

Abstract

The present invention belongs to the field of image processing, and specifically relates to a training method for a local descriptor network for natural scene image matching, including: using original samples and generated samples to train the descriptor network; in each training, the following method is first used to generate samples: each original sample is sampled by a geometric perturbation method to generate each new sample; and the current descriptor network is used to calculate the descriptor of each new sample and its corresponding original sample, and the adversarial generation loss function is calculated by the descriptor, and the control parameters are optimized based on the back propagation of the adversarial generation loss function to generate a generated sample with a larger adversarial generation loss function; and the loss function used in each iterative training includes the three-input loss of the original sample and the three-input loss of the generated sample, and the distance in each loss is calculated using the mixed distance, and the mixing coefficient in the mixed distance is obtained by the maximum likelihood estimation. The method of the present invention can improve the performance of the descriptor under large interference conditions in natural scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing, and more specifically, relates to a training method of a local description subnetwork for natural scene image matching. Background Art

[0002] Image matching is the process of finding the correspondence between two images using computer vision technology. Image matching is widely used in visual positioning, SLAM, 3D reconstruction, image stitching and other tasks, and is one of the important tasks of computer vision. In the field of image matching, due to the complexity and diversity of application scenarios, there are a large number of interference factors, such as rotation, scale, noise, blur, occlusion, illumination changes, perspective changes and complex backgrounds. These interference factors bring great challenges to the target matching and positioning tasks in complex natural scenes. Therefore, being able to obtain accurate and robust matching relationships between images has always been one of the key technologies for visual tasks.

[0003] Local descriptors are one of the better image matching methods currently available. They are mainly based on finding key points in the image and describing the neighborhood around the key points to obtain descriptors. Finally, a specific distance function is used to determine whether the descriptors match.

[0004] At present, there are many matching methods based on local descriptors. However, due to the existence of complex interference factors in natural scenes, the existing descriptors are not robust enough to cope with scenes with strong interference, which leads to insufficient robustness of the matching algorithm and easy failure, thus limiting the effectiveness of various downstream tasks such as visual positioning and 3D reconstruction.

[0005] Therefore, it is necessary to propose a descriptor that is more robust to environmental interference to alleviate this situation. Summary of the invention

[0006] In response to the defects of the prior art and the need for improvement, the present invention provides a training method for a local descriptor network for natural scene image matching, which aims to optimize the robustness and accuracy of current deep learning descriptors and improve the performance of descriptors under conditions of greater interference in natural scenes, thereby improving the robustness and accuracy of image matching, and thus improving the performance of downstream tasks.

[0007] To achieve the above object, according to one aspect of the present invention, a training method for a local descriptor network for natural scene image matching is provided, comprising:

[0008] Both the original samples and the generated samples are used as training samples to train the local description subnetwork;

[0009] In each iterative training, the generated samples are first generated in the following manner:

[0010] Each original sample is sampled by means of geometric perturbation to generate each new sample; and the current descriptor network is used to calculate the descriptor of each new sample and its corresponding original sample, and the adversarial generation loss function is calculated through the descriptor, and the control parameters are optimized based on the back propagation of the adversarial generation loss function to generate a generated sample with a larger adversarial generation loss function;

[0011] The training loss function used in each iteration training includes the original sample three-input loss And the three-input loss of generated samples In the two parts, the distance in each loss is calculated using the mixed distance, and the mixing coefficient in the mixed distance is obtained using the maximum likelihood estimation.

[0012] Furthermore, when generating the generated samples, the bilinear interpolation module in the STN is used as the sample generator, and the affine matrix is ​​selected as the control parameter, and the control parameter is used to generate the sampling grid.

[0013] Furthermore, the adversarial generation loss function uses the L2 distance between the descriptors of the generated sample and its corresponding original sample, expressed as:

[0014]

[0015] Where, d a ,d p is a pair of original samples x with matching relationship a 、x p The descriptor obtained by the descriptor network, To generate samples The resulting descriptor, ||·||2, represents the L2 distance between vectors.

[0016] Furthermore, FGSM is used to optimize and update control parameters used to control the sampling process.

[0017] Furthermore, the method further includes: calculating a label confidence of each generated image in each generated sample, wherein the label confidence represents a quantification of the similarity between the original sample and the generated sample;

[0018] but Some use label confidence weighting.

[0019] Furthermore, the generated sample three-input loss It is expressed as:

[0020]

[0021] In the formula, l i is the label confidence of the generated sample of the i-th three-input sample group; Dcos (θ) represents the cosine distance; Respectively represent the matching sample pairs (x a , x p ) and mismatched sample pairs (x a , x n )’s angle distance; mask i is the selection mask for the i-th three-input sample group, and mask i ∈{0, 1}.

[0022] Furthermore, the label confidence is calculated by generating a ratio of the number of valid pixels in the sample image to the number of pixels in the corresponding original sample image.

[0023] Furthermore, the mixed distance is the cosine distance D cos and L2 distance D L2 A mixture of.

[0024] Further, calculate the original sample three-input loss And the three-input loss of generated samples The mixing distances used are the same and are all calculated using the original samples.

[0025] The present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is executed by a processor, the device where the storage medium is located is controlled to execute a training method for a local descriptor network for natural scene image matching as described above.

[0026] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0027] (1) In the training phase, the present invention first inputs the image block as training data into the spatial adversarial perturbation module, and generates a sample that has undergone a slight geometric perturbation in the image space by an adversarial training method that increases the adversarial generation loss function. Since the sample is generated in an adversarial manner, it has a strong interference to the network. That is, the present invention generates adversarial samples that have a strong affine transformation interference to the network through the adversarial training method and uses them for network training, thereby improving the robustness of the descriptor network.

[0028] (2) The present invention uses the generated samples and the original samples together, and trains them together using the label weighted loss function, thereby making full use of the interference nature of the generated samples on the network, so that the network can learn more robust features. That is, the present invention uses the generated samples in the descriptor network training by designing a loss function based on label confidence weighting, thereby enhancing the robustness of the descriptor network, and at the same time making the descriptor network obtain greater weights on samples with higher confidence, thereby promoting network optimization.

[0029] (3) Based on the gradient distribution of training samples, the present invention proposes a dynamic sample weighting method based on maximum likelihood estimation, so that network training can pay more attention to samples around the decision boundary, thereby further improving the performance of the descriptor network. That is, by adopting a method of dynamic probability weighting of samples, the present invention enables the descriptor network to focus more on the optimization of samples at the probability decision boundary, thereby improving the performance of the descriptor network.

[0030] In general, the present invention optimizes the robustness and precision of current deep learning descriptors, improves the performance of descriptors under conditions of greater interference in natural scenes, thereby improving the robustness and accuracy of image matching, and thus improving the performance of downstream tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of an overall network model provided by an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of the spatial disturbance countermeasure principle provided by an embodiment of the present invention;

[0033] Figure 3 A schematic diagram of label confidence estimation provided by an embodiment of the present invention;

[0034] Figure 4 A schematic diagram of the label weighted loss relationship provided in an embodiment of the present invention;

[0035] Figure 5 The relationship between the sample distribution and the weights corresponding to different distances provided in the embodiment of the present invention, wherein (a) is a distribution histogram of matching and non-matching samples in the early stage of training, (b) is a distribution histogram of matching and non-matching samples in the late stage of training, and (c) is the weights corresponding to the cosine distance and L2 distance on samples with different cosine similarities;

[0036] Figure 6 A schematic diagram of the weighting effect of the dynamic probability weighting method provided by an embodiment of the present invention in actual use;

[0037] Figure 7 An image matching process based on the local descriptor provided in an embodiment of the present invention;

[0038] Figure 8 The image matching effect based on the local descriptor provided by the embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0040] Embodiment 1

[0041] A training method for local descriptor networks for natural scene image matching, such as Figure 1 As shown, including:

[0042] Both the original samples and the generated samples are used as training samples to train the local description subnetwork;

[0043] In each iterative training, the generated samples are first generated in the following manner:

[0044] The original samples are sampled by means of geometric perturbation to generate new samples. The current descriptor network is used to calculate the descriptors of the new samples and their corresponding original samples, and the adversarial generation loss function is calculated through the descriptors. Based on the back propagation of the adversarial generation loss function, the control parameters are optimized to generate samples with a larger adversarial generation loss function, that is, to generate samples that are more disruptive to the current descriptor network.

[0045] The training loss function used in each iteration training includes the original sample three-input loss And the three-input loss of generated samples In the two parts, the distance in each loss is calculated using the mixed distance, and the mixing coefficient in the mixed distance is obtained using the maximum likelihood estimation.

[0046] On the one hand, local image blocks are regions containing rich information extracted using key point detectors. In these image blocks, high-level semantic information is unclear. Therefore, current local descriptors mainly use low-level information in the image to establish descriptors. The main interference in local image blocks can be divided into two parts: illumination change and perspective change. Compared with illumination change, perspective change is more suitable for solving using local descriptors. Based on the above analysis, this embodiment uses perspective change involving low-level image information as the main enhancement method.

[0047] However, the enhancement method of perspective transformation on a data set based on local image blocks is not simple and easy, and there are some serious problems. First, since the local image block does not have enough neighborhood information, it cannot be rotated or deformed freely. Secondly, it is difficult to maintain the information of the local image block during the perspective transformation process, which will seriously reduce the network performance. In order to retain the information of the image block to the maximum extent, this embodiment uses a small perturbation for perspective transformation. This perturbation comes from a small change in ∈ in the control parameter domain. The transformed image block is considered to still match the original image block. At the same time, in order to maximize the effect of the disturbance, that is, to use the minimum transformation to cause maximum interference to the network, this embodiment uses an adversarial training method to update the control parameters.

[0048] Therefore, this embodiment uses the gradient information obtained by back-propagation of the adversarial generation loss function to make the generated samples have a larger loss function, that is, to generate samples that are more disruptive to the current descriptor network, where the current descriptor network is the descriptor network under the current parameters obtained in the previous training iteration.

[0049] On the other hand, through the dynamic sample weighting method based on maximum likelihood estimation, network training can pay more attention to samples around the decision boundary, thereby further improving the performance of the descriptor network.

[0050] Preferably, when generating samples, the bilinear interpolation module in STN is used as the sample generator, and the affine matrix is ​​selected as the control parameter, which is used to generate a sampling grid. The sampling grid samples the original sample, that is, performs a small geometric perturbation to obtain the generated sample.

[0051] Generate samples with strong affine transformation and small interference to the descriptor network and use them for network training, thereby improving the robustness of the network. Specifically, first generate a sampling grid by controlling parameters, sample the original sample through the sampling grid, generate new samples, and calculate the descriptors of the generated samples and the original samples by using the descriptor network in training, and calculate the loss function of the descriptor. In order to make the loss function generated by the generated samples larger, the gradient information obtained by backpropagation of the adversarial generation loss function is used to optimize the control parameters using FGSM (FastGradientSignMethod), so that the generated samples have a larger adversarial generation loss, that is, to generate samples that are more capable of interfering with the descriptor network under the current parameters during the training process. The module outputs generated samples, which will be used for network training later to enhance the robustness of the network.

[0052] For example, Figure 2 As shown, the solid line represents the process of forward propagation of the original sample and other parameters, and the dotted line represents the path of gradient backpropagation. By maximizing the adversarial generation loss function Using the gradient backpropagated to A Update the generation parameter A to achieve the effect of adversarial training. Select the bilinear interpolation module in STN (Spatial Transformer Networks) as the generator, and select the affine matrix as the control parameter A. This module can generate the generated sample x after affine transformation by changing the parameter A. gen .

[0053] The spatial adversarial perturbation to generate new samples only works in the training phase. In the forward propagation, we first transform a pair of matching samples (x a , x p ) is input into the sampling module, and bilinear sampling is performed using the sampling grid to obtain the generated samples Then use the current descriptor network to calculate the descriptors corresponding to the original sample and the generated sample (d a , d p )and And calculate the loss function Loss Function The L2 distance between the descriptors of the original sample and the generated sample is used, as shown in the following formula.

[0054]

[0055] The loss function Represents the descriptor of the generated sample The L2 distance between the descriptor and the original sample (d p , d a ), when the loss function When it increases, the descriptor distance between the generated sample and the original sample can be increased, that is, for the descriptor network, the similarity between the generated sample and the original sample decreases. Since the generated sample and the original sample are in a matching relationship, it is more difficult to generate samples.

[0056] In the back propagation process of the spatial adversarial interference module, only the adversarial generation loss function is back propagated to obtain the gradient of the control parameter Then, the parameter A is updated multiple times using FGSM, as shown in the following equation.

[0057]

[0058] Among them, n t-1 is a gradient The unit vector in the direction of ∈ is a very small number, which indicates the degree of disturbance in the control parameter A domain. sign(·) represents the vector sign function, that is, taking the sign of each bit of the vector separately. Since A is an affine matrix and ∈ is a very small number, there is only a small geometric transformation between the generated sample and the original sample, that is, the small geometric disturbance. This process ensures that the generated sample and the original sample (x a , x p ) is a matching relationship.

[0059] Preferably, the method further comprises: calculating the label confidence of each generated image in each generated sample, wherein the label confidence represents the quantification of the similarity between the original sample and the generated sample;

[0060] but Some use label confidence weighting.

[0061] Although the generated samples have only slight perturbations, information loss is inevitable for the image blocks. The present invention uses label confidence to quantify the information loss.

[0062] This scheme assigns higher weights to generated samples with higher label confidence. Since generated samples have information loss, the proportion of the valid area of ​​the generated samples is used as the confidence. The weighted loss includes two parts: the original sample three-input loss and the generated sample three-input loss. The generated sample three-input loss is weighted by the confidence of the generated sample, so that while fully utilizing the generated samples, the descriptor network obtains a greater weight on samples with higher label confidence, promoting network optimization.

[0063] Further preferably, the weighted loss is used to fully utilize the original samples and the generated samples in the network training, and the three-input loss of the generated samples is adjusted by the label confidence l of the generated samples. Weighted, so that while fully utilizing the generated samples, the descriptor network gets a larger weight on samples with higher label confidence l, that is, samples with less information loss, so that the descriptor network can utilize the generated samples while retaining the maximum information. The specific calculation steps are as follows.

[0064] First, the angular distance matrix between samples is calculated. Then, the original samples are selected using traditional hard example mining, and the three input pairs are selected using the angular boundary, as shown in the following formula:

[0065]

[0066]

[0067] in Respectively represent the matching sample pairs (x a, x p ) and mismatched sample pairs (x a , x n ), m represents the angle boundary threshold, mask i is the selection mask for the i-th three-input sample group, and mask i ∈{0, 1}. Original sample three-input loss function As shown below:

[0068]

[0069] The three-input loss of the generated samples uses the same selection mask as the original samples. Figure 4 As shown, the first row represents the original sample with matching relationship (x a , x p ) and the corresponding generated samples The relationship between x a and x p There is a match between them, so the label is 1; the original sample x a and generate samples The label confidence between Figure 3 Calculated using the ratio of the effective area; With x p The matching relationship between them is the product of the above two. The second row shows the original sample (x a , x n ) and the corresponding generated samples The relationship between x a and x n There is no match between them, so the label is 0; With x n The matching relationship between is the product of the above two, which is 0. According to this relationship, the gradient of the loss function is modified to a certain extent, as shown in the following formula:

[0070]

[0071]

[0072] Correspondingly, the loss function of the generated sample is Write in the following format:

[0073]

[0074] Loss Function The samples can be weighted according to the confidence of the generated samples, so that the network can obtain a larger gradient on samples with higher label confidence, so that the descriptor network can use the generated samples while retaining the maximum information. The final label weighted loss function is written as follows:

[0075]

[0076] Among them, λ clean ,λ gen is an adjustable parameter used to balance the two losses.

[0077] Preferably, the label confidence may be calculated by generating a ratio between the number of valid pixels in the sample image and the number of pixels in the corresponding original sample image.

[0078] like Figure 3 As shown, the label confidence estimation module uses the ratio of the valid area as the confidence of the generated sample. The label confidence is equal to the ratio of the number of valid pixels in the generated image to the number of pixels in the original image, as shown in the following formula:

[0079]

[0080] Among them, card(·) represents the cardinality of the set, P valid , P represent the number of pixels in the generated sample and the number of pixels in the original sample respectively.

[0081] Preferably, the above mixing distance is the cosine distance D cos and L2 distance D L2 A mixture of.

[0082] Preferably, the original sample three-input loss is calculated And the three-input loss of generated samples The mixing distances used are the same and are all calculated using the original samples.

[0083] Dynamic probability weighting is used to enable the descriptor network to focus more on optimizing samples at the probability decision boundary during network training, thereby improving the performance of the descriptor network.

[0084] For the commonly used cosine distance D cos and L2 distance and its variant D L2v , and their distance functions are shown as follows:

[0085]

[0086]

[0087] Its gradient is shown as follows:

[0088]

[0089]

[0090] Combining the above formula, we can see that both distance functions have the same gradient direction -d2, which means that when the network is trained, the optimization direction of the network parameters is the same, only the step size is different. Therefore, the descriptors using different distances can be summarized as sample weighting, that is, the distance function can be written as the following hybrid function form, and replace D in the above three-input loss function cos use:

[0091] D(θ,α)=w(θ,α)D cos (θ)

[0092] The common verification task in descriptors is discussed. The verification task is to mix all matching sample pairs and non-matching sample pairs together. Given any sample pair, the descriptor network performs a binary classification task of matching or non-matching judgment. The goal of this task is to completely separate all matching sample pairs from non-matching sample pairs. Figure 5 The histogram distribution of cosine similarity between positive examples and the most difficult negative examples and the weights generated by the two distance functions are shown. The solid lines in (a) and (b) represent the distribution of positive examples, and the dotted lines represent the distribution of the most difficult negative examples. Figure 5 As shown in (a) in the figure, since the classifier has not been well trained, the similarity of the most difficult samples is often higher than that of the positive samples. At this time, the effect of the classifier is worse than random guessing, so all samples should be taken seriously. Figure 5 As shown in (c) in the figure, the cosine distance (dashed line, equivalent to 1 / 2 of the square of the L2 distance) can provide a larger gradient than the L2 distance (solid line) for most samples in the early stage of training, so it converges faster. As the network is trained, positive and negative samples are gradually separated, as shown in Figure 5 As shown in (b) in the figure. At this time, the samples around the edge of the best decision should be given higher weights, but the cosine distance can only provide a constant weight pattern and cannot make these samples get a larger weight. Therefore, the L2 distance can be introduced to provide different gradient patterns so that the samples can get a larger weight.

[0093] In order to reconcile these two distance functions, this embodiment proposes a dynamic probability weighting method to calculate the scale parameter, and the distance function with the maximum likelihood is considered as the optimal distance function and is used for model training.

[0094] First, for a sample pair (x1, x2), calculate its descriptor angle distance θ, and then calculate the L2 distance function D L2 and cosine distance D cos The weighted distance function D(θ, α) (also known as the mixing function) composed of the convex combination of is shown in the following formula:

[0095] D(θ;α)=α·Dcos (θ)+(1-α)·D L2 (θ)

[0096] stα∈[0,1]

[0097] Then, normalize D(θ, α) to the standard distribution form D′(θ, α), and use the sigmoid function to map the normalized distance function D′(θ, α) to the matching probability P(l) between x1 and x2. + |θ, α), as shown below:

[0098]

[0099] Use maximum likelihood estimation to find the optimal harmonic parameter As shown below:

[0100]

[0101]

[0102] Since α is limited to the interval [0, 1], the traversal method is used to solve the optimal α.

[0103] Momentum is used to update α. Each minibatch estimates α once and updates it using the following formula:

[0104]

[0105] Among them, β is the momentum coefficient, and β∈[0,1], which is generally selected as 0.995.

[0106] The distance function D(θ, α) is used as the distance function during the training of the descriptor network and only works during training.

[0107] like Figure 6 As shown in the figure, the light gray rectangular area surrounded by two dotted lines perpendicular to the x-axis is the area where the samples are located near the decision boundary. The dotted line in the middle perpendicular to the x-axis represents the optimal decision boundary; the thick solid line and the thick dotted line respectively enclose two areas with the x-axis, representing the cosine distance D of the matching sample pairs and the mismatching sample pairs in a minibatch. cos In addition to the above two parts, another set of solid and dotted lines in the figure represent the weighted distance function D(θ, α) at ​​the current α t The weight w(θ, α) of the corresponding sample pair t ) and cosine distance D cos (θ) corresponds to the weight; compared to the cosine distance D cos (θ), weighted distance function D(θ, α t) The samples at the decision boundary produce larger weights, so that the network focuses on the samples at the decision boundary, which illustrates the effectiveness of the method.

[0108] That is, when determining the loss function for training, first calculate the angular distance of the sample pair and calculate the corresponding weighted distance function. Then, normalize the distance function to the standard distribution mode, and use the sigmoid function to map the normalized result to the matching probability. The optimal harmonic ratio in the distance function is obtained by maximum likelihood estimation, and the ratio is used as the parameter of the distance function for calculating the loss function. In order to keep the distance function as stable as possible during the training process, the momentum is used to update the harmonic ratio. The harmonic ratio parameter of the distance of the loss function is calculated so that the descriptor network can focus more on the optimization of samples at the probability decision boundary, thereby improving the performance of the descriptor network.

[0109] Finally, after the descriptor network model is optimized, it can be used for actual image matching. Figure 7 As shown in the figure, key point detection is performed on the two images to be matched I1 and I2 respectively, and the key points detected are Extract local image blocks P1 and P2, describe these local image blocks using the local descriptors, generate descriptors d1 and d2, and finally match them using the nearest neighbor matching algorithm to obtain the matching relationship between the images in the two images, such as Figure 8 shown.

[0110] When testing the descriptor network, only the sample needs to be input into the network to obtain the corresponding descriptor, thereby reducing the amount of calculation. The dynamic probability weighted local descriptor algorithm based on spatial adversarial disturbance proposed in this embodiment has high robustness and accuracy to various image noises, especially affine transformation in image view.

[0111] This embodiment solves the problem of insufficient robustness of the descriptor network to samples with geometric transformation noise in the current image matching task. It should be noted that it can also solve other image tasks such as image retrieval, image stitching, and visual positioning that require descriptors. The corresponding means used are also spatial adversarial perturbation and dynamic probability weighting. There are also a large number of samples with geometric transformation noise in these tasks, so the same method can be used.

[0112] In summary, the local descriptor algorithm based on dynamic probability weighting of spatial adversarial perturbation proposed in this embodiment adopts spatial adversarial perturbation to generate samples that have undergone slight geometric perturbations in the image space, and uses an adversarial generation method. The generated samples have a strong interference on the network, which can improve the robustness of the descriptor network; a label weighted loss function is adopted, the generated samples are used in combination with the original samples, and the label confidence is weighted, thereby making full use of the interference nature of the generated samples on the network, so that the network can learn more robust features; the dynamic probability sample weighting method is adopted, so that network training can pay more attention to samples around the decision boundary, thereby further improving the performance of the descriptor network.

[0113] Embodiment 2

[0114] A computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein when the computer program is executed by a processor, the device where the storage medium is located is controlled to execute the above-mentioned training method of a local descriptor network for natural scene image matching. The related technical solution is the same as that of embodiment 1, and will not be repeated here.

[0115] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A training method for local descriptor networks for natural scene image matching, It is characterized in that include: Both the original samples and the generated samples are used as training samples to train the local description subnetwork; In each iterative training, the generated samples are first generated in the following manner: Each original sample is sampled by means of geometric perturbation to generate each new sample; and the current descriptor network is used to calculate the descriptor of each new sample and its corresponding original sample, and the adversarial generation loss function is calculated through the descriptor, and the control parameters are optimized based on the back propagation of the adversarial generation loss function to generate a generated sample with a larger adversarial generation loss function; The training loss function used in each iteration training includes the original sample three-input loss And the three-input loss of generated samples In the two parts, the distance in each loss is calculated using the mixed distance, and the mixing coefficient in the mixed distance is obtained using the maximum likelihood estimation.

2. The training method according to claim 1, It is characterized in that When generating the generated samples, the bilinear interpolation module in the STN is used as the sample generator, and the affine matrix is ​​selected as the control parameter, and the control parameter is used to generate the sampling grid.

3. The training method according to claim 1, It is characterized in that The adversarial generation loss function uses the L2 distance between the descriptors of the generated sample and its corresponding original sample, expressed as: Where, d a ,d p is a pair of original samples x with matching relationship a 、x p The descriptor obtained by the descriptor network, To generate samples The resulting descriptor, ||·|| 2 Represents the L2 distance between vectors.

4. The training method according to claim 3, It is characterized in that FGSM is used to perform an optimized update of control parameters used to control the sampling process.

5. The training method according to claim 1, It is characterized in that Also includes: Calculate the label confidence of each generated image in each generated sample, which represents the quantification of the similarity between the original sample and the generated sample; but Some use label confidence weighting.

6. The training method according to claim 5, It is characterized in that The generated sample three-input loss It is expressed as: In the formula, l i is the label confidence of the generated sample of the i-th three-input sample group; D cos (θ) represents the cosine distance; Respectively represent the matching sample pairs (x a ,x p ) and mismatched sample pairs (x a ,x n )’s angle distance; mask i is the selection mask for the i-th three-input sample group, and mask i ∈{0,1}.

7. The training method according to claim 5, It is characterized in that The label confidence is calculated by generating a ratio of the number of valid pixels in a sample image to the number of pixels in the corresponding original sample image.

8. The training method according to claim 1, It is characterized in that The mixing distance is the cosine distance D cos and L2 distance D L2 A mixture of.

9. The training method according to claim 1, It is characterized in that Calculate the original sample three-input loss And the three-input loss of generated samples The mixing distances used are the same and are all calculated using the original samples.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed by a processor, the device where the storage medium is located is controlled to execute a training method for a local descriptor network for natural scene image matching as described in any one of claims 1 to 9.