Nasopharyngeal carcinoma image segmentation methods, equipment and media
By focusing on local region information and feature-level regularization, the nasopharyngeal carcinoma image segmentation network is optimized, which solves the problem of insufficient robustness of existing nasopharyngeal carcinoma image segmentation networks and achieves more efficient image segmentation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2026-04-03
AI Technical Summary
Existing medical image segmentation network frameworks fail to effectively utilize local region information in nasopharyngeal carcinoma medical images, resulting in insufficient robustness and network representation capabilities.
By focusing on local region information and feature-level regularization, a parallel segmentation network model is trained. By utilizing pseudo-labels and local region constraints, and combining cross-model consistency loss and differential consistency loss, the parameters of the segmentation network framework are optimized.
This study improved the robustness and effectiveness of the network for nasopharyngeal carcinoma image segmentation, reduced the impact of pseudo-label noise, and enhanced the model's ability to perceive and represent local regions.
Smart Images

Figure CN117197180B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this application relate to, but are not limited to, the field of image processing, and particularly to nasopharyngeal carcinoma image segmentation methods, devices, and media. Background Technology
[0002] Current image segmentation network frameworks applied to medical image processing include 2.5D convolutional neural networks, end-to-end deep deconvolutional neural networks, and semi-supervised learning networks that combine pyramid consistency regularization and uncertainty correction schemes. However, none of them consider the local region information of nasopharyngeal carcinoma medical images and cannot achieve consistency on the latent features of unlabeled data containing rich contextual information. Thus, they ignore the application of local region information and feature-level regularization, and fail to fully utilize the robustness of the model and the representational power of the network. Summary of the Invention
[0003] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0004] The purpose of this application is to at least partially solve one of the technical problems existing in the related technologies. The embodiments of this application provide a nasopharyngeal carcinoma image segmentation method, device and medium, which improves robustness by focusing on local region information and the application of feature-level regularization.
[0005] An embodiment of the first aspect of this application provides a nasopharyngeal carcinoma image segmentation method, comprising:
[0006] Acquire a first image and a second image, wherein the first image is a labeled medical image of nasopharyngeal carcinoma and the second image is an unlabeled medical image of nasopharyngeal carcinoma;
[0007] The first image is input into the segmentation network framework for training to obtain the trained segmentation network framework. The segmentation network framework includes a first model and a second model. The first model and the second model are parallel segmentation network models with the same architecture and different parameters.
[0008] The third image is obtained by rotating the second image;
[0009] The second image and the third image are input into a trained segmentation network framework. The encoder of the framework outputs the second latent feature of the second image and the third latent feature of the third image. The framework outputs the second prediction result pair of the second image and the third prediction result pair of the third image.
[0010] Based on the second prediction result, threshold processing is performed to obtain pseudo-label pairs;
[0011] The local region dice loss value is obtained based on the second prediction result pair, the pseudo-label pair, and the height and width of the local region.
[0012] Based on the second prediction result pair, the pseudo-label pair, and the local region dice loss value, the local region confidence loss value is obtained;
[0013] Based on the second latent feature and the third latent feature, a cross-model consistency loss value is obtained for aligning features between the first model and the second model;
[0014] The second latent feature is rotated to obtain the fourth latent feature, and a differential consistency loss value is obtained based on the third latent feature and the fourth latent feature to enable the structural information of the first model and the second model to interact.
[0015] The total loss value is obtained based on the local region dice loss value, the local region confidence loss value, the cross-model consistency loss value, and the differential consistency loss value.
[0016] The parameters of the segmentation network framework are adjusted based on the total loss value to obtain the target segmentation network framework;
[0017] The nasopharyngeal carcinoma medical image to be processed is input into the target segmentation network framework for image segmentation to obtain the image segmentation result.
[0018] According to certain embodiments of the first aspect of this application, the step of obtaining pseudo-label pairs by thresholding the second prediction result includes:
[0019] Compare the second prediction result with the first threshold to obtain the foreground value that determines whether the pixel belongs to the foreground or the background value that determines whether the pixel belongs to the background;
[0020] The pseudo-label pair is obtained by using an indicator function based on the foreground value or the background value.
[0021] According to certain embodiments of the first aspect of this application, the local region dice loss value obtained based on the second prediction result pair, the pseudo-label pair, and the height and width of the local region is expressed by the following formula: ; ; ;in, This represents the local region dice loss value for the nth local region in the first model. This represents the local region dice loss value for the nth local region in the second model. This represents the local dice loss value for the first model. This represents the local dice loss value for the second model. For the nth second prediction result pair corresponding to the nth local region, This refers to the nth pseudo-label pair corresponding to the nth local region, where h is the height of the local region and w is the width of the local region. is a constant term, and N is the total number of local regions.
[0022] According to certain embodiments of the first aspect of this application, the local region confidence loss value obtained based on the second prediction result pair, the pseudo-label pair, and the local region dice loss value is expressed by the following formula: ; ;in, This is the nth reweighting factor corresponding to the nth local region in the first model. This is the nth reweighting factor for the nth local region in the second model.
[0023] According to certain embodiments of the first aspect of this application, the cross-model consistency loss value obtained based on the second latent feature and the third latent feature for aligning features between the first model and the second model is expressed by the following formula: ;in, This represents the cross-model consistency loss value. The second latent feature of the first model, This is the second latent feature of the second model. This is the third latent feature of the first model. This is the third latent feature of the second model.
[0024] According to certain embodiments of the first aspect of this application, the differential consistency loss value obtained based on the third latent feature and the fourth latent feature for enabling the structural information interaction between the first model and the second model is expressed by the following formula: ; In the formula, This is the fourth latent feature of the first model. This is the fourth latent feature of the second model.
[0025] According to certain embodiments of the first aspect of this application, obtaining the total loss value based on the local region dice loss value, the local region confidence loss value, the cross-model consistency loss value, and the differential consistency loss value includes:
[0026] The first sub-loss value of the local region is obtained based on the local region dice loss value and the local region confidence loss value;
[0027] The second sub-loss value of consistency regularization is obtained based on the cross-model consistency loss value, the differentiated consistency loss value, and the weight coefficients used to balance different consistency regularization terms;
[0028] The total loss value is obtained based on the supervised loss value of the segmentation network framework, the first sub-loss value, and the second sub-loss value.
[0029] According to certain embodiments of the first aspect of this application, the total loss value obtained from the local region dice loss value, the local region confidence loss value, the cross-model consistency loss value, and the differential consistency loss value is expressed by the following formula: ; ; ; In the formula, The first sub-loss value, This is the second sub-loss value. To segment the supervised loss value of the network framework, For the i-th training epoch of the segmentation network framework, This represents the maximum number of training epochs for the segmentation network framework. A second aspect of this application provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the nasopharyngeal carcinoma image segmentation method as described above.
[0030] According to a third aspect of this application, a computer storage medium stores computer-executable instructions for performing the nasopharyngeal carcinoma image segmentation method described above.
[0031] The above scheme has at least the following beneficial effects: The first image is input into a segmentation network framework for training, resulting in a trained segmentation network framework; the second image is rotated to obtain a third image; the second and third images are input into the trained segmentation network framework, the framework's encoder outputs the second latent features of the second image and the third latent features of the third image, and the framework outputs the second prediction result pair of the second image and the third prediction result pair of the third image; thresholding is performed on the second prediction result pair to obtain pseudo-label pairs; a local region dice loss value is obtained based on the second prediction result pair, the pseudo-label pair, and the height and width of the local region; a local region confidence loss value is obtained based on the second prediction result pair, the pseudo-label pair, and the local region dice loss value; and features used to align the first and second models are obtained based on the second and third latent features. The cross-model consistency loss value is calculated; the second latent feature is rotated to obtain the fourth latent feature, and the differential consistency loss value is obtained based on the third and fourth latent features to enable the structural information of the first and second models to interact; the total loss value is obtained based on the local region dice loss value, the local region confidence loss value, the cross-model consistency loss value, and the differential consistency loss value; the parameters of the segmentation network framework are adjusted based on the total loss value to obtain the target segmentation network framework; the nasopharyngeal carcinoma medical image to be processed is input into the target segmentation network framework for image segmentation to obtain the image segmentation result; the influence of pseudo-label noise is reduced, and the local region perception ability of the network is improved by introducing local region constraints; different types of latent features between the two networks are associated to further enhance the representation ability of the model; the effectiveness and robustness of the network are improved. Attached Figure Description
[0032] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0033] Figure 1 This is a step diagram of the nasopharyngeal carcinoma image segmentation method provided in the embodiments of this application;
[0034] Figure 2 This is a sub-step diagram of step S500;
[0035] Figure 3 This is a structural diagram of the segmentation network framework;
[0036] Figure 4 This is a diagram illustrating pseudo-tags and their corresponding real tags. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0038] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0039] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0040] An embodiment of this application provides a method for nasopharyngeal carcinoma image segmentation.
[0041] Reference Figure 1 and Figure 3 Nasopharyngeal carcinoma image segmentation method, including but not limited to the following steps:
[0042] Step S100: Obtain the first image and the second image;
[0043] Step S200: Input the first image into the segmentation network framework for training to obtain the trained segmentation network framework;
[0044] Step S300: Rotate the second image to obtain the third image;
[0045] Step S400: Input the second image and the third image into the trained segmentation network framework. The encoder of the framework outputs the second latent features of the second image and the third latent features of the third image. The framework outputs the second prediction result pair of the second image and the third prediction result pair of the third image.
[0046] Step S500: Based on the second prediction result, threshold processing is performed to obtain pseudo-label pairs;
[0047] Step S600: Obtain the local region dice loss value based on the second prediction result pair, the pseudo-label pair, and the height and width of the local region;
[0048] Step S700: Obtain the local region confidence loss value based on the second prediction result pair, the pseudo-label pair, and the local region dice loss value;
[0049] Step S800: Obtain the cross-model consistency loss value for aligning features between the first model and the second model based on the second latent features and the third latent features;
[0050] Step S900: Rotate the second latent feature to obtain the fourth latent feature, and obtain the differential consistency loss value for enabling the structural information of the first model and the second model to interact based on the third latent feature and the fourth latent feature.
[0051] Step S1000: Obtain the total loss value based on the local region dice loss value, the local region confidence loss value, the cross-model consistency loss value, and the differential consistency loss value;
[0052] Step S1100: Adjust the parameters of the segmentation network framework according to the total loss value to obtain the target segmentation network framework;
[0053] Step S1200: Input the nasopharyngeal carcinoma medical image to be processed into the target segmentation network framework for image segmentation to obtain the image segmentation result.
[0054] For step S100, on the one hand, nasopharyngeal carcinoma medical images can be acquired using medical imaging equipment, and some of these images can be manually labeled to obtain a first image; on the other hand, a first image and a second image can be acquired using a large image database. The nasopharyngeal carcinoma medical images are CT images. Specifically, the first image is a labeled nasopharyngeal carcinoma medical image, and the second image is an unlabeled nasopharyngeal carcinoma medical image.
[0055] For example, if there are M labeled samples and N unlabeled samples, the labeled samples are defined as... This represents a labeled input sample. express The corresponding labels, where H and W represent the height and width of the original CT slice, respectively.
[0056] Semi-supervised learning of a nasopharyngeal carcinoma image segmentation network is achieved using labeled and unlabeled nasopharyngeal carcinoma medical images.
[0057] A total of 1355 NPC primary tumor region slices were extracted from the 2D slices along the Z-axis. During preprocessing, the HU values of all slices were cropped to […]. Within the range of 200,700, this is to increase the contrast between the primary NPC tumor and surrounding tissues. To mitigate the side effect of excessive intensity differences between different sections, a formula is used. Normalize all images and These represent the maximum and minimum intensity values of the image, respectively.
[0058] The resolution of each 2D slice is adjusted to 256×256, and the intensity of all pixels is normalized to [0,1].
[0059] For step S200, the first image is input into the segmentation network framework for training, and the trained segmentation network framework is obtained.
[0060] The segmentation network framework includes a first model and a second model, which are parallel segmentation network models with the same architecture but different parameters.
[0061] The first model contains an encoder and a decoder, using... and These represent the encoder and decoder of the first model, respectively. and These are the parameters corresponding to the encoder and decoder of the first model.
[0062] Similarly, the second model also includes an encoder and a decoder, using... and These represent the encoder and decoder of Model 2, respectively. and These are the parameters corresponding to the encoder and decoder in Model 2.
[0063] For the forward propagation of the first image, the first image The input is fed into the segmentation network framework, passes through the first model and the second model, and yields the first prediction result for the first image. and They can be defined as follows: .
[0064] The forward propagation process of the second image includes steps S300, S400, and S500.
[0065] For step S300, in the second image Before being input into the segmentation network framework, the second image is rotated through multiple rotation functions to obtain the third image, which is then processed through the i-th rotation function. get .
[0066] For step S400, the second image The encoder of the first model obtains the second latent features of the second image. The second image is processed by the encoder of the second model to obtain the second latent features of the second image. C represents the number of channels. Overall, the second latent feature of the second image can be represented as: ; .
[0067] The third image is processed by the encoder of the first model to obtain the third latent feature of the third image. The third image is encoded by the second model to obtain the third latent feature of the third image. Overall, the third latent feature of the third image can be represented as: ; .
[0068] The second image is output after being processed by the first model. The output is obtained through the second model. The second prediction result pair for the second image is defined as follows: .
[0069] Reference Figure 2 For step S500, thresholding is performed on the second prediction result to obtain pseudo-label pairs, including but not limited to the following steps:
[0070] Step S510: Compare the second prediction result with the first threshold to obtain the foreground value of the pixel that is determined to belong to the foreground or the background value of the pixel that is determined to belong to the background.
[0071] Step S520: Obtain pseudo-label pairs based on foreground or background values using an indicator function.
[0072] Reference Figure 4 The left side shows the pseudo-label, and the right side shows the real label corresponding to the pseudo-label. The boxed area in the pseudo-label is the noise area.
[0073] Create pseudo tags and ,have ; .in, It is an indicator function; it outputs 1 if the condition is met, and 0 if the condition is not met. T is the threshold used to determine whether a pixel belongs to the foreground or background.
[0074] Considering the location characteristics of the segmented target, a local region constraint is introduced into the pseudo-supervision loss. Specifically, this loss includes a local region dice loss value and a local region confidence loss value. The local region dice loss value is called the local region Dice Loss, and the local region confidence loss value is called the local region Confidence Loss.
[0075] In step S600, the pseudo-labels contain noise, which has a negative impact on the network's learning. Directly using the Dice Loss calculated from the noisy pseudo-labels to optimize the model would introduce potential errors into the CPS network, affecting segmentation performance. Considering that primary NPC tumors are typically located in the center of CT slices, local computation is used instead of standard global computation to calculate the Dice Loss. This incorporates more accurate information in a semi-supervised environment and focuses attention on the central region, which includes both the overall foreground region and a portion of the background region.
[0076] The local region dice loss value is obtained based on the second prediction result pair, the pseudo-label pair, and the height and width of the local region, and is expressed by the following formula: ; ; ;in, This represents the local region dice loss value for the nth local region in the first model. This represents the local region dice loss value for the nth local region in the second model. This represents the local dice loss value for the first model. This represents the local dice loss value for the second model. For the nth second prediction result pair corresponding to the nth local region, This refers to the nth pseudo-label pair corresponding to the nth local region, where N is the total number of local regions.
[0077] h is the height of the local region cropped from the center of the original slice, equal to... .
[0078] w is the width of the local region cropped from the center of the original slice, equal to... .
[0079] S is a hyperparameter that controls the area of a local region, and its value is greater than 2.
[0080] As a constant term, it is set to This is used to ensure data stability.
[0081] For step S700, the BCE loss is typically used for cross-pixel prediction tasks. However, for CPS learning, the predicted target (i.e., the output of other models) may be unreliable and noisy, thus degrading segmentation performance. Reweighting factors are constructed using local region Dice, and then multiplied with the BCE loss.
[0082] The local region confidence loss value is obtained based on the second prediction result pair, the pseudo-label pair, and the local region dice loss value, and is expressed by the following formula: ; ;in, This is the nth reweighting factor corresponding to the nth local region in the first model. This is the nth reweighting factor for the nth local region in the second model.
[0083] A higher local region dice value indicates a greater overlap between the local region prediction and the pseudo-label, meaning a higher certainty in the segmentation result. Therefore, the confidence level of the pseudo-label is proportional to its contribution to the BCE loss, ensuring more reliable information flow to the network.
[0084] In summary, based on the local region dice loss value and the local region confidence loss value, the first sub-loss value of the local region is obtained. Therefore, the overall CPS loss under the local region constraint is expressed as: .
[0085] Compared to ordinary CPS loss, it has the advantage of focusing more on local areas and reducing the impact of noise signals. The reweighting mechanism can emphasize the reliability of prediction.
[0086] Compared to global Dice Loss, local Dice Loss produces larger gradients for points within the local boundary, which increases the weight of the loss for each point within the local boundary and promotes the learning of the local context.
[0087] The local Dice Loss equation can be rewritten as: ; Describes a local region of Dice Loss, where K equals... .
[0088] Compared to the normalized prediction Satisfy the following gradient:
[0089] ;
[0090] in, These are the predicted points and related labels within the local area.
[0091] Similarly, relative to prediction The gradient of the global Dice Loss is:
[0092] ;
[0093] in, These are the predicted points and their corresponding labels within the global region. Compare big. and They are equal because all foreground pixels are contained within the local boundary. (Note: The original text contains some inconsistencies and unclear formatting. A more accurate translation would require the full context.) That is .because Very small, 2 It can be labeled as 2C, that is, 2. .
[0094] when hour, . and The differences are as follows: .
[0095] definition as follows: .
[0096] when hour, 0. The molecule is greater than 0. Clearly, The denominator is also greater than 0. When hour, .
[0097] when hour, . The differences are: .
[0098] All foreground pixels are contained within the local boundary. .because , Greater than ,so The molecules are larger. Clearly, The denominator is greater than , therefore when hour, .
[0099] In summary, local region Dice Loss produces larger gradients for points within the local boundary than global region Dice Loss, which makes the network pay more attention to local regions.
[0100] For step S800, the cross-model consistency loss value for aligning features between the first model and the second model is obtained based on the second latent features and the third latent features, expressed by the following formula: ;in, This represents the cross-model consistency loss value. The second latent feature of the first model, This is the second latent feature of the second model. This is the third latent feature of the first model. This is the third latent feature of the second model.
[0101] Aligning the untransformed (or transformed) features of two models can enrich the learned representations of each network.
[0102] For step S900, since convolution is typically not rotationally equivalent, the untransformed features and the transformed features are inconsistent. Unlike the untransformed and transformed features, the transformed differential features contain structural information about the segmentation target. Difference consistency is used to promote the consistency of the transformed differential features, which helps the network learn structural knowledge.
[0103] The fourth latent feature is obtained by rotating the second latent feature using a rotation function. and .
[0104] pass and Four different transformation differential features were established, including and .in, Transform the difference features for a single model. and This involves transforming difference features across models. They are represented as: .
[0105] Based on the third and fourth latent features, the differential consistency loss value used to enable the interaction of structural information between the first and second models is obtained, expressed by the following formula: .
[0106] The purpose of differentiated consistency is to and They are linked together, enabling the structural information of each network to interact.
[0107] The second sub-loss value of consistency regularization, derived from the cross-model consistency loss value, the differentiated consistency loss value, and the weighting coefficients used to balance the different consistency regularization terms, is expressed by the following formula: .in, and To balance the weights of different consistency regularization terms, Set to 0.05, Set to 0.03. Latent features contain rich semantic information, which can enhance the network's representational power by minimizing the second sub-loss value, thus improving the robustness of image segmentation.
[0108] The total loss value is obtained by considering the supervised loss value, the first sub-loss value, and the second sub-loss value of the segmentation network framework, and is expressed by the following formula: In the formula, The supervised loss value for segmenting the network framework is a weighted sum of the BCE loss and the global region Dice Loss. It uses the hyperparameters of the time-varying Gaussian preheating function. , For the i-th training epoch of the segmentation network framework, This represents the maximum number of training epochs for the segmentation network framework.
[0109] For step S1100, the parameters of the segmentation network framework are adjusted according to the total loss value to obtain the target segmentation network framework.
[0110] In step S1200, the nasopharyngeal carcinoma medical image to be processed is input into the target segmentation network framework for image segmentation to obtain the image segmentation result.
[0111] The semi-supervised segmentation method was implemented on the PyTorch platform and an NVIDIA 2080Ti. In each network, the kernel size and stride of the convolutional layers were set to 3 and 1, respectively, and downsampling and upsampling were performed using max-pooling layers and deconvolutional layers, respectively. The optimizer for both models was Adam, where... 1 and The values were set to 0.9 and 0.999. Furthermore, the initial learning rate was 0.0001, the weight decay was 0.0003, and a cosine annealingl learning rate scheduler was used, with a minimum learning rate of 0.00001. The batch size was set to 16, consisting of 8 labeled samples and 8 unlabeled samples, and the model was trained for 500 epochs. During the inference phase, the average of the outputs from different models was used as the ensemble prediction to further improve the robustness of the segmentation results.
[0112] Five commonly used metrics were used to assess primary NPC tumor segmentation: Dice similarity coefficient (DSC), Jaccard Index (JI), Recall (Re), Precision (Pre), and Hausdorff Distance (HD). The formulas for DSC, JI, Re, Pre, and HD are as follows: ; ; ; ; .
[0113] Tested using the internal NPC dataset, the public NPC dataset, and the PROMISE12 dataset.
[0114] The test results for the internal NPC dataset are shown in Table 1.
[0115] Table 1. Comparison of Test Results for the Internal NPC Dataset
[0116]
[0117] The test results for the publicly available NPC dataset are shown in Table 2.
[0118] Table 2 Comparison of Test Results for Publicly Available NPC Datasets
[0119]
[0120] The test results for the PROMISE12 dataset are shown in Table 3.
[0121] Table 3. Comparison of test results for the PROMISE12 dataset.
[0122]
[0123] Therefore, it can be seen that the proposed nasopharyngeal carcinoma image segmentation method has good feature representation ability and good robustness.
[0124] An embodiment of this application provides an electronic device. The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the nasopharyngeal carcinoma image segmentation method described above.
[0125] This electronic device can be any smart terminal, including computers.
[0126] In general, for the hardware structure of electronic devices, the processor can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, to execute relevant programs and implement the technical solutions provided in the embodiments of this application.
[0127] The memory can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory and is called and executed by the processor.
[0128] Input / output interfaces are used to implement information input and output.
[0129] The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0130] The bus transmits information between various components of a device, such as the processor, memory, input / output interfaces, and communication interfaces. The processor, memory, input / output interfaces, and communication interfaces communicate with each other within the device via the bus.
[0131] Embodiments of this application provide a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions for performing the nasopharyngeal carcinoma image segmentation method described above.
[0132] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium. In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0133] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0134] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0135] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0136] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0137] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed between each other may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms. Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
[0138] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method for nasopharyngeal carcinoma image segmentation, characterized in that, include: Acquire a first image and a second image, wherein the first image is a labeled medical image of nasopharyngeal carcinoma and the second image is an unlabeled medical image of nasopharyngeal carcinoma; The first image is input into the segmentation network framework for training to obtain the trained segmentation network framework. The segmentation network framework includes a first model and a second model. The first model and the second model are parallel segmentation network models with the same architecture and different parameters. The third image is obtained by rotating the second image; The second image and the third image are input into a trained segmentation network framework. The encoder of the framework outputs the second latent feature of the second image and the third latent feature of the third image. The framework outputs the second prediction result pair of the second image and the third prediction result pair of the third image. Based on the second prediction result, threshold processing is performed to obtain pseudo-label pairs; The local region dice loss value is obtained based on the second prediction result pair, the pseudo-label pair, and the height and width of the local region. Based on the second prediction result pair, the pseudo-label pair, and the local region dice loss value, the local region confidence loss value is obtained; Based on the second latent feature and the third latent feature, a cross-model consistency loss value is obtained for aligning features between the first model and the second model; The second latent feature is rotated to obtain the fourth latent feature, and a differential consistency loss value is obtained based on the third latent feature and the fourth latent feature to enable the structural information of the first model and the second model to interact. The total loss value is obtained based on the local region dice loss value, the local region confidence loss value, the cross-model consistency loss value, and the differential consistency loss value. The parameters of the segmentation network framework are adjusted based on the total loss value to obtain the target segmentation network framework; The nasopharyngeal carcinoma medical image to be processed is input into the target segmentation network framework for image segmentation to obtain the image segmentation result; The local region dice loss value is obtained based on the second prediction result pair, the pseudo-label pair, and the height and width of the local region, and is expressed by the following formula: ; ; ;in, This represents the local region dice loss value for the nth local region in the first model. This represents the local region dice loss value for the nth local region in the second model. This represents the local dice loss value for the first model. This represents the local dice loss value for the second model. For the nth second prediction result pair corresponding to the nth local region, This refers to the nth pseudo-label pair corresponding to the nth local region, where h is the height of the local region and w is the width of the local region. Here, N is a constant term, and N is the total number of local regions. The local region confidence loss value, obtained based on the second prediction result pair, the pseudo-label pair, and the local region dice loss value, is expressed by the following formula: ; ;in, This is the nth reweighting factor corresponding to the nth local region in the first model. This is the nth reweighting factor corresponding to the nth local region in the second model; The cross-model consistency loss value obtained based on the second latent feature and the third latent feature for aligning features between the first model and the second model is expressed by the following formula: ;in, This represents the cross-model consistency loss value. The second latent feature of the first model, This is the second latent feature of the second model. This is the third latent feature of the first model. This is the third latent feature of the second model; The differential consistency loss value obtained based on the third latent feature and the fourth latent feature to enable the interaction of structural information between the first model and the second model is expressed by the following formula: ; In the formula, This is the fourth latent feature of the first model. This is the fourth latent feature of the second model; The process of obtaining the total loss value based on the local region dice loss value, the local region confidence loss value, the cross-model consistency loss value, and the differential consistency loss value includes: The first sub-loss value of the local region is obtained based on the local region dice loss value and the local region confidence loss value; The second sub-loss value of consistency regularization is obtained based on the cross-model consistency loss value, the differentiated consistency loss value, and the weight coefficients used to balance different consistency regularization terms; The total loss value is obtained based on the supervised loss value of the segmentation network framework, the first sub-loss value, and the second sub-loss value; The total loss value, obtained from the local region dice loss value, the local region confidence loss value, the cross-model consistency loss value, and the differential consistency loss value, is expressed by the following formula: ; ; ; In the formula, The first sub-loss value, This is the second sub-loss value. To segment the supervised loss value of the network framework, For the i-th training epoch of the segmentation network framework, This represents the maximum number of training epochs for the segmentation network framework.
2. The nasopharyngeal carcinoma image segmentation method according to claim 1, characterized in that, The step of obtaining pseudo-label pairs by thresholding based on the second prediction result includes: Compare the second prediction result with the first threshold to obtain the foreground value that determines whether the pixel belongs to the foreground or the background value that determines whether the pixel belongs to the background; The pseudo-label pair is obtained by using an indicator function based on the foreground value or the background value.
3. An electronic device, characterized in that, include: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the nasopharyngeal carcinoma image segmentation method as described in any one of claims 1 to 2.
4. A computer storage medium, characterized in that, The device stores computer-executable instructions for performing the nasopharyngeal carcinoma image segmentation method as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Semi-supervised medical image segmentation method and device based on dual-model interactive learning
CN114332135A