Pulmonary blood vessel segmentation method, device, storage medium and electronic device

Through the pulmonary blood vessel mediastinum optimization model, the backbone network and the mediastinum area optimization module are used to optimize the pulmonary blood vessel segmentation results, solve the problem of splicing traces in the mediastinum, achieve more accurate and beautiful pulmonary blood vessel segmentation, and improve the diagnosis of lung diseases. accuracy.

CN114565623BActive Publication Date: 2024-08-27INFERVISION MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210204258.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-02
Publication Date
2024-08-27
Estimated Expiration
2042-03-02

AI Technical Summary

Technical Problem

Existing pulmonary blood vessel segmentation methods have obvious splicing marks in the mediastinum, resulting in uneven pulmonary blood vessel segmentation results and affecting doctors' diagnosis of lung-related diseases.

Method used

The pulmonary blood vessel mediastinum optimization model is used to generate mediastinal blood vessel segmentation images and initial pixel fusion weight matrices through the backbone network and mediastinal region optimization module. Combined with the mediastinal mask image, the pulmonary blood vessel segmentation results are optimized, reducing splicing traces and improving segmentation accuracy.

Benefits of technology

The generated pulmonary blood vessel segmentation results are more accurate and beautiful in the mediastinum, improving the accuracy of lung disease diagnosis, simplifying the operation process, and improving segmentation accuracy and operability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565623B
    Figure CN114565623B
Patent Text Reader

Abstract

The present application provides a pulmonary vascular segmentation method, device, storage medium and electronic device, which relate to the field of image processing technology. The pulmonary vascular segmentation method includes: using a pulmonary vascular mediastinum optimization model to process a three-dimensional image of the lung to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional image of the lung to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image, to generate a first mediastinal vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinal vascular segmentation image; based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, a second pulmonary vascular segmentation image corresponding to the three-dimensional image of the lung to be segmented is generated. The pulmonary vascular segmentation method in the present application makes the segmentation results of the mediastinum more accurate, thereby facilitating doctors to diagnose lung-related diseases in patients.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of medical image processing, and in particular to a pulmonary blood vessel segmentation method, device, storage medium and electronic device. Background Art

[0002] Medical image processing is an important technology that uses image visual processing methods to assist clinical diagnosis. Therefore, in recent years, medical image processing has gradually become a research hotspot. Medical image segmentation is a branch of medical image processing. It usually requires segmentation of a certain part of the human body in the computer tomography (CT) image to better assist doctors in the diagnosis and treatment of diseases.

[0003] Taking lung CT images as an example, the lung blood vessels are dense and slender, and the lung CT images are usually relatively large. Generally, it is necessary to first slice the lung CT images to obtain multiple lung slices, and then use the deep learning model to segment the lung slices. Finally, the segmentation results of the lung slices are reconstructed to obtain the final pulmonary blood vessel segmentation results. However, the pulmonary blood vessel segmentation results obtained by the above method have obvious splicing marks in the mediastinum, resulting in the final pulmonary blood vessel segmentation results being uneven, affecting doctors' diagnosis of lung-related diseases. Summary of the invention

[0004] In order to solve the above technical problems, the present application is proposed. The embodiments of the present application provide a pulmonary blood vessel segmentation method, device, storage medium and electronic device.

[0005] In a first aspect, an embodiment of the present application provides a pulmonary vascular segmentation method, including: determining a three-dimensional lung image to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image; based on the three-dimensional lung image to be segmented, the first pulmonary vascular segmentation image and the mediastinum mask image, using a pulmonary vascular mediastinum optimization model, generating a first mediastinal vascular segmentation image based on the first pulmonary vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinal vascular segmentation image; based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, generating a second pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented.

[0006] In combination with the first aspect, in certain implementations of the first aspect, the pulmonary vascular mediastinum optimization model includes a backbone network and a mediastinum region optimization module, and based on the three-dimensional lung image to be segmented, the first pulmonary vascular segmentation image and the mediastinum mask image, the pulmonary vascular mediastinum optimization model is used to generate a first mediastinum vessel segmentation image based on the first pulmonary vessel segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vessel segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinum vessel segmentation image, including: based on the three-dimensional lung image to be segmented, using the backbone network, generating a vascular centerline corresponding to the three-dimensional lung image to be segmented; using the mediastinum region optimization module, generating a first mediastinum vessel segmentation image based on the mediastinum boundary information of the mediastinum mask image and the first pulmonary vessel segmentation image, and generating a first initial pixel fusion weight matrix and a second initial pixel fusion weight matrix based on the vascular centerline and the first mediastinum vessel segmentation image.

[0007] In combination with the first aspect, in certain implementations of the first aspect, a second pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented is generated based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, including: based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, using a pulmonary vascular mediastinum optimization model to generate a second mediastinal vascular segmentation image; using the pulmonary vascular mediastinum optimization model, based on the mediastinum boundary information of the mediastinum mask image, intercepting the first pulmonary vascular segmentation image to obtain a non-mediastinum region vascular segmentation image located outside the mediastinum region bounding box; using the pulmonary vascular mediastinum optimization model to determine the pixel position information of the second mediastinum vessel segmentation image relative to the non-mediastinum region vascular segmentation image; using the pulmonary vascular mediastinum optimization model, based on the pixel position information, reconstructing the second mediastinum vessel segmentation image and the non-mediastinum region vascular segmentation image to generate the second pulmonary vascular segmentation image.

[0008] In combination with the first aspect, in certain implementations of the first aspect, based on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, a second mediastinal vessel segmentation image is generated using a pulmonary vessel mediastinum optimization model, including: performing the same upsampling on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, the second initial pixel fusion weight matrix, and the mediastinum mask image, respectively, to obtain an upsampled pulmonary vessel segmentation image, an upsampled mediastinal vessel segmentation image, an upsampled first pixel fusion weight matrix, an upsampled second pixel fusion weight matrix, and an upsampled mediastinum mask image; based on the mediastinum boundary information of the upsampled mediastinum mask image, the upsampled pulmonary vessel segmentation image is intercepted to obtain An upsampled three-dimensional image of mediastinal vessels located within a mediastinal boundary bounding box; for each current pixel point of the upsampled mediastinal vessel segmentation image, multiplying the pixel value of the current pixel point by the fusion weight value in the upsampled second pixel fusion weight matrix corresponding to the current pixel point to obtain a first fusion value; determining a matching pixel point in the upsampled three-dimensional image of mediastinal vessels corresponding to the current pixel point; multiplying the pixel value of the matching pixel point by the fusion weight value in the upsampled first pixel fusion weight matrix corresponding to the matching pixel point to obtain a second fusion value; adding the first fusion value and the second fusion value to obtain the pixel value of the pixel point corresponding to the current pixel point in the second mediastinal vessel segmentation image; generating a second mediastinal vessel segmentation image based on the pixel values ​​of all the pixels contained in the second mediastinal vessel segmentation image.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the loss function of the pulmonary vascular mediastinum optimization model includes an artery and vein classification loss function, a tracheal segmentation loss function, a vascular midline segmentation loss function, a vascular segmentation loss function corresponding to the mediastinum region, and a vascular fusion weight loss function corresponding to the mediastinum region.

[0010] In combination with the first aspect, in certain implementations of the first aspect, before using the pulmonary vascular mediastinum optimization model, it also includes: obtaining M groups of training data sets, each group of training data sets includes a three-dimensional sample image of the lung to be segmented, a first pulmonary vascular segmentation sample image corresponding to the three-dimensional sample image of the lung to be segmented, a mediastinum mask sample image corresponding to the first pulmonary vascular segmentation sample image, and a vascular midline marking image corresponding to the three-dimensional sample image of the lung to be segmented, a first mediastinal vascular segmentation sample marking image corresponding to the first pulmonary vascular segmentation sample image, and a second mediastinal vascular segmentation sample marking image, where M is a positive integer; based on the M groups of training data sets, the model to be trained is trained to obtain the pulmonary vascular mediastinum optimization model.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the model training constraints corresponding to the first initial pixel fusion weight matrix and the second initial pixel fusion weight matrix include: the blood vessels within the mediastinum boundary of the second mediastinal vessel segmentation sample labeled image are the same as the blood vessels within the mediastinum boundary of the first mediastinal vessel segmentation sample labeled image, and the blood vessels outside the mediastinum boundary of the second mediastinal vessel segmentation sample labeled image are the same as the blood vessels outside the mediastinum boundary of the first pulmonary vessel segmentation sample image.

[0012] In a second aspect, an embodiment of the present application provides a pulmonary vascular segmentation device, including: a determination module, used to determine a three-dimensional lung image to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image; a first generation module, used to generate a first mediastinal vessel segmentation image based on the first pulmonary vessel segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vessel segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinal vessel segmentation image based on the three-dimensional lung image to be segmented, the first pulmonary vessel segmentation image and the mediastinum mask image, using a pulmonary vascular mediastinum optimization model; a second generation module, used to generate a second pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented based on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix.

[0013] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program for executing the pulmonary vascular segmentation method mentioned in the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; the processor is used to execute the pulmonary vascular segmentation method mentioned in the first aspect above.

[0015] The pulmonary vascular segmentation method provided in the present application first determines a three-dimensional lung image to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image, and uses the three-dimensional lung image to be segmented, the first pulmonary vascular segmentation image, and the mediastinum mask image as inputs of a pulmonary vascular mediastinum optimization model, and the pulmonary vascular mediastinum optimization model generates a first mediastinum vascular segmentation image corresponding to the first pulmonary vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinum vascular segmentation image, wherein the mediastinum vascular segmentation accuracy of the first mediastinum vascular segmentation image is greater than the mediastinum vascular segmentation accuracy of the first pulmonary vascular segmentation image. The pulmonary vascular mediastinum optimization model then outputs a second pulmonary vascular segmentation image based on the first pulmonary vascular segmentation image, the first mediastinum vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix. In the embodiment of the present application, the pulmonary vascular mediastinum optimization model fuses the first pulmonary vascular segmentation image and the first mediastinum vascular segmentation image according to a certain weight, and finally outputs a second pulmonary vascular segmentation image with a more accurate and beautiful vascular segmentation result in the mediastinum, thereby better assisting doctors in diagnosing lung-related diseases. In addition, the scheme only needs to determine the three-dimensional image of the lung to be segmented, the first pulmonary vascular segmentation image, and the mediastinum mask image in advance, and then use the pulmonary vascular mediastinum optimization model to obtain the second pulmonary vascular segmentation image after mediastinum optimization, which is simple, convenient and highly operable. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0017] Figure 1 Shown is a schematic diagram of a scenario applicable to an embodiment of the present application.

[0018] Figure 2 Shown is a flowchart of a pulmonary blood vessel segmentation method provided by an exemplary embodiment of the present application.

[0019] Figure 3 A schematic diagram of a first pulmonary blood vessel segmentation image provided by an exemplary embodiment of the present application.

[0020] Figure 4 It is a schematic diagram of a process of generating a first mediastinal vessel segmentation image, a first initial pixel fusion weight matrix, and a second initial pixel fusion weight matrix provided by an exemplary embodiment of the present application.

[0021] Figure 5 The figure is a schematic diagram of a process of generating a second pulmonary vascular segmentation image corresponding to a three-dimensional lung image to be segmented provided by an exemplary embodiment of the present application.

[0022] Figure 6 Shown is a schematic diagram of a second pulmonary blood vessel segmentation image provided by an exemplary embodiment of the present application.

[0023] Figure 7 It is a schematic diagram of a flow chart of generating a second mediastinal vessel segmentation image using a pulmonary vascular mediastinum optimization model provided by an exemplary embodiment of the present application.

[0024] Figure 8 Shown is a flowchart of a pulmonary blood vessel segmentation method provided by another exemplary embodiment of the present application.

[0025] Fig. 9 Shown is a schematic structural diagram of a pulmonary vascular mediastinum optimization model provided by an exemplary embodiment of the present application.

[0026] Fig.10 Shown is a schematic structural diagram of a pulmonary vascular segmentation device provided by an exemplary embodiment of the present application.

[0027] Fig.11 Shown is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] CT (Computed Tomography) is a computer tomography scan that uses precisely collimated X-ray beams, gamma rays, ultrasound, etc., together with extremely sensitive detectors to perform cross-sectional scans one after another around a certain part of the human body. It has the characteristics of fast scanning time and clear images, and can be used to detect a variety of diseases.

[0030] The lungs consist of five lobes, namely the left upper lobe, left lower lobe, right upper lobe, right middle lobe, and right lower lobe. Each lobe is blocked by the visceral pleura to form an independent lobe. Different lobes can also transfer substances to each other through the visceral pleura. Each lobe is composed of alveoli, bronchioles, lymphatic vessels, and blood vessels. The pulmonary blood vessels are divided into two parts: the pulmonary artery and the pulmonary vein. The pulmonary artery and the pulmonary vein constitute the pulmonary circulatory system, which receives venous return blood from organs throughout the body and completes gas exchange in the lungs.

[0031] The mediastinum is the general term for the organs, structures and connective tissues between the left and right mediastinal pleura. The mediastinum is located in the sagittal plane, slightly to the left of the center of the chest cavity, narrow at the top and wide at the bottom, short in front and long in the back. The anterior boundary of the mediastinum is the sternum, the posterior boundary is the thoracic spine, the two sides are the mediastinal pleura, the upper boundary is the upper opening of the thorax, and the lower boundary is the diaphragm. Under normal circumstances, the position of the mediastinum is relatively fixed.

[0032] Pulmonary blood vessel segmentation is of great significance for doctors to diagnose diseases. The commonly used pulmonary blood vessel segmentation method is usually to use a deep learning model to directly segment the lung CT image. However, the lung blood vessels are dense and long, and the lung window CT is usually large. When the lung CT image is downsampled and then segmented, the image resolution will be reduced, resulting in a large number of blood vessels being disconnected. The method of cutting the lung CT image into blocks and then segmenting it also requires splicing the segmentation results of the blocks, which will produce many splicing marks. These splicing marks are particularly obvious in the mediastinum, resulting in inaccurate and unsightly segmentation results, affecting doctors' judgment of lung-related diseases.

[0033] Figure 1 The figure shows a schematic diagram of a scenario applicable to the embodiment of the present application. The scenario includes an image acquisition device 110 and a computer device 120. There is a communication connection relationship between the computer device 120 and the image acquisition device 110. The communication connection can be a wired connection or a wireless connection.

[0034] Specifically, the image acquisition device 110 is used to acquire an initial three-dimensional lung image. The image acquisition device 110 can be a CT scanner, an X-ray machine, or other devices with image acquisition functions, as long as it can acquire lung images. This application does not specifically limit the structure of the image acquisition device 1.

[0035] The computer device 120 is used to receive the initial lung three-dimensional image acquired by the image acquisition device 110, and generate a lung three-dimensional image to be segmented, a first pulmonary vascular segmentation image corresponding to the lung three-dimensional image to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image based on the initial lung three-dimensional image, and generate a second pulmonary vascular segmentation image corresponding to the lung three-dimensional image to be segmented based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix. The computer device 120 can be a general-purpose computer or a computer device composed of a dedicated integrated circuit, etc., and this application does not limit this. For example, the computer device 120 can be a mobile terminal device such as a tablet computer, or a personal computer, and the number of computer devices 120 can be one or more, and their types can be the same or different. The embodiment of the application does not limit the number and type of computer devices 120.

[0036] Figure 2 FIG. 2 is a flow chart of a pulmonary vascular segmentation method provided by an exemplary embodiment of the present application. Figure 2 As shown, the pulmonary blood vessel segmentation method provided in the embodiment of the present application includes the following steps.

[0037] Step 10: determine a three-dimensional lung image to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image.

[0038] Specifically, the three-dimensional image of the lung to be segmented may be a CT image of the lung to be segmented.

[0039] Exemplarily, an initial three-dimensional lung image is acquired, and the initial three-dimensional lung image is downsampled to obtain a three-dimensional lung image to be segmented. The three-dimensional lung image to be segmented is input into a lung segmentation model to generate left and right lung segmentation images, wherein the left and right lung segmentation images only contain the lung region. The left and right lung segmentation images are input into a pulmonary vascular segmentation model. The pulmonary vascular segmentation model first blocks the left and right lung segmentation images, and then performs pulmonary vascular segmentation on the left and right lung segmentation block images to generate block segmentation results corresponding to the left and right lung segmentation block images. The block results corresponding to the left and right lung segmentation block images are then reconstructed to output the three-dimensional pulmonary vascular images corresponding to the left and right lung segmentation images. The three-dimensional pulmonary vascular image is divided into a left pulmonary vascular three-dimensional image and a right pulmonary vascular three-dimensional image, and the left pulmonary vascular three-dimensional image and the right pulmonary vascular three-dimensional image are input into a vascular classification model. The vascular classification model outputs a left pulmonary arteriovenous classification image corresponding to the left pulmonary vascular three-dimensional image and a right pulmonary arteriovenous classification image corresponding to the right pulmonary vascular three-dimensional image. The left pulmonary arteriovenous classification image and the right pulmonary arteriovenous classification image are then reconstructed to obtain a first pulmonary vascular segmentation image. Figure 3, which is a schematic diagram of a first pulmonary vascular segmentation image, wherein arterial vessels and venous vessels in the first pulmonary vascular segmentation image are distinguished and shown with different grayscale values.

[0040] Perform distance transformation on the blood vessels in the first pulmonary vascular segmentation image, that is, divide the blood vessels into P unit distances from the inside to the outside, and the preset distance threshold is Q. P and Q are positive integers, Q<P. Based on the preset distance threshold Q, determine the mediastinum region. Exemplarily, P is 15 and Q is 3, that is, the arteriovenous blood vessels in the first pulmonary vascular segmentation image are divided into 15 unit distances from the inside to the outside. The outermost layer is 1 and the innermost layer is 10, and the area greater than or equal to 3 unit distances is taken as the initial mediastinum region. It can be understood that the values ​​of P and Q in this embodiment are only examples. Those skilled in the art can select the values ​​of P and Q according to actual needs. The embodiments of the present application do not specifically limit the values ​​of P and Q.

[0041] According to the mediastinum boundary information in the first pulmonary vascular segmentation image, the limited area is determined, and the growth step and the number of growth steps are set. According to the limited area, the growth step and the number of growth steps, the initial mediastinum area is grown to obtain a mediastinum mask image. Among them, the limited area is larger than the mediastinum area in the first pulmonary vascular segmentation image, that is, the mediastinum area in the mediastinum mask image is larger than the mediastinum area in the first pulmonary vascular segmentation image. In this way, the mediastinum mask image includes not only the blood vessels in the mediastinum area, but also more small blood vessels outside the mediastinum area, which can further improve the vascular segmentation accuracy of the second pulmonary vascular segmentation image output by the pulmonary vascular mediastinum optimization model.

[0042] It can be understood that in the embodiment of the present application, the three-dimensional image of the lung to be segmented, the first pulmonary blood vessel segmentation image, and the mediastinum mask image are all down-sampled images.

[0043] Step 40, based on the three-dimensional image of the lung to be segmented, the first pulmonary vascular segmentation image and the mediastinum mask image, using the pulmonary vascular mediastinum optimization model, generates a first mediastinal vascular segmentation image based on the first pulmonary vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinal vascular segmentation image.

[0044] Specifically, the three-dimensional image of the lung to be segmented, the first pulmonary vascular segmentation image and the mediastinum mask image are input into the pulmonary vascular mediastinum optimization model, and the pulmonary vascular mediastinum optimization model will generate a first mediastinum vascular segmentation image corresponding to the first pulmonary vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinum vascular segmentation image.

[0045] Among them, the pixel points on the first pulmonary vascular segmentation image and the values ​​in the first initial pixel fusion weight matrix are in a one-to-one correspondence relationship. For example, the pixel point at the position (100, 100, 100) of the first pulmonary vascular segmentation image corresponds to the fusion weight value at the position (100, 100, 100) of the first initial pixel fusion weight matrix. Correspondingly, the pixel points on the first mediastinal vascular segmentation image and the values ​​in the second initial pixel fusion weight matrix are also in a one-to-one correspondence relationship. For example, the pixel point at the position (60, 60, 60) of the first mediastinal vascular segmentation image corresponds to the fusion weight value at the position (60, 60, 60) of the second initial pixel fusion weight matrix.

[0046] Step 50, generating a second pulmonary vessel segmentation image corresponding to the three-dimensional lung image to be segmented based on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix.

[0047] Specifically, the pulmonary vascular mediastinum optimization model outputs a second pulmonary vascular segmentation image corresponding to the 3D image of the lung to be segmented based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, wherein the segmentation precision and accuracy of the second pulmonary vascular segmentation image are greater than those of the first pulmonary vascular segmentation image.

[0048] In the embodiment of the present application, based on the first pulmonary vascular segmentation image and its corresponding first initial pixel fusion weight matrix, the first mediastinal vascular segmentation image and its corresponding second initial pixel fusion weight matrix, a second pulmonary vascular segmentation image is generated, that is, the second pulmonary vascular segmentation image is obtained by fusing the first mediastinal vascular segmentation image and the first pulmonary vascular segmentation image, so that the second pulmonary vascular segmentation image has higher accuracy and can better assist doctors in diagnosing lung-related diseases. Then, the present application uses the three-dimensional image of the lungs to be segmented, the first pulmonary vascular segmentation image, and the mediastinum mask image as the input of the pulmonary vascular mediastinum optimization model, and the pulmonary vascular mediastinum optimization model directly outputs the second pulmonary vascular segmentation image. The method is simple, convenient, highly repeatable, and highly operable.

[0049] Figure 4 FIG. 1 is a flow chart of generating a first mediastinal vessel segmentation image, a first initial pixel fusion weight matrix, and a second initial pixel fusion weight matrix provided by an exemplary embodiment of the present application. Figure 2 Based on the embodiment shown, Figure 4 The embodiment shown is described below in detail. Figure 4 The embodiment shown and Figure 2 The differences and similarities of the illustrated embodiments are not described in detail.

[0050] like Figure 4As shown, based on the three-dimensional image of the lungs to be segmented, the first pulmonary vascular segmentation image and the mediastinum mask image, a pulmonary vascular mediastinum optimization model is used to generate a first mediastinal vascular segmentation image based on the first pulmonary vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinal vascular segmentation image, including the following steps.

[0051] Step 42: Based on the three-dimensional image of the lung to be segmented, using the backbone network, generate the blood vessel centerline corresponding to the three-dimensional image of the lung to be segmented.

[0052] Specifically, the pulmonary vascular mediastinum optimization model includes a backbone network and a mediastinum region optimization module. The three-dimensional image of the lung to be segmented, the first pulmonary vascular segmentation image, and the mediastinum mask image are input into the pulmonary vascular mediastinum optimization model. The backbone network first processes the three-dimensional image of the lung to be segmented to generate the vascular centerline corresponding to the three-dimensional image of the lung to be segmented. In addition, the trachea corresponding to the three-dimensional image of the lung to be segmented is also generated.

[0053] Furthermore, the backbone network mainly extracts features from images input into the pulmonary vascular mediastinum optimization model, and the mediastinum region optimization module generates an optimized image of the mediastinum region based on the features extracted by the backbone network.

[0054] Step 44 : using the mediastinum region optimization module, based on the mediastinum boundary information of the mediastinum mask image and the first pulmonary vessel segmentation image, a first mediastinal vessel segmentation image is generated.

[0055] Specifically, the mediastinum region optimization module is used to extract the inner area of ​​the mediastinum region circumscribed box from the first pulmonary vessel segmentation image as the mediastinum vessel image to be segmented according to the mediastinum boundary information of the mediastinum mask image. The mediastinum region optimization module then further segments the mediastinum vessel image to be segmented to generate the first mediastinum vessel segmentation image.

[0056] Furthermore, the mediastinum region circumscribed bounding box refers to the smallest circumscribed cube of the mediastinum region.

[0057] Step 46: Generate a first initial pixel fusion weight matrix and a second initial pixel fusion weight matrix based on the vascular midline and the first mediastinal vascular segmentation image.

[0058] Specifically, the first mediastinal vascular segmentation image includes vascular segmentation results within the mediastinal boundary and vascular segmentation results outside the mediastinal boundary. Thin blood vessels account for a large proportion of the vascular segmentation results outside the mediastinal boundary, while the mediastinal vascular segmentation results within the mediastinal boundary are usually coarse. Therefore, through the attention mechanism inside the pulmonary vascular mediastinum optimization model, the mediastinal area optimization module pays more attention to the vascular midline outside the mediastinal boundary, and generates a first initial pixel fusion weight matrix and a second initial pixel fusion weight matrix based on the vascular segmentation results of the first mediastinal vascular segmentation image and the mediastinal vascular segmentation results within the circumscribed bounding box of the mediastinal area on the first pulmonary vascular segmentation image.

[0059] In the embodiment of the present application, the backbone network is first used to generate the vascular centerline and trachea corresponding to the three-dimensional image of the lung to be segmented, wherein the mediastinum region optimization module can use the attention mechanism in the mediastinum region optimization module to increase the weight of the vascular centerline outside the mediastinum boundary in the first mediastinum vessel segmentation image, and the vascular centerline outside the mediastinum boundary in the mediastinum region circumscribed bounding box in the first pulmonary vessel segmentation image, and learn the first mediastinum vessel segmentation image and the first pulmonary vessel segmentation image in the mediastinum region optimization module to generate a more accurate first initial pixel fusion weight matrix and a second initial pixel fusion weight matrix. At the same time, the backbone network first segments the trachea, which further reduces the probability that the mediastinum region optimization module mis-segments the trachea as a blood vessel when segmenting the first pulmonary vessel segmentation image, thereby improving the segmentation accuracy of the mediastinum vessels in the first mediastinum vessel segmentation image.

[0060] Figure 5 FIG. 1 is a flow chart of generating a second pulmonary vascular segmentation image corresponding to a three-dimensional lung image to be segmented, provided by an exemplary embodiment of the present application. Figure 2 Based on the embodiment shown, Figure 5 The embodiment shown is described below in detail. Figure 5 The embodiment shown and Figure 2 The differences and similarities of the illustrated embodiments are not described in detail.

[0061] like Figure 5 As shown, based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, a second pulmonary vascular segmentation image corresponding to the three-dimensional image of the lung to be segmented is generated, including the following steps.

[0062] Step 52, based on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, a second mediastinal vessel segmentation image is generated using a pulmonary vessel mediastinum optimization model.

[0063] Specifically, the pulmonary vascular mediastinum optimization model outputs a second mediastinal vascular segmentation image based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix.

[0064] Step 54 , using the pulmonary vascular mediastinum optimization model, based on the mediastinum boundary information of the mediastinum mask image, intercepting the first pulmonary vascular segmentation image, and obtaining a non-mediastinum region vascular segmentation image located outside the mediastinum region bounding box.

[0065] Specifically, the pulmonary vascular mediastinum optimization model intercepts the non-mediastinum region vascular segmentation image outside the mediastinum region circumscribed peripheral frame in the first pulmonary vascular segmentation image according to the mediastinum boundary information of the mediastinum mask image.

[0066] Step 56: using the pulmonary vascular mediastinum optimization model, determine the pixel position information of the second mediastinal vascular segmentation image relative to the non-mediastinal region vascular segmentation image.

[0067] Specifically, the pulmonary vascular mediastinum optimization model is used to determine pixel position information of the second mediastinal vascular image on the non-mediastinal region vascular segmentation image.

[0068] Step 58, using the pulmonary vascular mediastinum optimization model, based on the pixel position information, reconstruct the second mediastinal vascular segmentation image and the non-mediastinal region vascular segmentation image to generate a second pulmonary vascular segmentation image.

[0069] Specifically, according to the pixel position information, the pulmonary vascular mediastinum optimization model splices the second mediastinum vessel segmentation image with the non-mediastinum region vessel segmentation image to generate a second pulmonary vascular segmentation image.

[0070] Figure 6 The figure shows a schematic diagram of the second pulmonary vascular segmentation image. It can be seen that the segmentation result of the mediastinum region in the second pulmonary vascular segmentation image is better than that in the Figure 3 The segmentation result of the mediastinum area in the first pulmonary vessel segmentation image is smoother and more accurate.

[0071] Through the technical solution in this embodiment, a second mediastinal vessel segmentation image with higher segmentation accuracy and more accuracy is obtained, and then according to the pixel position information of the second mediastinal vessel image relative to the non-mediastinal region vessel segmentation image, the second mediastinal vessel segmentation image and the non-mediastinal region vessel segmentation image are spliced ​​to generate a second pulmonary vessel segmentation image. The second pulmonary vessel segmentation image has a better segmentation accuracy in the mediastinum region and a smoother segmentation result, which is beneficial for doctors to diagnose lung-related diseases.

[0072] Figure 7 FIG. 1 is a flow chart of generating a second mediastinal vessel segmentation image using a pulmonary vascular mediastinum optimization model provided by an exemplary embodiment of the present application. Figure 5Based on the embodiment shown, Figure 7 The embodiment shown is described below in detail. Figure 7 The embodiment shown and Figure 5 The differences and similarities of the illustrated embodiments are not described in detail.

[0073] like Figure 7 As shown, based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, a second mediastinal vascular segmentation image is generated using a pulmonary vascular mediastinum optimization model, including the following steps.

[0074] Step 581, perform the same upsampling on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, the second initial pixel fusion weight matrix, and the mediastinal mask image, respectively, to obtain an upsampled pulmonary vascular segmentation image, an upsampled mediastinal vascular segmentation image, an upsampled first pixel fusion weight matrix, an upsampled second pixel fusion weight matrix, and an upsampled mediastinal mask image.

[0075] Specifically, the interpolation method can be used to perform the same upsampling on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, the second initial pixel fusion weight matrix, and the mediastinum mask image. The resolution of the obtained upsampled pulmonary vascular segmentation image, the upsampled mediastinal vascular segmentation image, and the upsampled mediastinum mask image can be the same as the resolution of the initial lung three-dimensional image, or larger than the resolution of the initial lung three-dimensional image.

[0076] Furthermore, performing the same upsampling on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, the second initial pixel fusion weight matrix, and the mediastinal mask image respectively means that after upsampling the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, and the mediastinal mask image using an interpolation method, the resolutions of the upsampled pulmonary vessel segmentation image, the upsampled mediastinal vessel segmentation image, and the upsampled mediastinal mask image are the same; and the first initial pixel fusion weight matrix is ​​upsampled corresponding to the first pulmonary vessel segmentation image, and the second initial pixel fusion weight matrix is ​​upsampled corresponding to the first mediastinal vessel segmentation image, to ensure that all pixels in the upsampled pulmonary vessel segmentation image are in one-to-one correspondence with the fusion weight values ​​of the upsampled first pixel fusion weight matrix, and all pixels in the upsampled mediastinal vessel segmentation image are in one-to-one correspondence with the fusion weight values ​​in the upsampled second pixel fusion weight matrix.

[0077] There is a one-to-one correspondence between the pixels on the upsampled pulmonary vessel segmentation image and the values ​​in the upsampled first pixel fusion weight matrix, and there is a one-to-one correspondence between the pixels on the upsampled mediastinal vessel segmentation image and the values ​​in the upsampled second pixel fusion weight matrix.

[0078] Step 582 : based on the mediastinum boundary information of the upsampled mediastinum mask image, intercept the upsampled pulmonary vascular segmentation image to obtain the upsampled mediastinal vascular three-dimensional image located within the mediastinum boundary bounding box.

[0079] Specifically, according to the mediastinum boundary information of the up-sampled mediastinum mask image, an up-sampled mediastinum vascular three-dimensional image within a circumscribed bounding box of the mediastinum region on the up-sampled pulmonary vascular segmentation image is acquired.

[0080] Step 583 , for each current pixel point of the upsampled mediastinal vessel segmentation image, multiply the pixel value of the current pixel point by the fusion weight value in the upsampled second pixel fusion weight matrix corresponding to the current pixel point to obtain a first fusion value.

[0081] For example, the upsampled mediastinal vessel segmentation image contains a×b×c pixels, and correspondingly, the upsampled second pixel fusion weight matrix is ​​a×b×c. Sequentially, the pixel value of the pixel at the position (1, 1, 1) on the upsampled mediastinal vessel segmentation image is multiplied by the fusion weight value at the position (1, 1, 1) in the upsampled second pixel fusion weight matrix to obtain the first fusion value W1, ..., the pixel value of the pixel at the position (a, b, c) on the upsampled mediastinal vessel segmentation image is multiplied by the fusion weight value at the position (a, b, c) in the upsampled second pixel fusion weight matrix to obtain the first fusion weight value Wn.

[0082] Step 584 , determining a matching pixel point in the upsampled mediastinal vessel three-dimensional image that corresponds to the current pixel point.

[0083] Specifically, the pixel points in the upsampled mediastinal vessel 3D image and the pixel points in the upsampled mediastinal vessel segmentation image are in a one-to-one correspondence, that is, if the upsampled mediastinal vessel segmentation image contains a×b×c pixels, the upsampled mediastinal vessel 3D image also contains a×b×c pixels. Exemplarily, the pixel point at position (1, 1, 1) on the upsampled mediastinal vessel segmentation image corresponds to the pixel point at position (1, 1, 1) on the upsampled mediastinal vessel 3D image, and the pixel point at position (a, b, c) on the upsampled mediastinal vessel segmentation image corresponds to the pixel point at position (a, b, c) on the upsampled mediastinal vessel 3D image.

[0084] Step 585 , multiply the pixel value of the matching pixel by the fusion weight value in the up-sampled first pixel fusion weight matrix corresponding to the matching pixel to obtain a second fusion value.

[0085] Specifically, the pixel points on the upsampled mediastinal vascular three-dimensional image are in one-to-one correspondence with the fusion weight values ​​in the upsampled first pixel fusion weight matrix. For example, if the position of the matching pixel point is (1, 1, 1), the pixel value of the pixel point at the position (1, 1, 1) on the upsampled mediastinal vascular three-dimensional image is multiplied by the fusion weight value at the position (1, 1, 1) in the upsampled first pixel fusion weight matrix to obtain the second fusion value W1. If the position of the matching pixel point is (a, b, c), the pixel value of the pixel point at the position (a, b, c) on the upsampled mediastinal vascular three-dimensional image is multiplied by the fusion weight value at the position (a, b, c) in the upsampled first pixel fusion weight matrix to obtain the second fusion value Wn.

[0086] Step 586: Add the first fusion value and the second fusion value to obtain the pixel value of the pixel point corresponding to the current pixel point in the second mediastinal vessel segmentation image.

[0087] Exemplarily, the first fusion value W1 and the second fusion value W1 are added to obtain the pixel value of the pixel at the position (1, 1, 1) in the second mediastinal vessel segmentation image. The first fusion value Wn and the second fusion value Wn are added to obtain the pixel value of the pixel at the position (a, b, c) in the second mediastinal vessel segmentation image.

[0088] Step 587: Generate a second mediastinal vessel segmentation image based on the pixel values ​​of all the pixels included in the second mediastinal vessel segmentation image.

[0089] In the embodiment of the present application, the pixel value of the pixel point in the second mediastinal vessel segmentation image is obtained by adding the first fusion value at the corresponding pixel point on the upsampled mediastinal vessel segmentation image and the second fusion value at the corresponding pixel point on the upsampled mediastinal vessel three-dimensional image, that is, the vessel segmentation result of the second mediastinal vessel segmentation image fuses the vessel segmentation result of the upsampled mediastinal vessel segmentation image and the vessel segmentation result of the upsampled mediastinal vessel three-dimensional image, and the vessel segmentation accuracy of the obtained second mediastinal vessel segmentation image is higher and smoother. In addition, the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, and the mediastinum mask image are all downsampled images. At this time, the image resolution is low, which may cause the pulmonary vessel mediastinum optimization model to ignore some small blood vessels when calculating the first fusion value and the second fusion value, thereby causing the presence of disconnected small blood vessels on the generated second mediastinal vessel segmentation image. The first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, the second initial pixel fusion weight matrix, and the mediastinal mask image are respectively upsampled in the same manner to obtain the upsampled pulmonary vascular segmentation image, the upsampled mediastinal vascular segmentation image, the upsampled first pixel fusion weight matrix, the upsampled second pixel fusion weight matrix, and the upsampled mediastinal mask image, and then weighted multiplication is performed to increase the vascular resolution of the upsampled mediastinal vascular three-dimensional image and the upsampled mediastinal vascular segmentation image, and improve the vascular segmentation accuracy of the generated second mediastinal vascular segmentation image.

[0090] In one embodiment of the present application, the loss function of the pulmonary vascular mediastinum optimization model includes an artery and vein classification loss function, a tracheal segmentation loss function, a vascular midline segmentation loss function, a vascular segmentation loss function corresponding to the mediastinum region, and a vascular fusion weight loss function corresponding to the mediastinum region.

[0091] Specifically, the pulmonary vascular mediastinum optimization model includes classification loss functions of veins and arteries, classification loss functions of veins and trachea, and classification loss functions of arteries and trachea. These three classification loss functions can make the arteriovenous distinction of the pulmonary vascular mediastinum optimization model greater and less likely to cause arteriovenous color confusion.

[0092] Furthermore, the pulmonary vascular mediastinum optimization model also includes a tracheal segmentation loss function and a vascular midline segmentation loss function, so that the pulmonary vascular mediastinum optimization model can distinguish between blood vessels and trachea during segmentation and segment out the vascular midline.

[0093] In addition, the pulmonary vascular mediastinum optimization model also includes a vascular segmentation loss function corresponding to the mediastinum region, which can perform secondary segmentation on the mediastinum region blood vessels located within the circumscribed bounding box of the mediastinum region in the first pulmonary vascular segmentation image to obtain a first mediastinum blood vessel segmentation image.

[0094] The vascular fusion weight loss function corresponding to the mediastinum region includes the vascular segmentation calculated inside the mediastinum boundary with the first mediastinum vascular segmentation image, and the vascular segmentation calculated outside the mediastinum boundary with the first pulmonary vascular segmentation image, that is, the pulmonary vascular mediastinum optimization model hopes that the vascular segmentation result within the mediastinum boundary of the second mediastinum vascular segmentation image output by itself is the same as the vascular segmentation result within the mediastinum boundary of the first mediastinum vascular segmentation image, and the vascular segmentation result outside the mediastinum boundary of the second mediastinum vascular segmentation image is the same as the vascular segmentation result outside the mediastinum boundary of the first pulmonary vascular segmentation image. The vascular fusion weight loss function corresponding to the mediastinum region also includes the segmentation calculated outside the mediastinum boundary with the vascular midline, so that the pulmonary vascular mediastinum optimization model pays more attention to the small blood vessels outside the mediastinum boundary.

[0095] Figure 8 FIG. 2 is a flow chart of a pulmonary vascular segmentation method provided by another exemplary embodiment of the present application. Figure 2 Based on the embodiment shown, Figure 8 The embodiment shown is described below in detail. Figure 8 The embodiment shown and Figure 2 The differences and similarities of the illustrated embodiments are not described in detail.

[0096] like Figure 8 As shown, before using the pulmonary vascular mediastinum optimization model, the following steps are also included.

[0097] Step 20, obtaining M groups of training data sets, each group of training data sets includes sample images and labeled images corresponding to the sample images, the sample images include three-dimensional sample images of lungs to be segmented, first pulmonary vessel segmentation sample images corresponding to the three-dimensional sample images of lungs to be segmented, and mediastinum mask sample images corresponding to the first pulmonary vessel segmentation sample images, the labeled images include vascular midline labeled images corresponding to the three-dimensional images of lungs to be segmented, first mediastinal vessel segmentation sample labeled images corresponding to the first pulmonary vessel segmentation sample images, and second mediastinal vessel segmentation sample labeled images, and M is a positive integer.

[0098] Step 30: Based on the M group of training data sets, the model to be trained is trained to obtain the pulmonary vascular mediastinum optimization model.

[0099] It can be understood that the model to be trained is a pre-established neural network model, and the difference between the model to be trained and the pulmonary vascular mediastinum optimization model lies in the model parameters, that is, the model parameters of the model to be trained are adjusted using M groups of training data sets to obtain a converged pulmonary vascular mediastinum optimization model.

[0100] In an embodiment of the present application, the training model is trained by acquiring M groups of training data sets to obtain a pulmonary vascular mediastinum optimization model, which can enable the pulmonary vascular mediastinum optimization model to accurately output the vascular midline and trachea, and segment the first mediastinum vascular segmentation image and the second mediastinum vascular segmentation image.

[0101] In one embodiment of the present application, the model training constraints corresponding to the first initial pixel fusion weight matrix and the second initial pixel fusion weight matrix include: the blood vessels within the mediastinum boundary of the second mediastinal vessel segmentation sample labeled image are the same as the blood vessels within the mediastinum boundary of the first mediastinal vessel segmentation sample labeled image, and the blood vessels outside the mediastinum boundary of the second mediastinal vessel segmentation sample labeled image are the same as the blood vessels outside the mediastinum boundary of the first pulmonary vessel segmentation sample image.

[0102] Specifically, when training the pulmonary vascular mediastinum optimization model, the blood vessels within the mediastinum boundary of the second mediastinum vascular segmentation sample labeled image tend to be the same as the blood vessels within the mediastinum boundary of the first mediastinum vascular segmentation sample, and the blood vessels outside the mediastinum boundary of the second mediastinum vascular segmentation sample labeled image tend to be the same as the blood vessels outside the mediastinum boundary at the corresponding position of the first pulmonary vascular segmentation sample. In addition, by utilizing the attention mechanism in the pulmonary vascular mediastinum optimization model, the segmentation with the vascular midline is calculated outside the mediastinum boundary, so that the pulmonary vascular mediastinum optimization model pays more attention to the fusion weights of the blood vessels outside the mediastinum boundary. Based on the above, a first initial pixel fusion weight matrix and a second initial pixel fusion weight matrix are generated to ensure that the blood vessel segmentation result inside the mediastinum boundary circumscribed bounding box of the first pulmonary vascular segmentation image can be better and more accurately fused with the blood vessel segmentation result of the first mediastinum vascular segmentation image, so as to generate a second mediastinum vascular segmentation image with higher segmentation accuracy and smoother mediastinum boundary.

[0103] Fig. 9 Shown is a schematic structural diagram of a pulmonary vascular mediastinum optimization model provided by an exemplary embodiment of the present application.

[0104] like Fig. 9 As shown, the pulmonary vascular mediastinum optimization model includes a backbone network and a mediastinum region optimization module. The three inputs of the pulmonary vascular mediastinum optimization model are a three-dimensional image of the lung to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional image of the lung to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image. After the backbone network segments the corresponding vascular midline and trachea according to the three-dimensional image of the lung to be segmented, the three-dimensional image of the lung to be segmented, the first pulmonary vascular segmentation image, and the mediastinum mask image are input into the mediastinum region optimization module. The mediastinum region optimization module generates a first mediastinum vascular segmentation image, a first initial pixel fusion weight matrix, and a second initial pixel fusion weight matrix, and then generates a second mediastinum vascular segmentation image according to the first mediastinum vascular segmentation image, the first initial pixel fusion weight matrix, the second initial pixel fusion weight matrix, and the first pulmonary vascular segmentation image.

[0105] Combination of the above Figures 2 to 9 , describes in detail the embodiment of the pulmonary vascular segmentation method of the present application, and the following is combined with Fig.10 , the pulmonary vascular segmentation device embodiment of the present application is described in detail. It should be understood that the description of the pulmonary vascular segmentation method embodiment corresponds to the description of the pulmonary vascular segmentation device embodiment, so the parts not described in detail can refer to the previous method embodiment.

[0106] Fig.10 FIG. 1 is a schematic diagram of the structure of a pulmonary vascular segmentation device provided by an exemplary embodiment of the present application. Fig.10 As shown, the pulmonary vascular segmentation device provided in the embodiment of the present application includes: a determination module 1010, which is used to determine a three-dimensional lung image to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image; a first generation module 1020, which is used to generate a first mediastinal vascular segmentation image based on the first pulmonary vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinal vascular segmentation image based on the three-dimensional lung image to be segmented, the first pulmonary vascular segmentation image and the mediastinum mask image, using a pulmonary vascular mediastinum optimization model; a second generation module 1030, which is used to generate a second pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix.

[0107] In one embodiment of the present application, the first generation module 1020 is also used to generate a vascular centerline corresponding to the three-dimensional image of the lung to be segmented based on the three-dimensional image of the lung to be segmented using the backbone network; use the mediastinum region optimization module to generate a first mediastinal vessel segmentation image based on the mediastinal boundary information of the mediastinum mask image and the first pulmonary vessel segmentation image, and generate a first initial pixel fusion weight matrix and a second initial pixel fusion weight matrix based on the vascular centerline and the first mediastinal vessel segmentation image.

[0108] In one embodiment of the present application, the second generation module 1030 is also used to generate a second mediastinal vessel segmentation image based on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix using the pulmonary vessel mediastinum optimization model; using the pulmonary vessel mediastinum optimization model, based on the mediastinum boundary information of the mediastinum mask image, intercept the first pulmonary vessel segmentation image to obtain a non-mediastinal region vessel segmentation image located outside the mediastinal region bounding box; using the pulmonary vessel mediastinum optimization model, determine the pixel position information of the second mediastinal vessel segmentation image relative to the non-mediastinal region vessel segmentation image; using the pulmonary vessel mediastinum optimization model, reconstruct the second mediastinal vessel segmentation image and the non-mediastinal region vessel segmentation image based on the pixel position information to generate the second pulmonary vessel segmentation image.

[0109] In one embodiment of the present application, the second generation module 1030 is further used to perform the same upsampling on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, the second initial pixel fusion weight matrix, and the mediastinal mask image, respectively, to obtain an upsampled pulmonary vessel segmentation image, an upsampled mediastinal vessel segmentation image, an upsampled first pixel fusion weight matrix, an upsampled second pixel fusion weight matrix, and an upsampled mediastinal mask image; based on the mediastinal boundary information of the upsampled mediastinal mask image, intercept the upsampled pulmonary vessel segmentation image to obtain an upsampled mediastinal vessel three-dimensional image located within the mediastinal boundary bounding box; for each of the upsampled mediastinal vessel segmentation images a current pixel point, multiplying the pixel value of the current pixel point by the fusion weight value in the upsampled second pixel fusion weight matrix corresponding to the current pixel point to obtain a first fusion value; determining the matching pixel point corresponding to the current pixel point in the upsampled mediastinal vessel three-dimensional image; multiplying the pixel value of the matching pixel point by the fusion weight value in the upsampled first pixel fusion weight matrix corresponding to the matching pixel point to obtain a second fusion value; adding the first fusion value and the second fusion value to obtain the pixel value of the pixel point corresponding to the current pixel point in the second mediastinal vessel segmentation image; generating the second mediastinal vessel segmentation image based on the pixel values ​​of all the pixels contained in the second mediastinal vessel segmentation image.

[0110] In one embodiment of the present application, the loss function of the pulmonary vascular mediastinum optimization model includes an artery and vein classification loss function, a tracheal segmentation loss function, a vascular midline segmentation loss function, a vascular segmentation loss function corresponding to the mediastinum region, and a vascular fusion weight loss function corresponding to the mediastinum region.

[0111] In one embodiment of the present application, the first generation module 1020 is also used to obtain M groups of training data sets, each group of training data sets includes sample images and labeled images corresponding to the sample images, the sample images include three-dimensional sample images of lungs to be segmented, first pulmonary vascular segmentation sample images corresponding to the three-dimensional sample images of lungs to be segmented, and mediastinum mask sample images corresponding to the first pulmonary vascular segmentation sample images, the labeled images include vascular midline labeled images corresponding to the three-dimensional images of lungs to be segmented, first mediastinal vascular segmentation sample labeled images corresponding to the first pulmonary vascular segmentation sample images, and second mediastinal vascular segmentation sample labeled images, and M is a positive integer; based on the M groups of training data sets, the model to be trained is trained to obtain the pulmonary vascular mediastinum optimization model.

[0112] In one embodiment of the present application, the model training constraints corresponding to the first initial pixel fusion weight matrix and the second initial pixel fusion weight matrix include: the blood vessels within the mediastinum boundary of the second mediastinal vessel segmentation sample labeled image are the same as the blood vessels within the mediastinum boundary of the first mediastinal vessel segmentation sample labeled image, and the blood vessels outside the mediastinum boundary of the second mediastinal vessel segmentation sample labeled image are the same as the blood vessels outside the mediastinum boundary of the first pulmonary vessel segmentation sample image.

[0113] Below, reference Fig.11 To describe an electronic device according to an embodiment of the present application. Fig.11 Shown is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.

[0114] like Fig.11 As shown, the electronic device 1100 includes one or more processors 1101 and a memory 1102 .

[0115] The processor 1101 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1100 to perform desired functions.

[0116] The memory 1102 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1101 may run the program instructions to implement the pulmonary vascular segmentation method of each embodiment of the present application described above and / or other desired functions. Various contents such as a three-dimensional image of the lungs to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional image of the lungs to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image may also be stored in the computer-readable storage medium.

[0117] In one example, the electronic device 1100 may further include: an input device 1103 and an output device 1104 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0118] The input device 1103 may include, for example, a keyboard, a mouse, etc.

[0119] The output device 1104 can output various information to the outside, including the first mediastinal vessel segmentation image of the first pulmonary vessel segmentation image, the first initial pixel fusion weight matrix corresponding to the first pulmonary vessel segmentation image, the second initial pixel fusion weight matrix corresponding to the first mediastinal vessel segmentation image, and the second pulmonary vessel segmentation image corresponding to the three-dimensional image of the lung to be segmented, etc. The output device 1104 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0120] Of course, to simplify, Fig.11 Only some of the components related to the present application in the electronic device 1100 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 1100 may also include any other appropriate components.

[0121] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the pulmonary vascular segmentation method according to various embodiments of the present application described above in this specification.

[0122] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0123] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the pulmonary vascular segmentation method according to various embodiments of the present application described above in this specification.

[0124] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0125] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0126] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0127] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0128] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A pulmonary vascular segmentation method, characterized in that: include: Determine a three-dimensional lung image to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image; Based on the three-dimensional image of the lung to be segmented, the first pulmonary vessel segmentation image and the mediastinum mask image, a first mediastinum vessel segmentation image based on the first pulmonary vessel segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vessel segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinum vessel segmentation image are generated using a pulmonary vessel mediastinum optimization model, wherein the pixel points on the first pulmonary vessel segmentation image and the values ​​in the first initial pixel fusion weight matrix are in a one-to-one correspondence, and the pixel points on the first mediastinum vessel segmentation image and the values ​​in the second initial pixel fusion weight matrix are in a one-to-one correspondence; Generate a second pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix; The pulmonary vascular mediastinum optimization model includes a backbone network and a mediastinum region optimization module. Based on the three-dimensional lung image to be segmented, the first pulmonary vascular segmentation image and the mediastinum mask image, the pulmonary vascular mediastinum optimization model is used to generate a first mediastinal vascular segmentation image based on the first pulmonary vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinal vascular segmentation image, including: Based on the three-dimensional image of the lung to be segmented, using the backbone network, generating a blood vessel midline corresponding to the three-dimensional image of the lung to be segmented; Using the mediastinum region optimization module, generating a first mediastinal vessel segmentation image based on the mediastinal boundary information of the mediastinal mask image and the first pulmonary vessel segmentation image, The first initial pixel fusion weight matrix and the second initial pixel fusion weight matrix are generated based on the blood vessel midline and the first mediastinal blood vessel segmentation image.

2. The pulmonary blood vessel segmentation method according to claim 1, characterized in that: The step of generating a second pulmonary vessel segmentation image corresponding to the three-dimensional lung image to be segmented based on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix comprises: Based on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix, using the pulmonary vessel mediastinum optimization model, generating a second mediastinal vessel segmentation image; Using the pulmonary vascular mediastinum optimization model, based on the mediastinum boundary information of the mediastinum mask image, intercepting the first pulmonary vascular segmentation image to obtain a non-mediastinum region vascular segmentation image located outside the mediastinum region bounding box; Determine pixel position information of the second mediastinal vessel segmentation image relative to the non-mediastinal region vessel segmentation image using the pulmonary vascular mediastinum optimization model; The second mediastinum vessel segmentation image and the non-mediastinum region vessel segmentation image are reconstructed using the pulmonary vessel mediastinum optimization model based on the pixel position information to generate the second pulmonary vessel segmentation image.

3. The pulmonary blood vessel segmentation method according to claim 2, characterized in that: The method of generating a second mediastinal vessel segmentation image based on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix using the pulmonary vessel mediastinum optimization model includes: Performing the same upsampling on the first pulmonary vessel segmentation image, the first mediastinal vessel segmentation image, the first initial pixel fusion weight matrix, the second initial pixel fusion weight matrix, and the mediastinal mask image, respectively, to obtain an upsampled pulmonary vessel segmentation image, an upsampled mediastinal vessel segmentation image, an upsampled first pixel fusion weight matrix, an upsampled second pixel fusion weight matrix, and an upsampled mediastinal mask image; Based on the mediastinum boundary information of the upsampled mediastinum mask image, intercepting the upsampled pulmonary vascular segmentation image to obtain an upsampled mediastinal vascular three-dimensional image located within the mediastinum boundary enclosing frame; For each current pixel of the upsampled mediastinal vessel segmentation image, Multiplying the pixel value of the current pixel by the fusion weight value in the up-sampled second pixel fusion weight matrix corresponding to the current pixel to obtain a first fusion value; Determine a matching pixel point in the upsampled pulmonary vascular three-dimensional image corresponding to the current pixel point; Multiplying the pixel value of the matching pixel by the fusion weight value in the up-sampled first pixel fusion weight matrix corresponding to the matching pixel to obtain a second fusion value; Adding the first fusion value and the second fusion value to obtain a pixel value of a pixel point corresponding to the current pixel point in the second mediastinal vessel segmentation image; The second mediastinal vessel segmentation image is generated based on the pixel values ​​of all the pixels included in the second mediastinal vessel segmentation image.

4. The pulmonary blood vessel segmentation method according to any one of claims 1 to 3, characterized in that: The loss function of the pulmonary vascular mediastinum optimization model includes an artery and vein classification loss function, a tracheal segmentation loss function, a vascular midline segmentation loss function, a vascular segmentation loss function corresponding to the mediastinum region, and a vascular fusion weight loss function corresponding to the mediastinum region.

5. The pulmonary blood vessel segmentation method according to any one of claims 1 to 3, characterized in that: Prior to using the pulmonary vascular mediastinum optimization model, the method further includes: Acquire M groups of training data sets, each group of the training data sets includes a three-dimensional sample image of the lung to be segmented, a first pulmonary vascular segmentation sample image corresponding to the three-dimensional sample image of the lung to be segmented, a mediastinum mask sample image corresponding to the first pulmonary vascular segmentation sample image, and a vascular midline labeled image corresponding to the three-dimensional sample image of the lung to be segmented, a first mediastinal vascular segmentation sample labeled image corresponding to the first pulmonary vascular segmentation sample image, and a second mediastinal vascular segmentation sample labeled image, where M is a positive integer; Based on the M groups of training data sets, the model to be trained is trained to obtain the pulmonary vascular mediastinum optimization model.

6. The pulmonary blood vessel segmentation method according to claim 5, characterized in that: The model training constraints corresponding to the first initial pixel fusion weight matrix and the second initial pixel fusion weight matrix include: the blood vessels within the mediastinum boundary of the second mediastinal vessel segmentation sample labeled image are the same as the blood vessels within the mediastinum boundary of the first mediastinal vessel segmentation sample labeled image, and the blood vessels outside the mediastinum boundary of the second mediastinal vessel segmentation sample labeled image are the same as the blood vessels outside the mediastinum boundary of the first pulmonary vessel segmentation sample image.

7. A pulmonary vascular segmentation device, characterized in that: include: a determination module, configured to determine a three-dimensional lung image to be segmented, a first pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented, and a mediastinum mask image corresponding to the first pulmonary vascular segmentation image; A first generating module is used to generate, based on the three-dimensional lung image to be segmented, the first pulmonary vascular segmentation image and the mediastinum mask image, a first mediastinum vessel segmentation image based on the first pulmonary vascular segmentation image, a first initial pixel fusion weight matrix corresponding to the first pulmonary vascular segmentation image, and a second initial pixel fusion weight matrix corresponding to the first mediastinum vessel segmentation image using a pulmonary vascular mediastinum optimization model, wherein the pixel points on the first pulmonary vascular segmentation image and the values ​​in the first initial pixel fusion weight matrix are in a one-to-one correspondence, and the pixel points on the first mediastinum vessel segmentation image and the values ​​in the second initial pixel fusion weight matrix are in a one-to-one correspondence; A second generating module is used to generate a second pulmonary vascular segmentation image corresponding to the three-dimensional lung image to be segmented based on the first pulmonary vascular segmentation image, the first mediastinal vascular segmentation image, the first initial pixel fusion weight matrix, and the second initial pixel fusion weight matrix; The pulmonary vascular mediastinum optimization model includes a backbone network and a mediastinum region optimization module. The first generation module is also used to generate a vascular centerline corresponding to the three-dimensional lung image to be segmented based on the three-dimensional lung image to be segmented using the backbone network; using the mediastinum region optimization module, based on the mediastinum boundary information of the mediastinum mask image and the first pulmonary vascular segmentation image, generate a first mediastinal vascular segmentation image; based on the vascular centerline and the first mediastinal vascular segmentation image, generate the first initial pixel fusion weight matrix and the second initial pixel fusion weight matrix.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the pulmonary blood vessel segmentation method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to execute the pulmonary blood vessel segmentation method according to any one of claims 1 to 6.