Method and device for training identification model for identifying cerebral arterial thrombosis and storage medium
By constructing an identification model of the semi-supervised average teacher theoretical framework, combining segmentation tasks and scoring tasks, the accuracy and labeling difficulty of identifying ischemic stroke in the existing technology is solved, and higher identification accuracy and performance are achieved.
Patent Information
- Application Number
- CN202411656748.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-19
AI Technical Summary
When identifying ischemic strokes, it is difficult to accurately locate the lesions, and rely on a large amount of labeling data, which has problems such as difficulty and limited performance.
Using the semi-supervised average teacher theoretical framework, an identification model containing the first and second models is constructed. By simultaneously performing segmentation tasks and scoring tasks, supervised and unsupervised losses are calculated and the identification model is trained.
It improves the accuracy of the identification model, reduces the difficulty of labeling, enhances the performance of the model under scarce samples, and achieves more accurate lesion segmentation and ASPECTS score.
Smart Images

Figure CN119579978A_ABST
Abstract
Description
Technical Field
[0001] The present application generally relates to the technical field of ischemic stroke recognition, and more specifically, to a method, device and computer-readable storage medium for training a recognition model for ischemic stroke recognition. Background Art
[0002] Stroke is a common cerebrovascular disease with high morbidity, mortality and disability. Acute ischemic stroke (AIS) accounts for 60% to 80% of strokes, and its cause is obstruction of blood supply to brain tissue. Neuroimaging plays an important clinical role in assessing the severity and prognosis of ischemic stroke and guiding clinical treatment. Within a few hours of the onset of acute ischemic stroke, changes in water content caused by ischemia in local brain tissue will appear as high-signal lesions on diffusion-weighted imaging (DWI), and early ischemic changes usually reflect cytotoxic edema or irreversible damage.
[0003] In order to accurately evaluate early ischemic changes, the commonly used method is to assist in identification and measurement through lesion segmentation and Alberta Stroke Program Early CT Score (“ASPECTS”). For example, by extracting the target area from the image, the cerebral ischemia classification model is trained based on machine learning (or deep learning) to predict the ASPECTS score; in addition, there is also machine learning (or deep learning) to segment the lesion, and obtain the ASPECTS score based on the overlap between the lesion area and the ASPECTS area. However, the former requires the extraction of the target brain area, the preprocessing is complex, and the end-to-end characteristics of the deep learning model cannot be fully utilized. In addition, only the ASPECTS score can be obtained, and the precise positioning of the stroke lesion cannot be provided, which affects the recognition accuracy. The effectiveness of the latter may be affected by errors introduced in the early ischemic segmentation and ASPECTS area registration process, resulting in inaccurate recognition results. In addition, the performance of existing deep learning models depends on a large number of segmentation annotations and ASPECTS scoring annotations. However, there are many artifacts in DWI images that mimic the intensity and shape of stroke lesions, making lesion segmentation and scoring annotation difficult, which seriously limits the performance of the automated ASPECTS scoring method.
[0004] In view of this, there is an urgent need to provide a solution for training a recognition model for identifying ischemic stroke, so as to improve the accuracy of the recognition model in identifying ischemic stroke, reduce the difficulty of labeling, and improve the performance of the recognition model in identifying ischemic stroke under scarce sample conditions. Summary of the invention
[0005] In order to at least solve one or more of the technical problems mentioned above, the present application proposes a solution for training a recognition model for identifying ischemic stroke in multiple aspects.
[0006] In a first aspect, the present application provides a method for training a recognition model for identifying ischemic stroke, wherein the recognition model includes a first model and a second model formed based on an exponential moving average of weights in the first model, and both the first model and the second model include an encoder and a decoder, and the method includes: acquiring diffusion weighted imaging, wherein the diffusion weighted imaging includes annotated and unannotated images; preprocessing the diffusion weighted imaging to obtain preprocessed diffusion weighted imaging; inputting the preprocessed diffusion weighted imaging into the first model and the second model, respectively, and extracting corresponding image features via the encoders in the first model and the second model, respectively; based on the corresponding image features, performing segmentation tasks and scoring tasks via the decoders in the first model and the second model, respectively, and calculating supervised losses under annotations and unsupervised losses under unannotations; and determining a total loss based on the supervised loss and the unsupervised loss to train the recognition model for identifying ischemic stroke.
[0007] In some embodiments, the annotated data at least include lesion annotations and ASPECT score annotations.
[0008] In some embodiments, the preprocessing includes at least one or more of skull stripping, image registration or normalization operations.
[0009] In some embodiments, the encoders in the first model and the second model each include a plurality of first convolutional layers of different scales, and each of the convolutional layers is connected to a batch normalization layer and a first ReLU activation layer, wherein the preprocessed diffusion weighted imaging is downsampled through the plurality of first convolutional layers of different scales, the batch normalization layer, and the first ReLU activation layer of the encoders in the first model and the second model, respectively, to extract corresponding image features.
[0010] In some embodiments, when performing a segmentation task, the decoders in the first model and the second model include at least multiple deconvolution layers, second convolution layers, and second ReLU activation layers, wherein the corresponding image features are upsampled via multiple deconvolution layers of the decoders in the first model and the second model, respectively, to obtain upsampled features; the upsampled features are spliced with the image features of the corresponding first convolution layers of the encoders in the first model and the second model, and the splicing results are subjected to a segmentation task via the second convolution layer and the second ReLU activation layer to obtain a segmentation result of the lesion.
[0011] In some embodiments, when performing a scoring task, the decoders in the first model and the second model include a global average pooling layer, a fully connected layer, and a Sigmoid activation layer, wherein the corresponding image features are respectively classified via the global average pooling layer, the fully connected layer, and the Sigmoid activation layer of the decoders in the first model and the second model to obtain classification results for the target scoring annotation area.
[0012] In some embodiments, the supervised loss is calculated by the following operations: respectively calculating the segmentation loss and classification loss corresponding to the segmentation task and the scoring task with annotations; and calculating the supervised loss based on the weighted sum of the segmentation loss and the classification loss.
[0013] In some embodiments, the unsupervised loss is calculated by the following operations: respectively calculating the segmentation consistency loss and the classification consistency loss of the first model and the second model for the segmentation task and the scoring task without labeling; and calculating the unsupervised loss based on the weighted sum of the segmentation consistency loss and the classification consistency loss.
[0014] In a second aspect, the present application provides a method for identifying ischemic stroke, comprising: acquiring diffusion weighted imaging; and inputting the diffusion weighted imaging into a recognition model trained by one or more embodiments in the first aspect, and obtaining an ischemic stroke recognition result through the first model recognition in the recognition model.
[0015] In a third aspect, the present application provides a device, comprising: a processor; and a memory, wherein program instructions for training a recognition model for identifying ischemic stroke are stored, and when the program instructions are executed by the processor, the device implements one or more embodiments of the aforementioned first aspect; or program instructions for identifying ischemic stroke are stored, and when the program instructions are executed by the processor, the device implements the embodiments of the aforementioned second aspect.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-readable instructions for training a recognition model for identifying ischemic stroke, which, when executed by one or more processors, implement one or more embodiments of the aforementioned first aspect; or having stored thereon computer-readable instructions for identifying ischemic stroke, which, when executed by one or more processors, implement embodiments of the aforementioned second aspect.
[0017] Through the scheme for training a recognition model for identifying ischemic stroke as provided above, the embodiment of the present application constructs a recognition model with a semi-supervised average teacher theory framework including the first and second models, and simultaneously performs segmentation tasks and scoring tasks during training, and calculates the total loss corresponding to the supervised loss and the unsupervised loss to train the recognition model. Based on this, the embodiment of the present application can reduce the need to determine the optimal threshold, obtain an ASPECTS score without additional, and utilize shared information through associated tasks, so that the segmentation task and the scoring task can assist and enhance each other, improve the accuracy of the recognition model, and thus improve the accuracy of the recognition model in identifying ischemic stroke. Further, the embodiment of the present application can be trained with a small amount of labeled data and a large amount of unlabeled data, reduce the difficulty of labeling, and improve the performance of the recognition model in identifying ischemic stroke under scarce sample conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0019] Figure 1 The target area in the middle cerebral artery territory is shown;
[0020] Figure 2 is an exemplary flowchart showing a method for training a recognition model for identifying ischemic stroke according to an embodiment of the present application;
[0021] Figure 3 is an exemplary schematic diagram showing the entirety of a recognition model for training recognition of ischemic stroke according to an embodiment of the present application;
[0022] Figure 4 is an exemplary flowchart showing a method for identifying ischemic stroke according to an embodiment of the present application;
[0023] Figure 5 is an exemplary schematic diagram showing a stroke segmentation result according to an embodiment of the present application;
[0024] Figure 6 is a block diagram showing an exemplary structure of a device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0026] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present application indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0027] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0028] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0029] As described in the above background technology, the commonly used method for target identification of ischemic stroke is to assist in identification and measurement through lesion segmentation and ASPECTS scoring. Among them, lesion segmentation can help doctors accurately locate the damaged area of cerebral stroke in clinical practice, and provide more detailed lesion information (such as the size, shape and location of the lesion), so as to formulate a more personalized treatment plan. Lesion segmentation is a method for evaluating early ischemic changes in the middle cerebral artery blood supply area of patients with ischemic stroke. It can be done by selecting 10 areas (such as lesions) at two levels in the middle cerebral artery blood supply area on the image. Figure 1(a) and (b) of Figure 1), for example, at the nucleus level (i.e., the thalamus and striatum plane), it is divided into seven regions: M1, M2, M3, insula I, lenticular nucleus L, caudate nucleus C, and posterior limb of internal capsule IC, and three regions: M4, M5, and M6 at the level above the nucleus (2 cm above the horizontal plane of the nucleus). The aforementioned 10 regions have the same weight, with a full score of 10 points. A deduction system is implemented based on whether there is an identifiable ischemic area in each region to evaluate early ischemic changes.
[0030] Based on the target brain area extracted from the image data (such as the 10 areas mentioned above), it can be marked by judging whether it is ischemic, and then a cerebral ischemia classification model based on a machine learning model or a deep learning model is designed, and the classification model is trained using the labeled ischemic stroke image data. However, this method requires the extraction of the target brain area, and the preprocessing is complex and cannot fully utilize the end-to-end characteristics of the deep learning model, which limits its clinical practice. In addition, this method can only obtain the ASPECTS score and cannot provide accurate positioning of the stroke lesion, affecting the recognition accuracy.
[0031] In addition, the commonly used method can also generate regional ASPECTS predictions by first performing lesion segmentation on the stroke image using a segmentation network, and then applying a specific involvement threshold (e.g., the presence of any lesion or the lesion covering more than 5% of the ASPECTS area) based on the overlap of the ASPECTS area with the lesion area. This method can provide scores for all ASPECT areas and provide more detailed location information, however, its effectiveness may be affected by errors introduced in the early ischemic segmentation and ASPECTS area registration process, resulting in inaccurate recognition results.
[0032] In addition, the performance of existing deep learning models relies on a large number of segmentation annotations and ASPECTS scoring labels, and there are many artifacts in DWI images that mimic the intensity and shape of stroke lesions. It is understandable that there are multiple subtypes of stroke, resulting in great differences in lesion size and location. The volume of stroke lesions can range from hundreds to tens of thousands of cubic millimeters and may occur in any brain region such as the lobes, cerebellum, and brainstem. As a result, accurately depicting detailed lesion areas remains a challenging task even for experienced radiologists. In addition to lesion annotation, the complexity of some acute stroke lesions causes neuroradiologists to spend a lot of time and effort when performing ASPECTS regional scoring by visual inspection, and may also produce large subjective biases. In summary, due to the doubling of the difficulty in obtaining these two labels, this severely limits the performance of the automated ASPECTS scoring method, especially in more diverse actual clinical scenarios, where there may be problems with reliability.
[0033] Based on this, the embodiment of the present application provides a solution for training a recognition model for identifying ischemic stroke, which can realize the joint training of lesion segmentation tasks and scoring tasks while utilizing a small amount of labeled data and a large amount of unlabeled data, thereby obtaining a richer feature representation of ischemic stroke lesions, improving the accuracy of the recognition model in identifying ischemic stroke, and improving the performance of the segmentation task and the scoring task of identifying ischemic stroke, thereby improving the accuracy of the recognition model.
[0034] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.
[0035] Figure 2 It is an exemplary flow chart showing a method 200 for training a recognition model for identifying ischemic stroke according to an embodiment of the present application. In some embodiments, the recognition model includes a first model and a second model formed based on an exponential moving average of weights in the first model. The aforementioned first model may correspond to a student model, and the second model may correspond to a teacher model. That is, during the training process, the exponential moving average of the weights of the student model is assigned to the teacher model, whereby the recognition model has a semi-supervised average teacher theory framework. In some embodiments, both the first model and the second model include an encoder and a decoder, and the recognition of the second model can be regarded as additional supervision of the first model. In some implementation scenarios, the aforementioned encoder can be shared between different tasks, while the decoder is specific to a segmentation task or a scoring task.
[0036] like Figure 2 As shown in , at step S201, diffusion weighted imaging is acquired, wherein the diffusion weighted imaging includes annotated and unannotated ones. It can be understood that the collection of medical imaging data covers cerebral infarction lesions in multiple parts of the anterior circulation area, and these lesions may present a variety of different types and characteristics. DWI images are very sensitive to the detection of acute cerebral infarction and can show abnormal signals within a very short time after the onset of ischemia, which is earlier than traditional CT scans. Therefore, acquiring DWI images of ischemic stroke patients helps to accurately identify and analyze the characteristics of cerebral infarction lesions and ASPECTS scores, thereby providing an important basis for clinical diagnosis and treatment.
[0037] In some embodiments, the annotations include at least lesion annotations and ASPECT score annotations. For lesion annotations, in order to ensure the accuracy and consistency of diagnosis, image processing software (such as ITK-SNAP) can be used to view DWI images layer by layer, and the patient's brain images can be carefully analyzed to accurately delineate and annotate the lesions of cerebral infarction to obtain lesion annotations.
[0038] For ASPECT scoring annotation, two experienced doctors can first independently interpret the patient's brain images according to clear scoring criteria. Specifically, a preliminary score of 1 or 0 is used according to the conditions of 10 target areas, including the caudate nucleus head, lenticular nucleus, posterior limb of the internal capsule, insular zone and M1-M6 areas. Based on the preliminary score, a third senior doctor will review these scores and integrate and adjust them when necessary. If differences in the scoring results are found during this process, or there are disputes about the evaluation of certain areas, the final score will be determined by three people voting to complete the ASPECT scoring annotation. This triple verification process ensures the accuracy and reliability of the scoring and reduces the errors that may be caused by subjective judgment.
[0039] Based on the diffusion weighted imaging obtained above, at step S202, the diffusion weighted imaging is preprocessed to obtain a preprocessed diffusion weighted imaging. In some embodiments, the preprocessing may include but is not limited to one or more of skull stripping, image registration or normalization operations. For example, it may also include image cropping, image denoising and other preprocessing.
[0040] In some implementation scenarios, the pixel points corresponding to the skull outside the brain can be determined from the DWI image according to a preset method for determining the pixel points corresponding to the skull outside the brain. Then, the grayscale of the pixel points corresponding to the skull outside the brain is set to 0 to achieve skull stripping. In other implementation scenarios, the original DWI image can be registered to the internationally used MNI152 standard space template by, for example, an affine registration algorithm to achieve image registration. Among them, the aforementioned affine registration algorithm can also process image translation, rotation, scaling and other transformations to ensure the spatial consistency of the DWI image. In some other embodiments, the DWI image can be normalized by, for example, the z-score method. In addition, the DWI images can be cropped to the same size (e.g., 128*128*128) by image cropping.
[0041] As an example, assume that the preprocessed diffusion-weighted imaging dataset contains N annotated datasets and M unannotated datasets, and the annotated dataset is defined as The unlabeled dataset is defined as N<<M. Among them, Indicates the size of the input image, H, W, D respectively represent the height, width and depth of the input image; s i ∈{0,1} H×WxD Y represents the corresponding real lesion annotation (or label). i ∈{0, 1} 10Represents the ASPECTS score label. The number 10 indicates that the ASPECTS scoring mechanism divides the middle cerebral artery blood supply into 10 areas, where 0 and 1 represent the normal area and ischemic infarction, respectively.
[0042] Next, at step S203, the preprocessed diffusion weighted imaging is input into the first model and the second model respectively, and the corresponding image features are extracted respectively through the encoders in the first model and the second model. For example, 50 and 150 data can be selected from the preprocessed diffusion weighted imaging data set as labeled samples and unlabeled data samples, respectively, and different proportions are extracted from them and input into the first model and the second model, and the corresponding image features are first extracted respectively through the encoders in the first model and the second model.
[0043] In some embodiments, the encoders in the first model and the second model may include multiple first convolutional layers of different scales, and each convolutional layer is connected to a batch normalization layer and a first ReLU activation layer. The preprocessed diffusion weighted imaging is downsampled through multiple first convolutional layers of different scales, batch normalization layers, and first ReLU activation layers of the encoders in the first model and the second model, respectively, to extract corresponding image features. That is, the main task of the encoders in the first model and the second model is to extract image features and gradually reduce the resolution of the feature map to capture semantic information at different levels.
[0044] As an example, the encoder in the first model and the second model may include four first convolutional layers, each layer may have convolutional blocks with different feature scales, and each layer may be a convolutional layer including two convolutional kernels of size 3×3×3. Furthermore, each convolutional layer may be followed by a batch normalization layer and a ReLU activation layer. In the implementation scenario, the input image is downsampled through the first convolutional layer, batch normalization layer, and ReLU activation layer in turn, and the image features are output.
[0045] Further, at step S204, based on the corresponding image features, the decoders in the first model and the second model respectively perform segmentation tasks and scoring tasks, and calculate the supervised loss with annotations and the unsupervised loss without annotations. In some embodiments, in performing the segmentation task, the decoders in the first model and the second model include at least a plurality of deconvolution layers, a second convolution layer, and a second ReLU activation layer, wherein the corresponding image features are upsampled through a plurality of deconvolution layers of the decoders in the first model and the second model, respectively, to obtain upsampled features; the upsampled features are spliced with the image features of the corresponding first convolution layers of the encoders in the first model and the second model, and the spliced results are subjected to the segmentation task via the second convolution layer and the second ReLU activation layer to obtain the segmentation result of the lesion.
[0046] In other embodiments, when performing a scoring task, the decoders in the first model and the second model include a global average pooling layer, a fully connected layer, and a Sigmoid activation layer, wherein the corresponding image features are respectively classified via the global average pooling layer, the fully connected layer, and the Sigmoid activation layer of the decoders in the first model and the second model to obtain classification results for the target scoring annotation area.
[0047] That is to say, in the segmentation task and the scoring task, the decoder corresponds to the lesion segmentation module and the ASPECT scoring module in the recognition model, respectively. Among them, the main task of the lesion segmentation module is to restore the spatial resolution of the image (ie, upsampling), gradually reconstruct the detail information, and finally generate a segmentation map with the same size as the input image. In some implementation scenarios, the upsampling operation can be first performed through the deconvolution layer. For example, the size of the image feature is doubled by an upsampling operation with a convolution kernel of 3×3×3 and a convolution step of 2. Then, the upsampled feature map is spliced with the feature map of the corresponding layer of the encoder to obtain a splicing result. In this way, features of different resolutions can be fused, which helps to better restore spatial information. Furthermore, the aforementioned splicing result can be used for the segmentation task through, for example, two second convolutional layers and a second ReLU activation layer, until the input feature map size is restored to obtain the classification result of the target scoring annotation area.
[0048] For the ASPECT scoring module, in the implementation scenario, 10 pairs of ASPECTS regions can be extracted based on the ASPECTS annotations. It can be understood that the ASPECTS region labels in the image can be obtained by registering the DWI image to the Atlas image. Based on the ASPECTS region labels, 10 pairs of regions from the affected and unaffected hemispheres in the 10 ASPECTS regions are extracted from the image features obtained by the encoder. For each region, the dimension of the feature can be reduced through a global average pooling layer, and the features in each region block can be combined by applying concatenation to combine a fully connected layer. Finally, the response of each ASPECTS region is activated through a Sigmoid activation layer to obtain the classification result of the target scoring annotated region (e.g., the classification probability of each region). In some implementation scenarios, the first k-th The classification probability of ASPECTS region (P k ) can be expressed as follows:
[0049]
[0050] Where k = 1, 2, ···, 10, σ represents the sigmoid function, R k Indicates the first k-th ASPECTS region, FAP represents the global average pooling operation, and W represents the fully connected layer parameters of the kth ASPECTS region.
[0051] As can be seen from the foregoing, the recognition model of the embodiment of the present application is constructed based on the semi-supervised average teacher theory framework, and is trained by using a small number of labeled and a large number of unlabeled DWI images. The corresponding loss function can include supervised loss and unsupervised consistency loss.
[0052] In some embodiments, the supervised loss may be calculated by the following operations, namely, respectively calculating the segmentation loss and classification loss corresponding to the segmentation task and the scoring task with annotations, and calculating the supervised loss according to the weighted sum between the segmentation loss and the classification loss. In some embodiments, the unsupervised loss may be calculated by the following operations, namely, respectively calculating the segmentation consistency loss and classification consistency loss for the segmentation task and the scoring task of the first model and the second model without annotations, and calculating the unsupervised loss according to the weighted sum of the segmentation consistency loss and the classification consistency loss.
[0053] Specifically, in one implementation scenario, the above supervised loss It can be expressed by the following formula:
[0054]
[0055] in, represents the above classification loss, In some implementation scenarios, the aforementioned classification loss is a binary cross entropy loss, which is used to perform binary classification on each ASPECTS region, specifically expressed as N represents the number of training samples, and They represent the label and the affected probability of the kth ASPECTS region of the i-th sample respectively. In some other implementation scenarios, the segmentation loss can be the Dice loss to measure the overlap between the model prediction result and the true label, which is specifically expressed as P represents the segmentation area predicted by the model, and G represents the actual segmentation area.
[0056] It can be understood that since the second model is formed based on the exponential moving average of the weights in the first model, for the same image input, the outputs of the first and second models for segmentation and classification are consistent, and the corresponding unsupervised losses are consistent. Specifically, in an implementation scenario, the above unsupervised loss It can be expressed as follows:
[0057]
[0058] in, represents the classification consistency loss, represents the segmentation consistency loss, and γ is the weight coefficient. Among them, the classification consistency loss Expressed as represents the prediction result of the first model for the rating, Represents the prediction result of the second model for the score. Segment consistency loss Expressed as represents the prediction result of the first model for segmentation, Represents the prediction result of the second model for segmentation.
[0059] After obtaining the supervised loss and the unsupervised loss, at step S205, the total loss is determined according to the supervised loss and the unsupervised loss to train a recognition model for ischemic stroke. It can be a supervised loss and unsupervised loss The weighted sum of is as shown below:
[0060]
[0061] In this scenario, by calculating the total loss To update the parameters of the recognition model, the learning rate is adjusted using a linear decay strategy during the training process until the maximum number of training times or the total loss is reached. Until convergence, a trained recognition model is obtained.
[0062] In combination with the above description, it can be seen that the embodiment of the present application constructs a recognition model with a semi-supervised average teacher theory framework including the first and second models, and performs segmentation tasks and scoring tasks simultaneously during training, and calculates the total loss corresponding to the supervised loss and the unsupervised loss to train the recognition model. Based on this, the embodiment of the present application can reduce the need to determine the optimal threshold, obtain an ASPECTS score without additional, and utilize shared information through associated tasks, so that the segmentation task and the scoring task can assist and enhance each other, improve the accuracy of the recognition model, and thus improve the accuracy of the recognition model in identifying ischemic stroke. Furthermore, the embodiment of the present application can be trained with a small amount of labeled data and a large amount of unlabeled data, reduce the difficulty of labeling, and improve the performance of the recognition model in identifying ischemic stroke under scarce sample conditions.
[0063] Figure 3 is an exemplary schematic diagram showing the whole of a recognition model for training ischemic stroke according to an embodiment of the present application. It should be understood that, Figure 3 is the above Figure 2 A specific embodiment of the method 200, therefore, the above Figure 2 The description also applies to Figure 3 .
[0064] like Figure 3 As shown in, the recognition model of the embodiment of the present application may include a first model (corresponding student model) 301 and a second model (corresponding teacher model) 302, wherein the second model is formed based on the exponential moving average of the weights in the first model. That is, the exponential moving average ("EMA") of the weights of the student model is allocated to the teacher model. In certain embodiments, the first model 301 and the second model 302 include an encoder and a decoder, wherein the decoder corresponds to the lesion segmentation module and the ASPECT scoring module in the recognition model in the segmentation task and the scoring task respectively. As an example, the first model 301 includes an encoder 301-1 and a decoder, and the decoder corresponds to the lesion segmentation module 301-21 and the ASPECT scoring module 301-22 respectively. The second model 302 includes an encoder 302-1 and a decoder, and the decoder corresponds to the lesion segmentation module 302-21 and the ASPECT scoring module 302-22 respectively.
[0065] In the implementation scenario, the encoder 301-1 and the encoder 302-1 may include multiple first convolutional layers of different scales, batch normalization layers and first ReLU activation layers. The lesion segmentation module 301-21 and the lesion segmentation module 302-21 may include multiple deconvolutional layers, second convolutional layers and second ReLU activation layers; the ASPECT scoring module 301-22 and the ASPECT scoring module 302-22 may both include a global average pooling layer, a fully connected layer and a Sigmoid activation layer. In this scenario, the acquired diffusion weighted imaging (including the annotated 303 and the unannotated 304) is first extracted through the encoder 301-1 of the first model 301 and the encoder 302-1 of the second model 302, respectively, to extract the corresponding image features 305-1 and image features 305-2. Specifically, the input image is sequentially downsampled through the first convolutional layer, batch normalization layer and ReLU activation layer of each layer in the encoder, and the image features are output.
[0066] Based on the image features 305-1 and 305-2, the classification task is performed by the ASPECT scoring modules 301-22 and ASPECT scoring modules 302-22 of the first model 301 and the second model 302, respectively, to obtain the classification results 306-1 and 306-2 of the corresponding target scoring annotation areas. Further, the segmentation task is performed by the lesion segmentation modules 301-21 and lesion segmentation modules 302-21 of the first model 301 and the second model 302, respectively, to obtain the segmentation results 307-1 and 307-2 of the corresponding lesions. Specifically, in the classification task, the classification result is obtained by the global average pooling layer, the fully connected layer and the Sigmoid activation layer in the ASPECT scoring module. In the segmentation task, the segmentation result is obtained by upsampling, splicing and convolution via the lesion segmentation module.
[0067] Furthermore, the segmentation loss 308 and classification loss 309 corresponding to the segmentation task and the scoring task with annotation are calculated respectively, and the weighted sum between the segmentation loss and the classification loss is calculated based on the above formula (2) to obtain the supervised loss. In addition, the segmentation consistency loss 310 and the classification consistency loss 311 are calculated respectively, and then the weighted sum of the segmentation consistency loss and the classification consistency loss is calculated based on the above formula (3) to obtain the unsupervised loss. Finally, the recognition model for ischemic stroke is trained based on the total loss determined by the supervised loss and the unsupervised loss. Among them, more details on the calculation of the above losses can be referred to the above Figure 2 The description of is not repeated here in this application.
[0068] In an exemplary scenario, the recognition model can be trained using, for example, the Adam optimizer, where the weighting coefficients can be set to α = 0.9, β = 0.8, and γ = 0.9. The total loss is calculated when the entire training cycle is 300 epochs and the initial learning rate is 0.0001. To update the model parameters, and use a linear decay strategy to adjust the learning rate during training. That is, the learning rate is decayed every 30 cycles with a decay coefficient of 0.5 until the maximum number of training times or the total loss function is reached. Until convergence. In addition, the proportion of annotated DWI images can be set to 10%, 20%, and 50% for training and testing to obtain a trained recognition model. Based on this recognition model, it can be used to process stroke DWI medical image data and obtain accurate stroke lesion segmentation and ASPECTS score for clinical decision support.
[0069] Figure 4 FIG. 4 is an exemplary flowchart of a method 400 for identifying ischemic stroke according to an embodiment of the present application. Figure 4As shown in FIG. 4 , at step S401, a diffusion weighted image is obtained. Then, at step S402, the diffusion weighted image is input into the trained recognition model, and the recognition result of ischemic stroke is obtained through the first model recognition in the recognition model. For more details about the recognition model training, please refer to the above Figure 2-Figure 3 It is understood that after the training of the recognition model is completed, the reasoning process can simply input the diffusion weighted imaging into the first model for recognition to obtain the recognition result of ischemic stroke, and the recognition result can include both the lesion segmentation result and the scoring result.
[0070] In some embodiments, in order to ensure the performance of the recognition model, the results of stroke lesion segmentation and ASPECTS classification can be evaluated by the following evaluation indicators. For example, for stroke segmentation, the Dice coefficient is used to measure the similarity of two samples:
[0071]
[0072] Where P and G represent the predicted and true segmentation regions, respectively.
[0073] The following evaluation indicators are used for ASPECTS scoring. For example, the accuracy is used to calculate the proportion of samples correctly predicted by the model to the total number of samples.
[0074]
[0075] Among them, TP is the true positive example, TN is the true negative example, FP is the false positive example, and FN is the false negative rate.
[0076] As another example, the F1 score (“F1-score”) is the harmonic mean of precision and recall.
[0077]
[0078]
[0079] Among them, TP represents true positive examples, FP represents false positive examples, and FN represents false negative rate.
[0080] In addition, the Kappa coefficient is a statistical indicator for measuring classification accuracy, which takes into account the probability of accidental agreement between classifiers. Specifically, the calculation formula of the Kappa coefficient is as follows:
[0081]
[0082] Among them, P 0 represents the observed agreement proportion, that is, the proportion of raters who actually agree with each other.e represents the expected proportion of agreement by chance, that is, the proportion of agreement between raters that would be expected in the absence of any actual agreement.
[0083] Figure 5 FIG. 1 is an exemplary schematic diagram showing the stroke segmentation result according to an embodiment of the present application. Figure 5 FIG. 1 shows a large area of lesion region segmented by the recognition model of the embodiment of the present application, which can accurately capture its boundary. This shows that the recognition model of the embodiment of the present application has excellent recognition ability when processing large-volume lesions. Figure 5 Figures (b) and (d) of FIG. 4 show that the recognition model based on the embodiment of the present application segmented multiple smaller lesions. This shows that the recognition model of the embodiment of the present application still maintains a high accuracy when processing scattered small lesions and can effectively distinguish lesions from normal tissues. Figure 5 Figure (c) shows the ability of the recognition model of the embodiment of the present application to segment irregularly shaped lesions, indicating that the recognition model of the embodiment of the present application can adapt to lesions of different shapes and ensure the integrity and accuracy of the segmentation. As can be seen from the figure, the recognition model of the embodiment of the present application shows excellent segmentation performance when processing lesions with different characteristics, and can provide reliable support for clinical diagnosis.
[0084] At the same time, the recognition model of the embodiment of the present application can also be ASPETCS scoring results, such as shown in Table 1 below.
[0085] Table 1 Performance comparison of recognition model and other methods
[0086]
[0087] Among them, other methods include the classification method based on brain area extraction adopted by Wu et al.; the threshold-based method based on segmentation and then adopted by Naganuma et al. to obtain the scoring results; the Baseline method of joint training of segmentation and ASPECTS scoring classification; the existing semi-supervised training method Self-training and the training method of the recognition model of the embodiment of the present application.
[0088] As can be seen from Table 1, compared with the first three methods, the embodiment of the present application adopts joint training of segmentation and ASPECTS scoring, and different tasks can share the underlying feature representation, which can help the recognition model learn richer and more detailed features of ischemic stroke lesions, thereby improving the performance of the model. Compared with the existing semi-supervised learning methods, the innovative method proposed in the present invention can simultaneously use limited labeled data and a large amount of unlabeled data for training. The embodiment of the present application not only effectively solves the problem of obtaining labeled data in lesion segmentation and ASPECTS scoring, but also significantly improves the accuracy of stroke lesion segmentation by deeply mining the potential information in unlabeled data, and optimizes the accuracy of ASPECT scoring, providing more reliable technical support for clinical diagnosis and treatment.
[0089] Figure 6 is an exemplary structural block diagram showing a device 600 according to an embodiment of the present application. Figure 6 As shown in FIG. 1 , the device 600 of the present application may include a processor 601 and a memory 602, wherein the processor 601 and the memory 602 communicate with each other via a bus. The memory 602 stores program instructions for training a recognition model for recognizing ischemic stroke. When the program instructions are executed by the processor 601, the method described in the foregoing combined with the attached Figure 2 The described method steps are: obtaining diffusion weighted imaging, wherein the diffusion weighted imaging includes annotated and unannotated ones; preprocessing the diffusion weighted imaging to obtain preprocessed diffusion weighted imaging; inputting the preprocessed diffusion weighted imaging into the first model and the second model respectively, and extracting corresponding image features through the encoders in the first model and the second model respectively; based on the corresponding image features, performing segmentation tasks and scoring tasks through the decoders in the first model and the second model respectively, and calculating the supervised loss under annotated conditions and the unsupervised loss under unannotated conditions; and determining the total loss based on the supervised loss and the unsupervised loss to train the recognition model for identifying ischemic stroke.
[0090] In some embodiments, the memory 602 stores program instructions for identifying ischemic stroke. When the program instructions are executed by the processor 601, the above-mentioned method in combination with the attached Figure 4 The described method steps include: acquiring diffusion weighted imaging; and inputting the diffusion weighted imaging into a trained recognition model, and obtaining a recognition result of ischemic stroke through first model recognition in the recognition model.
[0091] According to the above description in combination with the accompanying drawings, those skilled in the art can also understand that the embodiments of the present application can also be implemented by a software program. Therefore, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores thereon computer-readable instructions for training a recognition model for identifying ischemic stroke or for identifying ischemic stroke. When the computer-readable instructions are executed by one or more processors, the present application in combination with the accompanying drawings is implemented. Figure 2 or Figure 4 The described method for training a recognition model for recognizing ischemic stroke or a method for recognizing ischemic stroke.
[0092] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0093] It should be noted that although the operations of the method of the present application are described in a specific order in the accompanying drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0094] It should be understood that when the terms "first", "second", "third" and "fourth" are used in the claims, the specification and the drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.
[0095] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0096] Although the implementation methods of the present application are as above, the contents described are only examples adopted to facilitate the understanding of the present application, and are not intended to limit the scope and application scenarios of the present application. Any technician in the technical field described in the present application can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present application, but the scope of patent protection of the present application shall still be subject to the scope defined in the attached claims.
Claims
1. A method for training a recognition model for identifying ischemic stroke, wherein the recognition model comprises a first model and a second model formed based on an exponential moving average of weights in the first model, and both the first model and the second model comprise an encoder and a decoder, and the method comprises: Acquire diffusion-weighted imaging, wherein the diffusion-weighted imaging includes annotated and unannotated images; Preprocessing the diffusion weighted imaging to obtain preprocessed diffusion weighted imaging; Inputting the preprocessed diffusion weighted imaging into the first model and the second model respectively, and extracting corresponding image features through encoders in the first model and the second model respectively; Based on the corresponding image features, the decoders in the first model and the second model respectively perform a segmentation task and a scoring task, and calculate a supervised loss with annotations and an unsupervised loss without annotations; as well as A total loss is determined according to the supervised loss and the unsupervised loss to train the recognition model for recognizing ischemic stroke.
2. The method according to claim 1, wherein the annotated data at least includes a lesion annotation and an ASPECT score annotation.
3. The method according to claim 1, wherein the preprocessing comprises at least one or more of skull stripping, image registration or normalization operations.
4. The method according to claim 1, wherein the encoders in the first model and the second model each include a plurality of first convolutional layers of different scales, and each of the convolutional layers is connected to a batch normalization layer and a first ReLU activation layer, wherein the preprocessed diffusion weighted imaging is downsampled via the plurality of first convolutional layers of different scales, the batch normalization layer, and the first ReLU activation layer of the encoders in the first model and the second model, respectively, to extract corresponding image features.
5. The method according to claim 1 or 4, wherein in performing a segmentation task, the decoders in the first model and the second model include at least multiple deconvolution layers, a second convolution layer, and a second ReLU activation layer, wherein the corresponding image features are upsampled via multiple deconvolution layers of the decoders in the first model and the second model, respectively, to obtain upsampled features; the upsampled features are spliced with the image features of the corresponding first convolution layers of the encoders in the first model and the second model, and the splicing result is subjected to a segmentation task via the second convolution layer and the second ReLU activation layer to obtain a segmentation result of the lesion.
6. The method according to claim 1 or 4, wherein in performing a scoring task, the decoders in the first model and the second model include a global average pooling layer, a fully connected layer, and a Sigmoid activation layer, wherein the corresponding image features are respectively classified via the global average pooling layer, the fully connected layer, and the Sigmoid activation layer of the decoders in the first model and the second model to obtain classification results of the target scoring annotation area.
7. The method of claim 1, wherein the supervised loss is calculated by: Respectively calculating the segmentation loss and classification loss corresponding to the segmentation task and the scoring task with annotations; and The supervised loss is calculated as a weighted sum between the segmentation loss and the classification loss.
8. The method of claim 1, wherein the unsupervised loss is calculated by: Respectively calculating the segmentation consistency loss and classification consistency loss of the first model and the second model for the segmentation task and the scoring task without labeling; and The unsupervised loss is calculated according to a weighted sum of the segmentation consistency loss and the classification consistency loss.
9. A method for identifying ischemic stroke, comprising: Diffusion-weighted imaging was obtained; as well as The diffusion weighted imaging is input into a recognition model trained according to the method of any one of claims 1 to 8, and a recognition result of ischemic stroke is obtained through first model recognition in the recognition model.
10. A device comprising: processor; as well as A memory, wherein program instructions for training a recognition model for identifying ischemic stroke are stored, and when the program instructions are executed by the processor, the device implements the method according to any one of claims 1-8; or program instructions for identifying ischemic stroke are stored, and when the program instructions are executed by the processor, the device implements the method according to claim 9.
11. A computer-readable storage medium storing computer-readable instructions for training a recognition model for identifying ischemic stroke, which, when executed by one or more processors, implements the method described in any one of claims 1 to 8; or storing computer-readable instructions for identifying ischemic stroke, which, when executed by one or more processors, implements the method described in claim 9.
Citation Information
Patent Citations
Three-dimensional medical image segmentation method and imaging method for acute ischemic stroke
CN116012388A
Acute ischemic stroke ASPECTS automatic scoring device based on DWI image
CN116309295A
Semi-supervised cerebral apoplexy focus segmentation method based on multi-scale mutual consistency learning
CN117197160A
Skull base responsible blood vessel automatic identification method based on semi-supervised learning
CN117649550A
Medical image classification method and system based on semi-supervised multi-task learning, and medium
CN118038171A
