A method for endometrial image classification based on autoencoder momentum update

By using the momentum update method and joint loss function of the autoencoder in the endometrial image classification, the problems of low classification accuracy and strong dependence on labeled data in the prior art are solved, and efficient endometrial staging is achieved.

CN114170413BActive Publication Date: 2025-02-14EAST CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111374363.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-02-14
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

The prior art has problems in the classification of endometrial image with low accuracy, strong dependence on labeled data and poor generalization ability.

Method used

Using the momentum update method based on the autoencoder, a loss function of combined reconstruction loss, distribution divergence loss, and noise comparison loss is designed, and the encoding and decoding networks are optimized through self-supervised training to reduce dependence on labeled data.

Benefits of technology

It improves the learning ability and characteristics of endometrial ultrasound images, enhances the ability to distinguish multi-view images, and achieves accurate endometrial staging effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114170413B_ABST
    Figure CN114170413B_ABST
Patent Text Reader

Abstract

The present invention discloses an endometrial image classification method based on autoencoder momentum update, which belongs to the technical field of medical image analysis. The method steps include: endometrial multi-perspective ultrasound image acquisition; designing a loss function for endometrial ultrasound image data; designing a pre-training network, and using training data to repeatedly iterate and optimize to improve the performance of the encoding network and the decoding network, so that the encoding network will be able to perform similar feature encoding for the endometrial ultrasound images of the same cycle, and increase the encoding difference between the endometrial ultrasound images of different cycles by the encoding network. The present invention focuses on the features between different perspectives of the same cycle of endometrial ultrasound images, improves the distinguishability of endometrial images of different cycles; at the same time, reduces the instability of the network during training; and uses a self-supervised pre-training strategy; uses a multi-perspective feature fusion strategy; and finally achieves accurate and stable training and classification effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image analysis, and in particular to an endometrial image classification method based on autoencoder momentum update. Background Art

[0002] Predicting the cyclical nature of the endometrium (in the proliferative or secretory phase) during the menstrual cycle of women of childbearing age has many applications, such as predicting the time window for oocyte fertilization and embryo implantation. However, for women with irregular menstrual cycles or abnormal endometrium, predicting their cycle is not a simple task. At present, clinical prediction of endometrial staging either relies on traditional time estimation based on patients' menstrual cycle data, which will bring inaccuracy problems due to individual differences; or relies on endometrial biopsy, but the operation is somewhat invasive to the human body. Accurate and reliable automatic staging methods are very valuable for both clinical and research. There are two main types of existing technologies, but there are some disadvantages: one is the traditional staging method based on statistical machine learning, which often requires manual design of feature extractors, relies on feature engineering, and has a low staging accuracy; the other is the method based on supervised convolutional neural network, which can achieve good results, but as a supervised method, manual data annotation requires a lot of human resources and time, and the generalization ability of the model is easily affected by the lack of training data.

[0003] The autoencoder network is a method based on deep learning. The network consists of two parts: the encoding network and the decoding network. The specific implementation forms of both can be convolutional neural networks with different structural characteristics. The function of the encoding network is to generate encoding values ​​that obey the distribution of real data by learning the characteristics of the image, and the function of the decoding network is to reconstruct the results of the encoding network to restore the real data. However, how to design a pre-training scheme that can well take into account the characteristics of ultrasound image data of different perspectives at the same site, and improve the performance of the encoding network so that it has better discrimination performance is a problem that needs to be solved. Summary of the invention

[0004] The purpose of the present invention is to provide an endometrial image classification method based on autoencoder momentum update. The method designs a neural network using momentum update using an autoencoder and uses self-supervised training to design a loss function of joint reconstruction loss, distribution divergence loss, and noise contrast loss. In summary, a neural network model based on autoencoder momentum update is proposed, which achieves an effect that is superior to the existing method using a small amount of labeled data.

[0005] The specific technical solution for achieving the purpose of the present invention is:

[0006] A method for classifying endometrial images based on autoencoder momentum update, the method comprising the following specific steps:

[0007] Step S1: Collect multi-angle data of uterine ultrasound images to form a data set;

[0008] Step S2: Standardize the data set: manually crop the endometrial region in the endometrial ultrasound image, and only retain the ultrasound image of the uterus; obtain the endometrial ultrasound image data set Sa;

[0009] Step S3: The endometrial ultrasound image dataset Sa is further divided into a training set S according to a ratio of 4:1. t and the test set S p , randomly select 20% of the training set S t The data in is used as labeled training data;

[0010] Step S4: designing a loss function suitable for image self-supervised training; the loss function is a combination of a noise contrast loss function, i.e., an NCE loss function, a reconstruction loss function generated by a decoder, and a KL divergence loss function;

[0011] Specifically:

[0012] Assume that x is the input endometrial image, x' is a different image collected from the same part of the same case as image x, or an image after image x has been transformed (noise added, rotation transformation), and take it as the corresponding image of x, E Q (x) is the encoding network E Q The encoding result of image x, encoding network E k is the encoding network E Q A deep copy of E k (x`) is the encoding network E k The encoding result of image x`, D(E Q (x)) is the output of the decoding network, then the loss function of the self-supervised training network is designed as follows:

[0013] L(E,D)=l NGE (E Q (x),E K (x`))+λl REC (x,D(E Q (x)))+βl KL (E Q (x)) (1)

[0014] Where λ, β are empirical weighting factors.

[0015] NCE loss makes the model generate encoding results of x and its corresponding x` as different as possible, which is defined as:

[0016]

[0017] E k The encoding results of (x`) are stored in the encoding queue, where n is the size of the encoding queue, v is the number of images x` corresponding to image x, exp is the exponential function, and log is the logarithmic function. The encoding results in the encoding queue are used as negative samples. Use dynamic queues to maintain storage E k (x`) encoding queue: E k (x`) generates new encoding results and enters the queue, and the encoding results generated earlier are kicked out of the queue. By changing the size of n, the number of encoding results in the encoding queue that are negative examples can be changed.

[0018] Decoder to encoder E Q The generated encoding result is decoded to generate a reconstructed image. The loss of the reconstructed image and the original image is calculated. The difference between the two is as small as possible, indicating that the encoder E Q A valid encoding is generated, and the REC loss function is defined as:

[0019]

[0020] In the decoding network, in order to make the encoding distribution close to the standard normal distribution to facilitate the decoder to restore, the method of the present invention uses the KL loss, which is defined as:

[0021] l KL (σ,μ)=-0.5*(1+logσ 2 -μ 2 -exp(logσ 2 )) (4)

[0022] Where σ is E Q (x) is the standard deviation of the latent variable z of the generated encoding, and μ is its mean. This loss function is used to control the generated encoding distribution;

[0023] Optimize the encoding network E using backpropagation Q In the hope of learning the encoding result of the real image that is independent of the ultrasound image noise (by minimizing l NCE loss), and by minimizing the reconstruction loss between the decoder-generated image and the original image (by minimizing Optimized encoder E Q Coding ability;

[0024] Step S5: Design and construct a pre-trained network: The pre-trained network includes the encoding network E Q , encoding network E K , encoding queue and decoding network, in the pre-trained network, back propagation updates the encoding network E Q and decoding network, using momentum update mechanism to update the encoding network E KUpdate the parameters, and the encoding queue stores the encoding network E K The generated encoding result;

[0025] During the training process, back propagation is used to update the encoding network E. Q and the network parameters of the decoding network; after each back propagation, the momentum update mechanism is used to update the encoding network E k The network parameters θ k To update:

[0026] θ k ←mθ k +(1-m)θ q (5)

[0027] Where m is the hyperparameter set during momentum update, θ q is the encoding network E k The network parameters in E Q and E k In, θ k With θ q One-to-one correspondence; each time the encoding network E is updated using back propagation Q After the parameters are updated, the encoding network E is updated using momentum. k The parameter θ k ;

[0028] Step S6: Combined encoding network E Q and decoding network; the encoding network E Q The output result of is used as the input of the decoding network; the loss function designed in step S4 is used, and the data set S described in step S3 is introduced t , fully pre-train the pre-trained network;

[0029] Step S7: The fully trained encoding network E Q The network parameters are fixed, and the downstream classifier composed of a fully connected layer and a ReLu activation function is connected; the labeled training data is introduced using the cross entropy loss function to train the downstream task classifier; the encoding network E Q The result of image encoding is input into the final classifier for result prediction;

[0030] Step S8: According to the ultrasound images of different sections of the same case, different encoding networks are trained, and the images of different sections are encoded by the encoding network E Q The output vectors are spliced, and the multi-section ultrasound image features are integrated to predict the staging results; the encoding network E Q :Train the encoding network E corresponding to different sections for endometrial images of different sections Q, the features of the endometrial images of different sections of the same case are spliced, and the downstream classifier is trained to integrate the information features of the multi-section images after splicing, and the final endometrial staging is performed;

[0031] Step S9: Design model evaluation indicators and use the test set S p Test the prediction effect of the model.

[0032] The beneficial effects of the present invention are:

[0033] The present invention introduces a new loss function in the autoencoder network, which can optimize the encoding network and the decoding network at the same time. The reconstruction loss function improves the learning ability of ultrasonic medical images, improves the robustness of the features extracted in medical ultrasonic images, and uses the momentum update mechanism to greatly enhance the learning ability to distinguish uterine images. Using the self-supervised method, only part of the labeled data is used for training the classification task, which can effectively reduce the dependence on labeled image data. At the same time, for multi-perspective ultrasonic images, the ultrasonic images of the same person from different perspectives can be used as the query key of the sample, which can effectively learn the common features between images with slight perspective changes, and finally achieve accurate endometrial staging effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is an overall architecture diagram of a pre-trained network in an embodiment of the present invention;

[0035] Figure 2 In the embodiment of the present invention, the encoding network E using momentum update is integrated Q and encoding network E K Structure diagram of

[0036] Figure 3 In the embodiment of the present invention, the coding network E is included Q , encoding network E K Schematic diagram of momentum update;

[0037] Figure 4 is a schematic diagram of a decoding network structure in an embodiment of the present invention;

[0038] Figure 5 is a schematic diagram of a downstream task classifier for endometrial image staging involved in an embodiment of the present invention;

[0039] Figure 6 It is a schematic diagram of a classifier for fusing multi-view features after performing feature fusion using multi-section endometrial images in an embodiment of the present invention;

[0040] Figure 7 The figure is a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.

[0042] Example

[0043] See also Figure 7 , an endometrial image classification method based on autoencoder momentum update, which is used for the staging of endometrium in endometrial ultrasound images. The specific implementation steps and implementation details include:

[0044] Step S1: Acquire an endometrial ultrasound image dataset. Specifically, the format of the dataset is a three-channel JPEG bitmap.

[0045] Step S2: Standardize the data set. Standardization includes unifying the image format into JPEG images and manually labeling the data set, retaining only the uterine region images, and obtaining the endometrial ultrasound image data set Sa.

[0046] Step S3: The endometrial ultrasound image dataset Sa is further divided into a training set St and a test set Sp in an appropriate ratio for experimental use. In this embodiment, in order to take into account both the generalization ability of the final classification model and the accuracy of the test, the division ratio of the training set St and the test set Sp is set to 4:1, and 20% of the data in St is randomly selected as labeled downstream task training data.

[0047] Step S4: Design a special loss function suitable for endometrial ultrasound images. The loss function used in the method of the present invention is designed as a combination of three loss functions: noise contrast loss (Noise-Contrastive Estimation, NCE) function, reconstruction loss function (REC loss function) and KL loss function. Assume that x is an endometrial ultrasound image, x' is a different image collected from the same part of the same case where image x is obtained, or an image after image x is transformed (noise is added, rotation transformation), and it is used as the corresponding image of x, E Q (x) is the encoding network E Q The encoding result, encoding network E k is the encoding network E Q A deep copy of E K (x`) is the encoding network E k The encoding result, D(E Q (x)) is the output of the decoding network, then the loss function of the pre-trained network is designed as follows:

[0048] L(E,D)=l NCE (E Q (x`),E k(x))+λl REC (x,D(E Q (x)))+βl KL (E Q (x)) (1)

[0049] Where λ, β are empirical weighting factors.

[0050] The noise contrast loss makes the encoding network E Q The difference between the encoded data generated for the same image and after the image noise transformation is as small as possible, and the difference between the encoded data for different images is as large as possible, which is defined as:

[0051]

[0052] Where n = 2048 is the number of E stored in the encoding queue. k The number of encoding results of (x`) is taken as negative samples. Use dynamic queue to maintain storage E k (x`) encoding queue: newly generated E k The encoding result of (x`) enters the queue, and the encoding result generated earlier is kicked out of the queue. By changing the size of n, the number of encoding results used as negative examples in the encoding queue can be changed. τ is the temperature coefficient, which is 0.05 in this embodiment.

[0053] Decoder to encoder E Q The generated encoding result is decoded to generate a reconstructed image, and the loss of the reconstructed image and the original image is calculated, hoping that the difference between the two is as small as possible:

[0054]

[0055] In the decoding network, in order to make the encoding distribution close to the standard normal distribution and facilitate the decoder to restore, the method of the present invention uses KL loss, which is defined as:

[0056] l KL (σ,μ)=-0.5*(1+logσ 2 -μ 2 -exp(logσ 2 ) (4)

[0057] Optimize the encoding network E using backpropagation Q In the hope of learning the encoding result that is independent of ultrasound image noise (by minimizing l NCE loss), and by minimizing the reconstruction loss between the decoder-generated image and the original image (by minimizing The encoding capability of the encoder is better optimized. The pre-training scheme based on the autoencoder of the method of the present invention optimizes the encoding network and the decoding network alternately, performs an optimization step on the two networks in each iteration, and updates the encoding network E through momentum k Parameters;

[0058] Step S5: Design and construct a pre-trained network. The encoding network pre-training process includes the encoding query network E Q , encoding network E K And the encoding queue, the decoding network four parts. In this embodiment, in order to solve the problems that ultrasound imaging usually contains noise, and the ultrasound image is manually controlled by the doctor, which will lead to unstable imaging angles, etc., Gaussian noise is superimposed on the image x, and random angle rotation is performed. The ultrasound image scanned with a small angle change at the same site in the same case can be used as the query encoding image x`. For a single image, the implementation strategy is specifically designed as follows: on the one hand, Gaussian noise with a mean of 0.1 and a variance of 2.0 is applied to the image x, and a random rotation of 0 to 45° with a probability of 0.8 is applied to the image as the encoding key image x`. At the same time, using the noise contrast loss function, the input 224×224 ultrasound image can be encoded with a feature dimension of 512, and the image encoding E is controlled. Q (x),E k The result of (x`) is as large as possible, so that the encoding result of the non-corresponding image is as small as possible. Encoding network E Q and E K :

[0059] Encoding Network E Q ( Figure 2 a) uses a residual network module with 4 ( Figure 2 b) The neural network structure of the structure gradually increases the features to 64×112×112, 128×56×56, 256×28×28, 512×14×14, adds a nonlinear two-layer fully connected structure to the last classification layer, and uses the ReLu activation function to extract image coding features.

[0060] Encoding Network E K Use E Q The deep copy of is used as the initialization of the network, and the momentum parameters are updated, so the encoding network E K The network structure and E Q Totally consistent.

[0061] Design a training strategy that uses momentum updates. Because the network training results are affected by each sample, the large number of E k(x`) encoding result. In the process of back propagation of the network to update the parameters, the network parameters change too much, which will lead to the problem of too low consistency of the features extracted from the image in the encoding queue. In order to solve the problem of how to maintain the consistency of samples in the encoding queue, the momentum update method is used in this embodiment: the encoding network E k The parameter θ k To update:

[0062] θ k ←mθ k +(1-m)θ q (5)

[0063] Where m is the momentum update setting hyperparameter, θ q is the encoding network E Q The network parameters, θ k is the encoding network E K The network parameters in E Q and E k In, θ k With θ q One-to-one correspondence, each time the encoding network E is updated using back propagation Q After the parameters are updated, the encoding network E is updated using momentum. k The parameter θ k ; In this embodiment, m=0.999 is used. Figure 3 shown.

[0064] Encoding Queue:

[0065] In order to make the encoding network have better classification feature extraction ability, the dynamic queue method is used to update the negative sample queue. Preferably, in order to keep the number of samples in the queue as large as possible, in the training process of each batch, the E that enters the queue earlier at the head of the queue is updated. k The encoding result of (x`) is kicked out of the queue, and the new E k The encoding result of (x`) enters the tail of the queue and updates the encoding queue.

[0066] Decoding network:

[0067] In order to make the encoding network E Q In order to learn the detailed information of the precise ultrasound image, this embodiment decodes the encoded image after encoding the image, hoping to learn the precise information of the image. In the decoding network, the skip connection method is used. First, the input encoded features are input into a fully connected layer. Then, the output features are upsampled by 7 times, and then the features are input into the decoding basic unit to deconvolve the input features, and the deconvolution features of the previous layer are input into the next network layer using the skip connection mechanism. After 4 residual units ( Figure 2b), the feature maps are extracted into 256×8×8, 128×16×16, 64×32×32, and 64×32×32, respectively, and then undergo bilinear interpolation and convolution with a convolution kernel size of 3×3, and then activated by the sigmoid function to finally output a decoded image with the same size as the input image.

[0068] Step S6: Combined encoding network E Q And the decoding network. The encoding network E Q The output of is used as the input of the decoding network. Using the loss function designed in step S4 and introducing the data set St prepared in step S3, the designed pre-trained network is fully trained.

[0069] Step S7: After the previous pre-training task is completed, the encoding network E Q The parameters are fixed and 20% of the labeled training data is used for training. Specifically, the input parameters are connected to the classifier composed of a fully connected layer structure and a ReLU activation function. A random dropout of 0.5 is used to prevent the classifier from overfitting. The cross entropy loss function is used, and finally the sigmoid activation function is used to output the single-view classification results, such as Figure 5 .

[0070] Step S8: According to the multi-view views (cross section, longitudinal section, coronal section) generated during the ultrasonic sampling process, different types of encoders E are trained for different sections. Q ,like Figure 6 For multi-view patient uterine images, the image features extracted by the encoder pre-trained from images of the same case from different viewpoints are spliced ​​and finally input into the fully connected layer. After activation, the prediction results of the comprehensive multi-view features are output.

[0071] This embodiment crops each input image into 224×224 pixels, normalizes it, adjusts the pixel value to the interval [0,1], and then inputs it into the pre-trained network designed in step S5. This embodiment uses the SGD optimizer (momentum=0.9), sets the learning rate to 0.01, and the batch size to 200. For the loss function designed in step S4, this embodiment sets the temperature coefficient τ=0.05. This embodiment performs 300 rounds of iterative training on the pre-trained model, and during the training process, the best result is achieved in the 225th round.

[0072] The experiment of this embodiment is carried out on an NVIDIA GeForce Titan X GPU with two 12GB video memory. The operating system is 64-bit Ubuntu 14.04, using a 3.2GHz Intel Core i5 CPU and 16GB RAM. The required software tools mainly include Python 3.7.10, CUDA 9.1, cuDNN 7.0 and PyTorch 1.8.0, torchvision 0.9.0. In accordance with the techniques and steps described in the method of the present invention, other alternative software tools and hardware devices can also be adopted for implementation, and the software and hardware environment involved in this embodiment is not limited to the present invention.

[0073] When the pre-training of the present invention begins, the encoding network E is first fixed. K The gradient of K Encode the image x`, put the encoding result into the encoding queue of length n, and initialize the encoding queue; input x into E Q , and its result E Q (x) is passed to the decoding network for decoding, and the x` corresponding to x is input into E K Encode and use the loss function designed in step S4 to calculate the loss function, and back propagate to calculate the encoding network E Q and the decoding network gradient, update the encoding network E Q and the parameters of the decoding network; then the momentum update strategy is used to update the encoding network E K The network parameters are updated and optimized for one round of training. As the training progresses, the encoding network and the decoding network are continuously iterated. This embodiment plans to iterate 300 rounds. As the iteration progresses, the encoding network E Q As the performance of the decoding network gets better and better, finally, the encoding result of the encoding network can well represent the characteristics of the input image.

[0074] The specific steps for training the pre-trained network for one round are as follows: (1) Input the endometrial image x and the corresponding image transformed by noise addition and rotation or take the ultrasound image collected from the same site of the same case as x`, and input x and x` into the encoding network E respectively. Q and encoding network E K , generate the corresponding encoding result E Q (x) and E k (x`), the network parameters are adjusted through the noise contrast loss function so that the encoding network E Q The encoding result of x and the encoding network E K The encoding result of x` is as close as possible, and the encoding network E Q Encoding result E for x Q(x) is as different from the value in the encoding queue as possible; (2) the encoding network E is updated through the momentum parameter K To maintain the consistency of the query key results in the queue, the update rate m is set to 0.999. K The parameter θ k According to the encoding network E Q The one-to-one corresponding parameters θ C , according to: θ k ←mθ k +(1-m)θ q Update; (3) Update the E that entered the queue earlier at the head of the queue k The encoding result of (x`) is kicked out of the queue, and the new E k The encoding result of (x`) enters the tail of the queue and the encoding queue is updated;

[0075] The steps for updating the decoding network are as follows: (1) By comparing the decoded image D(QE) generated by the encoding network Q (x)) and the input image x to adjust the model weights so that the difference gradually approaches 0; (2) the encoding network's encoding result of image x is calculated using the KL loss. The KL loss is reduced, making fitting more difficult (the reconstruction error begins to increase), and the decoding network will update the weights to better improve the network's decoding performance.

[0076] Step S9: Design appropriate access classifier model evaluation indicators and use the test set S p The prediction effect of the model is tested. The evaluation criteria of the present invention include accuracy, sensitivity and specificity. The definitions of each evaluation index are:

[0077]

[0078] Where TP, TN, FP and FN represent the number of true positives, true negatives, false positives and false negatives defined in the classification, respectively. If the proliferative phase is considered positive and the model's prediction is correct, it is considered a true positive, otherwise it is considered a false negative. If the image result of the secretory phase is predicted correctly, it is a true negative, otherwise it is a false positive.

[0079] The beneficial effects of the above technical solution are:

[0080] The present invention introduces a new loss function in the momentum-updated encoder, which can simultaneously optimize the encoding and decoding networks and take into account the characteristics of image data of the same site at different perspectives of endometrial ultrasound images. The reconstruction loss function improves the encoding ability of the encoding network for endometrial ultrasound medical images and improves the robustness of the features extracted from medical ultrasound images. The momentum parameter update mechanism uses a self-supervised method and only uses part of the labeled data for training classification tasks, which can effectively reduce the dependence on labeled image data. At the same time, for multi-perspective ultrasound images, the ultrasound image feature extractions of the same case from different perspectives can be fused to make a joint multi-perspective image diagnosis, ultimately achieving accurate endometrial staging results.

[0081] The above description is only a preferred embodiment of the present invention, and does not limit the implementation mode and protection scope of the present invention. For those skilled in the art, it should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the description and illustrations of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for classifying endometrial images based on autoencoder momentum update, the method comprising the following specific steps: Step S1: Collect multi-angle data of uterine ultrasound images to form a data set; Step S2: Standardize the data set: manually crop the endometrial region in the endometrial ultrasound image, and only retain the ultrasound image of the uterus; obtain the endometrial ultrasound image data set Sa; Step S3: The endometrial ultrasound image dataset Sa is further divided into a training set S according to a ratio of 4:

1. t and the test set S p , randomly select 20% of the training set S t The data in is used as labeled training data; Step S4: designing a loss function suitable for image self-supervised training; the loss function is a combination of a noise contrast loss function, i.e., an NCE loss function, a reconstruction loss function generated by a decoder, and a KL divergence loss function; Step S5: Design and construct a pre-trained network: The pre-trained network includes the encoding network E Q , encoding network E K , encoding queue and decoding network, in the pre-trained network, back propagation updates the encoding network E Q and decoding network, using momentum update mechanism to update the encoding network E K Update the parameters, and the encoding queue stores the encoding network E K The generated encoding result; Step S6: Combined encoding network E Q and decoding network; the encoding network E Q The output result of is used as the input of the decoding network; the loss function designed in step S4 is used, and the data set S described in step S3 is introduced t , fully pre-train the pre-trained network; Step S7: The fully trained encoding network E Q The network parameters are fixed, and the downstream classifier composed of a fully connected layer and a ReLu activation function is connected; the labeled training data is introduced using the cross entropy loss function to train the downstream task classifier; the encoding network E Q The result of image encoding is input into the final classifier for result prediction; Step S8: For the same case, different encoding networks E are trained using endometrial ultrasound images of different sections. Q , encode the images of different sections through their corresponding encoding networks, splice the output result vectors, train a training downstream task classifier that integrates the characteristics of multi-section ultrasound images, and combine ultrasound images of different sections of the same case to predict the results; Step S9: Design model evaluation indicators and use the test set S p Test the prediction effect of the model; The loss function described in step S4 is a combination of a noise contrast loss function NCE, a reconstruction loss function REC generated by a decoder, and a KL divergence loss function; let x be an input endometrial image, x' be a different image collected from the same part of the same case of image x, or an image generated by applying Gaussian noise with a mean of 0.1 and a variance of 2.0 to image x and applying a random rotation transformation of 0 to 45° with a probability of 0.8; E Q (x) is the encoding network E Q The encoding result of image x, E k (x`) is the encoding network E k The encoding result of the image x`, D(E Q (x)) is the output of the decoding network, then the loss function of the pre-trained network is as follows: L(E,D)=l NCE (AND Q (x`),And K (x))+λl REC (x,D(E Q (x)))+βl KL (AND Q (x)) Where λ, β are empirical weighting factors; The NCE loss function is defined as: E k The value of (x`) is stored in the encoding queue, where n is the value of E stored in the encoding queue. k (x`), v is the number of x` images corresponding to the original image x, exp represents the exponential operation with the natural number e as the base, log is the logarithmic operation, and τ is the temperature coefficient; the values ​​in the encoding queue are maintained using a dynamic queue, E k (x`) New encoding results enter the queue, and earlier generated encoding results exit the queue; by changing the size of n, the number of negative samples in the encoding queue is changed; For encoder E Q (x) The generated code is decoded to generate a reconstructed image, and the loss of the reconstructed image and the original image is calculated to make the difference between the two as small as possible; the REC loss function is defined as: In order to make the encoding network E Q The generated encoding distribution is close to the standard normal distribution, which is convenient for the decoder to restore it. The KL loss function is used, which is defined as: l KL (σ,μ)=-0.5*(1+logσ 2 -m 2 -exp(logσ 2 )) Where σ is E Q (x) generates the variance of the latent variable z of the encoding result, μ is its mean; this loss function is used to control E Q (x) Generated encoding distribution.

2. The endometrial image classification method according to claim 1, characterized in that: Step S5 uses back propagation to update the encoding network E during training Q and the network parameters of the decoding network; after each back propagation, the momentum update mechanism is used to update the encoding network E k The network parameters θ k Update: θ k ←mθ k +(1-m)θ q , where m is the hyperparameter set during momentum update, θ q is the encoding network E k The network parameters in E Q and E k In, θ k With θ q One to one correspondence.

3. The endometrial image classification method according to claim 1, characterized in that: The encoding network E described in step S8 Q :Train the encoding network E corresponding to different sections for endometrial images of different sections Q , the features of the extracted endometrial images of different sections of the same case are spliced, and the downstream classifier is trained to integrate the information features of the multi-section images after splicing to perform the final endometrial staging.

Citation Information

Patent Citations

  • ML-based methods for pseudo-CT and HR mr image estimation

    US20200034948A1

  • Continual learning of artificial intelligence systems based on bi-level optimization

    US20210064989A1