CN116152600A - Model training method, device, equipment and readable storage medium - Google Patents

Model training method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN116152600A
CN116152600A CN202310129347.5A CN202310129347A CN116152600A CN 116152600 A CN116152600 A CN 116152600A CN 202310129347 A CN202310129347 A CN 202310129347A CN 116152600 A CN116152600 A CN 116152600A
Authority
CN
China
Prior art keywords
medical image
training
sample
determining
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310129347.5A
Other languages
Chinese (zh)
Inventor
郭珊珊
石峰
薛忠
詹翊强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai United Imaging Intelligent Healthcare Co Ltd
Original Assignee
Shanghai United Imaging Intelligent Healthcare Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai United Imaging Intelligent Healthcare Co Ltd filed Critical Shanghai United Imaging Intelligent Healthcare Co Ltd
Priority to CN202310129347.5A priority Critical patent/CN116152600A/en
Publication of CN116152600A publication Critical patent/CN116152600A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion

Abstract

The specification discloses a model training method, device, equipment and readable storage medium, which are used for obtaining a focus area by segmentation from a first medical image, obtaining a foreground image by segmentation from a second medical image according to the focus area, determining a positive example sample according to the focus area and the second medical image, determining a negative example sample according to the first medical image and the foreground image, constructing a training sample group according to the first medical image, the positive example sample and the negative example sample, and further training a focus segmentation model according to the training sample group. Therefore, the scale of the training sample is increased by constructing the training sample group by the positive example sample and the negative example sample, and the contrast characteristic between the focus region of interest and other regions can be captured by the focus segmentation model, so that the accuracy and the efficiency of model training are improved.

Description

Model training method, device, equipment and readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a model training method, apparatus, device, and readable storage medium.
Background
In clinic, the segmentation of focal regions based on medical images of patients prior to surgery is important for physicians to make therapeutic decisions for patients, as well as prognostic analysis. With the development of computer technology, a focus segmentation model which is completed by training can be adopted to segment and obtain focus areas from medical images of patients based on a machine learning mode at present. However, current lesion segmentation models are trained based on supervised learning, and the accuracy of segmentation depends on the number of training samples and accurate labeling. However, due to the high cost of medical image acquisition and the patient privacy involved, the scale of training samples is typically small, resulting in limited accuracy of the lesion segmentation model.
Currently, the number of training samples can be increased by rotating, translating, and increasing the image noise processing of the medical image.
However, the labeling of the focus area in the medical image processed by the method is different from the labeling of the focus area in the medical image before processing, so that the focus segmentation model can not well capture the contrast characteristics between the focus area and other areas, and the efficiency and the accuracy of model training are reduced.
Disclosure of Invention
The present specification provides a model training method, apparatus, device, and readable storage medium, to partially solve the above-mentioned problems in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides a model training method, comprising:
acquiring a second medical image associated with the first medical image;
dividing the first medical image to obtain a focus area;
dividing the second medical image into a foreground region according to the focus region, wherein the foreground region comprises human tissues;
determining a positive example of the first medical image according to the focus area and the second medical image, and determining a negative example of the first medical image according to the first medical image and the foreground area;
constructing a training sample group according to the first medical image, the positive example sample and the negative example sample;
and training a focus segmentation model according to the training sample group.
Optionally, determining a positive example of the first medical image according to the focus area and the second medical image, and determining a negative example of the first medical image according to the first medical image and the foreground area specifically includes:
Taking other areas except the focus area in the first medical image as a first background area, and determining a negative example sample of the first medical image according to the first background area and the foreground area;
and taking other areas except the foreground area in the second medical image as a second background area, and determining a positive sample of the first medical image according to the second background area and the focus area.
Optionally, determining a positive example of the first medical image according to the focus area and the second medical image, and determining a negative example of the first medical image according to the first medical image and the foreground area specifically includes:
transforming the lesion area and the foreground area, respectively;
and determining a positive example sample of the first medical image according to the transformed focus area and the second medical image, and determining a negative example sample of the first medical image according to the transformed foreground area and the first medical image.
Optionally, determining a positive example of the first medical image according to the focus area and the second medical image specifically includes:
morphological dilation of the contour of the focal region;
Fusing the focus area and the second medical image according to the expanded outline of the focus area and preset fusion parameters to obtain a positive sample of the first medical image; or (b)
Optionally, determining a negative example of the first medical image according to the first medical image and the foreground region specifically includes:
morphological dilation of the contour of the foreground region;
and fusing the foreground region and the first medical image according to the outline of the expanded foreground region and preset fusion parameters to obtain a negative example sample of the first medical image.
Optionally, the first medical image includes a first medical image before enhancement and a first medical image after enhancement, and the second medical image includes a second medical image before enhancement and a second medical image after enhancement;
determining a positive example of the first medical image according to the focus area and the second medical image, and determining a negative example of the first medical image according to the first medical image and the foreground area, specifically including:
determining a positive example sample before enhancement according to the focus area in the first medical image before enhancement and the second medical image before enhancement;
Determining an enhanced positive example sample according to the focus area in the enhanced first medical image and the enhanced second medical image;
determining a negative example sample before enhancement according to the first medical image before enhancement and a foreground region in the second medical image before enhancement;
and determining an enhanced negative example sample according to the enhanced first medical image and the foreground region in the enhanced second medical image.
Optionally, constructing a training sample set according to the first medical image, the positive example sample and the negative example sample specifically includes:
determining a difference image according to the difference between the first medical image before enhancement and the first medical image after enhancement;
determining a difference positive sample according to the difference between the positive sample before enhancement and the positive sample after enhancement;
determining a difference negative example sample according to the difference between the negative example sample before enhancement and the negative example sample after enhancement;
and constructing a target training sample group comprising the difference image, the difference positive example sample and the difference negative example sample, and an original training sample group comprising the first medical image, the positive example sample and the negative example sample.
Optionally, the lesion segmentation model comprises an encoder and a decoder;
training a focus segmentation model according to the training sample group, wherein the training sample group specifically comprises the following steps:
respectively inputting the first medical image, the positive example sample and the negative example sample in the training sample group into the encoder to obtain the characteristics of the first medical image, the characteristics of the positive example sample and the characteristics of the negative example sample;
training the encoder with a maximization of the similarity between the features of the first medical image and the features of the positive example sample and a minimization of the similarity between the features of the first medical image and the negative example sample as training targets;
and training the decoder according to the trained encoder, the first medical image and the focus area.
Optionally, the lesion segmentation model comprises a first encoder, a second encoder, and a decoder;
training the decoder according to the trained encoder, the first medical image and the focus area, specifically including:
determining a training sample according to the first medical image, and determining a label of the training sample according to the focus area;
Respectively inputting the training samples into a first encoder after training and a second encoder after training to obtain first characteristics of the training samples output by the first encoder and second characteristics of the training samples output by the second encoder;
fusing the first feature and the second feature, and inputting the fused feature into the decoder to obtain a segmentation result output by the decoder;
and adjusting parameters of the second encoder and parameters of the decoder by taking the difference between the segmentation result and the labeling of the training sample as an optimization target.
Optionally, the first medical image and the second medical image are segmented from the same reference medical image;
after obtaining the segmentation result output by the decoder, before adjusting the parameters of the second encoder and the parameters of the decoder with the difference between the segmentation result and the labeling of the training samples as an optimization objective, the method further comprises:
acquiring the reference medical image;
inputting the reference medical image into a pre-trained body part recognition model to obtain a contour of a body part corresponding to the first medical image output by the body part recognition model;
Correcting the segmentation result according to the contour of the body part corresponding to the first medical image;
adjusting parameters of the second encoder and parameters of the decoder with the difference between the segmentation result and the labeling of the training samples as an optimization target, specifically including:
and adjusting the parameters of the second encoder and the parameters of the decoder by taking the difference between the corrected segmentation result and the labeling of the training sample as an optimization target.
The present specification provides a model training apparatus comprising:
the acquisition module is used for acquiring a second medical image associated with the first medical image;
the first segmentation module is used for segmenting the first medical image to obtain a focus area;
the second segmentation module is used for segmenting the foreground region from the second medical image according to the focus region, wherein the foreground region comprises human tissues;
the sample determining module is used for determining a positive example sample of the first medical image according to the focus area and the second medical image, and determining a negative example sample of the first medical image according to the first medical image and the foreground area;
The training sample set determining module is used for constructing a training sample set according to the first medical image, the positive example sample and the negative example sample;
and the training module is used for training the focus segmentation model according to the training sample group.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the model training method described above.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above model training method when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
in the model training method provided by the specification, a focus area is obtained by segmentation from a first medical image, a foreground image is obtained by segmentation from a second medical image according to the focus area, then a positive example sample is determined according to the focus area and the second medical image, a negative example sample is determined according to the first medical image and the foreground image, a training sample set is constructed according to the first medical image, the positive example sample and the negative example sample, and a focus segmentation model is trained according to the training sample set. Therefore, the scale of the training sample is increased by constructing the training sample group by the positive example sample and the negative example sample, and the contrast characteristic between the focus region of interest and other regions can be captured by the focus segmentation model, so that the accuracy and the efficiency of model training are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
FIG. 1 is a schematic flow chart of a model training method in the present specification;
FIG. 2 is a schematic flow chart of a model training method in the present specification;
FIG. 3 is a schematic flow chart of a model training method in the present specification;
FIG. 4 is a schematic flow chart of a model training method in the present specification;
FIG. 5 is a schematic flow chart of a model training method in the present specification;
FIG. 6 is a schematic flow chart of a model training method in the present specification;
FIG. 7 is a schematic flow chart of a model training method in the present specification;
FIG. 8 is a schematic flow chart of a model training method in the present specification;
fig. 9 is a flow chart of a focus recognition method based on a focus segmentation model in the present specification;
FIG. 10 is a schematic diagram of a model training apparatus provided herein;
fig. 11 is a schematic view of the electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
In addition, it should be noted that, in the present invention, all actions of acquiring signals, information or data are performed under the condition of conforming to the corresponding data protection rule policy of the location and obtaining the authorization given by the owner of the corresponding device.
With the application of deep learning in the field of medical images, a machine learning model for processing medical images generally requires a large number of training samples in the process of model training to improve the generalization performance of the model, and a better effect is expected. In general, in the field of medical images, a medical image dataset has problems of high acquisition cost, related privacy of a patient, and the like, so when a traditional network is used for training, in order to solve the problem of small sample size, data augmentation is performed on the training set. The traditional data augmentation can be to augment the original training samples by adopting methods such as random rotation, random cutting, translation, noise increase and the like, or to randomly generate training samples based on a deep learning mode (such as generating an countermeasure network), and then to construct an automatic analysis model of a focus (such as tasks of focus detection, segmentation, classification and the like) by utilizing methods such as a convolutional neural network and the like. However, the above data augmentation method has the following problems: because of various forms of tumors, the generated data cannot accurately restrict the focus area and the position, and the model cannot capture the contrast characteristics between the tumor area and other areas of the background well.
Based on the above, the present specification provides a model training method, and a method for specifically constructing positive and negative samples for a lesion area in a medical image, so that matching similar lesion area features and corresponding background tissues exist between the reconstructed positive sample and an original first medical image. And then applying the ideas of contrast learning to the model training process, and training a focus segmentation model by utilizing the data of the specific structure.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a model training method provided in the present specification.
S100: a second medical image associated with the first medical image is acquired.
In the model training method provided in the embodiments of the present disclosure, the execution process of the model training method of the lesion segmentation model may be executed by an electronic device such as a server for model training. In addition, after the training of the lesion segmentation model is completed, the electronic device for performing image processing on the medical image based on the trained lesion segmentation model and the electronic device for performing the model training method may be the same or different, which is not limited in this specification.
In practical application, focus recognition can be performed on a medical image of a patient based on a machine learning model so as to determine whether a focus area exists in the medical image of the patient, and an output result of the model is used as a reference index to provide clinical medical reference for doctors. Therefore, a machine learning model with a good recognition effect needs to be obtained through model training. While the performance of the machine learning model depends on the scale of the training samples and the accuracy of the labels. In the model training method provided by the specification, the scale of the training sample is enlarged on the premise of not changing the labeling of the focus area by expanding the medical image so as to improve the accuracy and generalization of the focus segmentation model.
Specifically, the first medical image and the second medical image may be derived from a patient acquired by a medical image acquisition device, where the first medical image and the second medical image may be images obtained by computed tomography (Computed Tomography, CT), images obtained by magnetic resonance (Magnetic Resonance Imaging, MRI), images obtained by low dose positron emission computed tomography (Positron Emission Computed Tomography/Magnetic Resonance Imaging, PET), or medical images of other modalities, and the modalities of the first medical image and the second medical image are not specifically limited in this specification.
The first medical image and the second medical image may be complete images acquired by a medical image acquisition device, or may be partial cuts (patches) obtained by dividing the complete medical image, and generally, the sizes and shapes of the first medical image and the second medical image are consistent, but the attributes such as the sizes and the shapes may be determined according to specific application scenarios, which are not limited in this specification. In addition, an association relationship exists between the first medical image and the second medical image, and the association relationship may be that the first medical image and the second medical image are segmented from the same reference medical image; the human body part corresponding to the first medical image and the human body part corresponding to the second medical image may be the same, for example, the first medical image is a brain CT image of the patient a, and the second medical image is a brain CT image of the patient B; the first medical image and the second medical image may be medical images corresponding to two symmetrical parts of the human body, respectively, for example, the first medical image is a CT image of the left leg of the patient a, and the second medical image is a CT image of the right leg of the patient a. The specific type of the association relationship existing between the first medical image and the second medical image is not limited in this specification.
The medical image containing the focus area is used as a first medical image, and the medical image which does not contain the focus area but contains human tissues is used as a second medical image. The focal region included in the first medical image may be at least a portion of a complete lesion in the patient, which is not limited in this specification.
S102: and dividing the first medical image to obtain a focus area.
In practical application, focus recognition can be performed on a medical image of a patient based on a machine learning model so as to determine whether a focus area exists in the medical image of the patient, and an output result of the model is used as a reference index to provide clinical medical reference for doctors. Typically, the training samples employed by such machine learning models are medical images, and the labels of the training samples are outlines of the focal region or areas. Therefore, a training sample that is originally used for training a machine learning model for lesion recognition can be used as the first medical image, and the lesion region can be segmented from the first medical image based on the label of the training sample. The labeling of the training samples may be obtained by manual labeling or other models for segmenting lesions, however, the accuracy of the other models for segmenting lesions is limited. Of course, the first medical image may also be a medical image without a lesion area label, and in this case, the first medical image may be obtained by manual labeling or other models for segmenting a lesion, which is not limited in this specification.
S104: and dividing the second medical image into a foreground region according to the focus region, wherein the foreground region comprises human tissues.
Further, according to the focal region obtained in the above step S102, a foreground region having a shape and a size consistent with those of the focal region is segmented in the second medical image, and since the second medical image does not include the focal region and only includes the human tissue, the foreground region segmented in the second medical image also includes the human tissue. For example, as shown in fig. 2, a schematic diagram of a foreground region including human tissue is obtained by segmenting from a second medical image based on a focus region segmented from a first medical image, and a focus region a is obtained by segmenting from a first medical image a based on a manual annotation or other segmentation model 1 Focal region A 1 Moving into the second medical image B so that the lesion area A 1 Covering a partial region of the second medical image B to form a focus region A 1 The covered portion serves as a foreground region B segmented from the second medical image B 1
In the embodiment of the present disclosure, the specific type of the human tissue included in the second medical image is not limited, but generally, the second medical image does not include a focal region, that is, the second medical image characterizes a non-diseased human body part of the patient. The foreground region separated from the second medical image is only consistent with the shape and size of the focus region, and other human tissues consistent with the shape and size of the focus region are not contained in the second medical image.
S106: and determining a positive example sample of the first medical image according to the focus area and the second medical image, and determining a negative example sample of the first medical image according to the first medical image and the foreground area.
In the embodiment of the specification, based on the idea of contrast learning, a positive example sample and a negative example sample of a first medical image are constructed by taking the first medical image as an anchor sample, a training sample group is constructed by using the positive example sample and the negative example sample, and further, a focus segmentation model is trained through contrast learning, so that the aim of obtaining a focus segmentation model with better performance under the premise of limited medical images is fulfilled. In order to make the lesion segmentation model focus more on the characteristics of the lesion area, the human tissue and the lesion area in the medical image are distinguished, and in the embodiment of the present disclosure, an image containing the same lesion area as the first medical image is taken as a positive example of the first medical image, and an image containing no lesion area but a first background area other than the lesion area of the first medical image is taken as a negative example of the first medical image.
Specifically, the focus area is moved to a second medical image which is not subjected to segmentation treatment, so that the focus area covers a part of the second medical image, and the focus area and the second medical image are overlapped and fused, so that a positive sample containing the focus area identical to the first medical image is obtained.
In addition, the foreground region segmented from the second medical image is moved into the first medical image which is not segmented, so that the foreground region covers a partial region of the first medical image, and the foreground region and the first medical image are overlapped and fused, so that a negative example sample of the first background region which does not contain a focus region but contains the first medical image except the focus region is obtained.
In an optional embodiment of the present disclosure, fusion between different regions may also be directly performed on the segmented first medical image and the segmented second medical image, so as to obtain a positive example sample and a negative example sample.
Specifically, other areas except the focus area in the first medical image are used as a first background area, and a negative example of the first medical image is determined according to the first background area and the foreground area.
And taking other areas except the foreground area in the second medical image as a second background area, and determining a positive sample of the first medical image according to the second background area and the focus area.
For example, as shown in fig. 3, a lesion area a is segmented from a first medical image a 1 And except for focal region A 1 First background area A other than 2 According to the focus area A 1 Segmentation of the foreground region B from the second medical image B 1 And dividing the foreground region B in the second medical image B 1 Other than the second background area B 2
In an alternative embodiment of the present disclosure, to further increase the scale of the training sample, the focal region in the positive sample and the focal region in the first medical image may be non-uniform in angle and direction. Specifically, first, the lesion area and the foreground area are transformed, respectively. And then, determining a positive example sample of the first medical image according to the transformed focus area and the second medical image, and determining a negative example sample of the first medical image according to the transformed foreground area and the first medical image.
In practical application, in medical images to be identified by a focus segmentation model, the focus has various forms and size formats, and the focus segmentation model obtained by training based on training samples with single forms and sizes may have poor generalization, so that focus areas and foreground areas can be transformed, such as expansion, shrinkage, up-down mirror image overturn, left-right mirror image overturn, rotation according to a certain angle, and the like. Generally, the transformation mode adopted by the focus area and the foreground area is the same, if the focus area performs left-right mirror image overturning, the foreground area separated according to the focus area also performs left-right mirror image overturning. However, depending on the specific application scenario, the foreground region may not be transformed or may be transformed differently from the lesion region, which is not limited in this specification.
S108: and constructing a training sample group according to the first medical image, the positive example sample and the negative example sample.
Generally, a training sample set includes a first medical image (anchor sample), a positive sample of the first medical image, and a negative sample of the first medical image. Based on the thought of contrast learning, the focus segmentation model to be trained is trained according to the training sample set, so that the focus segmentation model can better extract focus areas from medical images, human tissues and focus areas are separated, and a focus segmentation target with higher accuracy is realized.
S110: and training a focus segmentation model according to the training sample group.
In the model training method provided by the specification, a focus area is obtained by segmentation from a first medical image, a foreground image is obtained by segmentation from a second medical image according to the focus area, then a positive example sample is determined according to the focus area and the second medical image, a negative example sample is determined according to the first medical image and the foreground image, a training sample set is constructed according to the first medical image, the positive example sample and the negative example sample, and a focus segmentation model is trained according to the training sample set. Therefore, the positive example sample is obtained by fusing the focus area and the second medical image, the negative example sample is obtained by fusing the first medical image and the foreground image, so that the focus segmentation model obtained based on training of the training sample set has better capability of identifying the focus area, the scale of the training sample is increased by constructing the training sample set by the positive example sample and the negative example sample, the focus segmentation model can well capture the contrast characteristics between the focus area and other areas, and the accuracy and the efficiency of model training are improved
In one or more embodiments of the present disclosure, as shown in step S106 of fig. 1, a positive example of the first medical image is determined according to the focal region and the second medical image, and a negative example of the first medical image is determined according to the first medical image and the foreground region, where the source of the focal region in the positive example is the first medical image and is different from the second medical image although the source of the focal region in the positive example is related to the second medical image, and accordingly, the foreground image in the negative example is also different from the second medical image, so that in the process of determining the positive example and the negative example, the fused boundary needs to be processed, so that the fused positive example and the fused negative example are closer to the actual medical image, and the specific scheme is as follows:
in one aspect, the contour of the focal region is morphologically expanded.
And then fusing the focus area and the second medical image according to the expanded outline of the focus area and preset fusion parameters to obtain a positive sample of the first medical image.
As described above, the focal region is segmented from the first medical image, and the first medical image and the second medical image are different medical images, so that there is a problem that the boundary is abrupt and uneven when the focal region is fused with the second medical image, and in order to make the constructed positive sample closer to the actual medical image, the boundary needs to be smoothed. In the embodiment of the present disclosure, the specific manner of smoothing is to perform morphological expansion on the contour of the focal region, that is, the contour of the focal region is expanded outward by a plurality of pixels (the contour of the focal region becomes thicker visually), and then, based on an edge smoothing method such as gaussian filtering, the boundary when the focal region is fused with the first medical image is subjected to smoothing, so as to obtain a positive sample closer to the real medical image.
Alternatively, in another aspect, the contours of the foreground region are morphologically expanded.
And fusing the foreground region and the first medical image according to the expanded outline of the foreground region and preset fusion parameters to obtain a negative example sample of the first medical image.
The above scheme of smoothing the boundary when fusing the foreground region and the first medical image is similar to the above scheme of fusing the focus region and the second medical image, and will not be repeated here.
In the embodiment of the present disclosure, the boundary may be smoothed only when the foreground region and the first medical image are fused, or the boundary may be smoothed only when the lesion region and the second medical image are fused, or both of the above-described fusion may be smoothed, which is not limited in this disclosure.
In one or more embodiments of the present disclosure, the focus segmentation model does not capture the problem of contrast features between the tumor region and other regions of the background well for focus regions and background regions that have low contrast on images. In the model training process as shown in steps S100 to S110 of fig. 1, the first medical image may include a first medical image before enhancement and a first medical image after enhancement, and the corresponding second medical image may include a second medical image before enhancement and a second medical image after enhancement, and the image-enhanced region is highlighted by the difference between the images before enhancement and after enhancement, so that the lesion segmentation model can segment the lesion region from all the regions of the image enhancement. As shown in fig. 4, the specific scheme is as follows:
S200: the pre-reinforcement focus area is obtained by segmentation from the pre-reinforcement first medical image, and the reinforced focus area is obtained by segmentation from the reinforced first medical image.
In practical application, since many tissue structures of a human body are not developed or are not clearly developed on medical images, the areas can only be displayed in a "brightening" manner by using a contrast agent, so that the difference between normal and abnormal tissues is increased, and a doctor can be assisted in exploring abnormal morphological structure and functional damage of organs of the human body based on medical images acquired by the contrast agent. And enables doctors to find and identify some early, small lesions (liver lesions, etc.). The medical image obtained by the magnetic resonance dynamic contrast enhancement scanning (Dynamic Contrast Enhanced-Magnetic Resonance Imaging, DCE-MRI) has the characteristics of high tissue resolution, higher sensitivity to soft tissues and the like, so that the method is widely applied to the evaluation of diseases such as tumors gradually. Standard DCE-MRI images require that a pre-enhancement image (pre-contrast image) of a patient be acquired before contrast agent is injected into the patient, then contrast agent is injected into the patient, and image acquisition is performed at regular intervals after the contrast agent participates in the blood circulation of the human body, and a series of post-enhancement images (post-contrast images) of different periods are acquired. The doctor can more accurately and rapidly find the focus position through the compared images, so that subsequent diagnosis and treatment scheme formulation can be performed. Thus, in the embodiment of the present disclosure, in order to improve the ability of the lesion segmentation model to identify the lesion area, the first medical image before the increase and the first medical image after the increase, and the second medical image before the increase and the second medical image after the increase, which are acquired by the DCE-MRI technique, are used to construct the training sample set.
Specifically, in this step, the lesion areas before and after the enhancement are segmented from the first medical images before and after the enhancement, respectively. The dividing manner is similar to the above-mentioned step S102 in fig. 1, and is not described here again.
It should be noted that contrast agent is a chemical injected into human tissue or organ to enhance the image observation effect, and its effect is limited to enhancing the image observation effect (visually appearing as a bright image on a medical image), and the injection of contrast agent does not affect the shape and size of the focal region of the image.
S202: and according to the focus area, segmenting the second medical image before enhancement to obtain a foreground image before enhancement, and segmenting the second medical image after enhancement to obtain a foreground image after enhancement.
In this step, the manner of segmenting the foreground images before and after enhancement is similar to that described above as step S104 in fig. 1, and will not be described in detail here.
S204: determining a positive example sample before enhancement according to the focus area in the first medical image before enhancement and the second medical image before enhancement, and determining a positive example sample after enhancement according to the focus area in the first medical image after enhancement and the second medical image after enhancement.
In this step, the manner of fusing the samples of the positive example before and after enhancement is similar to that described above in step S106 of fig. 1, and will not be described here again.
S206: a negative example before enhancement is determined from the foreground images in the first medical image before enhancement and the second medical image before enhancement, and a negative example after enhancement is determined from the foreground images in the first medical image after enhancement and the second medical image after enhancement.
In this step, the manner of fusing the negative examples before and after enhancement is similar to that described above in step S106 of fig. 1, and will not be described here again.
S208: determining a difference image according to the difference between the first medical image before enhancement and the first medical image after enhancement; determining a difference positive sample according to the difference between the positive sample before enhancement and the positive sample after enhancement; and determining a difference negative example sample according to the difference between the negative example sample before reinforcement and the negative example sample after reinforcement.
In practical applications, there may be a problem that not only the focal region but also some human tissue regions are brighter in the enhanced image, that is, there is a problem that the contrast between the focal region and the background region (human tissue region) is similar in the enhanced first medical image. For this purpose, the difference image may be determined according to the difference in gray value between the first medical image before enhancement and the first medical image after enhancement, and the difference image is used to characterize which areas in the first medical image are enhanced, where the areas in the first medical image characterized by the difference image where the imaging is enhanced include the lesion area and the partial human tissue area. Correspondingly, a difference positive example sample and a difference negative example sample can be obtained in the same way. The region of enhanced visualization characterized by the positive difference sample comprises a lesion region in the first medical image, and the region of enhanced visualization characterized by the negative difference sample comprises a region of enhanced human tissue in the first medical image.
S210: and constructing a target training sample group comprising the difference image, the difference positive example sample and the difference negative example sample, and an original training sample group comprising the first medical image, the positive example sample and the negative example sample, and training a focus segmentation model based on the target training sample group and the original training sample group.
Furthermore, the difference image is taken as an anchor sample in the constructed target training sample set, and based on the thought of contrast learning, the focus segmentation model can pay more attention to identifying the enhanced focus area under the training of taking the target training sample set as a guide, so that the focus area is segmented from the region with enhanced imaging, and the focus segmentation accuracy is improved.
Optionally, the target training sample may be combined with the first medical image and the difference image, the positive example sample and the positive example difference sample, and the negative example sample and the negative example difference sample in the original training sample set, and overlapped according to the channel, to be used as input of the focus segmentation model, so as to train the focus segmentation model.
Based on the model training method shown in fig. 4, by constructing a target training sample set comprising a difference image, the difference positive sample and the difference negative sample, and training a focus segmentation model by using the target training sample set, not only is the scale of the training sample enlarged by using a method of constructing a triplet based on contrast learning, but also different areas with enhanced imaging are respectively represented on the difference image, the difference positive sample and the difference negative sample by using the difference value on the image gray scale, so that the trained focus segmentation model can pay more attention to the focus area with enhanced imaging, and further accurately segment the focus area from the area with enhanced imaging.
In one or more embodiments of the present disclosure, in training a lesion segmentation model according to a training sample set as shown in step S110 of fig. 1, and in training a lesion segmentation model based on a target training sample set and an original training sample set as shown in step S210 of fig. 4, the lesion segmentation model may be composed of an encoder and a decoder, wherein the encoder may be trained based on ideas of contrast learning first, and then based on the trained encoder, a training process of the decoder is performed as shown in fig. 5, and the specific scheme is as follows:
s300: and respectively inputting the first medical image, the positive example sample and the negative example sample in the training sample group into the encoder to obtain the characteristics of the first medical image, the characteristics of the positive example sample and the characteristics of the negative example sample.
The lesion segmentation model includes an encoder for extracting image features from the medical image and a decoder for segmenting a lesion region from the input medical image based on the extracted image features. For this reason, the encoder needs to have a better capability of extracting the features of the lesion area and the features of the human tissue from the medical image. In this step, the first medical image, the positive example sample and the negative example sample in the training sample set are respectively input into the encoder, and the characteristics of the first medical image, the characteristics of the positive example sample and the characteristics of the negative example sample, that is, the encoder respectively projects the three to the characteristic space.
S302: training the encoder with a maximization of the similarity between the features of the first medical image and the features of the positive example sample and a minimization of the similarity between the features of the first medical image and the negative example sample as training targets.
Further, for the first medical image, the positive example sample, and the negative example sample in the training sample set, the first medical image and the positive example sample are common in that they all contain the same focal region, and are different in that they contain different human tissue regions (background regions). Whereas the first medical image and the negative example are diametrically opposed, the first medical image and the negative example have in common that they contain the same background region, but differ in that they contain different foreground regions.
Therefore, in the embodiment of the present specification, a contrast learning manner is adopted to set the training target as: in the feature space, the distance between the features of the first medical image and the features of the positive example sample is minimized, and the distance between the features of the first medical image and the negative example sample is maximized. Thus, the training objective of the encoder individual training is to maximize the similarity between the features of the first medical image and the features of the positive example sample and minimize the similarity between the features of the first medical image and the negative example sample. And (3) adjusting parameters of the encoder by multiple iterations according to the training target to obtain the trained encoder.
The encoder trained through the training process has good capability of capturing the contrast characteristics between the focus area and other areas, and can extract the characteristics of the focus area from the medical image with high accuracy.
S304: and training the decoder according to the trained encoder, the first medical image and the focus area.
In one or more embodiments of the present disclosure, in training the decoder according to the trained encoder, the first medical image, and the lesion area as shown in step S304 of fig. 5, the number of encoders included in the lesion segmentation model may be plural, that is, two or more, which is not limited in the present disclosure. Taking the example that the number of encoders is two, the model structure of the lesion segmentation model may be as shown in fig. 6, and at this time, the training process of the decoder may be implemented as follows, as shown in fig. 7:
s400: and determining a training sample according to the first medical image, and determining the label of the training sample according to the focus area.
S402: and respectively inputting the training samples into a first encoder after training and a second encoder after training to obtain first characteristics of the training samples output by the first encoder and second characteristics of the training samples output by the second encoder.
In practical application, based on the characteristics of the focus area output by the encoder after training, not only can the downstream tasks of focus segmentation be realized, but also various downstream tasks such as focus classification, focus detection and the like can be realized. And what downstream tasks are specifically implemented is implemented by the encoder. In one or more embodiments of the present disclosure, two encoders are employed in order to fine tune the parameters of the encoder according to a particular downstream task so that the performance of the encoder can be better adapted to the particular downstream task.
Therefore, the parameters of the first encoder can be fixed, the first encoder is used as a guide, the adjustment direction of the parameters of the second encoder and the decoder is guided, and the model training efficiency is improved.
S404: and fusing the first characteristic and the second characteristic, and inputting the fused characteristic into the decoder to obtain a segmentation result output by the decoder.
Specifically, weights corresponding to the first feature and the second feature respectively can be determined, and the first feature and the second feature are fused based on the weights. The first feature and the second feature may also be fused based on an attention mechanism to get a better feature representation for lesion segmentation. The specific fusion manner of the first feature and the second feature can be determined according to the application scenario, which is not limited in this specification.
S406: and adjusting parameters of the second encoder and parameters of the decoder by taking the difference between the segmentation result and the labeling of the training sample as an optimization target.
The model parameters of the second encoder and the decoder are adjusted based on a supervised learning approach with the minimization of the difference between the output of the decoder and the annotation of the training samples as an optimization objective. Wherein the model parameters of the decoder are initialized and the model parameters of the second encoder are trained as in steps S300 to S302 described above. Based on the trained first encoder and second encoder, joint training is performed, and model parameters of the second encoder and decoder are adjusted for the purpose of: the first medical image output by the first encoder after training is used as a guide, so that a better training effect can be obtained when the scale of training samples is reduced, the encoder can be better adapted to different downstream tasks corresponding to a decoder, and the accuracy and generalization of a focus segmentation model are improved.
In one or more embodiments of the present disclosure, after obtaining the segmentation result output by the decoder in step S404 in the process of training the decoder based on the trained encoder as shown in fig. 7, before adjusting the parameters of the second encoder and the parameters of the decoder with the difference between the segmentation result and the label of the training sample minimized as an optimization target in step S406, the segmentation result may be corrected by a body part of the human body where the focus represented by the focus area is located, which is specifically as follows:
First, the reference medical image is acquired.
The first medical image and the second medical image are segmented from the same reference medical image.
In the training process of an actual focus segmentation model, particularly in the training process of a decoder, inaccurate segmentation results output by the decoder cannot be avoided in the early iteration process, namely all focus areas cannot be completely and accurately segmented, and the situation belongs to the normal situation. However, there may be a problem that the segmentation result includes a region that does not obviously belong to the current body part, and in this case, the segmentation result may be corrected by using the contour of the body part during the training process of the decoder, so that the decoder and the second encoder during the training process are more related to distinguishing the lesion region from the human tissue region than to segmenting the body part.
Specifically, as described in the foregoing step S100, the first medical image and the second medical image have an association relationship. Here, the association relationship is that the first medical image and the second medical image originate from the same reference medical image. The difference is that the first medical image contains a focus area, while the second medical image does not contain a focus area. The reference medical image may include images of different body parts, for example, the reference medical image acquired by medical image acquisition of the breast of the patient includes not only the breast part of the patient but also the chest part of the patient. The object of correcting the segmentation result with the contour of the body part obtained from the reference medical image is to avoid that other body parts or other backgrounds have an influence on the segmentation result.
Since the first medical image is segmented from the reference medical image, the reference medical image is larger in size than the first medical image, and therefore the contour of the body part that can be visualized by the reference medical image is larger than the body part that can be visualized by the first medical image.
And secondly, inputting the reference medical image into a pre-trained body part recognition model to obtain the outline of the body part corresponding to the first medical image output by the body part recognition model.
The model structure of the body part recognition model, the constitution of the training sample, and the like are not particularly limited in this specification.
And then, correcting the segmentation result according to the contour of the body part corresponding to the first medical image.
Further, parameters of the second encoder and parameters of the decoder are adjusted with the minimized difference between the corrected segmentation result and the labeling of the training samples as an optimization objective.
The process of training the second encoder and decoder by the segmentation result after contour correction of the body part corresponding to the first medical image after the body part recognition model is introduced is shown in fig. 8.
Based on the same thought, the present disclosure further provides a focus identification method, where the focus segmentation model related to the focus identification method may be trained based on the model training method shown in fig. 1 to 8, and the focus contained in the medical image of the user is identified, as shown in fig. 9, specifically implemented by the following steps:
S500: and acquiring a medical image of the user.
Specifically, the medical image of the user may be a partial medical image that is segmented from the acquired complete medical image, or may be a complete medical image, which is not limited in this specification.
S502: inputting the medical image into a trained focus segmentation model to obtain a focus area contained in the medical image output by the focus segmentation model, and obtaining a focus recognition result of the user based on the focus area.
Optionally, after obtaining the focus area included in the medical image of the user output by the focus segmentation model, a body part recognition model may be introduced, as in the training process shown in fig. 8, to input the medical image of the user or the reference medical image to which the medical image belongs into the body part recognition model, so as to obtain the contour of the body part of the user corresponding to the medical image of the user. And then, correcting the focus area contained in the medical image output by the focus segmentation model by using the contour of the body part of the user output by the body part recognition model to obtain a more accurate focus recognition result.
Fig. 10 is a schematic diagram of a model training device provided in the present specification, specifically including:
An acquisition module 600 for acquiring a second medical image associated with the first medical image;
a first segmentation module 602, configured to segment a focal region from the first medical image;
a second segmentation module 604, configured to segment a foreground region from the second medical image according to the focal region, where the foreground region includes human tissue;
a sample determining module 606, configured to determine a positive example of the first medical image according to the focal region and the second medical image, and determine a negative example of the first medical image according to the first medical image and the foreground region;
a training sample set determining module 608, configured to construct a training sample set according to the first medical image, the positive example sample, and the negative example sample;
a training module 610, configured to train a lesion segmentation model according to the training sample set.
Optionally, the sample determining module 606 is specifically configured to determine, using other areas except the focal area in the first medical image as a first background area, a negative example of the first medical image according to the first background area and the foreground area; and taking other areas except the foreground area in the second medical image as a second background area, and determining a positive sample of the first medical image according to the second background area and the focus area.
Optionally, the sample determining module 606 is specifically configured to transform the lesion area and the foreground area respectively; and determining a positive example sample of the first medical image according to the transformed focus area and the second medical image, and determining a negative example sample of the first medical image according to the transformed foreground area and the first medical image.
Optionally, the sample determination module 606 is specifically configured to morphologically expand the contour of the focal region; fusing the focus area and the second medical image according to the expanded outline of the focus area and preset fusion parameters to obtain a positive sample of the first medical image; or (b)
Optionally, the sample determination module 606 is specifically configured to morphologically expand the contour of the foreground region; and fusing the foreground region and the first medical image according to the outline of the expanded foreground region and preset fusion parameters to obtain a negative example sample of the first medical image.
Optionally, the first medical image includes a first medical image before enhancement and a first medical image after enhancement, and the second medical image includes a second medical image before enhancement and a second medical image after enhancement;
Optionally, the sample determining module 606 is specifically configured to determine a positive sample before enhancement according to the lesion area in the first medical image before enhancement and the second medical image before enhancement; determining an enhanced positive example sample according to the focus area in the enhanced first medical image and the enhanced second medical image; determining a negative example sample before enhancement according to the first medical image before enhancement and a foreground region in the second medical image before enhancement; and determining an enhanced negative example sample according to the enhanced first medical image and the foreground region in the enhanced second medical image.
Optionally, the training sample set determining module 608 is specifically configured to determine a difference image according to a difference between the first medical image before enhancement and the first medical image after enhancement; determining a difference positive sample according to the difference between the positive sample before enhancement and the positive sample after enhancement; determining a difference negative example sample according to the difference between the negative example sample before enhancement and the negative example sample after enhancement; and constructing a target training sample group comprising the difference image, the difference positive example sample and the difference negative example sample, and an original training sample group comprising the first medical image, the positive example sample and the negative example sample.
Optionally, the lesion segmentation model comprises an encoder and a decoder;
optionally, the training module 610 is specifically configured to input the first medical image, the positive example sample, and the negative example sample in the training sample set into the encoder respectively, so as to obtain features of the first medical image, features of the positive example sample, and features of the negative example sample; training the encoder with a maximization of the similarity between the features of the first medical image and the features of the positive example sample and a minimization of the similarity between the features of the first medical image and the negative example sample as training targets; and training the decoder according to the trained encoder, the first medical image and the focus area.
Optionally, the lesion segmentation model comprises a first encoder, a second encoder, and a decoder;
optionally, the training module 610 is specifically configured to train the decoder according to the trained encoder, the first medical image, and the lesion area, and specifically includes:
determining a training sample according to the first medical image, and determining a label of the training sample according to the focus area; respectively inputting the training samples into a first encoder after training and a second encoder after training to obtain first characteristics of the training samples output by the first encoder and second characteristics of the training samples output by the second encoder; fusing the first feature and the second feature, and inputting the fused feature into the decoder to obtain a segmentation result output by the decoder; and adjusting parameters of the second encoder and parameters of the decoder by taking the difference between the segmentation result and the labeling of the training sample as an optimization target.
Optionally, the first medical image and the second medical image are segmented from the same reference medical image;
optionally, after the training module 610 obtains the segmentation result output by the decoder, before the training module 610 adjusts the parameters of the second encoder and the parameters of the decoder with the difference between the segmentation result and the labeling of the training samples as an optimization target, the training module 610 is further configured to obtain the reference medical image; inputting the reference medical image into a pre-trained body part recognition model to obtain a contour of a body part corresponding to the first medical image output by the body part recognition model; correcting the segmentation result according to the contour of the body part corresponding to the first medical image;
optionally, the training module 610 is specifically configured to adjust the parameters of the second encoder and the parameters of the decoder with the difference between the corrected segmentation result and the labeling of the training samples being minimized as an optimization objective.
The present specification also provides a computer readable storage medium storing a computer program operable to perform the model training method described above and shown in fig. 1.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 11. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, as illustrated in fig. 11, although other hardware required by other services may be included. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to implement the model training method shown in fig. 1 described above. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (10)

1. A method of model training, comprising:
acquiring a second medical image associated with the first medical image;
dividing the first medical image to obtain a focus area;
dividing the second medical image into a foreground region according to the focus region, wherein the foreground region comprises human tissues;
determining a positive example of the first medical image according to the focus area and the second medical image, and determining a negative example of the first medical image according to the first medical image and the foreground area;
Constructing a training sample group according to the first medical image, the positive example sample and the negative example sample;
and training a focus segmentation model according to the training sample group.
2. The method of claim 1, wherein determining a positive example of the first medical image from the lesion area and the second medical image and determining a negative example of the first medical image from the first medical image and the foreground area, comprises:
taking other areas except the focus area in the first medical image as a first background area, and determining a negative example sample of the first medical image according to the first background area and the foreground area;
and taking other areas except the foreground area in the second medical image as a second background area, and determining a positive sample of the first medical image according to the second background area and the focus area.
3. The method of claim 1, wherein determining a positive example of the first medical image from the lesion area and the second medical image and determining a negative example of the first medical image from the first medical image and the foreground area, comprises:
Transforming the lesion area and the foreground area, respectively;
and determining a positive example sample of the first medical image according to the transformed focus area and the second medical image, and determining a negative example sample of the first medical image according to the transformed foreground area and the first medical image.
4. The method of claim 1, wherein determining a positive example of the first medical image from the lesion area and the second medical image comprises:
morphological dilation of the contour of the focal region;
fusing the focus area and the second medical image according to the expanded outline of the focus area and preset fusion parameters to obtain a positive sample of the first medical image; or (b)
Determining a negative example of the first medical image according to the first medical image and the foreground region specifically includes:
morphological dilation of the contour of the foreground region;
and fusing the foreground region and the first medical image according to the outline of the expanded foreground region and preset fusion parameters to obtain a negative example sample of the first medical image.
5. The method of any of claims 1-4, wherein the first medical image comprises a pre-enhanced first medical image and an enhanced first medical image, and the second medical image comprises a pre-enhanced second medical image and an enhanced second medical image;
determining a positive example of the first medical image according to the focus area and the second medical image, and determining a negative example of the first medical image according to the first medical image and the foreground area, specifically including:
determining a positive example sample before enhancement according to the focus area in the first medical image before enhancement and the second medical image before enhancement;
determining an enhanced positive example sample according to the focus area in the enhanced first medical image and the enhanced second medical image;
determining a negative example sample before enhancement according to the first medical image before enhancement and a foreground region in the second medical image before enhancement;
and determining an enhanced negative example sample according to the enhanced first medical image and the foreground region in the enhanced second medical image.
6. The method of claim 5, wherein constructing a training sample set from the first medical image, the positive example sample, and the negative example sample, comprises:
Determining a difference image according to the difference between the first medical image before enhancement and the first medical image after enhancement;
determining a difference positive sample according to the difference between the positive sample before enhancement and the positive sample after enhancement;
determining a difference negative example sample according to the difference between the negative example sample before enhancement and the negative example sample after enhancement;
and constructing a target training sample group comprising the difference image, the difference positive example sample and the difference negative example sample, and an original training sample group comprising the first medical image, the positive example sample and the negative example sample.
7. The method of claim 1, wherein the lesion segmentation model comprises an encoder and a decoder;
training a focus segmentation model according to the training sample group, wherein the training sample group specifically comprises the following steps:
respectively inputting the first medical image, the positive example sample and the negative example sample in the training sample group into the encoder to obtain the characteristics of the first medical image, the characteristics of the positive example sample and the characteristics of the negative example sample;
training the encoder with a maximization of the similarity between the features of the first medical image and the features of the positive example sample and a minimization of the similarity between the features of the first medical image and the negative example sample as training targets;
And training the decoder according to the trained encoder, the first medical image and the focus area.
8. The method of claim 7, wherein the lesion segmentation model comprises a first encoder, a second encoder, and a decoder;
training the decoder according to the trained encoder, the first medical image and the focus area, specifically including:
determining a training sample according to the first medical image, and determining a label of the training sample according to the focus area;
respectively inputting the training samples into a first encoder after training and a second encoder after training to obtain first characteristics of the training samples output by the first encoder and second characteristics of the training samples output by the second encoder;
fusing the first feature and the second feature, and inputting the fused feature into the decoder to obtain a segmentation result output by the decoder;
and adjusting parameters of the second encoder and parameters of the decoder by taking the difference between the segmentation result and the labeling of the training sample as an optimization target.
9. The method of claim 8, wherein the first medical image and the second medical image are segmented from a same reference medical image;
after obtaining the segmentation result output by the decoder, before adjusting the parameters of the second encoder and the parameters of the decoder with the difference between the segmentation result and the labeling of the training samples as an optimization objective, the method further comprises:
acquiring the reference medical image;
inputting the reference medical image into a pre-trained body part recognition model to obtain a contour of a body part corresponding to the first medical image output by the body part recognition model;
correcting the segmentation result according to the contour of the body part corresponding to the first medical image;
adjusting parameters of the second encoder and parameters of the decoder with the difference between the segmentation result and the labeling of the training samples as an optimization target, specifically including:
and adjusting the parameters of the second encoder and the parameters of the decoder by taking the difference between the corrected segmentation result and the labeling of the training sample as an optimization target.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-9.
CN202310129347.5A 2023-02-16 2023-02-16 Model training method, device, equipment and readable storage medium Pending CN116152600A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310129347.5A CN116152600A (en) 2023-02-16 2023-02-16 Model training method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310129347.5A CN116152600A (en) 2023-02-16 2023-02-16 Model training method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116152600A true CN116152600A (en) 2023-05-23

Family

ID=86353942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310129347.5A Pending CN116152600A (en) 2023-02-16 2023-02-16 Model training method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116152600A (en)

Similar Documents

Publication Publication Date Title
RU2571523C2 (en) Probabilistic refinement of model-based segmentation
CN109978037B (en) Image processing method, model training method, device and storage medium
US10426372B2 (en) Image registration system with non-rigid registration and method of operation thereof
CN109035261B (en) Medical image processing method and device, electronic device and storage medium
JP4785371B2 (en) Multidimensional structure extraction method and system using dynamic constraints
CN111428709A (en) Image processing method, image processing device, computer equipment and storage medium
CN109448003A (en) A kind of entocranial artery blood-vessel image dividing method and system
WO2021259391A2 (en) Image processing method and apparatus, and electronic device and storage medium
KR102228087B1 (en) Method and apparatus for segmentation of specific cartilage in medical image
US20180064409A1 (en) Simultaneously displaying medical images
CN111325714A (en) Region-of-interest processing method, computer device and readable storage medium
CN110400302B (en) Method and device for determining and displaying focus information in breast image
CN113610752A (en) Mammary gland image registration method, computer device and storage medium
CN114066886A (en) Bone segmentation boundary determining method and device, electronic equipment and storage medium
CN115546095A (en) Image registration method and registration device
CN117333529B (en) Template matching-based vascular ultrasonic intima automatic measurement method and system
CN116030247B (en) Medical image sample generation method and device, storage medium and electronic equipment
Atiyah et al. Brain MRI Images Segmentation Based on U-Net Architecture
CN116524295A (en) Image processing method, device, equipment and readable storage medium
CN113379770B (en) Construction method of nasopharyngeal carcinoma MR image segmentation network, image segmentation method and device
CN116152600A (en) Model training method, device, equipment and readable storage medium
CN115546094A (en) Model training method, and CT image optimization method and device
CN114511599A (en) Model training method and device, medical image registration method and device
Al Abboodi et al. Supervised Transfer Learning for Multi Organs 3D Segmentation With Registration Tools for Metal Artifact Reduction in CT Images
CN116229218B (en) Model training and image registration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination