Graphic feature recognition method and device
By adjusting neural network weights to probabilistic uncertainty and refining models through multiple predictions and loss functions, the method addresses data complexity in industrial image recognition, enhancing accuracy and reliability.
Patent Information
- Application Number
- CN202510804488.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-06-17
AI Technical Summary
Existing image object detection methods are prone to overfitting when there is little defect data, resulting in poor recognition results and cannot be effectively applied in high-end manufacturing industries. Especially in the detection of complex materials and products, it is difficult to define defect characteristics, resulting in unreliable model output.
By adjusting the determination weight of the fully connected neural network to the uncertainty weight of the probability distribution, multiple prediction trainings are performed, learning weight sets are obtained, predicted expected values and distributions are calculated, network weights are adjusted using loss functions, and graphical feature recognition models are constructed to improve the recognition accuracy of the model under unknown data.
Effectively responding to the complexity of detection results and uncertainty of material behavior improves the usability of the model and the accuracy of detection image evaluation, and reduces the dependence on large amounts of labeled data.
Smart Images

Figure CN120318656A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and particularly 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 obtaining both overall data and defective data. The scarcity of defective data is the norm in detection scenarios. Therefore, when performing annotation learning on a small amount of data, technical problems such as overfitting often occur, resulting in poor recognition effects and the inability to apply the algorithm model to industrial production. At the same time, in the inspection of components and products in the high-end manufacturing industry, due to the complex product process and the complex internal structure of materials, it is difficult to clearly define the defective behaviors presented by the inspection data. Therefore, the obtained defective data cannot represent the defective characterization characteristics that may occur in actual production. When the model faces difficult-to-define or unknown situations, it usually makes judgments according to the training data set under ideal conditions, resulting in unreliable results, further restricting 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 graphic feature recognition method and device, 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, there is provided a graphic feature recognition method, including: 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 transfer process of the fully connected neural network to uncertainty weights of probability distributions; based on the uncertainty weights, performing multiple prediction trainings to obtain a set of learning weights; based on the set of learning weights, calculating the expected value and distribution of the prediction; based on the input detection data and the expected value and distribution of the prediction, obtaining the output result of the detection data; based on the loss function and the output result of the detection data, adjusting the uncertainty weights of the fully connected neural network to obtain a graphic feature recognition model; based on the graphic feature recognition model, performing graphic feature recognition.
[0005] In one embodiment, adjusting the determined weights in the transfer process of the fully connected neural network to uncertainty weights of probability distributions includes: adjusting the determined weights in the transfer process of the fully connected neural network to uncertainty weights of probability distributions: P(W|X, Y); where X represents training data, Y represents the true label, W represents the neural network weights, and P(W|X, Y) represents the credibility of the neural network weights W when given training data X and true label Y.
[0006] In one embodiment, based on the uncertainty weights, multiple prediction trainings are performed to obtain a set of learning weights, including: performing multiple prediction trainings on the training data based on the uncertainty weights; wherein each prediction is based on the current neural network weights; wherein the training data is obtained by sampling; obtaining a set of learning weights of the fully connected neural network at different training iteration times based on the multiple prediction trainings; wherein each of the learning weights in the set of learning weights corresponds to the state at different training iteration times.
[0007] In one embodiment, based on the set of learning weights, the expected value and distribution of the prediction are calculated, including: performing multiple predictions on the same training data based on the obtained different learning weights to obtain multiple prediction results; performing weighted average or arithmetic average on 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 occurrence frequency, range and fluctuation of the predicted values.
[0008] In one embodiment, based on the input detection data and the expected value and distribution of the prediction, the output result of the detection data is obtained, including: encoding the input detection data to extract the local features of the detection data; wherein each of the local features includes local semantics and existence probability; inversely learning the local features based on the Gaussian mixture function to obtain the clustering weights; constructing a Dirichlet function distribution based on the clustering weights; 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 result of the detection data, the uncertainty weights of the fully connected neural network are adjusted to obtain a graphic feature recognition model, including: calculating the evaluation result of the output result of the detection data based on the loss function; adjusting the uncertainty weights of the fully connected neural network based on the evaluation result to obtain a graphic feature recognition model.
[0010] In one embodiment, a fully connected neural network is established, including: when the fully connected neural network is applied to a classification problem, setting the activation function as: Formula One; in Formula One, represents the original output value of the i-th neuron, K represents the total number of categories of the classification task, represents taking the exponential of the original output, represents summing the exponential outputs of all categories; the loss function is: Formula Two; in Formula Two, represents the true label of the i-th category, represents the predicted probability of the model for the i-th category, and K represents the total number of categories of the classification task.
[0011] In one embodiment, a fully connected neural network is established, including: when the fully connected neural network is applied to a regression problem, setting the activation function as: Formula Three; Formula Four; in Formula Three and Formula Four, represents the original value output by the last layer of the fully connected neural network, represents the mean value predicted by the model, represents the original value output by another branch of the fully connected neural network, represents converting to a positive number; represents the standard deviation predicted by the model; the loss function is: Formula Five; in Formula Five, represents the observed true value, represents the mean value predicted by the model, represents the standard deviation predicted by the model, represents at a mean of and a variance of under the normal distribution of the probability density of the observed true value
[0012] In one embodiment, a fully connected neural network is established, including: setting a feature set; quantifying and defining the features in the feature set, and determining the probability of each feature; wherein, after being calculated 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, there is provided a graphic feature recognition device, including: a building module for building 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 determined weights in the transfer process of the fully connected neural network to uncertainty weights of a 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 expected value and distribution of the prediction based on the set of learning weights; an output module for obtaining an output result of the detection data based on the input detection data and the expected value and distribution of the prediction; 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 determined weights of the fully connected neural network to uncertainty weights of probability distribution, and adopt an uncertainty-aware fusion method to effectively cope with the complexity of detection results and the uncertainty of material behavior performance in industrial scenarios, without collecting a large number of images for annotation, improving the usability and efficiency of the model, and enhancing the accuracy of the evaluation of detected images. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other objects, features, and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention and do not constitute a limitation to the present invention. In the drawings, the same reference numerals generally represent the same components or steps.
[0016] Figure 1 It is a schematic flowchart of a graphic feature recognition method provided by an exemplary embodiment of the present invention.
[0017] Figure 2 It is a schematic structural diagram of a graphic feature recognition device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] Next, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention. It should be understood that the present invention is not limited by the exemplary embodiments described herein.
[0019] Currently, visual large models are increasingly applied to real scenarios. Under the conditions of real environments, working conditions, processes, etc., the behaviors exhibited by workpieces, materials, etc. are often complex, difficult to define, and fuzzy. Sometimes, behind the same manifestation feature, there may be multiple causes. Generally speaking, when constructing a deep learning model, it is assumed that the training data is at least similar to the actual data in distribution, resulting in the model performing poorly on the actual data. For example, advanced materials such as composite materials (carbon fiber, etc.) are increasingly widely used in high-end manufacturing due to advantages such as good durability and light weight. However, the structures of these materials are complex, resulting in a variety of defective characterization forms, which are very difficult to define, leading to the situation where defects cannot be detected manually, and there are missed detections and false detections. The present invention fully considers the uncertainty characteristics presented by the detection data, introduces a quantitative prediction algorithm, obtains the accuracy of the model for the discrimination result, and realizes the quantitative analysis of the model result. This method effectively solves the misrecognition situation caused by insufficient data volume and incomplete coverage of feature types, and improves the reliability of the intelligent recognition calculation results of the detection data.
[0020] To solve the problem that the complex product process and the complex internal structure of materials lead to inaccurate model output results, the present invention proposes a graphic feature recognition method. Figure 1 is a schematic flowchart of the graphic feature recognition method provided by an exemplary embodiment of the present invention. Taking Figure 1 as an example, first, a fully connected neural network is established (see Figure 1 S110); among them, the fully connected neural network includes features, feature probabilities, activation functions, and loss functions. Then, the determined weights in the transfer process of the fully connected neural network are adjusted to uncertainty weights of probability distributions (see Figure 1 S120). Secondly, based on the uncertainty weights, multiple prediction trainings are carried out to obtain a set of learning weights (see Figure 1 S130). Then, based on the set of learning weights, the expected value and distribution of the prediction are calculated (see Figure 1 S140). Next, 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 S150). Then, based on the loss function and the output result of the detection data, the uncertainty weights of the fully connected neural network are adjusted to obtain a graphic feature recognition model (see Figure 1 S160). Finally, based on the graphic feature recognition model, graphic feature recognition is carried out (see Figure 1 S170).
[0021] That is to say, before graphic feature recognition, first use the uncertainty-aware fusion method to change the weight parameters of model training from fixed values to probability distribution functions, and re-evaluate the reliability of model calculation results to ensure that the model outputs reliable recognition results when facing unknown data. For example, a fully connected neural network model is constructed, and the determined weight parameters in the fully connected neural network model are randomly initialized. Through the backpropagation algorithm, the model is iteratively trained multiple times using the training data set, and the uncertainty weights are dynamically adjusted. Then, after the training is completed, multiple different sets of learning weights are generated, and then the learning weights and the input data are used for prediction. Finally, the central tendency (expectation) and dispersion degree (distribution) of the output results are statistically analyzed, and a new loss function is introduced to guide the direction of parameter adjustment during model training. There are many rounds of model training, and the results of each round are evaluated using the loss function. According to the evaluation results, the parameter changes of the next round of training are guided until relatively ideal parameters are obtained to make the model output accurate answers.
[0022] In S110, a fully connected neural network is established.
[0023] In some embodiments, a feature set is first set; the features in the feature set are quantitatively defined, and the probability of each feature is determined; wherein, after being calculated by a fully connected neural network, the sum of the features in the feature set is a preset value. For example, set p as the feature set and quantitatively define p[C1, C2, C3, C4, C5], and the probability of each feature is defined as 0-1. Each time after being calculated by the fully connected neural network, the sum of the features is 1.
[0024] In some embodiments, when the fully connected neural network is applied to a classification problem, the activation function can be set as: Formula One; In Formula One, represents the original output value of the i-th neuron, K represents the total number of categories in the classification task, represents taking the exponent of the original output, represents summing the exponential outputs of all categories; The loss function can be set as: Formula Two; In Formula Two, represents the true label of the i-th category, represents the predicted probability of the model for the i-th category, and K represents the total number of categories in the classification task.
[0025] In some embodiments, when the fully connected neural network is applied to a regression problem, the activation function can be set as: Formula Three; Formula Four; In Formulas Three and Four, represents the original value output by the last layer of the fully connected neural network, represents the mean value predicted by the model, represents the original value output by another branch of the fully connected neural network, represents converting to a positive number; represents the standard deviation predicted by the model.
[0026] The loss function can be set as: Formula Five; In Formula Five, represents the observed true value, represents the mean value predicted by the model, represents the standard deviation predicted by the model, represents at a mean of , variance of under the normal distribution of Probability density.
[0027] In S120, the determined weights in the transfer process of the fully connected neural network are adjusted to the uncertainty weights of the probability distribution.
[0028] The determined weights in the neural network transfer process are adjusted from fixed values to a probability distribution function 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.
[0029] In some embodiments, in the deterministic network, the weight parameters transmitted by each neuron are W, and in the uncertainty perception, the weights are adjusted to P(W|X, Y); where X represents the training data, Y represents the true label, W represents the neural network weights, and P(W|X, Y) represents the credibility of the neural network weights W when the training data X and the true label Y are given. That is to say, W is considered a random variable, and its distribution is calculated through P(W∣X, Y) to quantify the uncertainty.
[0030] In S130, based on the uncertainty weights, multiple prediction trainings are performed to obtain a set of learning weights.
[0031] In some embodiments, based on the uncertainty weights, multiple prediction trainings are performed on the training data; where each prediction is based on the current neural network weights; where the training data is obtained by sampling; based on multiple prediction trainings, a set of learning weights of the fully connected neural network at different training iteration times is obtained; where each learning weight in the set of learning weights corresponds to the state at different training iteration times.
[0032] To avoid excessive computational complexity caused by the introduction of the distribution function during the propagation of each neuron, making it difficult to perform practical application logic, a sampling-based method needs to be used to approximately approximate the probability distribution. The set of learning weights is obtained by saving the weight parameters of the fully connected neural network at different training iteration times, and 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).
[0033] In S140, based on the set of learning weights, the expected value and distribution of the prediction are calculated.
[0034] In some embodiments, based on the obtained different learning weights, the same training data is predicted multiple times to obtain multiple prediction results; the multiple prediction results are weighted averaged or arithmetically averaged to calculate the expected value of the prediction; the distribution of the expected values of the multiple prediction results is statistically analyzed to obtain the distribution of the prediction; wherein, the distribution includes the occurrence frequency, range and fluctuation of the predicted values. The calculation method of weighted average or arithmetical average is determined according to the specific application scenario, and the predicted expected value is used as the most likely prediction result of the network for the training data.
[0035] In some embodiments, the distribution of the prediction results can be visually displayed through a histogram, probability density function or cumulative distribution function to intuitively reflect the degree of uncertainty of the prediction results.
[0036] In some embodiments, the expected value of the prediction can be expressed as: Formula Six; In Formula Six, represents the expected value of the prediction when given the training data X, represents the expected value, X represents the training data, which can be original input features such as images, text vectors, etc., T represents the number of samplings, represents the predicted output of the model at the t-th sampling, f is a fully connected neural network, is the set of learning weights.
[0037] The distribution of the prediction can be expressed as: Formula Seven; In Formula Seven, represents the variance of the prediction when given the training data X, represents the expected value, X represents the training data, T represents the number of samplings, represents the square of the deviation between the predicted value of a single model and the average predicted value, represents the square of the average predicted value.
[0038] In S150, based on the input detection data and the predicted expected value and distribution, the output result of the detection data is obtained.
[0039] After the model is constructed, independent detection data is prepared to evaluate the performance of the model, and the detection data is input into the model for prediction. The output result of the detection data includes the expected value and distribution calculated after inputting the detection data.
[0040] In some embodiments, the input detection data is encoded to extract local features of the detection data; wherein each local feature includes local semantics and an existence probability; the local features are inversely learned based on a Gaussian mixture function to obtain clustering weights; a Dirichlet function distribution is constituted based on the clustering weights; and an output result of the detection data is obtained based on the clustering weights and the Dirichlet function distribution. After receiving the detection data, it is encoded through a basic model to extract pixel-level information. The pixel-level information retains the spatial details of the original data but has been preliminarily interpreted by the model, and each local feature corresponds to local semantics and an existence probability. Then, the Gaussian mixture function is used to inversely learn the local features. The Gaussian mixture model (GMM) is a probability model that assumes the data comes from a mixture of multiple Gaussian distributions. It is commonly used in tasks such as density estimation and clustering. During the model construction process, sometimes it is necessary to infer or learn the latent features of the data through the known data distribution. Using the GMM to inversely learn features may mean fitting the GMM to the data to obtain the latent structure or feature representation of the data. Synchronously, a Dirichlet function distribution is constituted. The Dirichlet distribution is a multivariate continuous probability distribution commonly used to represent the distribution of probability vectors. During the model construction process, the probability distribution is defined or learned through the Dirichlet function distribution. At the same time, the decoder is used to ensure that the output result is still the original image, and semantic segmentation for detecting abnormal features can be achieved.
[0041] 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.
[0042] For example, taking the detection data as a picture, first it is encoded through S150 to obtain pixel-level information, such as features including color, texture, position, etc., then the Gaussian mixture function is used to mark abnormal features, and finally the decoder is used to restore the picture to determine whether the input image has target features and whether the basis for the model's judgment is reliable, so as to adjust the uncertainty weight of the fully connected neural network and complete the training and evaluation of the graphic feature recognition model.
[0043] In some embodiments, a loss function is introduced. Based on the loss function, the 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.
[0044] For example, introduce Formula VIII; Formula VIII is used for calculation to introduce the adjustable effect of uncertainty and guide model parameter tuning. In Formula VIII, N represents the number of samples or the total number of data points, x N represents a set composed of N data points, Indicates that under the parameter θ , the joint probability density function of the dataset x N . Based on this, when training the model, input clear and ambiguous samples to teach the model to distinguish between "certain" and "uncertain", and reward reasonable uncertainty estimation through the loss function. For example, if the data is ambiguous, the model not only has to predict the result, but also predict its "uncertainty" (such as giving "the suitable probability is 60% and the uncertainty is 30%"). The loss function will reward both accurate prediction and reasonable uncertainty estimation, adjust the weights according to the loss, and improve the prediction accuracy of the model.
[0045] Figure 2 is a schematic structural diagram of a graphic feature recognition device provided by an exemplary embodiment of the present invention. As Figure 2 shown, the graphic feature recognition device 2 includes: a building module 21 that builds a fully connected neural network; wherein, the fully connected neural network includes features, feature probabilities, activation functions, and loss functions; an adjustment module 22 that adjusts the certain weights in the transfer process of the fully connected neural network to the uncertainty weights of the probability distribution; a training module 23 that performs multiple prediction trainings based on the uncertainty weights to obtain a set of learning weights; a calculation module 24 that calculates the expected value and distribution of the prediction based on the set of learning weights; an output module 25 that 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 that 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 that performs graphic feature recognition based on the graphic feature recognition model.
[0046] The graphic feature recognition device effectively deals with the complexity of detection results and the uncertainty of material behavior performance in industrial scenarios by adopting an uncertainty-aware fusion method, thereby improving the accuracy of detecting image evaluation, effectively reducing the hallucination phenomenon of the model, and without the need to collect a large number of images for annotation, improving the usability and efficiency of the model.
[0047] In one embodiment, the adjustment module 22 can be configured to: adjust the certain weights in the transfer process of the fully connected neural network to the uncertainty weights of the probability distribution: P(W|X, Y); where X represents the training data, Y represents the true label, W represents the neural network weights, and P(W|X, Y) represents the credibility of the neural network weights W when given the training data X and the true label Y.
[0048] In one embodiment, the training module 23 may be configured to: perform multiple prediction trainings on the training data based on uncertainty weights; wherein each prediction is based on the current neural network weights; wherein the training data is obtained by sampling; obtain a set of learning weights of the fully connected neural network at different training iteration times based on the multiple prediction trainings; wherein each learning weight in the set of learning weights corresponds to the state at a different training iteration time.
[0049] In one embodiment, the calculation module 24 may be configured to: perform multiple predictions on the same training data based on the obtained different learning weights to obtain multiple prediction results; perform weighted average or arithmetic average on the multiple prediction results to calculate the expected value of the prediction; statistically analyze the distribution of the expected values of the multiple prediction results to obtain the distribution of the prediction; wherein the distribution includes the occurrence frequency, range, and fluctuation of the predicted values.
[0050] In one embodiment, the output module 25 may be configured to: encode the input detection data and extract the local features of the detection data; wherein each local feature includes local semantics and existence probability; inversely learn the local features based on the Gaussian mixture function to obtain the clustering weights; construct a Dirichlet function distribution based on the clustering weights; and obtain the output result of the detection data based on the clustering weights and the Dirichlet function distribution.
[0051] In one embodiment, the optimization module 26 may be configured to: calculate the evaluation result of the output result of the detection data based on the loss function; and adjust the uncertainty weights of the fully connected neural network based on the evaluation result to obtain the graphical feature recognition model.
[0052] 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 as: Formula One; in Formula One, represents the original output value of the i-th neuron, K represents the total number of categories of the classification task, represents taking the exponent of the original output, represents summing the exponential outputs of all categories; the loss function is: Formula Two; in Formula Two, represents the true label of the i-th category, represents the predicted probability of the model for the i-th category, and K represents the total number of categories of the classification task.
[0053] In one embodiment, the establishment module 21 may also be configured to: when the fully connected neural network is applied to a regression problem, set the activation function as: Formula Three; Formula Four; in Formula Three and Formula Four, represents the original value output by the last layer of the fully connected neural network, represents the mean value predicted by the model, represents the original value output by another branch of the fully connected neural network, represents converting to a positive number; represents the standard deviation of the model prediction; the loss function is: Formula Five; in Formula Five, represents the observed true value, represents the mean value predicted by the model, represents the standard deviation of the model prediction, represents at a mean of , and a variance of under the normal distribution, the probability density of observing the true value .
[0054] In one embodiment, the establishing module 21 can also be configured to: set a feature set; perform quantization definition on the features in the feature set and determine the probability of each feature; wherein, after being calculated by the fully connected neural network, the sum of the features in the feature set is a preset value.
[0055] Embodiments of the present invention provide a graphic feature recognition device. The device embodiments can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, in addition to the CPU, memory, network interface, and non-volatile memory, the device where the embodiments are located usually can also include other hardware, such as a forwarding chip responsible for processing packets, etc. Taking the software implementation as an example, as a logically meaningful device, it is formed by the CPU of its corresponding device reading the computer program instructions in the non-volatile memory into the memory and running.
[0056] According to another aspect of the present invention, there is provided a computer-readable storage medium storing a computer program for executing the graphic feature recognition method of any of the above embodiments.
[0057] In addition to the above methods and devices, embodiments of the present invention can also be computer program products, which include computer program instructions that, when run by a processor, cause the processor to execute the steps in the graphic feature recognition methods according to various embodiments of the present invention described above.
[0058] According to another aspect of the present invention, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; and a processor for executing the graphic feature recognition method of any of the above embodiments.
[0059] In addition, an embodiment of the present invention may also be a computer-readable storage medium storing computer program instructions that, when run by a processor, cause the processor to perform the steps in the graphic feature recognition method according to various embodiments of the present invention described above.
[0060] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for recognizing graphic features, characterized in that, Including: Construct a fully-connected neural network; wherein, the fully-connected neural network includes features, feature probabilities, activation functions, and loss functions; Adjust the determined weights during the transfer process of the fully-connected neural network to uncertainty weights of probability distributions; Based on the uncertainty weights, conduct multiple prediction trainings to obtain a set of learning weights; Based on the set of learning weights, calculate the expected value and distribution of the prediction; Based on the input detection data and the expected value and distribution of the prediction, obtain the output result of the detection data; Based on the loss function and the output result of the detection data, adjust the uncertainty weights of the fully-connected neural network to obtain a graphic feature recognition model; Based on the graphic feature recognition model, conduct graphic feature recognition.
2. The graphic feature recognition method according to claim 1, wherein Adjusting the determined weights during the transfer process of the fully-connected neural network to uncertainty weights of probability distributions includes: Adjust the determined weights during the transfer process of the fully-connected neural network to uncertainty weights of probability distributions: P(W|X, Y); where X represents training data, Y represents the true label, W represents the neural network weights, and P(W|X, Y) represents the credibility of the neural network weights W when given the training data X and the true label Y.
3. The graphic feature recognition method according to claim 1, characterized in that Conducting multiple prediction trainings based on the uncertainty weights to obtain a set of learning weights includes: Based on the uncertainty weights, conduct multiple prediction trainings on the training data; wherein, each prediction is based on the current neural network weights; wherein, the training data is obtained by sampling; Based on multiple prediction trainings, obtain a set of learning weights of the fully-connected neural network at different training iteration times; wherein, each learning weight in the set of learning weights corresponds to the state at different training iteration times.
4. The graphical feature recognition method according to claim 3, characterized in that Calculating the expected value and distribution of the prediction based on the set of learning weights includes: Based on the obtained different learning weights, conduct multiple predictions on the same training data to obtain multiple prediction results; Perform weighted average or arithmetic average on the multiple prediction results to calculate the expected value of the prediction; Statistically analyze the distribution of the expected values of the multiple prediction results to obtain the distribution of the prediction; wherein, the distribution includes the occurrence frequency, range, and fluctuation of the predicted values.
5. The graphic feature recognition method according to claim 1, wherein Obtaining the output result of the detection data based on the input detection data and the expected value and distribution of the prediction includes: Encode the input detection data and extract the local features of the detection data; wherein, each local feature includes local semantics and existence probability; Reverse-learn the local features based on the Gaussian mixture function to obtain clustering weights; Based on the clustering weights, construct a Dirichlet function distribution; Based on the clustering weights and the Dirichlet function distribution, obtain the output result of the detection data.
6. The graphic feature recognition method according to claim 1, wherein 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 includes: Based on the loss function, calculate the evaluation result of the output result of the detection data; Based on the evaluation result, adjust the uncertainty weights of the fully-connected neural network to obtain a graphic feature recognition model.
7. The graphic feature recognition method according to claim 1, wherein Constructing a fully-connected neural network includes: When a fully connected neural network is applied to a classification problem, the activation function is set as: Formula 1; In Formula 1, represents the original output value of the i-th neuron, and K represents the total number of categories in the classification task. represents taking the exponent of the original output. represents summing up the exponential outputs of all categories. The loss function is: Formula II; In Formula 2, represents the true label of the $i$-th category, represents the predicted probability of the model for the $i$-th category, and $K$ represents the total number of categories in the classification task.
8. The graphical feature recognition method according to claim 1, wherein A fully connected neural network is established, including: When a fully connected neural network is applied to a regression problem, the activation function is set as: Formula III; Formula Four; In Formula 3 and Formula 4, represents the original value output by the last layer of the fully connected neural network, represents the mean value predicted by the model, represents the original value output by another branch of the fully connected neural network, represents converting to a positive number; represents the standard deviation predicted by the model; The loss function is: Formula Five; In Equation 5, represents the observed true value, represents the mean predicted by the model, represents the standard deviation predicted by the model, represents under the normal distribution with a mean of and a variance of the probability density of observing the true value .
9. The graphic feature recognition method according to claim 1, characterized in that A fully connected neural network is established, including: A feature set is set; The features in the feature set are quantitatively defined, and the probability of each feature is determined; wherein, after being calculated by the fully connected neural network, the sum of the features in the feature set is a preset value.
10. A graphic feature recognition device, characterized in that Including: A building module that builds a fully connected neural network; wherein, the fully connected neural network includes features, feature probabilities, activation functions, and loss functions; An adjustment module that adjusts the determined weights in the transfer process of the fully connected neural network to the uncertainty weights of the probability distribution; A training module that performs multiple prediction trainings based on the uncertainty weights to obtain a set of learning weights; A calculation module that calculates the expected value and distribution of the prediction based on the set of learning weights; An output module that 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 that 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; A recognition module that performs graphic feature recognition based on the graphic feature recognition model.
Citation Information
Patent Citations
Self-adaptive Gaussian mixture reduction method based on variational Bayesian
CN112508087A
Landslide displacement prediction method based on Gaussian process regression and neural network
CN113268932A
Human face age identification method and system based on uncertainty suppression network model
CN114267060A
Image analysis method based on Bayesian deep learning
CN114463268A
Image small target detection method and system based on Gaussian distribution strategy
CN114782709A