Training method of image regression model, image regression analysis method, medium and terminal

By identifying abnormal samples and calculating similarity on the training sample set of the image regression model, and using a loss function to correct the model parameters, the problem of insufficient prediction accuracy of image regression models in the existing technology is solved, and higher regression performance and prediction accuracy are achieved.

CN115240029BActive Publication Date: 2026-05-19SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN UNIV
Filing Date
2022-06-30
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing image regression models have shortcomings in prediction accuracy. In particular, methods based on learning the mapping relationship of a single sample lack the ability to learn the structured relationship between samples, while methods based on learning the correlation of samples do not take a comprehensive approach, resulting in low accuracy of regression analysis.

Method used

By acquiring a training sample set, identifying the predicted values ​​of sample images, determining abnormal samples and forming the first sample set, calculating image similarity and reference values, and using a loss function to correct the parameters of the preset network model until the preset conditions are met, a trained image regression model is formed.

Benefits of technology

It improves the regression performance and prediction accuracy of the image regression model, and enhances the stability and robustness of the model through deep learning, ensuring that the predicted values ​​are closer to the true values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115240029B_ABST
    Figure CN115240029B_ABST
Patent Text Reader

Abstract

The application discloses a kind of training method of image regression model, image regression analysis method, medium and terminal, the method is obtained by preset network model to the sample image of training sample set, the predicted value of the index to be measured of each sample image is obtained;Again according to the real value and predicted value of each sample image, image similarity, determine first sample set and second sample set;Then by first loss function respectively to first sample set, to second sample set is carried out loss calculation, obtains the first loss value of preset network model, second loss value;Based on first loss value and second loss value, the model parameter of preset network model is corrected to obtain image regression model.It is known from the above that the present application can correct the preset network model by the first loss value and the second loss value to obtain the image regression model, thereby improving the regression analysis performance of the image regression model and the accuracy of model prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of deep learning technology, and in particular to a training method for an image regression model, an image regression analysis method, a medium, and a terminal. Background Technology

[0002] Regression is a statistical method that aims to determine a continuous mapping relationship between two dependent variables. Regression analysis is an important branch of image analysis based on deep learning. Image regression analysis primarily involves using a pre-created deep learning model to obtain predicted values ​​for the image's target metrics.

[0003] For example, predicting key anatomical points in brain MR images is an application of image regression analysis. Key anatomical points are the indicators to be predicted. By processing the image using a pre-built deep learning model, the predicted values ​​of key anatomical points in brain MR images can be determined. Generally, deep learning models used to perform regression analysis tasks can be called image regression models.

[0004] Currently, existing regression methods for constructing image regression models can be mainly divided into two categories: 1) regression methods based on learning the mapping relationship of single samples; and 2) regression methods based on learning the correlation between samples. Regression methods based on learning the mapping relationship of single samples mainly use a single sample (such as mean squared error) as the optimization objective, lacking the learning of the structured relationships between samples. This results in large prediction errors and low accuracy in practical applications. While regression methods based on learning the correlation between samples do consider sample correlation, their consideration is not comprehensive enough, and their improvement effect on image regression models is limited, with low accuracy in regression analysis.

[0005] Therefore, there is an urgent need for a method to improve the prediction accuracy of image regression models. Summary of the Invention

[0006] This invention aims to provide a training method for an image regression model, an image regression analysis method, a medium, and a terminal, to solve the technical problems of poor regression performance and low accuracy in existing image regression analysis.

[0007] The technical solution adopted in this invention is as follows:

[0008] A method for training an image regression model, the method comprising:

[0009] Obtain a training sample set; wherein the training sample set includes: multiple training samples, each training sample including: a sample image, and the true value of the target index of the sample image pre-labeled;

[0010] The sample images are identified by a preset network model to obtain the predicted values ​​of the indicators to be measured for each sample image.

[0011] A first sample set is determined based on the true value and predicted value of each sample image; wherein the first sample set consists of anomalous samples from the training sample set, and the difference between the true value and predicted value of the sample image of the anomalous sample meets a first preset condition; and

[0012] Determine the image similarity between any two sample images in the training sample set and the corresponding first reference value; the first reference value is the ratio of the true values ​​of the two sample images.

[0013] Based on the image similarity of the sample images and the corresponding first reference value, a first unsorted sample in the training sample set is determined and a second sample set is determined; wherein, the second sample set is composed of the first unsorted sample in the training sample set; the first unsorted sample is a training sample whose difference between the image similarity and the corresponding first reference value is greater than a first preset threshold;

[0014] The first loss function is used to calculate the loss on the first sample set and the second sample set respectively to obtain the first loss value and the second loss value of the preset network model; based on the first loss value and the second loss value, the model parameters of the preset network model are corrected.

[0015] Return to the step of recognizing the sample images through the preset network model to obtain the predicted values ​​of each sample image, until the corrected preset network model meets the second preset condition, and the trained image regression model is obtained.

[0016] Optionally, the method further includes: determining a second sample to be sorted and forming a third sample set based on the image similarity and the corresponding first reference value; wherein the third sample set consists of the second sample to be sorted in the training sample set, and the training samples whose image similarity to the second sample to be sorted is less than or equal to a first preset threshold.

[0017] Training samples are selected from the third sample set to form multiple sample tuples; wherein each sample tuple includes at least three second unsorted samples from the third sample set, and the three second unsorted samples in each sample tuple are not completely identical.

[0018] If the image similarity between any two sample images in the sample tuple and the corresponding first reference value do not meet the preset requirements, the sample tuple is determined to be a tuple to be sorted.

[0019] The loss of the unsorted tuples is calculated using the second loss function to obtain the third loss value of the preset network model.

[0020] Based on the third loss value, the model parameters of the preset network model are corrected, and the process returns to the step of recognizing the sample images through the preset network model to obtain the predicted values ​​of each sample image, until the corrected preset network model meets the third preset condition, thus obtaining the trained image regression model.

[0021] Optionally, if the image similarity between any two sample images in the sample tuple and the corresponding first reference value do not meet the preset requirements, the sample tuple is determined to be a tuple to be sorted, specifically including:

[0022] Determine the similarity difference between the image similarities in the sample tuples, and the difference of the corresponding first reference value, and use the difference of the first reference value as the second reference value;

[0023] If the difference between the similarity difference and the second reference value is greater than the second preset threshold, the corresponding sample tuple is taken as the tuple to be sorted.

[0024] Optionally, determining the image similarity between any two sample images in the training sample set specifically includes:

[0025] The preset network model is used to extract features from each sample image in the training sample set to obtain the feature vector of the target index of each sample image.

[0026] The image similarity between the two sample images is determined based on the feature vectors of the sample images.

[0027] Optionally, the method further includes: determining a fourth sample set based on the true value and predicted value of each of the sample images; wherein the fourth sample set consists of normal samples from the training sample set, and the difference between the true value and the predicted value of the sample images of the normal samples does not meet a first preset condition.

[0028] The fourth loss value of the preset network model is obtained by calculating the loss of the fourth sample set using the third loss function.

[0029] Based on the fourth loss value, the model parameters of the preset network model are corrected;

[0030] Return to the step of recognizing the sample images through the preset network model to obtain the predicted values ​​of each sample image, until the corrected preset network model meets the fourth preset condition, so as to obtain the trained image regression model.

[0031] Optionally, the method further includes: performing normalization and data augmentation processing on each sample image in the training sample set to obtain a preprocessed image, and using the preprocessed image as a sample image.

[0032] Optionally, the sample image is a medical image.

[0033] An image regression analysis method, comprising: a trained image regression model obtained by applying any of the image regression model training methods described above; the image regression analysis method includes:

[0034] Acquire the image to be identified and input the image to be identified into the trained image regression model;

[0035] The image to be identified is identified by a trained image regression model, and the predicted value of the target index of the image to be identified is obtained.

[0036] Optionally, before inputting the image to be identified into the trained image regression model, the method further includes:

[0037] The image to be identified is normalized and data augmented to obtain a preprocessed image of the image to be identified, and the preprocessed image is used as the image to be identified.

[0038] A computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement steps in the training method of the image regression model as described above, or steps in the image regression analysis method as described above.

[0039] A terminal includes: a processor and a memory; the memory stores a computer-readable program executable by the processor; when the processor executes the computer-readable program, it implements steps in the training method of the image regression model as described above, or steps in the image regression analysis method as described above.

[0040] Compared with existing technologies, this application provides a training method, an image regression analysis method, a medium, and a terminal for an image regression model. The training method involves inputting sample images from a training sample set into a preset network model to obtain predicted values ​​of the target indicators for the sample images. Using the true values ​​and predicted values ​​of the sample images, abnormal samples in the training sample set are identified and formed into a first sample set. A second sample set is determined by comparing image similarity with a corresponding first reference value (the ratio of the true values ​​of the sample images). A first loss function is used to calculate the loss on both the first and second sample sets to obtain corresponding first and second loss values. The model parameters of the preset network model are then corrected based on the first and second loss values ​​to obtain the trained image regression model. Therefore, this application improves the stability of the preset network model training by calculating the loss function for abnormal samples. Furthermore, by comparing the ratio of the true values ​​of the sample images as a reference value with the image similarity, the corresponding loss value is calculated, achieving order ranking among the samples and effectively improving the regression performance of the image regression model and increasing the accuracy of the model's preset parameters. Attached Figure Description

[0041] Figure 1 This diagram illustrates an application scenario of the training method for an image regression model provided in this embodiment.

[0042] Figure 2 A flowchart illustrating a training method for an image regression model provided in this embodiment;

[0043] Figure 3 This is a flowchart illustrating a training method for an image regression model provided in this embodiment;

[0044] Figure 4 An example diagram illustrating a training method for an image regression model provided in this embodiment;

[0045] Figure 5 Another flowchart of a training method for an image processing model provided in this embodiment;

[0046] Figure 6 Another flowchart of a training method for an image processing model provided in this embodiment;

[0047] Figure 7 This is a flowchart of an image regression analysis method provided in this embodiment;

[0048] Figure 8 This is a schematic diagram of the structure of a terminal provided in this embodiment. Detailed Implementation

[0049] This invention provides a training method for an image regression model, an image regression analysis method, a medium, and a terminal. To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.

[0050] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0051] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0052] Image regression analysis is an important branch of deep learning-based image analysis, applied in areas such as image quality assessment, keypoint localization, object detection, analysis, biological feature measurement, and registration. Image regression analysis refers to using a pre-built deep learning model to identify an image and obtain predicted values ​​for its target metrics. Current image regression analysis primarily focuses on learning the mapping between the input and output of a single sample, neglecting the structured learning between samples in the dataset, including linear correlations and ranking relationships. This can lead to poor regression performance of deep learning-based image regression models, resulting in low accuracy in actual predictions. Furthermore, although existing techniques have proposed regression methods for learning sample correlations, the learning of correlations between samples is not comprehensive enough to significantly improve the regression performance and accuracy of image regression models.

[0053] To address the aforementioned issues, in this embodiment of the invention, sample images are input into a preset network model. The preset network model outputs predicted values ​​of the target metrics for the sample images. Abnormal samples are identified based on the true and predicted values ​​of the sample images, and these abnormal samples are grouped into a first sample set. Then, the image similarity between two sample images and their corresponding first reference values ​​are determined to identify a first set of samples to be ranked. This first set of samples to be ranked is then grouped into a second sample set. Subsequently, loss calculations are performed to obtain the first and second loss values ​​corresponding to the first and second sample sets, respectively. The model parameters of the preset network model are then corrected to obtain a trained image regression model. Therefore, in this embodiment of the invention, by performing deep learning on the preset network model to obtain the image regression model, the predicted values ​​of the trained image regression model are closer to the true values, thereby improving the regression performance and accuracy of the prediction results.

[0054] For example, embodiments of the present invention can be applied to, for example... Figure 1 The scene shown. In Figure 1 In the scenario shown, firstly, terminal device 1 can collect a training sample set and input it to server 2, so that server 2 can train a preset network model based on the training samples. Server 2 can pre-store the preset network model and, in response to the training sample set input by terminal device 1, input the sample images in the training sample set as input items into the preset network model. Then, it obtains the predicted values ​​of the test indicators of the sample images output by the preset network model, and determines abnormal samples and first unsorted samples based on the true values ​​and predicted values ​​of the sample images. Then, it performs loss calculations on the first sample set composed of abnormal samples and the second sample set composed of the first unsorted samples to obtain the first loss value and the second loss value of the preset network model, respectively. The model parameters of the preset network model are corrected using the first loss value and the second loss value, and the operation of inputting the sample images of the training sample set into the preset network model continues until the preset network model meets the second preset condition, thus obtaining the trained image regression model.

[0055] It is understood that, in the above application scenarios, although the actions of the embodiments of the present invention are described as being partially performed by terminal device 2 and partially by server 1, these actions can also be performed entirely by terminal device 2 or entirely by server 1. The present invention is not limited in terms of the executing entity, as long as the actions disclosed in the real-time mode of the present invention are performed.

[0056] Furthermore, after obtaining the trained image regression model, the trained image processing model can be used to process the image to be identified through image regression analysis to obtain the predicted value of the target index of the image. For example, a terminal device acquires a human brain MR image by capturing it. The target index of this brain MR image is the location of key anatomical points in the human brain. This brain MR image is input into the trained image regression model as the image to be identified. The trained image regression model identifies the image to be identified to obtain the predicted location of key anatomical points in the brain MR image, thereby enabling regression analysis of the key anatomical point locations in the brain MR image. In practical applications, the trained image regression model can be configured as an image regression analysis module in the terminal device. When the terminal device with image capturing capabilities captures an image, the image regression analysis module is activated. Regression analysis is performed through this module, allowing the terminal device to output the regression value (i.e., the predicted value) of the target index of the image.

[0057] It is understood that the above application scenarios are shown only for the purpose of understanding the present invention, and the embodiments of the present invention are not limited in any way. On the contrary, the embodiments of the present invention can be applied to any applicable scenario.

[0058] The invention will be further explained below with reference to the accompanying drawings and through description of the embodiments.

[0059] This embodiment provides a training method for an image regression model, such as... Figure 2 , 3 As shown, the training method for this image regression model may include:

[0060] S201, Obtain the training sample set.

[0061] The training sample set includes multiple training samples, each of which includes a sample image and the true value of the target metric for the pre-labeled sample image.

[0062] The training samples can be images captured by corresponding terminal devices. For example, an MRI image of the human brain taken by an MRI scanner can be used as a sample image. The metric to be measured in this brain MRI image is the location of key anatomical points. In this case, each training sample includes: the brain MRI image and the true values ​​of the pre-labeled locations of the key anatomical points in the brain MRI image. As another example, a road image captured by a traffic camera can be used as a sample image. The metric to be measured in this road image is the number of vehicles displayed in the image. In this case, each training sample includes: the road image and the pre-labeled true values ​​of the number of vehicles displayed in the road image.

[0063] In this embodiment, as Figure 3As shown, for each sample image in the training sample set, normalization and data augmentation can be performed first to obtain a preprocessed image, which is then used as the sample image. By performing normalization and data augmentation on each sample image and using the normalized and augmented images as sample images, and inputting them into the preset network model for model training, it is more conducive to the learning and convergence of the deep learning model, prevents overfitting of the deep learning model, and improves the robustness of the image regression model.

[0064] For example, after obtaining the training sample set, each brain MR image in the training sample set can be normalized. After normalization, the pixel distribution of the brain MR images will change from 0 to 255 to 0 to 1. This distribution range is more conducive to the learning and convergence of the deep learning model. Then, data augmentation processing can be performed on each normalized brain MR image. This data augmentation processing can include at least random registration and random scaling. For example, if the input size of the sample image is 320×320, it can be scaled and then padded to generate a fixed size. Data augmentation processing can expand the distribution of the dataset, reduce the possibility of overfitting of the deep learning model, and improve robustness.

[0065] It is understood that in the embodiments of this application, each sample image may be first subjected to data augmentation processing and then normalization processing, and no specific restrictions are imposed here.

[0066] S202, the sample images are identified by a preset network model to obtain the predicted values ​​of the indicators to be measured for each sample image.

[0067] Specifically, the aforementioned preset network model is a deep learning model, and the image regression model trained by the method proposed in this embodiment can represent any deep learning model used for regression analysis of images.

[0068] Furthermore, such as Figure 3 As shown, the sample images of the training samples can first be input into the feature extraction network of the preset network model for feature extraction, and the extracted feature tensor of each sample image can be output. Then, regression analysis is performed on the feature tensors of the sample images through the preset network model to determine the predicted value of the target index of the sample image. In other words, the feature tensors of the sample images are mapped to the predicted values ​​of the sample images through the preset network model.

[0069] For example, to predict the age of a person's eyes in an image, the metric to be measured is the age of the person corresponding to the eyes shown in the image. The feature tensor of the human eye image is extracted using a feature extraction network of a pre-defined network model, which is the age feature tensor. The age feature tensor is used to indicate the predicted age of the person corresponding to the eyes shown in the sample eye image. The age feature tensor is then subjected to regression analysis by the pre-defined network model to obtain the predicted age of the human eye image.

[0070] S203, determine the first sample set based on the true value and predicted value of each sample image.

[0071] The first sample set consists of anomalous samples from the training sample set, and the difference between the true value and the predicted value of the sample image of the anomalous sample meets the first preset condition.

[0072] Specifically, after obtaining the true value and predicted value of each sample image, the difference between the true value and the predicted value of each sample image can be calculated, and this difference is taken as the first difference. Then, the first differences are sorted in descending order to obtain a first difference sequence. A predetermined number of first differences are selected from the first difference sequence in ascending order, and the training samples corresponding to the selected first differences are designated as outlier samples, while the other training samples are designated as normal samples. It should be noted that alternatively, the first differences can also be sorted in ascending order to obtain a corresponding first difference sequence, and a predetermined number of first differences can be selected from this sequence in ascending order, with the training samples corresponding to the selected first differences designated as outlier samples and the other training samples as normal samples.

[0073] Furthermore, the aforementioned preset quantity can be determined based on the number of training samples in the current training sample set. For example, the preset quantity can be 10% of the training samples in the current training sample set. In other words, it determines whether the difference between the predicted result (i.e., the predicted value) and the true result (i.e., the true value) of the sample image (i.e., the first difference) is among the worst 10% of the current batch results (i.e., all the first differences in the current training sample set). Figure 3 As shown. If the number of training samples in the current training sample set is 1000, then the 100 training samples with the worst first difference in the current batch results, that is, the 100 worst results, are regarded as abnormal samples, and the other 900 training samples in the training sample set are regarded as normal samples.

[0074] Understandably, a preset threshold can be set. If the difference between the true value and the predicted value of a sample image (i.e., the first difference) is greater than the preset threshold, the training sample corresponding to the first difference is considered an abnormal sample; if the difference between the true value and the predicted value of a sample image is less than or equal to the preset threshold, the training sample corresponding to the first difference is considered a normal sample. It should be noted that this preset threshold can be adjusted in a timely manner according to the current training sample set, and the preset threshold may be different for each training sample set.

[0075] Therefore, the first preset condition can be that the first difference of the sample image (i.e., the difference between the true value and the predicted value of the sample image) is in the corresponding position in the difference ranking of the current training sample set, or it can be that the first difference of the sample image is greater than the corresponding preset threshold.

[0076] S204, determine the image similarity between any two sample images in the training sample set and the corresponding first reference value.

[0077] The first reference value is the ratio of the true values ​​of the measured index in the two sample images.

[0078] Specifically, the feature tensor of the extracted sample images can be dimensionality reduced to obtain the feature vector of the target index for each sample image; then, the image similarity between two sample images can be determined based on the feature vector of the sample images. In other words, the feature tensor is a high-dimensional feature representation of the sample images, while the feature vector is a low-dimensional feature representation of the sample images relative to the feature tensor. It should be noted that the method for extracting the feature tensor of the samples has already been explained and will not be repeated here.

[0079] Furthermore, the cosine distance S(x) between the feature vectors of two sample images can be calculated. i ,x j ), which is used as the image similarity between two sample images. Where x... i Let x represent the feature vector of sample image i. j Let represent the feature vector of sample image j.

[0080] Understandably, the Euclidean distance between the feature vectors of two sample images can also be calculated as the image similarity between the two sample images.

[0081] It should be noted that in this embodiment, image similarity between sample images can also be evaluated in other ways, such as evaluating the cross-correlation and mutual information between two sample images, and calculating image similarity at the image level rather than the feature level. No specific limitation is made here.

[0082] Since the feature vectors of the sample images are obtained by dimensionality reduction of the feature tensors extracted by the feature extraction network of the preset network model, and the predicted values ​​of the sample images are obtained by regression analysis of the feature tensors by the preset network model, the ratio of the feature vectors between the sample images obtained through the preset network model can be used to characterize the ratio of the predicted values ​​obtained by the preset network model after regression analysis of the sample images.

[0083] Furthermore, it is assumed that sample images with similar true values ​​should also have a certain degree of similar feature representations (which can be feature vectors), while sample images with different true values ​​should have fewer similar feature representations. Therefore, in this embodiment, the ratio of the true values ​​of the measured index of pre-labeled sample images is used as a reference value for image similarity (i.e., the aforementioned first reference value), specifically defined as: in, This represents the true value of the measured index in sample image i. [·] represents the true value of the measured index in sample image j. The reciprocal operation when the value is greater than 1.0. That is, the first reference value P(x) i ,x j The range of values ​​for is (0, 1).

[0084] S205, Based on image similarity and the corresponding first reference value, determine the first unsorted sample in the training sample set and determine the second sample set.

[0085] The second sample set consists of the first unsorted samples from the training sample set. The first unsorted samples are training samples whose image similarity difference with the corresponding first reference value is greater than a first preset threshold. In other words, the difference between the image similarity of two sample images and the corresponding first reference value can be calculated, and the training samples whose difference is greater than the first preset threshold are used as the first unsorted samples, thus obtaining the second sample set.

[0086] In this embodiment of the application, the image similarity between two sample images in the training sample set will have a corresponding first reference value. For example, the image similarity between sample images A and B in the training sample is S(x). A ,x B If the first reference value of sample images A and B is... Where, x A Let x be the feature vector of sample image A. B Let B be the feature vector of the sample image. This represents the true value of the measured index in sample image A. This represents the true value of the measured index in sample image B.

[0087] Understandably, if the true values ​​of two sample images are similar, it means their feature vectors are also similar; that is, the ratio of their feature vectors (i.e., image similarity) is similar to the first reference value. Since the feature vectors of the sample images are obtained by a pre-defined network model, a large difference between the image similarity of two sample images and the corresponding first reference value indicates that the output of the current pre-defined network model is inaccurate and has low accuracy. In other words, the first sample to be ranked may simply use the sample image as input to the pre-defined network model, and the predicted value output will differ significantly from the true value, exceeding the acceptable error range.

[0088] S206, calculate the loss of the first sample set and the second sample set respectively using the first loss function to obtain the first loss value and the second loss value of the preset network model.

[0089] The second sample set consists of the first unsorted sample in the training sample set.

[0090] As described above, the first sample set consists of abnormal samples from the training sample set. In this embodiment, the first loss function can be the L2 loss function. By calculating the loss of the first sample set using the L2 loss function, the first loss value can be obtained. Specifically, the formula for calculating the loss function of the first sample set is defined as follows:

[0091]

[0092] in, y represents the true value of the training samples (i.e., outliers) in the first sample set. i L represents the predicted value of the training samples (i.e., outliers) in the first sample set. outlier This is the first loss value of the preset network model.

[0093] Furthermore, the loss of the second sample set is calculated using the L2 loss function to obtain the second loss value. Specifically, the formula for calculating the loss function of the second sample set is defined as follows:

[0094]

[0095] Where, x i Let x represent the feature vector of sample image i. j Let S(x) represent the feature vector of sample image j. i ,x j P(x) represents the image similarity between sample image i and sample image j. i ,x j ) represents the first reference value between sample image i and sample image j, Loss SRC This represents the second loss value.

[0096] In other words, the conditions for global ranking among samples are as follows:

[0097] r(x i ,x j ): P(x i ,x j )≤|S(x i ,x j )|or|S(x i ,x j )|≥P(x i ,x j )+α,

[0098] Wherein, parameter α is the control boundary, and in this embodiment, α can be set to 0.25.

[0099] In other words, when the sample image satisfies the above condition r(x) i ,x j In the case of ), a second loss value is calculated to achieve a normalized global ranking of the training sample set.

[0100] It should be noted that step S203 for determining the first sample set can be executed first, followed by steps S204-S205 for determining the second sample set; or steps S204-S205 for determining the second sample set can be executed first, followed by step S203 for determining the first sample set; or steps S203 for determining the first sample set and steps S204-S205 for determining the second sample set can be executed simultaneously. No specific limitation is made in the embodiments of this application.

[0101] S207, Based on the first loss value and the second loss value, the model parameters of the preset network model are corrected.

[0102] S208, return to the step of recognizing the sample images through the preset network model and obtaining the predicted value of the target index of each sample image, until the corrected preset network model meets the second preset condition and the trained image regression model is obtained.

[0103] Since the loss function is used to measure the deviation between the predicted value and the true value of the model output, the parameters of the preset network model can be optimized by using the gradient descent algorithm. By taking whether the first loss value and the second loss value meet the corresponding preset values ​​as conditions, the predicted value of the preset network model can be made closer to the true value.

[0104] Specifically, the aforementioned second preset condition can be that the first loss value satisfies the first preset value, and the second loss value satisfies the second preset value. Both the first and second preset values ​​can be determined based on the accuracy of the image regression model, and will not be detailed here. Thus, the preset network model outputs the predicted value of the sample image. Based on the predicted value of the sample image, the true value of the sample image, and the sample similarity between sample images, the first loss value and the second loss value of the current preset network model are calculated. After calculating the first and second loss values, it is determined whether the obtained first and second loss values ​​satisfy the corresponding preset values. If both the first and second loss values ​​satisfy the corresponding preset values, the training of the preset network model ends, and the trained image regression model is obtained.

[0105] Furthermore, since the correction of the model parameters of the preset network model is performed when the model parameters of the preset network model do not meet the second preset condition, after correcting the model parameters of the preset network model based on the first loss value and the second loss value, it is necessary to continue training the corrected preset network model and continue to execute the step of recognizing sample images through the preset network model to obtain the preset values ​​of the test indicators for each sample image. In the process of continuing to recognize sample images through the preset network model, the sample images input to the preset network model can be sample images from other training sample sets that have not been used as input items. However, it is understandable that in actual operation, due to the limited number of training sample sets, if the training sample set has already been used, the step of recognizing sample images from that training sample set through the preset network model can continue to be executed, so that the training sample set is input into the preset network model cyclically, thereby improving the training effect of the image regression model.

[0106] In this embodiment, the L2 loss function is used to calculate the loss of the training samples (i.e., outliers) in the first sample set, resulting in a first loss value. This first loss value is then used as the training condition for the preset network model, making the training of the preset network model more stable and enhancing its predictive robustness. However, existing technologies only use the Pearson linear correlation (PLC) loss function for global regression, without considering the impact of outliers on model learning. PLC is highly sensitive to outliers; therefore, if extreme outliers exist in the data sample set, the Pearson correlation coefficient estimation loses its reliability, leading to low stability of the preset network model trained based on the PLC loss function and affecting its predictive robustness.

[0107] Furthermore, the ratio of the true values ​​of the sample images is used as the first reference value. This first reference value serves as supervisory information to constrain the ranking of image similarity (i.e., feature similarity) of the sample images. Figure 4 As shown, the loss of the second sample set is calculated using the L2 loss function, and the model parameters of the preset network model are corrected using the second loss value so that the image similarity between the sample images is close to the first reference value, so as to obtain the trained image regression model.

[0108] In other words, this embodiment introduces a correlation criterion through the first loss value and the second loss value, and presets that the network model can fully learn the structured relationship between sample images in the training sample set, which greatly improves the regression performance of the trained image regression model and further improves the prediction accuracy of the image regression model.

[0109] Because there exist r(x) in the training sample set that do not satisfy the above conditions. i ,x j Therefore, in order to further improve the regression analysis performance of the image regression model, for training samples that do not satisfy r(x) i ,x j The training samples are sorted locally.

[0110] Specifically, such as Figure 5 As shown, the training method for the image regression model provided in this application embodiment may further include:

[0111] S501, based on the image similarity of the sample images and the corresponding first reference value, determine the second image to be sorted and form the third sample set.

[0112] The third sample set consists of the second unsorted samples from the training sample set. The difference between the image similarity of the second unsorted sample and the corresponding first reference value is less than or equal to a first preset threshold. When the difference between the image similarity and the corresponding first reference value is less than or equal to the first preset threshold, the two corresponding training samples are used as the second unsorted samples.

[0113] S502: Select training samples from the third sample set to form multiple sample tuples.

[0114] Each sample tuple includes at least three second unsorted samples from the third sample set, and the three second sorted samples in the sample tuples are not completely identical.

[0115] For example, the third sample set includes: A1, A2, A3, A4, A5, A6, where A1, A2, A3, A4, A5, and A6 are all second samples to be sorted. Training samples are selected from the third sample set, and the resulting sample tuples can include the following:

[0116] (A1,A2,A3),(A1,A2,A4),(A1,A2,A5),(A1,A2,A6),(A1,A3,A4),(A1,A3,A5),(A1,A3,A6),(A1,A4,A5),(A1,A4,A6),(A1,A 5,A6),(A2,A3,A4),(A2,A3,A5),(A2,A3,A6),(A2,A4,A5),(A2,A5,A6),(A3,A4,A5),(A3,A4,A6),(A3,A5,A6),(A4,A5,A6).

[0117] S503, if the similarity between any two sample images in a sample tuple does not meet the preset requirements as a first reference value, then the sample tuple is determined to be a tuple to be sorted.

[0118] Specifically, the similarity difference between the image similarities in the sample tuples and the difference of the corresponding first reference value can be determined firstly, and the difference of the first reference value can be used as the second reference value. If the difference between the similarity difference and the corresponding second reference value is greater than a second preset threshold, the corresponding training tuple is used as a tuple to be sorted.

[0119] For example, if a sample tuple is (A1, A2, A3), then the image similarity between A1 and A2 is S(x). A1 ,x A2 The first reference value for A1 and A2 is P(x). A1 ,x A2 The image similarity between A1 and A3 is S(x). A1 ,x A3 The first reference value for A1 and A2 is P(x). A1 ,x A3 )-P(x A2 ,x A3 The image similarity between A2 and A3 is S(x). A2 ,x A3 The first reference value for A1 and A2 is P(x). A2 ,x A3 Therefore, the calculated similarity differences are: |S(x) A1 ,x A2 )|-|S(x A1 ,x A3 )|、|S(x A1 ,x A2 )|-|S(x A2 ,x A3 )|、|S(x A1 ,x A3 )|-|S(xA2 ,x A3 )|, and their corresponding second reference values ​​are P(x) A1 ,x A2 )-P(x A1 ,x A3 ), P(x A1 ,x A2 )-P(x A2 ,x A3 ), P(x A1 ,x A3 )-P(x A2 ,x A3 ).

[0120] S504 calculates the loss of the tuples to be sorted using the second loss function to obtain the third loss value of the preset network model.

[0121] Specifically, the second loss function for calculating the third loss value is as follows:

[0122] in:

[0123] L ascent =max{0,(P(x i ,x j )-P(x i ,x k ))-(|S(x i ,x j )|-|S(x i ,x k )|)},

[0124] L descent =max{0,(P(x j ,x k )-P(x i ,x k ))-(|S(x j ,x k )|-|S(x i ,x k )|)}.

[0125] The above Loss SRC L is the third loss value for the preset network model. ascent For positive ranking loss, i.e., in R(x) i )>R(x j )>R(x k Under the condition of ), calculate R(x) i ,x j ) and R(x i ,x k The loss between L and ) descentThe reverse sorting loss is calculated as follows: In R(x) i )>R(x j )>R(x k Under the condition of ), calculate R(x) j ,x k ) and R(x i ,x k The losses between )

[0126] S505, based on the third loss value, correct the model parameters of the preset network model, and return to execute the step of recognizing the sample images through the preset network model to obtain the predicted values ​​of each sample image, until the corrected preset network model meets the third preset condition, and the trained image regression model is obtained.

[0127] Specifically, the aforementioned third preset condition can be that the third loss value meets a third preset value, which can be determined based on the accuracy of the image regression model, and will not be explained in detail here. After calculating the third loss value, it is determined whether the third loss value meets the corresponding preset value. If the third loss value meets the third preset value, the training of the preset network model ends, and the trained image regression model is obtained.

[0128] In other words, for r(x) that does not meet the condition i ,x j This application proposes to use the training samples of ) through the eigenvector (x) i ,x j ,x j The sample tuples are subjected to fine-grained local sorting and normalization, such as... Figure 4 The triangular relationship shown. It can be understood that if the ranking relationship of the true values ​​of the sample tuples is expressed as: R(x i )>R(x j )>R(x k If the image similarity relationship in the sample tuples is such that S(x) = x, then the image similarity relationship in the sample tuples should satisfy the following relationship: S(x) = x + ... i ,x j )>S(x j ,x k ), S(x j ,x k )>S(x i ,x kFurthermore, the difference in image similarity should be greater than a boundary value to better distinguish the relationship between similar sample images and optimize local ranking. Therefore, in this embodiment, using the difference of the first reference value of the sample images as a dynamic boundary value (i.e., the second reference value) can better adapt to the similarity relationship between different sample images in regression analysis. Thus, through the above steps S501-S505, the relationship between similar sample images can be further ranked, and the model parameters of the preset network model can be corrected again through the third loss value, so as to further improve the regression performance of the trained image regression model and further improve the prediction accuracy.

[0129] In existing technologies, the conventional Spearman's rank correlation coefficient (SRC) is defined as a measure of the strength of the association between two ordinal variables, as shown below:

[0130] SRC(X,Y)=1-(6||rk(X)-rk(Y)||) / (n(n 2 -1)),

[0131] Where X and Y represent two variables, rk(·) represents the sorting operator, and n represents the number of samples for the variable.

[0132] However, the SRC formula mentioned above is non-differentiable, meaning that the loss function involved in discrete ranking is difficult to minimize. Therefore, this application proposes to transform the learning related to the hierarchical ranking of samples into a ranking problem based on the image similarity of the samples. The ratio of image similarity to the true value proposed in this application serves as the ranking condition, providing a differentiable approximation for the loss function and offering a new approach to representing the hierarchical ranking of samples.

[0133] As can be seen from the above, the new SRC loss function proposed in this application embodiment can be expressed as follows:

[0134] When the condition r(x) is satisfied i ,x j )hour, otherwise,

[0135] In other words, in this embodiment of the application, the above-mentioned scheme can not only optimize the absolute order between image similarities, but also constrain the distance between image similarities, so as to better complete the order sorting of sample images.

[0136] Furthermore, such as Figure 6 As shown, the training method for the image regression model provided in this embodiment may further include:

[0137] S601, determine the fourth sample set based on the true value and predicted value of each sample image.

[0138] The fourth sample set consists of normal samples from the training sample set, and the difference between the true value and the predicted value of the sample image of the normal sample does not meet the first preset condition.

[0139] It should be noted that the specific implementation steps for determining normal samples in the training sample set by using the true value and predicted value of the sample image in this embodiment have been described above and will not be repeated here.

[0140] S602, using the third loss function, calculates the loss on the fourth sample set to obtain the fourth loss value of the preset network model.

[0141] The third loss function mentioned above can be the loss function of the Pearson correlation coefficient.

[0142] Specifically, the formula for calculating the fourth loss value is as follows:

[0143]

[0144] in, Y represents the true value of the sample image in the fourth sample set, Y represents the feature vector of the sample image in the fourth sample set, and μ and σ represent the mean and variance of the variables, respectively.

[0145] S603, based on the fourth loss value, corrects the model parameters of the preset network model.

[0146] S604, return to the above steps of recognizing sample images through a preset network model and obtaining the predicted values ​​of each sample image, until the corrected preset network model meets the third preset condition, so as to obtain the trained regression model.

[0147] Specifically, the third preset condition mentioned above can be that the fourth loss value meets the fourth preset value. The fourth preset value can be determined based on the accuracy of the image regression model, and will not be described in detail here. After calculating the fourth loss value, it is determined whether the obtained fourth loss value meets the fourth preset value. If the fourth loss value meets the fourth preset value, the training of the preset network model ends, and the trained image regression model is obtained.

[0148] The Pearson correlation coefficient is used to measure the strength of the linear relationship between two variables. Therefore, for normal samples, this embodiment of the application introduces the Pearson correlation coefficient as a loss function to apply the loss extreme to the fourth sample set composed of normal samples, thereby obtaining a fourth loss value. This strengthens the correlation between the predicted samples and the real samples at the level of the overall dataset and reduces distribution differences.

[0149] In this embodiment, the sample images in the training sample set are medical images, such as brain MR images and lung tissue images. Since the correlation between images in medical images has a significant impact on diagnosis, the image regression model trained by the image regression model training method proposed in this embodiment is of great importance to medical images.

[0150] Based on the above-described image regression model training method, this invention also provides an image regression analysis method. This method uses the image regression model training method described in the above embodiments to train an image regression model, such as... Figure 7 As shown, the image regression analysis method includes:

[0151] S701, acquire the image to be identified, and input the image to be identified into the image regression model.

[0152] Specifically, the image to be processed can be an image captured by an imaging device, a pre-set image, or an image determined based on a received selection operation.

[0153] In some embodiments of this application, before inputting the image to be recognized into the image regression model, the image to be recognized can be normalized and data augmented to obtain a preprocessed image, which is then used as the input image regression model. By normalizing and data augmenting the image to be recognized, the regression analysis results of the image regression model are made more accurate.

[0154] S702, the image to be identified is subjected to regression analysis by the image regression model to obtain the predicted value of the target index of the image to be identified.

[0155] Specifically, the image to be identified is input into the image regression model, and the image regression model performs regression analysis on the image to be identified in order to obtain the predicted value of the target index of the image to be identified.

[0156] Based on the above-described image regression model training method and image regression analysis method, the present invention also provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps in the image regression model training method or the steps in the image regression analysis method described in the above embodiments.

[0157] Based on the above-mentioned image regression model training method and image regression analysis method, this invention also provides a terminal, such as... Figure 8As shown, it includes at least one processor 80; a display screen 81; and a memory 82, and may also include a communications interface 83 and a bus 84. The processor 80, display screen 81, memory 82, and communications interface 83 can communicate with each other via the bus 84. The display screen 81 is configured to display a preset user guide interface in the initial setup mode. The communications interface 83 can transmit information. The processor 80 can call logical instructions in the memory 82 to execute the methods described in the above embodiments.

[0158] Furthermore, the logic instructions in the aforementioned memory 82 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0159] The memory 82, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this disclosure. The processor 80 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 82, thereby implementing the methods in the above embodiments.

[0160] The memory 82 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal. Furthermore, the memory 82 may include high-speed random access memory (RAM) and non-volatile memory. Examples include 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; it may also be a transient storage medium.

[0161] Furthermore, the specific process of loading and executing multiple instruction processors in the aforementioned storage medium and terminal has been described in detail in the above method, and will not be repeated here.

[0162] 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 training method for an image regression model, characterized in that, The method includes: Obtain a training sample set; wherein the training sample set includes: multiple training samples, each training sample including: a sample image, and the true value of the target index of the sample image pre-labeled; The sample images are identified by a preset network model to obtain the predicted values ​​of the indicators to be measured for each sample image. Based on the true value and predicted value of each sample image, a first sample set is determined; wherein, the first sample set consists of abnormal samples in the training sample set, and the difference between the true value and predicted value of the sample image of the abnormal sample meets a first preset condition; and the image similarity between any two sample images in the training sample set and the corresponding first reference value are determined. The first reference value is the ratio of the true values ​​of the two sample images; Based on the image similarity and the corresponding first reference value, a first unsorted sample in the training sample set is determined and a second sample set is determined; wherein, the second sample set consists of the first unsorted sample in the training sample set; the first unsorted sample is a training sample whose difference between the image similarity and the corresponding first reference value is greater than a first preset threshold; The first loss function is used to calculate the loss on the first sample set and the second sample set respectively to obtain the first loss value and the second loss value of the preset network model; based on the first loss value and the second loss value, the model parameters of the preset network model are corrected. Return to the step of recognizing the sample images through the preset network model to obtain the predicted values ​​of each sample image, until the corrected preset network model meets the second preset condition, and the trained image regression model is obtained.

2. The training method for the image regression model according to claim 1, characterized in that, The method further includes: The second unsorted samples are determined based on the image similarity of the sample images and the corresponding first reference value, forming a third sample set; wherein the difference between the image similarity of the second unsorted samples and the corresponding first reference value is less than or equal to... Training samples with a first preset threshold; Training samples are selected from the third sample set to form multiple sample tuples; wherein each sample tuple includes at least three second unsorted samples from the third sample set, and the three second unsorted samples in each sample tuple are not completely identical. If the image similarity between any two sample images in the sample tuple and the corresponding first reference value do not meet the preset requirements, the sample tuple is determined to be a tuple to be sorted. The loss of the unsorted tuples is calculated using the second loss function to obtain the third loss value of the preset network model. Based on the third loss value, the model parameters of the preset network model are corrected, and the process returns to the step of recognizing the sample images through the preset network model to obtain the predicted values ​​of each sample image, until the corrected preset network model meets the third preset condition, thus obtaining the trained image regression model.

3. The training method for the image regression model according to claim 2, characterized in that, If the image similarity between any two sample images in the sample tuple and the corresponding first reference value do not meet the preset requirements, the sample tuple is determined to be a tuple to be sorted, specifically including: Determine the similarity difference between the image similarities in the sample tuples, and the difference of the corresponding first reference value, and use the difference of the first reference value as the second reference value; If the difference between the similarity difference and the second reference value is greater than the second preset threshold, the corresponding sample tuple is taken as the tuple to be sorted.

4. The training method for the image regression model according to claim 1, characterized in that, Determining the image similarity between any two sample images in the training sample set specifically includes: The preset network model is used to extract features from each sample image in the training sample set to obtain the feature vector of the target index of each sample image. The image similarity between the two sample images is determined based on the feature vectors of the sample images.

5. The training method for the image regression model according to claim 1, characterized in that, The method further includes: A fourth sample set is determined based on the true value and predicted value of each sample image; wherein the fourth sample set consists of normal samples from the training sample set, and the difference between the true value and predicted value of the sample image of the normal sample does not meet the first preset condition. The fourth loss value of the preset network model is obtained by calculating the loss of the fourth sample set using the third loss function. Based on the fourth loss value, the model parameters of the preset network model are corrected; Return to the step of recognizing the sample images through the preset network model to obtain the predicted values ​​of each sample image, until the corrected preset network model meets the fourth preset condition, and the trained image regression model is obtained.

6. The training method for the image regression model according to claim 1, characterized in that the method further includes: For each sample image in the training sample set, normalization and data augmentation are performed to obtain a preprocessed image, which is then used as a sample image.

7. The training method for the image regression model according to claim 1, characterized in that, The sample images are medical images.

8. An image regression analysis method, characterized in that, The trained image regression model is obtained by applying the training method of the image regression model as described in any one of claims 1-7, wherein the image regression analysis method includes: Acquire the image to be identified and input the image to be identified into the trained image regression model; The image to be identified is identified by a trained image regression model, and the predicted value of the target index of the image to be identified is obtained.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps in the training method of the image regression model as described in any one of claims 1-7, or the steps in the image regression analysis method as described in any one of claims 8.

10. A terminal for performing a training method for an image regression model, characterized in that, include: Processor and memory; The memory stores a computer-readable program that can be executed by the processor; when the processor executes the computer-readable program, it implements the steps in the training method of the image regression model as described in any one of claims 1-7, or the steps in the image regression analysis method as described in any one of claims 8.