Learning of angle constraint based feature descriptor, image processing method and device

By introducing an angle-constrained angle loss function into the learning model and combining it with a distance loss function to construct an overall loss function, the learning model is optimized, which solves the problem of low robustness and accuracy of feature descriptors in existing technologies and achieves higher-performance feature matching.

CN116524385BActive Publication Date: 2026-05-05INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INST OF AUTOMATION CHINESE ACAD OF SCI
Filing Date
2022-01-19
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing descriptor learning networks based on Euclidean distance constraints are susceptible to outliers and noise, resulting in low robustness and accuracy of the generated image feature descriptors.

Method used

By introducing an angle-constrained angle loss function into the learning model and combining it with a distance loss function, an overall loss function is constructed. This is then iteratively optimized to generate the optimal learning model, thereby improving the robustness and accuracy of the feature descriptors.

Benefits of technology

It effectively reduces the impact of noise and outliers on the learning model, improves the robustness and accuracy of feature descriptors, and enhances the accuracy of image processing and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116524385B_ABST
    Figure CN116524385B_ABST
Patent Text Reader

Abstract

This invention provides a learning method and apparatus for feature descriptors based on angle constraints, and image processing. The learning method includes: inputting a sample dataset into a learning model to obtain predicted feature descriptors for each sample image in the dataset; obtaining a distance loss function for the learning model based on the distance between the predicted feature descriptors of any two sample images; obtaining an angle loss function for the learning model based on the spatial angle between the predicted feature descriptors of each pair of matched sample images; constructing an overall loss function for the learning model based on the distance loss function and the angle loss function; and iteratively optimizing the parameters of the learning model based on the overall loss function to obtain the optimal learning model. This invention adds an angle loss function based on angle constraints to the loss function of the learning model on top of the distance loss function, which can reduce the influence of noise and outliers on the learning model and improve the robustness and accuracy of the feature descriptors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and apparatus for learning and processing feature descriptors based on angle constraints. Background Technology

[0002] Traditional image feature descriptor learning methods mainly utilize the neighboring pixels of feature points. However, the performance of image feature descriptors generated by this method is easily affected by various factors, such as scale, rotation, illumination, affine transformation, and noise, leading to large errors in feature matching and resulting in poor robustness and accuracy of the generated image feature descriptors.

[0003] With the development of deep learning, convolutional neural networks have been widely used in most current computer vision tasks. Learning networks based on Euclidean distance constraints can learn local feature descriptors to appropriately improve the robustness and accuracy of image feature descriptors.

[0004] However, this method is susceptible to outliers and noise, resulting in image feature descriptors that still suffer from poor robustness and low accuracy. Therefore, how to eliminate the influence of outliers and noise to generate highly robust and accurate image feature descriptors is an important issue that urgently needs to be addressed in the industry. Summary of the Invention

[0005] This invention provides a learning method and apparatus for feature descriptors based on angle constraints, which addresses the shortcomings of existing learning networks based on Euclidean distance constraints, which are susceptible to outliers and noise, resulting in weak robustness and low accuracy of the generated image feature descriptors. This invention aims to improve the robustness and accuracy of image feature descriptors.

[0006] This invention provides a method for learning feature descriptors based on angle constraints, comprising:

[0007] The sample dataset is input into the learning model to obtain the predicted feature descriptors of each sample image in the sample dataset; wherein, the sample dataset includes multiple pairs of matched sample images;

[0008] Based on the distance between the predicted feature descriptors of any two sample images, the distance loss function of the learning model is obtained; based on the spatial angle between the predicted feature descriptors of each pair of matched sample images, the angle loss function of the learning model is obtained.

[0009] Based on the distance loss function and angle loss function of the learning model, the overall loss function of the learning model is constructed.

[0010] Based on the overall loss function, the parameters of the learning model are iteratively optimized to obtain the optimal learning model;

[0011] The optimal learning model is used to obtain the predicted feature descriptor of the image to be processed based on the image to be processed.

[0012] According to the learning method of feature descriptors based on angle constraints provided by the present invention, each pair of matched sample images includes a first sample image and a second sample image;

[0013] Accordingly, obtaining the angular loss function of the learning model based on the spatial angle between the predicted feature descriptors of each matched pair of sample images includes:

[0014] In the first feature space formed by the predicted feature descriptors of all first sample images in the sample dataset, multiple neighborhood feature descriptors of the predicted feature descriptors of the first sample image in each pair of matched sample images are obtained.

[0015] In the second feature space formed by the predicted feature descriptors of all second sample images in the sample dataset, multiple neighborhood feature descriptors of the predicted feature descriptors of the second sample images in each pair of matched sample images are obtained.

[0016] Calculate the spatial angle between the predicted feature descriptors of the first and second sample images and their corresponding multiple neighborhood feature descriptors in each pair of matched sample images;

[0017] The angle loss function is obtained based on the spatial angles corresponding to the first and second sample images in each pair of matched sample images.

[0018] According to the learning method of feature descriptors based on angle constraints provided by the present invention, any two sample images are either a matched pair of sample images or a mismatched pair of sample images.

[0019] Accordingly, obtaining the distance loss function of the learning model based on the distance between the predicted feature descriptors of any two sample images includes:

[0020] The distance loss function is constructed with the objective of minimizing the distance between the predicted feature descriptors of all matching sample image pairs in the sample dataset and maximizing the distance between the predicted feature descriptors of all non-matching sample image pairs.

[0021] According to the present invention, a learning method for feature descriptors based on angle constraints is provided, wherein constructing an overall loss function for the learning model based on the distance loss function and the angle loss function of the learning model includes:

[0022] The distance loss function and the angle loss function of the learning model are weighted and summed to obtain the overall loss function of the learning model.

[0023] According to the present invention, a method for learning feature descriptors based on angle constraints, wherein inputting a sample dataset into a learning model to obtain predicted feature descriptors for each sample image in the sample dataset includes:

[0024] For the current training batch, starting from the last sample image obtained by sequential sampling of the previous training batch, a first preset number of sample images are sequentially sampled from the sample dataset, and then a second preset number of sample images are randomly sampled from the remaining sample dataset to obtain the subsample dataset of the current training batch.

[0025] The subsample dataset of the current training batch is input into the learning model to obtain the predicted feature descriptor of each sample image in the subsample dataset of the current training batch.

[0026] The last sample image obtained by sequential sampling of the current training batch is used as the starting point of the next training batch. The sequential sampling, random sampling and input process is iteratively executed until the result of the sequential sampling is empty.

[0027] According to the present invention, a method for learning feature descriptors based on angle constraints includes inputting a sample dataset into the learning model, comprising:

[0028] Preprocess the images of each sample in the sample dataset;

[0029] The preprocessing includes cropping and image enhancement; the image enhancement includes one or more combinations of rotation, flipping, and affine transformation.

[0030] The preprocessed sample dataset is then input into the learning model.

[0031] This invention also provides an image processing method based on angle-constrained feature descriptors, comprising:

[0032] To obtain the optimal learning model;

[0033] The image to be processed is input into the optimal learning model to obtain the predicted feature descriptor of the image to be processed;

[0034] Based on the predicted feature descriptor of the image to be processed, the image to be processed is processed to obtain the processing result of the image to be processed;

[0035] The processing includes image recognition or image matching;

[0036] The optimal learning model is trained based on any of the angle-constrained feature descriptor learning methods described above.

[0037] The present invention also provides a learning device for feature descriptors based on angle constraints, comprising:

[0038] The first learning module is used to input the sample dataset into the learning model to obtain the predicted feature descriptors of each sample image in the sample dataset; wherein, the sample dataset includes multiple pairs of matched sample images;

[0039] The first acquisition module is used to acquire the distance loss function of the learning model based on the distance between the predicted feature descriptors of any two sample images, and to acquire the angle loss function of the learning model based on the spatial angle between the predicted feature descriptors of each pair of matched sample images.

[0040] A construction module is used to construct the overall loss function of the learning model based on the distance loss function and the angle loss function of the learning model;

[0041] The training module is used to iteratively optimize the parameters of the learning model based on the overall loss function to obtain the optimal learning model.

[0042] The optimal learning model is used to obtain the predicted feature descriptor of the image to be processed based on the image to be processed.

[0043] The present invention also provides an image processing apparatus based on angle-constrained feature descriptors, comprising:

[0044] The second acquisition module is used to acquire the optimal learning model;

[0045] The second learning module is used to input the image to be processed into the optimal learning model to obtain the predicted feature descriptor of the image to be processed.

[0046] The processing module is used to process the image to be processed based on the predicted feature descriptor of the image to be processed, and obtain the processing result of the image to be processed.

[0047] The processing includes image recognition or image matching;

[0048] The optimal learning model is trained based on the learning method of feature descriptors based on angle constraints as described in any of the above.

[0049] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of any of the above-described angle-constrained feature descriptor learning methods or the image processing method based on the angle-constrained feature descriptors.

[0050] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the angle-constrained feature descriptor learning method as described above, or the image processing method based on the angle-constrained feature descriptor.

[0051] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the learning method for angle-constrained feature descriptors as described above, or implements the steps of the image processing method for angle-constrained feature descriptors.

[0052] The method and apparatus for learning and image processing based on angle-constrained feature descriptors provided by this invention, by adding an angle-constrained angle loss function to the loss function of the learning model based on the distance loss function, further constrains the angle of the feature space, which can effectively reduce the influence of noise and outliers on the learning model, thereby making the learning model have good robustness and learning performance, and making the feature descriptors generated by the trained learning model more robust and accurate. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0054] Figure 1 This is one of the flowcharts illustrating the learning method for feature descriptors based on angle constraints provided by the present invention;

[0055] Figure 2 This is the second flowchart of the learning method for feature descriptors based on angle constraints provided by the present invention;

[0056] Figure 3 This is a flowchart illustrating the image processing method based on angle-constrained feature descriptors provided by the present invention.

[0057] Figure 4 This is a schematic diagram of the structure of the learning device based on angle-constrained feature descriptors provided by the present invention;

[0058] Figure 5 This is a schematic diagram of the image processing device based on angle-constrained feature descriptors provided by the present invention;

[0059] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0061] In the description of the embodiments of the present invention, it should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0062] The learning method and image processing method in this embodiment can be executed by an electronic device, a component within the electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, a mobile electronic device can be a laptop computer, a PDA, a super mobile personal computer, etc., while a non-mobile electronic device can be a server, a network-attached storage device, etc. This invention does not impose specific limitations.

[0063] The following is combined with Figure 1 The present invention describes a learning method for feature descriptors based on angle constraints, the method comprising:

[0064] Step 101: Input the sample dataset into the learning model to obtain the predicted feature descriptors of each sample image in the sample dataset; wherein, the sample dataset includes multiple pairs of matched sample images;

[0065] In this embodiment, the sample dataset contains multiple pairs of matching sample images. The specific number can be set according to actual needs, and this embodiment does not impose a specific limit on it.

[0066] For example, a sample dataset can be represented as in, Let p be a pair of matched sample images, where p is the number of sample image pairs in the sample dataset.

[0067] The sample images can be samples used to train a learning model for learning and predicting local image feature descriptors, such as vehicle images for vehicle recognition, face images for face recognition, building images for building recognition or 3D reconstruction, etc. This embodiment does not specifically limit them.

[0068] The learning model can be based on other deep networks such as deep convolutional neural networks, residual networks, and recurrent neural networks. This embodiment does not limit the specific structure of the learning model.

[0069] Optionally, when it is necessary to train the learning model, a sample dataset is first obtained. The methods for obtaining the sample dataset include, but are not limited to, directly transmitting or downloading via the Internet or acquiring it through an image acquisition device, or extracting local images from the acquired original image set and then using the resulting local image set as the sample dataset. This embodiment does not specifically limit this.

[0070] Then, the sample dataset is directly input into the learning model; or the sample images in the sample dataset are preprocessed and then input into the learning model to obtain the predicted feature descriptors of each sample image in the sample dataset. This embodiment does not specifically limit this.

[0071] Step 102: Based on the distance between the predicted feature descriptors of any two sample images, obtain the distance loss function of the learning model; based on the spatial angle between the predicted feature descriptors of each pair of matched sample images, obtain the angle loss function of the learning model.

[0072] It should be noted that any two sample images in the sample dataset may be a matching pair or a mismatched pair; this embodiment does not impose any specific limitations on this.

[0073] Optionally, the distance between the predicted feature descriptors of sample image pairs formed by combining any two sample images can be calculated. The distance can be calculated based on Euclidean distance or Mahalanobis distance, etc., which will not be described in detail in this embodiment.

[0074] Then, the distance between all pairwise combined sample image pairs in the joint sample dataset is used to obtain the distance loss function of the learning model.

[0075] Simultaneously, the spatial angle between the predicted feature descriptors of each pair of matched sample images is calculated; then, the spatial angles of all matched sample image pairs are combined to obtain the angular loss function of the learning model.

[0076] Optionally, the method of calculating the spatial angle includes mapping the predicted feature descriptors of each pair of matched sample images and its neighboring sample image pairs to the feature space, and calculating the vector angle using the vector angle calculation formula based on the vector formed by each pair of matched sample images and its neighboring sample image pairs, or calculating the spatial angle based on spatial coordinate points. This embodiment does not specifically limit this method.

[0077] Step 103: Based on the distance loss function and angle loss function of the learning model, construct the overall loss function of the learning model;

[0078] Optionally, after obtaining the distance loss function and the angle loss function of the learning model, the distance loss function and the angle loss function can be fused to construct the overall loss function of the learning model;

[0079] Specific fusion methods include adding the distance loss function and the angle loss function, weighted addition, or inputting the distance loss function and the angle loss function into the fusion model. This embodiment does not specifically limit this.

[0080] Because existing technologies only use the Euclidean distance loss function to optimize the learning model, they are susceptible to outliers and noise. Therefore, additional constraints need to be applied to the descriptors in the feature space during training. This embodiment adds an angle-constrained angle loss function to the distance loss function, further constraining the learning model's loss function in the feature space. By combining the Euclidean distance-constrained distance loss function and the angle-constrained angle loss function as the overall loss function of the learning model, the impact of noise and outliers on the learning model can be effectively reduced. This results in a learning model with good robustness and learning performance, which is significant for researching higher-performance descriptors, providing a guarantee for higher-precision feature matching, and has broad application prospects.

[0081] Step 104: Based on the overall loss function, iteratively optimize the parameters of the learning model to obtain the optimal learning model; wherein, the optimal learning model is used to obtain the predicted feature descriptor of the image to be processed based on the image to be processed.

[0082] Optionally, after obtaining the overall loss function of the learning model, an optimization algorithm can be used to iteratively optimize the parameters of the learning model to obtain a learning model that can accurately predict the feature descriptors of the image; then, in scenarios where feature descriptor prediction of the image to be processed is required, the image to be processed is input into the optimal learning model obtained through training to accurately obtain the feature descriptors of the image to be processed.

[0083] In this process, the obtained overall loss function value is used to backpropagate and update the parameters of the learning model.

[0084] It should be noted that the training parameters of the learning model can be set according to actual needs. For example, the optimization algorithm, metric function, number of iterations, and number of sample images per batch can all be set according to actual needs.

[0085] The optimization algorithms include, but are not limited to, the momentum gradient descent method or the Adam adaptive momentum estimation method, etc. This example does not specifically limit them.

[0086] The measurement functions include, but are not limited to, mean squared error and mean absolute error, but this example does not specifically limit them.

[0087] This embodiment adds an angle-constrained loss function to the distance loss function to further constrain the feature space angle of the loss function of the learning model. This can effectively reduce the impact of noise and outliers on the learning model, thereby making the learning model have good robustness and learning performance, and making the feature descriptors generated by the trained learning model more robust and accurate.

[0088] Based on the above embodiments, in this embodiment, each pair of matched sample images includes a first sample image and a second sample image. Accordingly, obtaining the angle loss function of the learning model based on the spatial angle between the predicted feature descriptors of each pair of matched sample images includes: obtaining multiple neighborhood feature descriptors of the predicted feature descriptors of the first sample images in each pair of matched sample images in a first feature space formed by the predicted feature descriptors of all first sample images in the sample dataset; obtaining multiple neighborhood feature descriptors of the predicted feature descriptors of the second sample images in each pair of matched sample images in a second feature space formed by the predicted feature descriptors of all second sample images in the sample dataset; calculating the spatial angle between the predicted feature descriptors of the first and second sample images in each pair of matched sample images and their corresponding multiple neighborhood feature descriptors; and obtaining the angle loss function based on the spatial angle corresponding to the first and second sample images in each pair of matched sample images.

[0089] Optionally, for two images to be matched, pair I and I + Suppose we use the SIFT (Scale-invariant feature transform) feature extraction method to extract feature points from these two images respectively; let x i , They represent I and I respectively + Any feature point in x; j and x k For x i SIFT feature points in the neighborhood and for Two SIFT feature points in the neighborhood. In the image matching problem, images I and I... + Each image has its own feature space. If the feature points of these two images can be accurately matched, then the feature points in these two images need to satisfy the constraints in the following formula:

[0090]

[0091]

[0092] Where, x j ,x k ∈KNN(x i ) represents x j and x k For feature point x i Feature points within the neighborhood; express and For feature points Feature points within the neighborhood; where N is the image I or I + The total number of all feature points in the feature space.

[0093] Based on the above analysis, in order to obtain more robust and accurate feature descriptors, this embodiment adds an angle loss function to the loss function of the learning model so that the feature descriptors of the matched images can be accurately matched.

[0094] It should be noted that the number of neighborhood feature descriptors can be set according to actual needs, such as two; this embodiment does not specifically limit this.

[0095] The following description uses a neighborhood feature descriptor count of 2 as an example to illustrate the feature descriptor learning method in this embodiment.

[0096] Optionally, for the first sample image in any pair of matched sample images, the predicted feature descriptors of all first sample images in the sample dataset are used to form a first feature space, and the predicted feature descriptor x of the first sample image in the first feature space is determined. i Two adjacent neighborhood feature descriptors, x j and x k ;

[0097] Then, the predicted feature descriptor x for the first sample image is calculated. i With neighborhood feature descriptor x j and x k The spatial angle between them.

[0098] For any pair of matched sample images, the second sample image is used to form a second feature space from the predicted feature descriptors of all second sample images in the sample dataset. Then, the predicted feature descriptor of the second sample image within the second feature space is determined. Two adjacent neighborhood feature descriptors are respectively and

[0099] Then, the predicted feature descriptor of the second sample image is calculated. With neighborhood feature descriptors and The spatial angle between them.

[0100] Then, the square of the difference between the spatial angle corresponding to the first sample image and the spatial angle corresponding to the second sample image in the sample image pair is calculated to obtain the angular deviation of the sample image pair; the specific calculation formula is as follows:

[0101]

[0102] Where x represents the angular deviation corresponding to the i-th pair of sample images; i and The predicted feature descriptors for the first and second sample images, respectively; x j and x k For x i Neighborhood feature descriptor; and for Neighborhood feature descriptor.

[0103] Finally, the angle deviations of the sample image pairs are fused to construct the angle loss function of the learning model.

[0104] Optionally, for a training batch containing N pairs of sample images, if it is of the form {x i ,x j ,x k If there are S triples in the expression, then the angle loss function for each training batch can be defined as:

[0105]

[0106] Among them, L ISO Let S be the angle loss function for each training batch, and let S be the angle loss function for each training batch that satisfies {x} i ,x j ,x k The number of sample image pairs for the triplet condition}.

[0107] In this embodiment, a local isometric loss term based on angle constraints is introduced into the loss function of the learning model. This term is used to constrain the angle between the current feature point and other feature points in its neighborhood in the feature space. This is to avoid interference from outliers and noise on the learning model of the local image feature descriptor, thereby making the generated local image feature descriptor more robust and accurate.

[0108] Based on the above embodiments, in this embodiment, any two sample images are either matched sample image pairs or unmatched sample image pairs; correspondingly, obtaining the distance loss function of the learning model based on the distance between the predicted feature descriptors of any two sample images includes: constructing the distance loss function with the objective of minimizing the distance between the predicted feature descriptors of all matched sample image pairs in the sample dataset and maximizing the distance between the predicted feature descriptors of all unmatched sample image pairs.

[0109] Optionally, a distance loss function for the learning model is constructed based on the distance between the predicted feature descriptors of each pair of sample images to update the parameters of the learning model, so that the learning model can accurately learn the predicted feature descriptors of the output image; that is, to make the predicted feature descriptors of matching images as similar as possible, and the predicted feature descriptors of non-matching images as dissimilar as possible, i.e., small intra-class distance and large inter-class distance.

[0110] Therefore, the optimization objective of the constructed distance loss function is to minimize the distance between the predicted feature descriptors of matched sample image pairs and maximize the distance between the predicted feature descriptors of mismatched sample image pairs.

[0111] The formula for calculating the distance loss function is as follows:

[0112]

[0113]

[0114]

[0115] Among them, L FOS The distance loss function is used to learn the model, and N is the number of sample image pairs in the sample dataset; The predicted feature descriptor represents the i-th sample image pair; t is a pre-set relative distance threshold, which can be set according to actual needs, such as 1. The distance between the predicted feature descriptors of the i-th pair of matched sample images; x is the distance between the predicted feature descriptors of the i-th non-matching sample image pair; k For x iThe predicted feature descriptor of the sample image that does not match the sample image; d(u,v) is the distance metric formula, and the specific calculation method can be Mahalanobis distance or Euclidean distance, etc. This embodiment does not make a specific limitation on this. For example, if Euclidean distance is used, d(u,v)=||uv||2.

[0116] It should be noted that the calculation formula of the distance loss function can be set according to actual needs. As long as the optimization objective of the constructed distance loss function is to minimize the distance between the predicted feature descriptors of the matched sample image pairs and maximize the distance between the predicted feature descriptors of the mismatched sample image pairs, it can be applied to the feature descriptor learning method in this embodiment.

[0117] In this embodiment, the distance loss function is used to constrain the learning model, which enables the learning model to learn feature descriptors with high robustness and high accuracy.

[0118] Based on the above embodiments, the construction of the overall loss function of the learning model based on the distance loss function and the angle loss function of the learning model in this embodiment includes: weighted summing of the distance loss function and the angle loss function of the learning model to obtain the overall loss function of the learning model.

[0119] Optionally, to balance the loss function of the entire learning model, weight coefficients α and δ are introduced to weight and sum the distance loss function and angle loss function of the learning model to obtain the overall loss function of the learning model, as shown in the following formula:

[0120] L total =αL FOS +δL ISO ;

[0121] Among them, L total L is the overall loss function for the learning module. FOS and L ISO These are the distance loss function and the angle loss function, respectively; α and δ are the weighting coefficients.

[0122] The weight coefficients corresponding to the distance loss function and the angle loss function can be determined according to actual needs, such as α = 1, etc. This embodiment does not make specific limitations on this.

[0123] Alternatively, weighting analysis can be used to determine the weighting method. The weighting analysis method can be hierarchical analysis, chain ratio analysis, principal component analysis, or entropy analysis, etc., and this embodiment is not limited to any particular type of weighting analysis method.

[0124] This embodiment optimizes the training of the learning model by combining the distance loss function and the angle loss function, resulting in better performance of the optimized learning and more accurate prediction results of local image feature descriptors.

[0125] Based on the above embodiments, the step of inputting the sample dataset into the learning model to obtain the predicted feature descriptor of each sample image in the sample dataset in this embodiment includes: for the current training batch, taking the last sample image obtained by sequential sampling of the previous training batch as the starting point, sequentially sampling a first preset number of sample images from the sample dataset, and then randomly sampling a second preset number of sample images from the remaining sample dataset to obtain the sub-sample dataset of the current training batch; inputting the sub-sample dataset of the current training batch into the learning model to obtain the predicted feature descriptor of each sample image in the sub-sample dataset of the current training batch; continuing to use the last sample image obtained by sequential sampling of the current training batch as the starting point of the next training batch of the current training batch, iteratively executing the process of sequential sampling, random sampling, and input until the result of sequential sampling is empty.

[0126] Optionally, this embodiment is based on a progressive sampling method, in which the sample dataset is input into the learning model in batches.

[0127] The first preset quantity p1 and the second preset quantity p2 can be the same or different, and can be set according to actual needs.

[0128] For a sample dataset of P pairs of sample images, a total of samples are required. Next, the sample dataset is divided into Subsample datasets from each training batch.

[0129] Optionally, for the current training batch, first, obtain the last sample image pair obtained from the sequential sampling of the previous training batch. Starting from this sample image pair, sequentially sample p1 sample image pairs following this sample image pair from the sample dataset to traverse all sample image pairs. Then, randomly sample p2 sample image pairs from the remaining P-p1 sample image pairs to obtain the subsample dataset of the current training batch. The subsample dataset of the current training batch contains m = p1 + p2 sample image pairs.

[0130] Then, the last sample image pair obtained by sequential sampling of the current training batch is used as the starting point for sequential sampling of the next training batch. The above sequential sampling and random sampling process is executed iteratively until all sample image pairs in the sample dataset have been sequentially sampled, that is, the result of sequential sampling is empty.

[0131] This embodiment uses a progressive sampling method, which allows the learning model to review the distribution of historically learned data and get a head start on the distribution of data to be learned in the future, thus enabling the learning model to converge quickly.

[0132] Based on the above embodiments, the input of the sample dataset into the learning model in this embodiment includes: preprocessing each sample image in the sample dataset; wherein, the preprocessing includes cropping and image enhancement; the image enhancement includes one or more combinations of rotation, flipping and affine transformation; and inputting the preprocessed sample dataset into the learning model.

[0133] Optionally, before inputting the sample dataset into the learning model, it is necessary to preprocess each sample image in the sample dataset; then, the preprocessed sample dataset is input into the learning model.

[0134] Optionally, each sample image in the sample dataset is first cropped to a preset size; the preset size can be set according to actual needs, such as 32*32, but this embodiment does not specifically limit it.

[0135] Then, one or more combinations of rotation, flipping, and affine transformations are used to augment the cropped sample images to expand the sample dataset, improve the robustness of the samples in different environments, and enable the trained learning model to adapt to background interference, resulting in stronger robustness, generalization, and compatibility.

[0136] It should be noted that image enhancement is not limited to the methods listed above. Other image enhancement methods can also be applied to the local image feature descriptor learning method in this embodiment. This embodiment does not make specific limitations on this.

[0137] For example, the sample images in the sample dataset are p pairs, and each pair is a local feature image patch of size 64×64, which is the sample dataset. for:

[0138]

[0139] The sample dataset X after cropping and image enhancement is:

[0140]

[0141] In this embodiment, by cropping and enhancing the images of each sample in the sample dataset, the convergence of the model can be accelerated and the robustness, generalization and compatibility of the model can be improved.

[0142] like Figure 2The diagram shows the overall process of the angle-constrained feature descriptor learning method, including the following steps:

[0143] Step 1: Preprocess the sample dataset; specifically, crop the sample images and use image enhancement techniques such as rotation, flipping, and affine transformation to expand the sample dataset.

[0144] Step 2: Using a progressive sampling method, the enhanced training images are input into the learning model in batches;

[0145] Step 3: The first-order distance loss term based on distance constraints and the angle loss term based on angle constraints are used as the overall loss function of the learning model. During the iteration process, the obtained overall loss function value is used to back-transmit and update the parameters of the learning model in order to obtain the optimal learning model.

[0146] Step 4: Input the image to be processed into the optimal learning model to obtain the feature descriptor of the image to be processed output by the optimal learning model.

[0147] like Figure 3 As shown, this embodiment provides an image processing method based on angle-constrained feature descriptors, the method including:

[0148] Step 301: Obtain the optimal learning model; the optimal learning model is trained based on the learning method of feature descriptors with angle constraints.

[0149] Optionally, based on Figure 2 The learning steps based on angle-constrained feature descriptors are used to construct the optimal learning model. Specifically, the sample dataset is preprocessed first. An incremental sampling method is used to input the enhanced sample dataset into the learning model in batches. The first-order distance loss term based on distance constraints and the angle loss term based on angle constraints are combined as the overall loss function of the learning model. During the iteration process, the obtained overall loss function is used to backpropagate and update the parameters of the learning model to obtain the optimal learning model.

[0150] Step 302: Input the image to be processed into the optimal learning model to obtain the predicted feature descriptor of the image to be processed;

[0151] The image to be processed is the image that needs to be predicted by feature descriptors. It can be an image of a vehicle, a face, or a building, etc. This implementation does not make any specific limitations on this.

[0152] Optionally, when it is necessary to predict the feature descriptors of the image to be processed, the image to be processed can be preprocessed first, including image cropping or noise reduction, etc. This embodiment does not specifically limit this.

[0153] Then, the processed image to be processed is input into the optimal learning model, and the learning model learns from the image to be processed, and can accurately output feature descriptors with strong robustness.

[0154] Step 303: Based on the predicted feature descriptor of the image to be processed, process the image to be processed to obtain the processing result of the image to be processed; wherein, the processing includes image recognition or image matching;

[0155] Optionally, after obtaining the predicted feature descriptor of the image to be processed, image recognition can be performed based on the predicted feature descriptor of the image to be processed to obtain the recognition result of the image to be processed.

[0156] Image recognition can be achieved by inputting the predicted feature descriptor of the image to be processed into a recognition model to obtain the recognition result of the image to be processed; or by performing similarity calculation between the predicted feature descriptor of the image to be processed and the predicted feature descriptor of images of a preset category to obtain the recognition result of the image to be processed, etc. This embodiment does not specifically limit this.

[0157] Alternatively, after obtaining the predicted feature descriptor of the image to be processed, image matching can be performed on the image to be processed for three-dimensional reconstruction of the image, etc. This embodiment does not limit the specific application of the predicted feature descriptor of the image to be processed.

[0158] This embodiment adds an angle-constrained loss function to the loss function of the learning model based on the distance loss function, further constraining the feature space angle. This can effectively reduce the impact of noise and outliers on the learning model, thereby making the learning model have good robustness and learning performance. The feature descriptors generated by the trained learning model have higher robustness and accuracy, effectively improving the accuracy of image processing and the user experience.

[0159] The following describes the learning device for feature descriptors based on angle constraints provided by the present invention. The learning device for feature descriptors based on angle constraints described below can be referred to in correspondence with the learning method for feature descriptors based on angle constraints described above.

[0160] like Figure 4 As shown, this embodiment provides a learning device for feature descriptors based on angle constraints. The device includes a first learning module 401, a first acquisition module 402, a construction module 403, and a training module 404, wherein:

[0161] The first learning module 401 is used to input the sample dataset into the learning model to obtain the predicted feature descriptors of each sample image in the sample dataset; wherein, the sample dataset includes multiple pairs of matched sample images;

[0162] Optionally, when it is necessary to train the learning model, a sample dataset is first obtained;

[0163] Then, the sample dataset is directly input into the learning model; or the sample images in the sample dataset are preprocessed and then input into the learning model to obtain the predicted feature descriptors of each sample image in the sample dataset. This embodiment does not specifically limit this.

[0164] The first acquisition module 402 is used to acquire the distance loss function of the learning model based on the distance between the predicted feature descriptors of any two sample images, and to acquire the angle loss function of the learning model based on the spatial angle between the predicted feature descriptors of each pair of matched sample images.

[0165] Optionally, the distance between the predicted feature descriptors of sample image pairs formed by combining any two sample images is calculated; then, the distances of all pairwise sample image pairs in the joint sample dataset are used to obtain the distance loss function of the learning model.

[0166] Simultaneously, the spatial angle between the predicted feature descriptors of each pair of matched sample images is calculated; then, the spatial angles of all matched sample image pairs are combined to obtain the angular loss function of the learning model.

[0167] The construction module 403 is used to construct the overall loss function of the learning model based on the distance loss function and the angle loss function of the learning model;

[0168] Optionally, after obtaining the distance loss function and angle loss function of the learning model, the distance loss function and angle loss function can be fused to construct the overall loss function of the learning model.

[0169] The training module 404 is used to iteratively optimize the parameters of the learning model based on the overall loss function to obtain the optimal learning model; wherein, the optimal learning model is used to obtain the predicted feature descriptor of the image to be processed based on the image to be processed.

[0170] Optionally, after obtaining the overall loss function of the learning model, an optimization algorithm can be used to iteratively optimize the parameters of the learning model to obtain a learning model that can accurately predict the feature descriptors of the image; then, in scenarios where it is necessary to predict the feature descriptors of the image to be processed, the image to be processed is input into the optimal learning model obtained through training to accurately obtain the feature descriptors of the image to be processed.

[0171] This embodiment adds an angle-constrained loss function to the distance loss function to further constrain the feature space angle of the loss function of the learning model. This can effectively reduce the impact of noise and outliers on the learning model, thereby making the learning model have good robustness and learning performance, and making the feature descriptors generated by the trained learning model more robust and accurate.

[0172] Based on the above embodiments, each pair of matched sample images in this embodiment includes a first sample image and a second sample image;

[0173] Accordingly, the first acquisition module is specifically configured to: acquire multiple neighborhood feature descriptors of the predicted feature descriptors of the first sample image in each pair of matched sample image pairs in the first feature space formed by the predicted feature descriptors of all first sample images in the sample dataset; acquire multiple neighborhood feature descriptors of the predicted feature descriptors of the second sample image in each pair of matched sample image pairs in the second feature space formed by the predicted feature descriptors of all second sample images in the sample dataset; calculate the spatial angle between the predicted feature descriptors of the first and second sample images in each pair of matched sample image pairs and the corresponding multiple neighborhood feature descriptors; and acquire the angle loss function based on the spatial angles corresponding to the first and second sample images in each pair of matched sample image pairs.

[0174] Based on the above embodiments, in this embodiment, any two sample images are either a matched pair of sample images or a mismatched pair of sample images.

[0175] Accordingly, the first acquisition module is specifically used to: construct the distance loss function with the objective of minimizing the distance between the predicted feature descriptors of all matching sample image pairs in the sample dataset and maximizing the distance between the predicted feature descriptors of all non-matching sample image pairs.

[0176] Based on the above embodiments, the construction module in this embodiment is specifically used to: weightedly add the distance loss function and the angle loss function of the learning model to obtain the overall loss function of the learning model.

[0177] Based on the above embodiments, the first learning module in this embodiment is specifically used for: for the current training batch, taking the last sample image obtained by sequential sampling of the previous training batch as the starting point, sequentially sampling a first preset number of sample images from the sample dataset, and then randomly sampling a second preset number of sample images from the remaining sample dataset to obtain a sub-sample dataset of the current training batch; inputting the sub-sample dataset of the current training batch into the learning model to obtain the predicted feature descriptors of each sample image in the sub-sample dataset of the current training batch; continuing to use the last sample image obtained by sequential sampling of the current training batch as the starting point of the next training batch of the current training batch, iteratively executing the process of sequential sampling, random sampling and input until the result of sequential sampling is empty.

[0178] Based on the above embodiments, the first learning module in this embodiment is further configured to: preprocess each sample image in the sample dataset; wherein the preprocessing includes cropping and image enhancement; the image enhancement includes one or more combinations of rotation, flipping and affine transformation; and input the preprocessed sample dataset into the learning model.

[0179] The image processing apparatus based on angle-constrained feature descriptors provided by the present invention will be described below. The image processing apparatus based on angle-constrained feature descriptors described below can be referred to in correspondence with the image processing method based on angle-constrained feature descriptors described above.

[0180] like Figure 5 As shown, this embodiment provides an image processing device based on angle-constrained feature descriptors. The device includes a second acquisition module 501, a second learning module 502, and a processing module 503, wherein:

[0181] The second acquisition module 501 is used to acquire the optimal learning model;

[0182] Optionally, based on Figure 2 The learning steps based on angle-constrained feature descriptors are used to construct the optimal learning model. Specifically, the sample dataset is preprocessed first. An incremental sampling method is used to input the enhanced sample dataset into the learning model in batches. The first-order distance loss term based on distance constraints and the angle loss term based on angle constraints are combined as the overall loss function of the learning model. During the iteration process, the obtained overall loss function is used to backpropagate and update the parameters of the learning model to obtain the optimal learning model.

[0183] The second learning module 502 is used to input the image to be processed into the optimal learning model to obtain the predicted feature descriptor of the image to be processed;

[0184] Optionally, when it is necessary to predict the feature descriptors of the image to be processed, the image to be processed can be preprocessed first, including image cropping or noise reduction, etc. This embodiment does not specifically limit this.

[0185] Then, the processed image to be processed is input into the optimal learning model, and the learning model learns from the image to be processed, and can accurately output feature descriptors with strong robustness.

[0186] The processing module 503 is used to process the image to be processed according to the predicted feature descriptor of the image to be processed, and obtain the processing result of the image to be processed; wherein, the processing includes image recognition or image matching.

[0187] Optionally, after obtaining the predicted feature descriptor of the image to be processed, image recognition can be performed based on the predicted feature descriptor of the image to be processed to obtain the recognition result of the image to be processed.

[0188] Alternatively, after obtaining the predicted feature descriptor of the image to be processed, image matching can be performed on the image to be processed for three-dimensional reconstruction of the image, etc. This embodiment does not limit the specific application of the predicted feature descriptor of the image to be processed.

[0189] This embodiment adds an angle-constrained loss function to the loss function of the learning model based on the distance loss function, further constraining the feature space angle. This can effectively reduce the impact of noise and outliers on the learning model, thereby making the learning model have good robustness and learning performance. The feature descriptors generated by the trained learning model have higher robustness and accuracy, effectively improving the accuracy of image processing and the user experience.

[0190] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include: a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604. The processor 601 can call logical instructions in the memory 603 to execute a learning method based on angle-constrained feature descriptors. This method includes: inputting a sample dataset into a learning model to obtain predicted feature descriptors for each sample image in the sample dataset; wherein the sample dataset includes multiple pairs of matched sample images; obtaining a distance loss function of the learning model based on the distance between the predicted feature descriptors of any two sample images, and obtaining an angle loss function of the learning model based on the spatial angle between the predicted feature descriptors of each pair of matched sample images; constructing an overall loss function of the learning model based on the distance loss function and the angle loss function; and iteratively optimizing the parameters of the learning model based on the overall loss function to obtain an optimal learning model; wherein the optimal learning model is used to obtain predicted feature descriptors for the image to be processed based on the image to be processed.

[0191] Alternatively, the image processing method based on angle-constrained feature descriptors provided by the above methods can be implemented. This method includes: obtaining an optimal learning model; inputting the image to be processed into the optimal learning model to obtain a predicted feature descriptor of the image to be processed; processing the image to be processed according to the predicted feature descriptor of the image to be processed to obtain a processing result of the image to be processed; wherein the processing includes image recognition or image matching; the optimal learning model is trained based on the learning method based on angle-constrained feature descriptors.

[0192] Furthermore, the logical instructions in the aforementioned memory 603 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0193] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the angle-constrained feature descriptor learning method provided by the above methods. The method includes: inputting a sample dataset into a learning model to obtain predicted feature descriptors for each sample image in the sample dataset; wherein the sample dataset includes multiple pairs of matched sample images; obtaining a distance loss function of the learning model based on the spatial distance between the predicted feature descriptors of any two sample images; obtaining an angle loss function of the learning model based on the spatial angle between the predicted feature descriptors of each pair of matched sample images; constructing an overall loss function of the learning model based on the distance loss function and the angle loss function; and iteratively optimizing the parameters of the learning model based on the overall loss function to obtain an optimal learning model; wherein the optimal learning model is used to obtain the predicted feature descriptors of the image to be processed based on the image to be processed.

[0194] Alternatively, the image processing method based on angle-constrained feature descriptors provided by the above methods can be implemented. This method includes: obtaining an optimal learning model; inputting the image to be processed into the optimal learning model to obtain a predicted feature descriptor of the image to be processed; processing the image to be processed according to the predicted feature descriptor of the image to be processed to obtain a processing result of the image to be processed; wherein the processing includes image recognition or image matching; the optimal learning model is trained based on the learning method based on angle-constrained feature descriptors.

[0195] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a learning method for angle-constrained feature descriptors provided by the methods described above. This method includes: inputting a sample dataset into a learning model to obtain predicted feature descriptors for each sample image in the sample dataset; wherein the sample dataset includes multiple pairs of matched sample images; obtaining a distance loss function of the learning model based on the distance between the predicted feature descriptors of any two sample images; obtaining an angle loss function of the learning model based on the spatial angle between the predicted feature descriptors of each pair of matched sample images; constructing an overall loss function of the learning model based on the distance loss function and the angle loss function; and iteratively optimizing the parameters of the learning model based on the overall loss function to obtain an optimal learning model; wherein the optimal learning model is used to obtain predicted feature descriptors for the image to be processed based on the image to be processed.

[0196] Alternatively, the image processing method based on angle-constrained feature descriptors provided by the above methods can be implemented. This method includes: obtaining an optimal learning model; inputting the image to be processed into the optimal learning model to obtain a predicted feature descriptor of the image to be processed; processing the image to be processed according to the predicted feature descriptor of the image to be processed to obtain a processing result of the image to be processed; wherein the processing includes image recognition or image matching; the optimal learning model is trained based on the learning method based on angle-constrained feature descriptors.

[0197] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0198] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0199] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A learning method for feature descriptors based on angle constraints, characterized in that, include: The sample dataset is input into the learning model to obtain the predicted feature descriptors of each sample image in the sample dataset; wherein, the sample dataset includes multiple pairs of matched sample images; Based on the distance between the predicted feature descriptors of any two sample images, the distance loss function of the learning model is obtained; based on the spatial angle between the predicted feature descriptors of each pair of matched sample images, the angle loss function of the learning model is obtained. Based on the distance loss function and angle loss function of the learning model, the overall loss function of the learning model is constructed. Based on the overall loss function, the parameters of the learning model are iteratively optimized to obtain the optimal learning model; The optimal learning model is used to obtain the predicted feature descriptor of the image to be processed based on the image to be processed. Each pair of matched sample images contains a first sample image and a second sample image; The steps for obtaining the angle loss function include: In the first feature space formed by the predicted feature descriptors of all first sample images in the sample dataset, multiple neighborhood feature descriptors of the predicted feature descriptors of the first sample image in each pair of matched sample images are obtained. In the second feature space formed by the predicted feature descriptors of all second sample images in the sample dataset, multiple neighborhood feature descriptors of the predicted feature descriptors of the second sample images in each pair of matched sample images are obtained. Calculate the spatial angle between the predicted feature descriptors of the first and second sample images and their corresponding multiple neighborhood feature descriptors in each pair of matched sample images; The angle loss function is obtained based on the spatial angles corresponding to the first and second sample images in each pair of matched sample images.

2. The learning method for feature descriptors based on angle constraints according to claim 1, characterized in that, The two sample images are either a matched pair or a mismatched pair. Accordingly, obtaining the distance loss function of the learning model based on the distance between the predicted feature descriptors of any two sample images includes: The distance loss function is constructed with the objective of minimizing the distance between the predicted feature descriptors of all matching sample image pairs in the sample dataset and maximizing the distance between the predicted feature descriptors of all non-matching sample image pairs.

3. The learning method for feature descriptors based on angle constraints according to any one of claims 1-2, characterized in that, The construction of the overall loss function of the learning model based on the distance loss function and the angle loss function of the learning model includes: The distance loss function and the angle loss function of the learning model are weighted and summed to obtain the overall loss function of the learning model.

4. The learning method for feature descriptors based on angle constraints according to any one of claims 1-2, characterized in that, The step of inputting the sample dataset into the learning model to obtain the predicted feature descriptors for each sample image in the sample dataset includes: For the current training batch, starting from the last sample image obtained by sequential sampling of the previous training batch, a first preset number of sample images are sequentially sampled from the sample dataset, and then a second preset number of sample images are randomly sampled from the remaining sample dataset to obtain the subsample dataset of the current training batch. The subsample dataset of the current training batch is input into the learning model to obtain the predicted feature descriptor of each sample image in the subsample dataset of the current training batch. The last sample image obtained by sequential sampling of the current training batch is used as the starting point of the next training batch. The sequential sampling, random sampling and input process is iteratively executed until the result of the sequential sampling is empty.

5. The learning method for feature descriptors based on angle constraints according to any one of claims 1-2, characterized in that, The step of inputting the sample dataset into the learning model includes: Preprocess the images of each sample in the sample dataset; The preprocessing includes cropping and image enhancement; the image enhancement includes one or more combinations of rotation, flipping, and affine transformation. The preprocessed sample dataset is then input into the learning model.

6. An image processing method based on angle-constrained feature descriptors, characterized in that, include: To obtain the optimal learning model; The image to be processed is input into the optimal learning model to obtain the predicted feature descriptor of the image to be processed; Based on the predicted feature descriptor of the image to be processed, the image to be processed is processed to obtain the processing result of the image to be processed; The processing includes image recognition or image matching; The optimal learning model is trained based on the learning method of feature descriptors based on angle constraints as described in any one of claims 1 to 5.

7. A learning device for feature descriptors based on angle constraints, characterized in that, include: The first learning module is used to input the sample dataset into the learning model to obtain the predicted feature descriptors of each sample image in the sample dataset; wherein, the sample dataset includes multiple pairs of matched sample images; The first acquisition module is used to acquire the distance loss function of the learning model based on the distance between the predicted feature descriptors of any two sample images, and to acquire the angle loss function of the learning model based on the spatial angle between the predicted feature descriptors of each pair of matched sample images. A construction module is used to construct the overall loss function of the learning model based on the distance loss function and the angle loss function of the learning model; The training module is used to iteratively optimize the parameters of the learning model based on the overall loss function to obtain the optimal learning model. The optimal learning model is used to obtain the predicted feature descriptor of the image to be processed based on the image to be processed. Each pair of matched sample images contains a first sample image and a second sample image; The building module is specifically used for: In the first feature space formed by the predicted feature descriptors of all first sample images in the sample dataset, multiple neighborhood feature descriptors of the predicted feature descriptors of the first sample image in each pair of matched sample images are obtained. In the second feature space formed by the predicted feature descriptors of all second sample images in the sample dataset, multiple neighborhood feature descriptors of the predicted feature descriptors of the second sample images in each pair of matched sample images are obtained. Calculate the spatial angle between the predicted feature descriptors of the first and second sample images and their corresponding multiple neighborhood feature descriptors in each pair of matched sample images; The angle loss function is obtained based on the spatial angles corresponding to the first and second sample images in each pair of matched sample images.

8. An image processing apparatus based on angularly constrained feature descriptors, characterized in that, include: The second acquisition module is used to acquire the optimal learning model; The second learning module is used to input the image to be processed into the optimal learning model to obtain the predicted feature descriptor of the image to be processed. The processing module is used to process the image to be processed based on the predicted feature descriptor of the image to be processed, and obtain the processing result of the image to be processed. The processing includes image recognition or image matching; The optimal learning model is trained based on the learning method of feature descriptors based on angle constraints as described in any one of claims 1 to 5.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the learning method for feature descriptors based on angle constraints as described in any one of claims 1 to 5, or the image processing method for feature descriptors based on angle constraints as described in claim 6.

Citation Information

Patent Citations

  • A feature matching method based on Triplet Depth Neural Network structure

    CN109344845A

  • Angle-based target detection training method and device and target detection method and device

    CN110348460A