A graphic feature recognition method and device
By adjusting the weights of the fully connected neural network to a probability distribution and performing multiple prediction training and loss function adjustments, the problem of poor recognition results caused by insufficient defect data was solved, and the accuracy and efficiency of image target detection in high-end manufacturing were improved.
Patent Information
- Application Number
- CN202510804488.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-06-17
AI Technical Summary
Existing image target detection methods are prone to overfitting when there is little defect data, resulting in poor recognition results and cannot be effectively applied in industrial production. Especially in high-end manufacturing, due to the complex product processes and material structures, defect data is difficult to define, resulting in unreliable judgment of the model in unknown situations.
By adjusting the deterministic weights of the fully connected neural network to the uncertainty weights of the probability distribution, multiple prediction trainings are performed to obtain a set of learning weights, calculate the expected value and distribution of the prediction, use the loss function to adjust the network weights, and construct a graphic feature recognition model to improve the recognition accuracy of the model under unknown data.
It effectively improves the recognition accuracy of the model when facing unknown data, reduces the dependence on large amounts of labeled data, and improves the accuracy of detection image evaluation and the usability of the model.
Smart Images

Figure CN120318656B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a graphic feature recognition method and device. Background Art
[0002] Common image target detection methods require a large amount of data annotation information and need to ensure that the data distribution in each category is relatively uniform. However, in actual detection scenarios, there are certain difficulties in both overall data acquisition and defect data acquisition. The lack of defect data is the norm in detection scenarios. Therefore, labeling and learning a small amount of data often encounters technical problems such as overfitting, resulting in poor recognition results and the inability to apply the algorithm model to industrial production. At the same time, in the inspection of parts and products in the high-end manufacturing industry, due to the complex product process and the complex internal structure of the materials, the defect behavior presented by the inspection data is difficult to clearly define. Therefore, the defect data that has been obtained cannot represent the defect characterization characteristics that may appear in actual production. When faced with difficult to define or unknown situations, the model usually makes judgments based on the training data set under ideal conditions, resulting in unreliable results, further limiting the implementation effect of artificial intelligence algorithms. Summary of the Invention
[0003] In order to solve the above technical problems, the present invention is proposed. Embodiments of the present invention provide a method and apparatus for pattern feature recognition, which can improve the accuracy of the recognition results output by the model when facing unknown data.
[0004] According to one aspect of the present invention, a method for graphic feature recognition is provided, comprising: establishing a fully connected neural network; wherein the fully connected neural network includes features, feature probabilities, activation functions, and loss functions; adjusting the determined weights in the transmission process of the fully connected neural network to uncertainty weights of the probability distribution; performing multiple prediction trainings based on the uncertainty weights to obtain a set of learning weights; calculating the predicted expected value and distribution based on the learning weight set; obtaining the output result of the detection data based on the input detection data and the predicted expected value and distribution; adjusting the uncertainty weights of the fully connected neural network based on the loss function and the output result of the detection data to obtain a graphic feature recognition model; and performing graphic feature recognition based on the graphic feature recognition model.
[0005] In one embodiment, adjusting the determined weights in the transmission process of the fully connected neural network to uncertainty weights of the probability distribution includes: adjusting the determined weights in the transmission process of the fully connected neural network to uncertainty weights of the probability distribution: P(W|X, Y); wherein X represents training data, Y represents the true label, W represents the neural network weight, and P(W|X, Y) represents the credibility of the neural network weight W when the training data X and the true label Y are given.
[0006] In one embodiment, based on uncertainty weights, multiple prediction trainings are performed to obtain a set of learning weights, including: based on uncertainty weights, multiple prediction trainings are performed on training data; wherein each prediction is performed based on the current neural network weights; wherein the training data is obtained by sampling; based on multiple prediction trainings, a set of learning weights of a fully connected neural network under different numbers of training iterations is obtained; wherein each of the learning weights in the set of learning weights corresponds to a state of different numbers of training iterations.
[0007] In one embodiment, based on the learning weight set, the expected value and distribution of the prediction are calculated, including: based on the different learning weights obtained, multiple predictions are made on the same training data to obtain multiple prediction results; weighted averaging or arithmetic averaging the multiple prediction results to calculate the expected value of the prediction; statistically analyzing the distribution of the expected values of the multiple prediction results to obtain the distribution of the prediction; wherein the distribution includes the frequency, range and fluctuation of the predicted value.
[0008] In one embodiment, an output result of the detection data is obtained based on the input detection data and the predicted expected value and distribution, including: encoding the input detection data and extracting local features of the detection data; wherein each of the local features includes local semantics and existence probability; reverse learning the local features based on a Gaussian mixture function to obtain clustering weights; constructing a Dirichlet function distribution based on the clustering weights; and obtaining the output result of the detection data based on the clustering weights and the Dirichlet function distribution.
[0009] In one embodiment, based on the loss function and the output results of the detection data, the uncertainty weight of the fully connected neural network is adjusted to obtain a graphic feature recognition model, including: calculating an evaluation result of the output result of the detection data based on the loss function; and adjusting the uncertainty weight of the fully connected neural network based on the evaluation result to obtain a graphic feature recognition model.
[0010] In one embodiment, establishing a fully connected neural network includes: when the fully connected neural network is applied to a classification problem, setting the activation function to: Formula 1: In formula 1, Represents the original output value of the i-th neuron, K represents the total number of categories of the classification task, means taking the exponential of the original output, Represents the sum of the exponential outputs of all categories; the loss function is: Formula 2: In formula 2, represents the true label of the i-th category, represents the model's predicted probability for the i-th category, and K represents the total number of categories in the classification task.
[0011] In one embodiment, establishing a fully connected neural network includes: when the fully connected neural network is applied to a regression problem, setting the activation function to: Formula 3; Formula 4; In Formula 3 and Formula 4, Represents the original value of the output of the last layer of the fully connected neural network, represents the mean of the model predictions, Represents the original value output by another branch of the fully connected neural network, Indicates that Convert to a positive number; represents the standard deviation of the model prediction; the loss function is: Formula 5; In formula 5, represents the observed true value, represents the mean of the model predictions, represents the standard deviation of the model prediction, Indicates that the mean , the variance is Under the normal distribution of The probability density of .
[0012] In one embodiment, establishing a fully connected neural network includes: setting a feature set; quantitatively defining features in the feature set and determining the probability of each feature; wherein, after calculation by the fully connected neural network, the sum of the features in the feature set is a preset value.
[0013] According to another aspect of the present invention, a graphic feature recognition device is provided, comprising: an establishment module for establishing a fully connected neural network; wherein the fully connected neural network includes features, feature probabilities, activation functions and loss functions; an adjustment module for adjusting the certain weights in the transmission process of the fully connected neural network to the uncertainty weights of the probability distribution; a training module for performing multiple prediction trainings based on the uncertainty weights to obtain a set of learning weights; a calculation module for calculating the predicted expected value and distribution based on the learning weight set; an output module for obtaining the output result of the detection data based on the input detection data and the predicted expected value and distribution; an optimization module for adjusting the uncertainty weights of the fully connected neural network based on the loss function and the output result of the detection data to obtain a graphic feature recognition model; and a recognition module for performing graphic feature recognition based on the graphic feature recognition model.
[0014] The graphic feature recognition method and device provided by the present invention adjust the deterministic weights of a fully connected neural network to the uncertainty weights of a probability distribution, and adopt an uncertainty-aware fusion method to effectively cope with the complexity of detection results and the uncertainty of material behavior in industrial scenarios. This method eliminates the need to collect a large number of images for annotation, thereby improving the availability and efficiency of the model and enhancing the accuracy of detection image evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other objects, features, and advantages of the present invention will become more apparent through a more detailed description of the embodiments of the present invention in conjunction with the accompanying drawings. The accompanying drawings are provided to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and are not intended to limit the present invention. In the drawings, the same reference numerals generally represent the same components or steps.
[0016] Figure 1 It is a flowchart of a graphic feature recognition method provided by an exemplary embodiment of the present invention.
[0017] Figure 2 It is a structural diagram of a graphic feature recognition device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0018] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein.
[0019] Currently, large-scale visual models are increasingly being applied to real-world scenarios. Under real-world conditions, operating conditions, and processes, the behavior of parts and materials is often complex, difficult to define, and ambiguous. Sometimes, the same characteristic can have multiple causes. Deep learning models typically assume that the training data and the actual data are similar, at least in terms of distribution. This can lead to suboptimal performance on real-world data. For example, advanced materials such as composite materials (carbon fiber) are increasingly being used in high-end manufacturing due to their durability and lightweight properties. However, the complex structures of these materials result in a wide variety of defect manifestations, making them difficult to define. This can lead to manual failure to detect defects and false detections. This invention fully accounts for the uncertainty inherent in test data and introduces a quantitative prediction algorithm to determine the accuracy of the model's discrimination results, enabling quantitative analysis of the model's results. This method effectively addresses misidentification issues caused by insufficient data and incomplete feature coverage, improving the reliability of intelligent recognition calculations based on test data.
[0020] In order to solve the problem of inaccurate model output results caused by complex product processes and complex internal structures of materials, the present invention proposes a graphic feature recognition method. Figure 1 is a flow chart of a method for identifying graphic features provided by an exemplary embodiment of the present invention. Figure 1 For example, first, a fully connected neural network is established (see Figure 1 S110); wherein the fully connected neural network includes features, feature probabilities, activation functions, and loss functions. Then, the determined weights in the transmission process of the fully connected neural network are adjusted to the uncertainty weights of the probability distribution (see Figure 1 Secondly, based on the uncertainty weights, multiple prediction trainings are performed to obtain a set of learning weights (see Figure 1 Then, based on the learning weight set, the expected value and distribution of the prediction are calculated (see Figure 1 Then, based on the input detection data and the expected value and distribution of the prediction, the output result of the detection data is obtained (see Figure 1 Then, based on the loss function and the output of the detection data, the uncertainty weight of the fully connected neural network is adjusted to obtain the graphic feature recognition model (see Figure 1 Finally, based on the graphic feature recognition model, graphic feature recognition is performed (see Figure 1 S170).
[0021] That is, before recognizing graphic features, an uncertainty-aware fusion method is first used to change the weight parameters of model training from fixed values to probability distribution functions. The reliability of the model's calculation results is re-evaluated to ensure that the model outputs reliable recognition results when faced with unknown data. For example, a fully connected neural network model is constructed, and the fixed weight parameters in the fully connected neural network model are randomly initialized. The model is then iterated multiple times using the training dataset through the backpropagation algorithm to dynamically adjust the uncertainty weights. Then, after training is complete, multiple different sets of learning weights are generated. The learned weight sets and input data are then used for prediction. Finally, the central tendency (expectation) and dispersion (distribution) of the output results are statistically analyzed. A new loss function is introduced to guide the direction of parameter adjustment during model training. The model training will be carried out over multiple rounds, and the loss function is used to calculate the evaluation results of each round. The evaluation results guide the parameter changes of the next round of training until more ideal parameters are obtained, so that the model can output accurate answers.
[0022] In S110 , a fully connected neural network is established.
[0023] In some embodiments, a feature set is first defined; the features in the feature set are quantitatively defined, and the probability of each feature is determined; wherein, after calculation by a fully connected neural network, the sum of the features in the feature set is a preset value. For example, let p be the feature set and p[C1, C2, C3, C4, C5] is quantitatively defined, with the probability of each feature defined as 0-1. After each calculation by the fully connected neural network, the sum of the features is 1.
[0024] In some embodiments, when a fully connected neural network is applied to a classification problem, the activation function may be set to:
[0025] Formula 1;
[0026] In formula 1, Represents the original output value of the i-th neuron, K represents the total number of categories of the classification task, means taking the exponential of the original output, Indicates the sum of the index outputs of all categories;
[0027] The loss function can be set as:
[0028] Formula 2;
[0029] In formula 2, represents the true label of the i-th category, represents the model's predicted probability for the i-th category, and K represents the total number of categories in the classification task.
[0030] In some embodiments, when a fully connected neural network is applied to a regression problem, the activation function may be set to:
[0031] Formula 3;
[0032] Formula 4;
[0033] In formula three and formula four, Represents the original value of the output of the last layer of the fully connected neural network, represents the mean of the model predictions, Represents the original value output by another branch of the fully connected neural network, Indicates that Convert to a positive number; represents the standard deviation of the model predictions.
[0034] The loss function can be set as:
[0035] Formula 5;
[0036] In formula five, represents the observed true value, represents the mean of the model predictions, represents the standard deviation of the model prediction, Indicates that the mean , the variance is Under the normal distribution of The probability density of .
[0037] In S120 , the deterministic weights in the transmission process of the fully connected neural network are adjusted to the uncertainty weights of the probability distribution.
[0038] The determination weights in the neural network transmission process are adjusted from fixed values to probability distribution functions to form uncertainty weights, thereby re-evaluating the reliability of the model calculation results and ensuring that the model outputs reliable recognition results when facing unknown data.
[0039] In some embodiments, in a deterministic network, the weight parameter transmitted by each neuron is W. In uncertainty perception, the weight is adjusted to P(W|X, Y); where X represents the training data, Y represents the true label, and W represents the neural network weight. P(W|X, Y) represents the credibility of the neural network weight W when given the training data X and the true label Y. In other words, W is considered a random variable, and its distribution is calculated using P(W|X, Y), thereby quantifying uncertainty.
[0040] In S130 , multiple prediction trainings are performed based on the uncertainty weights to obtain a learning weight set.
[0041] In some embodiments, based on uncertainty weights, multiple prediction trainings are performed on the training data; wherein each prediction is performed based on the current neural network weights; wherein the training data is obtained through sampling; based on multiple prediction trainings, a set of learning weights of the fully connected neural network under different numbers of training iterations is obtained; wherein each learning weight in the learning weight set corresponds to a state with a different number of training iterations.
[0042] In order to avoid the excessive amount of calculation caused by the introduction of the distribution function in the process of propagation of each neuron, which makes it difficult to perform practical application logic, a sampling-based approach is needed to approximate the probability distribution. The learning weight set is obtained by saving the weight parameters of the fully connected neural network at different training iterations. Each weight parameter corresponds to a specific state of the network. In the fully connected network, due to the uncertainty of the weight parameters, multiple prediction trainings are performed by adjusting the weight parameters to obtain different learning weights W, forming a set W t =train(f;X,Y).
[0043] In S140 , based on the learned weight set, the expected value and distribution of the prediction are calculated.
[0044] In some embodiments, multiple predictions are performed on the same training data based on different learning weights to obtain multiple prediction results. The multiple prediction results are weighted averaged or arithmetic averaged to calculate an expected value of the prediction. The distribution of the expected values of the multiple prediction results is statistically analyzed to obtain a distribution of the predictions, wherein the distribution includes the frequency, range, and fluctuation of the predicted values. The weighted average or arithmetic average calculation method is determined based on the specific application scenario, and the predicted expected value is used as the network's most likely prediction result for the training data.
[0045] In some embodiments, the distribution of the prediction results can be visualized through a histogram, a probability density function, or a cumulative distribution function to intuitively reflect the degree of uncertainty of the prediction results.
[0046] In some embodiments, the predicted expected value may be expressed as:
[0047] Formula 6;
[0048] In formula six, Represents the prediction given the training data X The expected value of represents the expected value, X represents the training data, which can be the original input features such as images and text vectors, and T represents the number of sampling times. represents the predicted output of the model at the tth sampling time, f is a fully connected neural network, is the set of learning weights.
[0049] The predicted distribution can be expressed as:
[0050] Formula 7;
[0051] In formula seven, Indicates the prediction given the training data X The variance of represents the expected value, X represents the training data, T represents the number of sampling times, It represents the square of the deviation between the predicted value of a single model and the average predicted value. represents the square of the mean predicted value.
[0052] In S150 , an output result of the detection data is obtained based on the input detection data and the predicted expected value and distribution.
[0053] After building the model, prepare independent test data to evaluate the model's performance. This test data is then fed into the model for prediction. The output of the test data includes the expected value and distribution calculated based on the input test data.
[0054] In some embodiments, the input detection data is encoded to extract local features of the detection data. Each local feature includes local semantics and an existence probability. The local features are reverse-learned using a Gaussian mixture function to obtain clustering weights. A Dirichlet function distribution is constructed based on the clustering weights. The detection data output is obtained based on the clustering weights and the Dirichlet function distribution. After receiving the detection data, it is encoded using a basic model to extract pixel-level information. This pixel-level information retains the spatial details of the original data but has been initially interpreted by the model. Each local feature corresponds to a local semantics and an existence probability. Next, the local features are reverse-learned using a Gaussian mixture function. The Gaussian mixture model (GMM) is a probabilistic model that assumes data comes from a mixture of multiple Gaussian distributions. It is commonly used in tasks such as density estimation and clustering. During model construction, it is sometimes necessary to infer or learn the data's latent features from a known data distribution. Using a GMM for reverse feature learning may involve fitting the GMM to the data to obtain the data's latent structure or feature representation. The Dirichlet function distribution is simultaneously constructed. The Dirichlet distribution is a multivariate continuous probability distribution commonly used to represent the distribution of probability vectors. During model construction, the probability distribution is defined or learned using the Dirichlet function distribution. Furthermore, the decoder ensures that the output remains the same as the original image, enabling semantic segmentation to detect abnormal features.
[0055] In S160 , based on the loss function and the output result of the detection data, the uncertainty weight of the fully connected neural network is adjusted to obtain a graphic feature recognition model.
[0056] For example, taking the detection data as an image, it is first encoded through S150 to obtain pixel-level information, such as color, texture, position and other features, and then a Gaussian mixture function is used to mark abnormal features. Finally, the decoder is used to restore the image to determine whether the input image has target features and whether the basis of the model's judgment is reliable, thereby adjusting the uncertainty weight of the fully connected neural network to complete the training and evaluation of the graphic feature recognition model.
[0057] In some embodiments, a loss function is introduced, and based on the loss function, an evaluation result of the output result of the detection data is calculated; based on the evaluation result, the uncertainty weight of the fully connected neural network is adjusted to obtain a graphic feature recognition model.
[0058] For example, introducing Formula 8: Formula 8 is used to introduce the adjustable effect of uncertainty and guide the model parameter adjustment. In Formula 8, N represents the number of samples or the total number of data points. x N represents a set of N data points, Indicates that the parameter θ Next, the dataset x N The joint probability density function of the two sets of predictions is a function of the probability density function of the given set. Based on this, when training the model, both clear and ambiguous samples are fed into the model to teach it to distinguish between "certainty" and "uncertainty," and a loss function is used to reward reasonable uncertainty estimates. For example, if the data is ambiguous, the model must not only predict the outcome but also its "uncertainty" (for example, "the probability of a fit is 60%, and the uncertainty is 30%"). The loss function rewards both accurate predictions and reasonable uncertainty estimates, adjusting the weights based on the loss to improve the model's prediction accuracy.
[0059] Figure 2 FIG. 1 is a schematic diagram of a structure of a graphic feature recognition device provided by an exemplary embodiment of the present invention. Figure 2 As shown, the graphic feature recognition device 2 includes: an establishment module 21, which establishes a fully connected neural network; wherein the fully connected neural network includes features, feature probabilities, activation functions and loss functions; an adjustment module 22, which adjusts the certain weights in the transmission process of the fully connected neural network to the uncertainty weights of the probability distribution; a training module 23, which performs multiple prediction training based on the uncertainty weights to obtain a set of learning weights; a calculation module 24, which calculates the expected value and distribution of the prediction based on the learning weight set; an output module 25, which obtains the output result of the detection data based on the input detection data and the expected value and distribution of the prediction; an optimization module 26, which adjusts the uncertainty weights of the fully connected neural network based on the loss function and the output result of the detection data to obtain a graphic feature recognition model; and a recognition module 27, which performs graphic feature recognition based on the graphic feature recognition model.
[0060] The graphic feature recognition device effectively copes with the complexity of detection results in industrial scenarios and the uncertainty of material behavior by adopting an uncertainty-aware fusion method, thereby improving the accuracy of detection image evaluation, effectively reducing the hallucination phenomenon of the model, and eliminating the need to collect a large number of images for annotation, thereby improving the availability and efficiency of the model.
[0061] In one embodiment, the adjustment module 22 can be configured to adjust the determined weights in the transmission process of the fully connected neural network to the uncertainty weights of the probability distribution: P(W|X, Y); wherein X represents the training data, Y represents the true label, W represents the neural network weight, and P(W|X, Y) represents the credibility of the neural network weight W when the training data X and the true label Y are given.
[0062] In one embodiment, the training module 23 can be configured to: perform multiple prediction training on the training data based on uncertainty weights; wherein each prediction is performed based on the current neural network weights; wherein the training data is obtained through sampling; based on multiple prediction trainings, obtain a set of learning weights of the fully connected neural network under different training iteration numbers; wherein each learning weight in the learning weight set corresponds to a state with different training iteration numbers.
[0063] In one embodiment, the calculation module 24 can be configured to: perform multiple predictions on the same training data based on the different learning weights obtained to obtain multiple prediction results; perform weighted averaging or arithmetic averaging on the multiple prediction results to calculate the expected value of the prediction; and statistically analyze the distribution of the expected values of the multiple prediction results to obtain the distribution of the predictions; wherein the distribution includes the frequency, range and fluctuation of the predicted values.
[0064] In one embodiment, the output module 25 can be configured to: encode the input detection data and extract local features of the detection data; wherein each local feature includes local semantics and existence probability; reversely learn the local features based on the Gaussian mixture function to obtain clustering weights; construct a Dirichlet function distribution based on the clustering weights; and obtain the output results of the detection data based on the clustering weights and the Dirichlet function distribution.
[0065] In one embodiment, the optimization module 26 may be configured to: calculate an evaluation result of the output result of the detection data based on the loss function; and adjust the uncertainty weight of the fully connected neural network based on the evaluation result to obtain a graphic feature recognition model.
[0066] In one embodiment, the establishment module 21 may be configured to: when the fully connected neural network is applied to a classification problem, set the activation function to: Formula 1: In formula 1, Represents the original output value of the i-th neuron, K represents the total number of categories of the classification task, means taking the exponential of the original output, Represents the sum of the exponential outputs of all categories; the loss function is: Formula 2: In formula 2, represents the true label of the i-th category, represents the model's predicted probability for the i-th category, and K represents the total number of categories in the classification task.
[0067] In one embodiment, the establishment module 21 may also be configured to: when the fully connected neural network is applied to the regression problem, set the activation function to: Formula 3; Formula 4; In Formula 3 and Formula 4, Represents the original value of the output of the last layer of the fully connected neural network, represents the mean of the model predictions, Represents the original value output by another branch of the fully connected neural network, Indicates that Convert to a positive number; represents the standard deviation of the model prediction; the loss function is: Formula 5; In formula 5, represents the observed true value, represents the mean of the model predictions, represents the standard deviation of the model prediction, Indicates that the mean , the variance is Under the normal distribution of The probability density of .
[0068] In one embodiment, the establishment module 21 can also be configured to: set a feature set; quantitatively define the features in the feature set and determine the probability of each feature; wherein, after calculation by the fully connected neural network, the sum of the features in the feature set is a preset value.
[0069] An embodiment of the present invention provides a graphic feature recognition device. The device embodiment can be implemented through software, hardware, or a combination of software and hardware. From a hardware perspective, in addition to a CPU, memory, network interface, and non-volatile memory, the device in which the device in the embodiment is located can generally also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, as a device in a logical sense, it is formed by the CPU of the device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them.
[0070] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program for executing the graphic feature recognition method of any one of the above embodiments.
[0071] In addition to the above methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to perform the steps of the graphic feature recognition method according to various embodiments of the present invention described above.
[0072] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; and the processor for executing the graphic feature recognition method of any one of the above embodiments.
[0073] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps of the graphic feature recognition method according to various embodiments of the present invention described above.
[0074] 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, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A graphic feature recognition method, characterized in that: include: Establishing a fully connected neural network; wherein the fully connected neural network includes features, feature probabilities, activation functions, and loss functions; Adjusting the deterministic weights in the transmission process of the fully connected neural network to the uncertainty weights of the probability distribution; Based on the uncertainty weights, multiple prediction trainings are performed to obtain a set of learning weights; Based on the set of learned weights, calculate the expected value and distribution of the prediction; Based on the input test data and the predicted expected value and distribution, obtain the output result of the test data; Based on the loss function and the output results of the detection data, the uncertainty weight of the fully connected neural network is adjusted to obtain a graphic feature recognition model; Perform graphic feature recognition based on the graphic feature recognition model; Adjusting the deterministic weights in the transmission process of the fully connected neural network to uncertainty weights of the probability distribution includes: Adjusting the determined weights in the transmission process of the fully connected neural network to uncertainty weights of the probability distribution: P(W|X, Y); wherein X represents the training data, Y represents the true label, W represents the neural network weight, and P(W|X, Y) represents the credibility of the neural network weight W when given the training data X and the true label Y; Based on the uncertainty weights, multiple prediction trainings are performed to obtain a set of learning weights, including: Based on the uncertainty weights, multiple prediction trainings are performed on the training data; wherein each prediction is performed based on the current neural network weights; wherein the training data is obtained by sampling; Based on multiple prediction trainings, a learning weight set of a fully connected neural network under different training iterations is obtained; wherein each learning weight in the learning weight set corresponds to a state of a different training iteration number; Based on the learned weight set, calculate the expected value and distribution of the prediction, including: Based on the different learning weights obtained, multiple predictions are made on the same training data to obtain multiple prediction results; Taking a weighted average or arithmetic average of the multiple prediction results to calculate the expected value of the prediction; Calculate the distribution of expected values of multiple prediction results to obtain the distribution of predictions; wherein the distribution includes the frequency, range and fluctuation of the predicted values; Based on the input test data and the predicted expected value and distribution, the output results of the test data are obtained, including: Encode the input detection data and extract local features of the detection data; wherein each local feature includes local semantics and existence probability; Reverse learning the local features based on a Gaussian mixture function to obtain clustering weights; Based on the clustering weights, a Dirichlet function distribution is constructed; Obtaining an output result of the detection data based on the clustering weight and the Dirichlet function distribution; Based on the loss function and the output results of the detection data, the uncertainty weight of the fully connected neural network is adjusted to obtain the graphic feature recognition model, including: Calculating an evaluation result of an output result of the detection data based on the loss function; Adjusting the uncertainty weight of the fully connected neural network based on the evaluation result to obtain a graphic feature recognition model; Build a fully connected neural network, including: When the fully connected neural network is applied to the classification problem, the activation function is set to: In formula 1, z i Represents the original output value of the i-th neuron, K represents the total number of categories of the classification task, means taking the exponential of the original output, Indicates the sum of the index outputs of all categories; The loss function is: Formula 2; In formula 2, y i represents the true label of the i-th category, p i Represents the model's predicted probability for the i-th category, and K represents the total number of categories in the classification task; Build a fully connected neural network, including: When the fully connected neural network is applied to the regression problem, the activation function is set to: μ=Z μ Formula 3; σ=exp(z σ ) Formula 4; In Formula 3 and Formula 4, Z μ represents the original value of the last layer output of the fully connected neural network, μ represents the mean value predicted by the model, and z σ Represents the original value of the output of another branch of the fully connected neural network, exp(z σ ) means z σ Converted to a positive number; σ represents the standard deviation of the model prediction; The loss function is: -log(N(y|μ,σ 2 ))Formula 5; In formula 5, y represents the observed true value, μ represents the mean value predicted by the model, and σ represents the standard deviation of the model prediction. 2 ) means that the mean is μ and the variance is σ 2 The probability density of observing the true value y under the normal distribution of ; Build a fully connected neural network, including: Set feature set; The features in the feature set are quantitatively defined, and the probability of each feature is determined; wherein, after calculation by the fully connected neural network, the sum of the features in the feature set is a preset value.
Citation Information
Patent Citations
Landslide displacement prediction method based on Gaussian process regression and neural network
CN113268932A
Hyperspectral image classification method based on Bayesian layer graph convolutional neural network
CN115393631A