Method, device and equipment for predicting gas and perforation location in medical images

CN121304606BActive Publication Date: 2026-08-21NEUSOFT MEDICAL SYST CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511472450.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-08-21
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

然而,传统依赖人工判读影像来检测游离气体的方法仍然存在效率低下和医疗资源消耗大的问题

Benefits of technology

[0017]The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121304606B_ABST
    Figure CN121304606B_ABST
Patent Text Reader

Abstract

The application discloses a method, device and equipment for predicting gas and perforation position in medical images. The method comprises: obtaining a medical image, performing image segmentation on the medical image to obtain an organ segmentation result; performing reset processing on pixels corresponding to different organs in the medical image based on the organ segmentation result to obtain an organ identification image; performing distance field calculation on the medical image based on the organ segmentation result to obtain distance field images corresponding to different organs, wherein the distance field images represent distance relationships between pixel points and organs in the medical image; and performing prediction of gas and perforation position based on the organ identification image and the distance field images to obtain gas prediction results and perforation position prediction results. The method can simultaneously identify free gas and perforation organs causing the gas in the medical image, reduces false positive detection through pixel reset and distance field calculation of the organ segmentation result, and thus improves the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and in particular to a method, apparatus, and device for predicting gas and perforation locations in medical images. Background Technology

[0002] Gastrointestinal perforation is usually difficult to observe directly through medical imaging in clinical practice because the perforation orifice is often extremely small. Free gas in the abdominal cavity caused by the perforation can serve as an important indirect diagnostic criterion.

[0003] In recent years, significant progress has been made in the detection of pneumoperitoneum (free gas in the abdominal cavity) through advancements in imaging technology, integration of multimodal strategies, and intelligent applications. Most hospitals primarily optimize diagnostic efficiency through traditional X-ray examinations, including upright chest X-rays, horizontal plain films, and characteristic signs (such as the bilateral wall sign and falciform ligament visualization). However, the traditional method of detecting free gas by manually interpreting images still suffers from low efficiency and high consumption of medical resources. Summary of the Invention

[0004] In view of the above problems, this application provides a method for predicting gas and perforation location in medical images, which can simultaneously identify free gas and perforating organs that cause gas generation in medical images. By resetting pixels and calculating distance fields of organ segmentation results, false positives are reduced, thereby improving the accuracy of prediction.

[0005] In a first aspect, this application provides a method for predicting gas and perforation locations in medical images. The method includes: acquiring medical images and performing image segmentation on the medical images to obtain organ segmentation results; based on the organ segmentation results, resetting the pixels corresponding to different organs in the medical images to obtain organ identification images; based on the organ segmentation results, performing distance field calculation on the medical images to obtain distance field images corresponding to different organs, wherein the distance field images represent the distance relationship between pixels in the medical images and organs; and based on the organ identification images and distance field images, predicting the gas and perforation locations to obtain gas prediction results and perforation location prediction results.

[0006] In the technical solution of this application embodiment, medical images are first acquired and then segmented to obtain organ segmentation results. Based on the organ segmentation results, the pixels corresponding to different organs in the medical images are reset to obtain organ identification images. Based on the organ segmentation results, distance field calculation is performed on the medical images to obtain distance field images corresponding to different organs. Finally, based on the organ identification images and distance field images, gas and perforation locations are predicted to obtain gas prediction results and perforation location prediction results. This method can simultaneously identify free gas and perforating organs that cause gas generation in medical images. By resetting pixels and calculating distance field in the organ segmentation results, false positives are reduced, thereby improving the accuracy of prediction.

[0007] In some embodiments, the gas prediction result includes a gas prediction code; the perforation location prediction result includes a perforated organ identification result; the prediction of gas and perforation location based on the organ identification image and the distance field image includes: combining the organ identification image and the distance field image into channels to obtain a multi-channel image; performing gas pixel segmentation prediction on the multi-channel image to obtain a gas prediction code; and performing organ perforation classification and identification on the multi-channel image to obtain a perforated organ identification result; wherein, the gas prediction code indicates whether there is diffused gas outside the organ, and the perforated organ identification result indicates the organ where the gas diffuses.

[0008] In some embodiments, based on the organ segmentation results, the pixels corresponding to different organs in the medical image are reset to obtain organ identification images, including: calculating the average and absolute values ​​of the original pixel grayscale values ​​corresponding to different organs in the medical image to obtain reset pixel grayscale values; and resetting the original pixel grayscale values ​​corresponding to different organs in the medical image based on the reset pixel grayscale values ​​to obtain organ identification images.

[0009] In some embodiments, distance field calculation is performed on medical images based on organ segmentation results, including: determining whether a pixel in the medical image is inside or outside an organ based on the organ segmentation results; when a pixel in the medical image is inside an organ, determining a preset distance value as the first distance field data of the organ; when a pixel in the medical image is outside an organ, determining the shortest distance between the pixel and the organ boundary as the second distance field data of the organ; and obtaining a distance field image based on the first distance field data and the second distance field data.

[0010] In some embodiments, obtaining a distance field image based on first distance field data and second distance field data includes: normalizing the first distance field data and second distance field data to obtain normalized first distance field data and normalized second distance field data; and mapping the normalized first distance field data and normalized second distance field data to grayscale values ​​to obtain a distance field image.

[0011] In some embodiments, the organ identification image and the distance field image are combined to obtain a multi-channel image, including: performing feature extraction by downsampling and channel amplification on the organ identification image according to the image encoder, and outputting organ identification image features; performing feature extraction by downsampling and channel amplification on the distance field image according to the distance encoder, and outputting distance field image features; and performing weight allocation on the organ identification image features and the distance field image features based on an attention network to obtain a multi-channel image.

[0012] In some embodiments, based on an attention network, weights are assigned to organ identification image features and distance field image features to obtain a multi-channel image, including: inputting organ identification image features and distance field image features into an attention network for linear transformation to obtain an organ identification feature matrix and a distance field feature matrix; performing attention-weighted summation on the organ identification feature matrix and the distance field feature matrix to output weighted features; and performing upsampling and channel reduction feature extraction on the weighted features according to a decoder to output a multi-channel image.

[0013] In some embodiments, the method further includes writing the gas prediction results and the perforation location prediction results into a DICOM file corresponding to the medical image for associated storage.

[0014] On the other hand, this application provides a device for predicting gas and perforation locations in medical images. The device includes: a segmentation module for acquiring medical images and performing image segmentation on the medical images to obtain organ segmentation results; a reset module for resetting pixels corresponding to different organs in the medical images based on the organ segmentation results to obtain organ identification images; a calculation module for performing distance field calculation on the medical images based on the organ segmentation results to obtain distance field images corresponding to different organs, wherein the distance field images represent the distance relationship between pixels in the medical images and organs; and a prediction module for predicting gas and perforation locations based on the organ identification images and distance field images to obtain gas prediction results and perforation location prediction results.

[0015] On the other hand, this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method of any of the above embodiments.

[0016] On the other hand, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method of any of the above embodiments.

[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiments below. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a method for predicting gas and perforation locations in medical images according to an embodiment of this application is shown. Figure 2 This application illustrates a system for predicting gas and perforation locations in medical images according to an embodiment of the present application; Figure 3 A schematic diagram of organ segmentation results according to an embodiment of this application is shown; Figure 4 A schematic diagram of the image processing results of an embodiment of this application is shown; Figure 5 A schematic diagram of the distance field calculation results according to an embodiment of this application is shown; Figure 6 A schematic diagram of a multi-task model according to an embodiment of this application is shown; Figure 7 A block diagram of a device for predicting gas and perforation location in medical images according to an embodiment of this application is shown; Figure 8 A schematic diagram of an electronic device according to an embodiment of this application is shown. Detailed Implementation

[0019] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0021] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0024] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0025] In the description of the embodiments of this application, the technical terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of this application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.

[0026] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0027] Gastrointestinal perforation is usually difficult to observe directly through medical imaging in clinical practice because the perforation orifice is often extremely small. Free gas in the abdominal cavity caused by the perforation can serve as an important indirect diagnostic criterion.

[0028] In recent years, significant progress has been made in the detection of pneumoperitoneum (free gas in the abdominal cavity) through advancements in imaging technology, integration of multimodal strategies, and intelligent applications. Most hospitals primarily optimize diagnostic efficiency through traditional X-ray examinations, including upright chest X-rays, horizontal plain films, and characteristic signs (such as the bilateral wall sign and falciform ligament visualization). However, the traditional method of detecting free gas by manually interpreting images still suffers from low efficiency and high consumption of medical resources.

[0029] Furthermore, CT, with its high sensitivity (capable of detecting less than 1 mL of gas) and multiplanar reconstruction technology, has become a core tool for accurately locating perforation sites and differentiating complex cases (such as interstitial colon syndrome), significantly reducing the misdiagnosis rate. Ultrasound technology, with its contrast-enhanced ultrasound (CEUS) dynamic imaging and radiation-free advantages, demonstrates its value in fistula localization in special populations (children, pregnant women) and peritoneal dialysis patients. While artificial intelligence is not yet widely applied, its potential in automatically labeling free gas and developing intelligent early warning systems has attracted considerable attention, with the prospect of shortening manual image interpretation time and optimizing decision-making processes through deep learning.

[0030] An image recognition method identifies whether a gas in a medical image is a free gas by determining a target region containing gas and a region of interest associated with that target region. Based on the images of the target region and the region of interest, and a classification model, the method determines whether the gas in the target region is a free gas. This method emphasizes the relationship between the gas and the associated organs, i.e., based on information about the gas within the body and the associated organs, it improves the accuracy of gas identification. However, while this method focuses on using the relationship between free gas and tissues / organs to train the model and enhance the accuracy of gas identification (i.e., reducing the number of false positives for free gas), it cannot provide the specific cause of free gas generation or identify the perforating organs that cause gas generation.

[0031] In view of this, this application proposes a method for predicting gas and perforation location in medical images, which can simultaneously identify free gas and perforating organs that cause gas generation in medical images. By resetting pixels and calculating distance fields of organ segmentation results, false positives are reduced, thereby improving the accuracy of prediction.

[0032] In the technical solution of this application embodiment, medical images are first acquired and then segmented to obtain organ segmentation results. Based on the organ segmentation results, the pixels corresponding to different organs in the medical images are reset to obtain organ identification images. Based on the organ segmentation results, distance field calculation is performed on the medical images to obtain distance field images corresponding to different organs. Finally, based on the organ identification images and distance field images, gas and perforation locations are predicted to obtain gas prediction results and perforation location prediction results. This method can simultaneously identify free gas and perforating organs that cause gas generation in medical images. By resetting pixels and calculating distance field in the organ segmentation results, false positives are reduced, thereby improving the accuracy of prediction.

[0033] Figure 1 A flowchart illustrating a method for predicting gas and perforation location in medical images according to an embodiment of this application is shown.

[0034] like Figure 1 As shown, the method 100 for predicting gas and perforation location in medical images provided in this application includes steps S110 to S140.

[0035] Step S110: Acquire medical images and perform image segmentation on the medical images to obtain organ segmentation results.

[0036] For example, medical images may include abdominal CT images. For instance, the acquired abdominal CT images may be segmented to segment all possible hollow organs in the trunk portion of the image, resulting in organ segmentation results such as lungs, heart, liver, spleen, small and large intestines, pancreas, kidneys, stomach, etc.

[0037] Step S120: Based on the organ segmentation results, the pixels corresponding to different organs in the medical image are reset to obtain organ identification images.

[0038] For example, image preprocessing can be performed by re-perpending the pixel gray values ​​of the corresponding organ positions in the original medical image based on the organ segmentation results to obtain the reset pixel gray values ​​of different organs. That is, the prior knowledge in the image is preprocessed to mark the known organs and obtain organ identification images. Cavities in the organs can be removed to reduce false positives.

[0039] Step S130: Based on the organ segmentation results, perform distance field calculation on the medical images to obtain distance field images corresponding to different organs, wherein the distance field image represents the distance relationship between pixels in the medical images and organs.

[0040] For example, the distance from all pixels in a medical image to a segmentation surface (i.e., organ boundary) of a certain organ can be calculated based on the organ segmentation results. For instance, the shortest distance from a pixel to the organ boundary can be calculated, and the calculated distance values ​​can be mapped to grayscale images to obtain distance field images of each organ.

[0041] Step S140: Based on the organ identification image and the distance field image, predict the gas and perforation location to obtain the gas prediction result and the perforation location prediction result.

[0042] For example, organ identification images and distance field images of the obtained medical images can be fused together, and gas and perforation locations can be predicted based on the fused images. That is, free gas in the abdominal cavity and perforating organs that cause free gas are predicted to obtain gas prediction results and perforation location prediction results, thereby detecting free gas between tissues and organs and providing clues about perforating organs.

[0043] In the technical solution of this application embodiment, medical images are first acquired and then segmented to obtain organ segmentation results. Based on the organ segmentation results, the pixels corresponding to different organs in the medical images are reset to obtain organ identification images. Based on the organ segmentation results, distance field calculation is performed on the medical images to obtain distance field images corresponding to different organs. Finally, based on the organ identification images and distance field images, gas and perforation locations are predicted to obtain gas prediction results and perforation location prediction results. This method can simultaneously identify free gas and perforating organs that cause gas generation in medical images. By resetting pixels and calculating distance field in the organ segmentation results, false positives are reduced, thereby improving the accuracy of prediction.

[0044] Figure 2 This application illustrates a system for predicting gas and perforation locations in medical images, based on an embodiment of the present application.

[0045] like Figure 2 As shown, in one example, the method of this application can be implemented based on a prediction system for gas and perforation location in medical images. The system includes an organ segmentation module, an image processing module, a distance field calculation module, a multi-task model module, a free gas labeling module, and a perforated organ classification module. Specifically, after segmenting the acquired medical images into organs, pixel-reset image processing and distance field calculation are performed on different organs in the medical images according to the organ segmentation results, thereby obtaining organ identification images and distance field images. Based on this, the (free) gas and perforation location are predicted through a multi-task model, obtaining the detection results of free gas (gas prediction results) and the corresponding perforated organs (perforation location prediction results). The following is a detailed explanation.

[0046] Figure 3A schematic diagram of organ segmentation results according to an embodiment of this application is shown.

[0047] like Figure 3 As shown, organ segmentation is performed on medical CT images of gastrointestinal perforation. Different colors in the image correspond to different organs after segmentation. Organ segmentation can be based on neural network models. For example, the nnUnet (medical image segmentation) model can be trained using open-source multi-organ segmentation data. Other network model frameworks can also be used to improve the accuracy of organ segmentation results. At the same time, an erosion operation is performed on the organ segmentation mask to reduce the probability of free gas on the organ boundary being separated into the organ interior, thereby improving the detection accuracy of free gas.

[0048] Figure 4 A schematic diagram of the image processing results of an embodiment of this application is shown.

[0049] For example, such as Figure 4 As shown, based on the organ segmentation results, the pixels corresponding to different organs in the medical image are reset to obtain organ identification images. For example, firstly, the average and absolute values ​​of the original pixel gray values ​​corresponding to different organs in the medical image are calculated to obtain the reset pixel gray values; then, based on the reset pixel gray values, the original pixel gray values ​​corresponding to different organs in the medical image are reset to obtain organ identification images.

[0050] Specifically, please refer to Figure 4 For medical images after organ segmentation, different labels are assigned to different organs in the image, and the original pixel grayscale values ​​corresponding to the organs are reset in image preprocessing. The reset grayscale values ​​are all greater than 0 to distinguish them from free gas. For example, based on experience, the grayscale values ​​in the original organ image (i.e., Figure 3 The average and absolute values ​​of the pixel colors of each organ in the image are calculated to obtain new gray values. By resetting the gray values, the organ segmentation results can be smoother and false positives can be reduced, thus obtaining organ identification images.

[0051] In the technical solution of this application embodiment, the average and absolute values ​​of the original pixel gray values ​​corresponding to different organs in the medical image are first calculated to obtain the reset pixel gray values. Then, the original pixel gray values ​​corresponding to different organs in the medical image are reset based on the reset pixel gray values ​​to obtain organ identification images, thereby providing additional information for the prediction of free gas and perforated organs, reducing the detection of false positives and improving the recognition accuracy.

[0052] For example, based on the organ segmentation results, distance field calculation is performed on the medical image. For instance, firstly, based on the organ segmentation results, it is determined whether the pixel in the medical image is inside or outside the organ; then, if the pixel in the medical image is inside the organ, a preset distance value is determined as the first distance field data of the organ; if the pixel in the medical image is outside the organ, the shortest distance between the pixel and the organ boundary is determined as the second distance field data of the organ; and then, based on the first distance field data and the second distance field data, a distance field image is obtained.

[0053] Specifically, a distance field image is obtained based on the first distance field data and the second distance field data. For example, firstly, the first distance field data and the second distance field data are normalized to obtain normalized first distance field data and normalized second distance field data; then, grayscale values ​​are mapped to the normalized first distance field data and the normalized second distance field data to obtain the distance field image.

[0054] Figure 5 A schematic diagram of the distance field calculation results according to an embodiment of this application is shown.

[0055] For example, such as Figure 5 The image shows the distance field image of a certain organ. The white gradient area represents the organ boundary, and the black area represents the organ interior. Based on the organ segmentation results, distance field calculations can be performed on some or all organs. For example, based on experience, organs near areas with a high probability of free gas generation can be selected for distance field calculations, thereby improving prediction results. For example, distance field calculations can be performed on the liver, spleen, stomach, and large and small intestines. If the calculated pixel is inside the organ, the distance is 0 (preset distance value). If the calculated pixel is outside the organ, the shortest distance between the pixel and the organ boundary is calculated. For example, the shortest distance from the point to the organ surface in the vertical direction can be calculated (second distance field data). The calculated distance field data can be normalized according to the image size, that is, the first and second distance field data are normalized to reduce data errors and enhance organ boundary information. Then, grayscale mapping is performed on different distance values. The mapping method is not limited here, thus obtaining the distance field image. Therefore, based on the organ segmentation results, the distance field images of each organ are calculated, which further provides prior knowledge of organ location, enhances organ boundary information, reduces false positives, and improves the accuracy of prediction and recognition results.

[0056] In the technical solution of this application embodiment, the location of a pixel in a medical image is determined to be inside or outside the organ based on the organ segmentation result. Then, when the pixel in the medical image is inside the organ, a preset distance value is determined as the first distance field data of the organ. When the pixel in the medical image is outside the organ, the shortest distance between the pixel and the organ boundary is determined as the second distance field data of the organ. The first distance field data and the second distance field data are then normalized and grayscale value mapped to obtain a distance field image. This further provides prior knowledge of the organ location for the prediction of gas and perforated organs, reduces the detection of false positives, and improves the accuracy of prediction and recognition.

[0057] In one example, based on the obtained organ identification image and distance field image, a multi-task model can be used to segment the free gas in the image at the pixel dimension, and to classify which organ the perforation belongs to and whether there is a gastrointestinal perforation in the overall image, thereby predicting the gas and perforation location, and obtaining the gas prediction result and the specific reason for the gas generation, i.e. the perforation location prediction result, which will be explained in detail below.

[0058] Figure 6 A schematic diagram of a multitasking model according to an embodiment of this application is shown.

[0059] For example, the gas prediction result includes a gas prediction code; the perforation location prediction result includes a perforated organ identification result; based on the organ identification image and the distance field image, the gas and perforation location are predicted. For example, firstly, the organ identification image and the distance field image are combined into channels to obtain a multi-channel image; then, gas pixel segmentation prediction is performed on the multi-channel image to obtain a gas prediction code; and organ perforation classification and identification are performed on the multi-channel image to obtain a perforated organ identification result; wherein, the gas prediction code indicates whether there is diffused gas outside the organ, and the perforated organ identification result indicates the organ where the gas diffuses.

[0060] For example, such as Figure 6 As shown, the organ identification image and the distance field image are combined by channels to obtain a multi-channel image. For example, firstly, based on the image encoder, the organ identification image is downsampled and the channel is amplified to extract features, and the output is the organ identification image features; then, based on the distance encoder, the distance field image is downsampled and the channel is amplified to extract features, and the output is the distance field image features; then, based on the attention network, the organ identification image features and the distance field image features are weighted to obtain the multi-channel image.

[0061] Specifically, please refer to Figure 6Preprocessed image data (organ-identified images) and distance field data (distance field images) can be input into the multi-task model using channel fusion. The image data (organ-identified images) can be input into the image encoder, which can use a traditional CNN architecture neural network, extracting features using a layer combination of conv+bn+relu+pooling (convolutional layers + normalization layers + activation functions + pooling layers). For example, the input image (organ identifier image) is processed three times by an image encoder for feature extraction. Each time the image passes through the encoder, the feature size is downsampled by a factor of 2. Finally, the feature size is downsampled by a factor of 8 while the number of channels is increased to 128, and the output is the organ identifier image feature. The distance field data is input into a distance encoder network, which uses the same CNN architecture, combining conv+bn+relu+pooling layers. For example, the distance field image is processed three times by the distance encoder for feature extraction. The feature size is downsampled by a factor of 8 while the number of channels is increased to 128, and the output is the distance field image feature. This reduces the feature size while increasing the number of channels, enhancing the depth of feature extraction and effectively capturing multi-scale features in the organ identifier image and the distance field image. Then, based on an attention network, weights are assigned to the organ identifier image features and the distance field image features to obtain a multi-channel image, thereby improving the accuracy of the multi-task model and the prediction precision.

[0062] In the technical solution of this application embodiment, the organ identification image is downsampled and channel-amplified for feature extraction according to the image encoder, and the organ identification image features are output. Then, the distance field image is downsampled and channel-amplified for feature extraction according to the distance encoder, and the distance field image features are output. Then, based on the attention network, the organ identification image features and the distance field image features are weighted to obtain a multi-channel image, thereby enhancing the depth of feature extraction and effectively capturing multi-scale features in the organ identification image and the distance field image, so as to improve the accuracy of the multi-task model and improve the accuracy of gas and perforation location prediction.

[0063] For example, based on an attention network, weights are assigned to organ identification image features and distance field image features to obtain a multi-channel image. For instance, firstly, the organ identification image features and distance field image features are input into the attention network for linear transformation to obtain organ identification feature matrix and distance field feature matrix; then, the organ identification feature matrix and distance field feature matrix are summed by attention weights to output weighted features; then, according to the decoder, the weighted features are upsampled and feature extraction with channel reduction to output a multi-channel image.

[0064] Specifically, please refer to Figure 6The outputs of the distance encoder and the image encoder, namely the organ identification image features and the distance field image features, are input into the transformer attention network. Based on the VIT architecture, the organ identification image features are input into a multi-layer transformer network (e.g., 3 layers) for self-attention calculation, resulting in three feature matrices (organ identification feature matrices): Q (query), KI (key), and V (value). The distance field image features are processed through a multi-layer transformer network (e.g., 3 layers) to obtain KD features (key, i.e., the distance field feature matrix). The feature matrices obtained above are weighted and summed based on the attention weights to redistribute the weights and enhance the expressive power of the model. The calculation process is as shown in formula (1): (1) Where attention represents the attention weights, Q represents the query feature matrix of the organ identifier feature matrix, KI represents the key feature matrix of the organ identifier feature matrix, KD represents the key feature matrix of the distance field feature matrix, V represents the value feature matrix of the organ identifier feature matrix, and softmax represents the activation function. The dimension of the key vector of the organ identifier feature matrix.

[0065] Based on this, the weighted features obtained from the output are input into the Decoder network. This network consists of a CNN architecture, which extracts features using a combination of convolutional layers, normalization layers, activation functions, and upsampling layers. For example, the weighted features are extracted three times by the decoder, upsampling the feature size by 8 times while reducing the number of channels to 8. This effectively captures multi-scale features in the image and outputs a multi-channel image combining organ identification images and distance field images.

[0066] For example, a multi-channel image can be simultaneously input into a segmentation network to segment free gas at the pixel level for gas pixel segmentation prediction, and into a classification network to classify which organ perforation the image belongs to and whether there is gastrointestinal perforation, thus performing organ perforation classification and recognition. The segmentation network can, for example, consist of a two-layer convolutional layer + normalization layer + activation function (reLU) with one output channel. The classification network can, for example, consist of a two-layer convolutional layer + normalization layer + activation function (reLU) combined with global pooling, with two output channels.

[0067] It should be noted that this model requires training with labeled data. Diagnostic medical image data can be used as sample data, a free gas segmentation mask as the label for the gas pixel segmentation task, and etiological information (such as specific perforating organ information) extracted from patient diagnostic reports as the label for the perforating organ classification and recognition task. During training, the segmentation network uses DICE loss (similarity coefficient loss), the classification network uses cross-entropy loss, and the optimization algorithm uses Adam (an adaptive learning rate optimization algorithm). The learning rate is initially set to 0.001 and decreases progressively with each training iteration.

[0068] During the prediction phase, the segmentation network's free gas output module outputs the gas pixel segmentation prediction probability of the multi-task model after thresholding. The output result can be, for example, the predicted free gas segmentation mask (gas prediction encoding). The classification network's perforated organ output module outputs the organ perforation classification prediction probability of the multi-task model after thresholding. The output result can be, for example, the predicted organ label that may have perforation (perforated organ identification result). At the same time, when the free gas segmentation mask is not all 0, the perforated organ output module also outputs a prompt result indicating that there is a perforation in the digestive tract.

[0069] In the technical solution of this application embodiment, organ identification image features and distance field image features are input into an attention network for linear transformation to obtain organ identification feature matrix and distance field feature matrix. Then, attention weighted summation is performed on the organ identification feature matrix and distance field feature matrix to output weighted features. Then, according to the decoder, the weighted features are upsampled and channel reduced for feature extraction to output a multi-channel image, thereby effectively capturing multi-scale features in the image and improving the expressive power of the multi-task model. Based on gas pixel segmentation prediction of the multi-channel image, gas prediction encoding is obtained, and organ perforation classification and recognition are performed on the multi-channel image to obtain perforated organ recognition results. While segmenting free gas, the category of perforated organ is indicated. Moreover, the training mode of segmentation and classification multi-task models can mutually promote the accuracy of each task, thereby improving the accuracy of prediction results and significantly improving diagnostic accuracy and efficiency, providing a reliable automated solution for rapid diagnosis of gastrointestinal perforation.

[0070] For example, after obtaining the gas prediction results and the perforation location prediction results, the gas prediction results and the perforation location prediction results can also be written into the DICOM file corresponding to the medical image for associated storage.

[0071] Specifically, the gas prediction code output by the free gas output module can be combined with the original medical image and written into a DICOM file (a common format for medical images). The perforated organ identification result output by the perforated organ output module can be written into a field of the original DICOM file. In this way, the prediction results of free gas and perforation location can be associated and stored with the medical image, thereby providing more intuitive diagnostic information and improving the diagnostic efficiency of gastrointestinal perforation.

[0072] In the technical solution of this application embodiment, the gas prediction results and perforation location prediction results are written into the DICOM file corresponding to the medical image and stored together, thereby providing more intuitive diagnostic information and improving the diagnostic efficiency of gastrointestinal perforation.

[0073] Figure 7 A block diagram of a device for predicting gas and perforation location in medical images according to an embodiment of this application is shown.

[0074] like Figure 7 As shown, this application provides a device 700 for predicting gas and perforation locations in medical images. The device 700 includes: The segmentation module 710 is used to acquire medical images and perform image segmentation on the medical images to obtain organ segmentation results.

[0075] The reset module 720 is used to reset the pixels corresponding to different organs in medical images based on the organ segmentation results to obtain organ identification images.

[0076] The calculation module 730 is used to perform distance field calculation on medical images based on organ segmentation results to obtain distance field images corresponding to different organs. The distance field image represents the distance relationship between pixels in the medical image and organs.

[0077] The prediction module 740 is used to predict gas and perforation location based on organ identification images and distance field images, and obtain gas prediction results and perforation location prediction results.

[0078] For example, the gas prediction result includes a gas prediction code; the perforation location prediction result includes a perforated organ identification result; based on the organ identification image and the range field image, the prediction of gas and perforation location is performed, including: combining the organ identification image and the range field image into channels to obtain a multi-channel image; performing gas pixel segmentation prediction on the multi-channel image to obtain a gas prediction code; and performing organ perforation classification and identification on the multi-channel image to obtain a perforated organ identification result; wherein, the gas prediction code indicates whether there is diffused gas outside the organ, and the perforated organ identification result indicates the organ where gas diffuses.

[0079] For example, the reset module 720 is further configured to: calculate the average and absolute values ​​of the original pixel gray values ​​corresponding to different organs in the medical image to obtain the reset pixel gray values; and perform reset processing on the original pixel gray values ​​corresponding to different organs in the medical image based on the reset pixel gray values ​​to obtain organ identification images.

[0080] For example, based on the organ segmentation results, distance field calculation is performed on the medical image, including: determining whether a pixel in the medical image is inside or outside an organ based on the organ segmentation results; when the pixel in the medical image is inside an organ, determining a preset distance value as the first distance field data of the organ; when the pixel in the medical image is outside an organ, determining the shortest distance between the pixel and the organ boundary as the second distance field data of the organ; and obtaining a distance field image based on the first distance field data and the second distance field data.

[0081] For example, obtaining a distance field image based on first distance field data and second distance field data includes: normalizing the first distance field data and second distance field data to obtain normalized first distance field data and normalized second distance field data; and mapping the normalized first distance field data and normalized second distance field data to grayscale values ​​to obtain a distance field image.

[0082] For example, combining the organ identification image and the distance field image into multiple channels to obtain a multi-channel image includes: extracting features from the organ identification image by downsampling and channel amplification according to an image encoder, and outputting organ identification image features; extracting features from the distance field image by downsampling and channel amplification according to a distance encoder, and outputting distance field image features; and assigning weights to the organ identification image features and the distance field image features based on an attention network to obtain a multi-channel image.

[0083] For example, based on an attention network, weights are assigned to organ identification image features and distance field image features to obtain a multi-channel image, including: inputting organ identification image features and distance field image features into the attention network for linear transformation to obtain organ identification feature matrix and distance field feature matrix; performing attention-weighted summation on the organ identification feature matrix and distance field feature matrix to output weighted features; and extracting features by upsampling and channel reduction on the weighted features according to the decoder to output a multi-channel image.

[0084] For example, the device 700 also includes a storage module for writing the gas prediction results and the perforation location prediction results into the DICOM file corresponding to the medical image for associated storage.

[0085] Figure 8 A schematic diagram of an electronic device according to an embodiment of this application is shown.

[0086] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.

[0087] like Figure 8 As shown, for ease of understanding, embodiments of this application illustrate a specific electronic device 800.

[0088] Electronic device 800 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0089] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 808.

[0090] Multiple components in electronic device 800 are connected to I / O interface 805. These components include: input unit 806, such as a keyboard or mouse; output unit 807, such as various types of displays or speakers; storage unit 808, such as a disk or optical disk; and communication unit 809, such as a network interface card (NIC), modem, or wireless transceiver. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0091] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods described above. For example, in some embodiments, any one or more of the methods described above can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of any one or more of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform any one or more of the methods described above by any other suitable means (e.g., by means of firmware).

[0092] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method in any of the above embodiments.

[0093] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this application, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0094] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no structural conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method for predicting gas and perforation location in medical imaging, characterized in that, The method includes: Acquire medical images and perform image segmentation on the medical images to obtain organ segmentation results; Based on the organ segmentation results, the pixels corresponding to different organs in the medical image are reset to obtain organ identification images; Based on the organ segmentation results, distance field calculation is performed on the medical image to obtain distance field images corresponding to different organs, wherein the distance field image represents the distance relationship between pixels in the medical image and organs; Based on the organ identification image and the distance field image, gas and perforation location are predicted to obtain gas prediction results and perforation location prediction results. The step of resetting the pixels corresponding to different organs in the medical image based on the organ segmentation result includes calculating the average and absolute values ​​of the original pixel gray values ​​corresponding to different organs in the medical image to obtain reset pixel gray values, and resetting the original pixel gray values ​​corresponding to different organs in the medical image based on the reset pixel gray values ​​to obtain the organ identification image. The step of performing distance field calculation on the medical image based on the organ segmentation result includes determining whether a pixel in the medical image is inside or outside an organ based on the organ segmentation result; if the pixel in the medical image is inside an organ, determining a preset distance value as the first distance field data of the organ; if the pixel in the medical image is outside an organ, determining the shortest distance between the pixel and the organ boundary as the second distance field data of the organ; and obtaining the distance field image based on the first distance field data and the second distance field data.

2. The method for predicting gas and perforation location in medical images according to claim 1, characterized in that, The gas prediction result includes a gas prediction code; the perforation location prediction result includes a perforating organ identification result; the prediction of gas and perforation location based on the organ identification image and the distance field image includes: The organ identification image and the distance field image are combined by channel to obtain a multi-channel image; Gas pixel segmentation prediction is performed on the multi-channel image to obtain the gas prediction code; The multi-channel images are subjected to organ perforation classification and recognition to obtain the perforated organ recognition results; The gas prediction code indicates whether there is diffused gas outside the organ, and the perforated organ identification result indicates the organ through which gas diffuses.

3. The method for predicting gas and perforation location in medical images according to claim 1, characterized in that, The process of obtaining the distance field image based on the first distance field data and the second distance field data includes: The first distance field data and the second distance field data are normalized to obtain normalized first distance field data and normalized second distance field data; The normalized first distance field data and the normalized second distance field data are mapped to grayscale values ​​to obtain the distance field image.

4. The method for predicting gas and perforation location in medical images according to claim 2, characterized in that, The process of combining the organ identification image and the distance field image into a multi-channel image includes: Based on the image encoder, the organ identification image is downsampled and channel amplified for feature extraction, and the organ identification image features are output. Based on the distance encoder, the distance field image is downsampled and channel-amplified for feature extraction, and the distance field image features are output. The multi-channel image is obtained by weighting the organ identification image features and the distance field image features based on an attention network.

5. The method for predicting gas and perforation location in medical images according to claim 4, characterized in that, The attention network-based method assigns weights to the organ identification image features and the distance field image features to obtain the multi-channel image, including: The organ identification image features and the distance field image features are input into the attention network and linearly transformed to obtain the organ identification feature matrix and the distance field feature matrix; The organ identifier feature matrix and the distance field feature matrix are summed by attention weighting to obtain the weighted features. Based on the decoder, the weighted features are upsampled and the channels are reduced for feature extraction, and the multi-channel image is output.

6. The method for predicting gas and perforation location in medical images according to any one of claims 1-5, characterized in that, The method further includes: The gas prediction results and the perforation location prediction results are written into the DICOM file corresponding to the medical image for associated storage.

7. A device for predicting gas and perforation location in medical imaging, characterized in that, The device includes: The segmentation module is used to acquire medical images and perform image segmentation on the medical images to obtain organ segmentation results; A reset module is used to reset the pixels corresponding to different organs in the medical image based on the organ segmentation result to obtain an organ identification image. The reset processing of the pixels corresponding to different organs in the medical image based on the organ segmentation result includes calculating the average and absolute values ​​of the original pixel grayscale values ​​corresponding to different organs in the medical image to obtain reset pixel grayscale values, and resetting the original pixel grayscale values ​​corresponding to different organs in the medical image based on the reset pixel grayscale values ​​to obtain the organ identification image. The calculation module is used to perform distance field calculation on the medical image based on the organ segmentation result to obtain distance field images corresponding to different organs. The distance field image represents the distance relationship between pixels in the medical image and organs. The step of performing distance field calculation on the medical image based on the organ segmentation result includes determining whether the pixels in the medical image are inside or outside the organ based on the organ segmentation result. If the pixels in the medical image are inside the organ, a preset distance value is determined as the first distance field data of the organ. If the pixels in the medical image are outside the organ, the shortest distance between the pixels and the organ boundary is determined as the second distance field data of the organ. The distance field image is obtained based on the first distance field data and the second distance field data. The prediction module is used to predict the gas and perforation location based on the organ identification image and the distance field image, and obtain the gas prediction result and the perforation location prediction result.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Trocar position prediction method and trocar position prediction device for laparoscopic left-outer-lobe hepatopectomy

    CN118452962A

  • KR20230174543A