Image region extraction method, device, equipment and storage medium
By performing preset contour correction on the contour of the lung area to be extracted, the problem of incomplete and inaccurate lung area extraction in the prior art is solved, and more accurate lung area extraction is achieved.
Patent Information
- Application Number
- CN202010440540.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-05-22
AI Technical Summary
Existing lung region extraction methods based on genetic algorithms require a large number of clear training samples, and the boundaries of the lung regions may have lesions or adhesion to the inner wall of the chest, resulting in incomplete and inaccurate extraction.
By obtaining the preset lung area contour and lung image, using the preset contour to correct the contour to be extracted, the corrected contour is obtained and the lung area is extracted to ensure the integrity and accuracy of the extraction.
This ensures the integrity and accuracy of lung region extraction when the boundaries of the lung region are unclear, and avoids extraction errors caused by border lesions or adhesions.
Smart Images

Figure CN111627037B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an image region extraction method, device, equipment and storage medium. Background Art
[0002] At present, the lung region is generally extracted based on the global optimization strategy in the genetic algorithm. The genetic algorithm needs to provide a large number of training samples, and the training samples need to have clear lung boundaries. In fact, the lung region boundary may have lesions, and even the lung region boundary and the chest cavity inner wall may produce adhesion areas, that is, the lung image does not have a clear lung boundary. If the lung region is extracted based on the global optimization strategy in the genetic algorithm, the lung region extraction will be incomplete and inaccurate. Summary of the invention
[0003] The main purpose of the present invention is to provide an image region extraction method, device, equipment and storage medium, aiming to solve the problem of incomplete and inaccurate lung region extraction in the prior art.
[0004] To achieve the above object, in a first aspect, the present invention provides an image region extraction method, the image region extraction method comprising the following steps:
[0005] Obtaining a preset lung area contour and lung image;
[0006] Obtaining a contour of a lung region to be extracted according to the lung image;
[0007] Correcting the lung region contour to be extracted using the preset lung region contour to obtain a corrected lung region contour;
[0008] Lung region extraction is performed on the lung image according to the corrected lung region contour.
[0009] In a second aspect, the present invention further provides an image region extraction device, the device comprising:
[0010] An acquisition module, used to acquire a preset lung region contour and a lung image, and obtain a lung region contour to be extracted according to the lung image;
[0011] A correction module, used for correcting the lung region contour to be extracted by using the preset lung region contour to obtain a corrected lung region contour;
[0012] An extraction module is used to extract the lung region of the lung image according to the corrected lung region contour.
[0013] In a third aspect, the present invention further proposes an image region extraction device, which includes: a memory, a processor, and an image region extraction program stored in the memory and executable on the processor, wherein the image region extraction program is executed by the processor to perform the steps of the image region extraction method.
[0014] In a fourth aspect, the present invention further proposes a storage medium storing an image region extraction program, which implements the steps of the image region extraction method when executed by a processor.
[0015] The present invention provides an image region extraction method, device, equipment and storage medium. After obtaining a preset lung region contour and a lung image, the lung region contour to be extracted can be obtained according to the lung image; and the preset lung region contour can be used to correct the erroneously extracted contour in the lung region contour to be extracted, that is, the region where the lung region boundary and the chest cavity inner wall are adhered can be corrected to obtain a complete and accurate corrected lung region contour; thus, the lung region of the lung image is extracted according to the corrected lung region contour, which can ensure that a complete and accurate corrected lung region contour is extracted. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flowchart of an image region extraction method according to an embodiment of the present invention;
[0017] Figure 2 A schematic diagram showing the structure of an image region extraction device according to an embodiment of the present invention;
[0018] Figure 3 A schematic structural diagram of an image region extraction device according to an embodiment of the present invention is shown.
[0019] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0021] It should be noted that the image region extraction device in the embodiment of the present invention can be a smart phone, a personal computer, a server or other device, and no specific limitation is made here.
[0022] The execution subject of the lung region extraction method provided in an embodiment of the present invention can be any image processing device, for example, the lung region extraction method can be executed by a terminal device or a server, wherein the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be a local server or a cloud server. In some possible implementations, the lung region extraction method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0023] The embodiment of the present invention provides an image region extraction method, such as Figure 1 As shown, including:
[0024] S10: Acquire a preset lung region contour and a lung image.
[0025] In an embodiment of the present invention, the method for determining the preset lung region contour comprises: extracting the lung region contours of a number of healthy subjects' lung images respectively to obtain a number of lung region contours; fitting the number of lung region contours to obtain the preset lung region contour. The fitting method may adopt the least squares fitting method. The method for extracting the lung region contours of a number of healthy subjects' lung images may be the existing region growing method. In the present invention and the embodiments of the present invention, the size of the lung images of a number of healthy subjects should be the same as the size of the lung image.
[0026] In the embodiment of the present invention, the number of lung images of healthy subjects is 1003 sets, and the lung region contours of the 1003 sets of lung images of healthy subjects are extracted by using the region growing method to obtain 1003 sets of lung region contours. Then, the preset lung region contour, that is, a lung region contour model, is obtained by using the least squares fitting method.
[0027] In the embodiment of the present invention, the lung image of a healthy subject is a lung image in which there is no adhesion between the lung boundary and the inner wall of the chest cavity, and a traditional method can be used to obtain the lung image of the lung region.
[0028] S20: Obtaining a contour of the lung region to be extracted according to the lung image.
[0029] In some possible implementations, the embodiments of the present invention may obtain lung images by taking CT (Computed Tomography).
[0030] In an embodiment of the present invention, the lung image is a lung image of a lung region contour to be extracted. Similarly, the lung image can be used to extract the lung region contour by using a region growing method. However, the lung region contour to be extracted has an erroneous extraction contour at the adhesion of the chest cavity, and the erroneous extraction contour is a concave area or a convex area of the lung region contour to be extracted. Therefore, it is necessary to use a preset lung region contour to correct the lung region contour to be extracted, and then use the corrected lung region contour to extract the lung region from the lung image.
[0031] In some possible implementations, the present invention can also process lung images through a neural network to obtain the contour of the lung area to be extracted. The specific processing process is described in subsequent embodiments.
[0032] S30: Correcting the erroneously extracted contour in the to-be-extracted lung region contour using the preset lung region contour to obtain a corrected lung region contour.
[0033] In the present invention, the method of using the preset lung region contour to correct the erroneously extracted contour in the lung region contour to be extracted to obtain the corrected lung region contour includes: determining a number of points set on the lung region contour to be extracted; scaling the preset lung region contour according to a preset step length, and when the number of points contacted by the scaled preset lung region contour is greater than or equal to the set number, the scaled preset lung region contour is determined to be the corrected lung region contour, and the erroneous contour of the lung region contour to be extracted is corrected. Scaling the preset lung region contour according to the preset step length only changes the size of the preset lung region contour, but does not change the shape of the preset lung region contour.
[0034] In an embodiment of the present invention, the preset lung region contour may be gradually reduced or gradually expanded. In the method of correcting the lung region contour to be extracted by the preset lung region contour to obtain the corrected lung region contour, before scaling the preset lung region contour according to a preset step length, the first area of the preset lung region contour and the second area of the lung region contour to be extracted are calculated respectively, and when the first area is larger than the second area, the preset lung region contour is reduced; when the first area is smaller than the second area, the preset lung region contour is enlarged.
[0035] In an embodiment of the present invention, the number of the plurality of points is 1000, and the plurality of points are evenly distributed on the contour of the lung region to be extracted. The preset step length is 0.1 mm, and the set number can be 1 / 2 or more of the plurality of points. The number of the plurality of points, the preset step length, and the set number can be set by those skilled in the art according to actual needs, and the present invention does not limit them.
[0036] In the present invention, the preset lung region contour is scaled according to a preset step length, and when the number of points contacted by the scaled preset lung region contour is greater than or equal to the set number, the erroneous extraction contour of the lung region contour to be extracted is determined, and the erroneous extraction contour is replaced by the corresponding contour of the scaled preset lung region contour, and the replaced lung region contour to be extracted is the corrected lung region contour. The correct area of the lung region contour to be extracted is retained, and only the erroneous extraction contour of the lung region contour to be extracted is corrected.
[0037] In the present invention, the method for determining the erroneously extracted contour of the to-be-extracted lung region contour comprises: the scaled preset lung region contour contacts the several points to divide the scaled preset lung region contour into several preset lung region contour line segments, and the to-be-extracted lung region contour is divided into several to-be-extracted lung region contour line segments; calculating the distance between the preset lung region contour line segments and the to-be-extracted lung region contour line segments having the same starting point and the same end point; when the distance is greater than or equal to the set distance, the to-be-extracted lung region contour line segment is the erroneously extracted contour.
[0038] In an embodiment of the present invention, the preset lung region contour line segment and the lung region contour line segment to be extracted having the same starting point and the same end point are approximated as straight lines, and the average distance of the two straight lines is calculated to obtain the distance between the preset lung region contour line segment and the lung region contour line segment to be extracted having the same starting point and the same end point. Specifically, the two straight lines are two non-parallel straight lines, and the calculation method is to take a number of contour line points on the lung region contour line segment to be extracted, and respectively calculate the line segment distances from the several contour line points to the preset lung region contour line segment, and the average value of all the line segment distances is the distance between the preset lung region contour line segment and the lung region contour line segment to be extracted having the same starting point and the same end point. When the distance is greater than or equal to the set distance, it is determined that the lung region contour line segment to be extracted is the erroneously extracted contour.
[0039] In the embodiment of the present invention, the set distance may be 8 mm to 25 mm. Similarly, those skilled in the art may set the distance according to actual needs, and the present invention does not limit the set distance.
[0040] S40: Extracting the lung region from the lung image according to the corrected lung region contour.
[0041] Further, in the present invention, the preset lung area contour is a preset lung area contour of multiple layers of planes, and the lung image is a lung image of multiple layers of planes; the preset lung area contour is a preset lung area contour of multiple layers of planes, and the lung image is a lung image of multiple layers of planes; before extracting the lung area from the lung image according to the corrected lung area contour, the method also includes: determining whether the number of layers of the preset lung area contour is the same as the number of layers of the lung image; if they are the same, extracting the lung area from the lung image according to the corrected lung area contour; if they are different, interpolating the preset lung area contour or the lung image to obtain the preset lung area contour and the lung image with the same number of layers; extracting the lung area from the lung image according to the corrected lung area contour after interpolation, or extracting the lung area from the interpolated lung image according to the corrected lung area contour.
[0042] At the same time, the preset lung region contour corrects the lung region contour to be extracted, and the method for obtaining the corrected lung region contour is to correct the preset lung region contour of the multi-layer plane, and the obtained corrected lung region contour is the corrected lung region contour of the multi-layer plane. Lung regions are extracted from the lung images of the multi-layer planes respectively according to the corrected lung region contour of the multi-layer plane.
[0043] Furthermore, in the present invention, the preset lung region contour includes: a set left lung region contour and a set right lung region contour; the lung region contour to be extracted includes: a left lung region contour to be extracted and a right lung region contour to be extracted; the left lung region contour to be extracted is corrected using the set left lung region contour to obtain a corrected left lung region contour; the right lung region contour to be extracted is corrected using the set right lung region contour to obtain a corrected right lung region contour; and lung region extraction is performed on the lung image according to the corrected left lung region contour and the corrected right lung region contour.
[0044] In an embodiment of the present invention, the extraction method for setting the left lung region contour and the right lung region contour adopts the above-mentioned region growing method, or is implemented by a neural network. The method for obtaining the corrected left lung region contour and the method for obtaining the corrected right lung region contour refer to the detailed description above. In addition, when obtaining the corrected lung region contour, the embodiment of the present invention can use the area formed by the corrected lung region contour as the extracted lung region. For example, the corrected lung region contour obtained in the embodiment of the present invention can also be represented in the form of a matrix or a vector, including a first label 1 and a second label 0, the first label represents the contour boundary and the image pixels within the contour boundary, and 0 represents other areas. By multiplying the corrected lung region contour and the image feature, the extracted lung region in the lung image can be obtained.
[0045] Referring to the description of the above embodiment, the method for obtaining the contour of the lung area to be extracted in the embodiment of the present invention can be executed by neural network processing, which may include the extraction of the regional contour of at least one area in the left lung area and the right lung area, which is described in detail below.
[0046] In an embodiment of the present invention, a neural network may be used to process a lung image to obtain the contour of the lung region to be extracted in the lung image. That is, in an embodiment of the present invention, obtaining the contour of the lung region to be extracted based on the lung image may include: acquiring image features of each layer of images in the lung image; performing feature optimization processing on the image features of each layer of images in the lung image to obtain optimized features corresponding to each layer of images; performing correction processing on the lung image using the correlation features between the optimized features of adjacent layers of images in the lung image to obtain a corrected lung image; and obtaining the contour of the lung region to be extracted in the lung image based on the corrected lung image. Alternatively, obtaining the contour of the lung region to be extracted based on the lung image may include: performing detail enhancement processing on the image features of the lung image to obtain specific image features; correcting the lung image based on specific image features of adjacent layers of images in the lung image; and segmenting the contour of the lung region to be extracted from the corrected lung image using a region generation method.
[0047] In some possible implementations, the lung image may be obtained by photographing the lung image using CT (computed tomography), or the lung image may be received from other electronic devices or servers. The lung image may include multi-layer lung tomography (images), and the overall lung image may be formed by superimposing these multi-layer images.
[0048] In some possible implementations, when a lung image is obtained, image features of the lung image can be further extracted, wherein the pixel values corresponding to the pixel points in each layer of the lung image can be directly used as image features, or the image features of the image can be obtained by performing feature extraction processing on the image.
[0049] In some possible implementations, the image features of each layer of images can be respectively optimized by performing convolution processing on the image features of each layer of images. This optimization can increase more detailed feature information and improve the richness of features. Among them, by performing optimization processing on each layer of images, corresponding optimized features can be obtained respectively. Alternatively, the image features of adjacent layers of images can be connected to obtain connected features, and feature processing can be performed on the connected features so that the image features of adjacent layers of images can be fused with each other, and the feature accuracy can be improved. Then, the same features obtained by two convolution layers are respectively convolved, and the optimized features of each layer of images in the adjacent layers of images are correspondingly obtained.
[0050] In some possible implementations, after obtaining the optimized features of each layer of the lung image, the associated features between the optimized features of adjacent layers of the image can be further obtained, and the elements in the associated features represent the degree of association between the feature values at the same position in the optimized features of adjacent layers of the image. Using the associated features, correction processing of each layer of the lung image can be performed to improve the accuracy of the lung image. In the embodiment of the present invention, the associated features, image features, optimized features, and subsequent fusion features, residual features, and other features can all be represented in the form of vectors or matrices.
[0051] In some possible implementations, the obtained associated features can be used to perform feature fusion processing between optimized features of adjacent layer images to obtain fused features. Through this fusion processing, the image features of adjacent layer images can be effectively fused, which is beneficial to the correction of lung images. Among them, in the embodiment of the present invention, adjacent layer images refer to any layer image in the lung image and the next layer image of any layer image. In other embodiments, it can also be any layer image and the next n layers of images of any layer image, and n is an integer greater than or equal to 1 and less than or equal to 3. In other words, adjacent layers can represent two directly adjacent layers of images, or can also represent adjacent multiple layers of images, and the present invention does not make specific limitations on this.
[0052] In some possible implementations, when a fusion feature is obtained, the fusion feature can be used to perform image correction on any image in the adjacent layer images. For example, the fusion feature and the image feature of the image can be added to obtain a corrected image feature, and the image corresponding to the corrected image feature is the corrected image.
[0053] In the embodiment of the present invention, the corrected lung image can be obtained by superimposing the corrected images of each layer in the lung image. Alternatively, convolution processing can be performed on the corrected images of each layer in the lung image to further improve the image accuracy, and then the obtained image features are superimposed to obtain the corrected lung image.
[0054] By performing lung region segmentation on the corrected image, the corresponding lung region contour to be extracted can be obtained. For example, the lung region detection can be realized through a convolutional neural network to obtain the lung region contour to be extracted. Alternatively, the corrected lung image can be processed using a region growing method to obtain the lung region contour.
[0055] It should be noted here that the embodiments of the present invention can be implemented through a neural network or through an algorithm specified in this application. As long as it is included in the scope of the technical solution protected by this application, it can be regarded as an embodiment of the present invention.
[0056] Based on the above configuration, the embodiment of the present invention can obtain the correlation features between the optimized features of the image features of adjacent layers of images. When the above-mentioned optimized feature fusion process is performed through the correlation features, the feature information between the adjacent layers of images can be fused according to the correlation of different features at the same position in the correlation features, thereby improving the correction effect of the lung image.
[0057] The following is a detailed description of the method for obtaining the contour of the lung area to be extracted according to an embodiment of the present invention in conjunction with the accompanying drawings. The embodiment of the present invention can first obtain the image features of each layer of the image in the lung image, wherein, as described in the above embodiment, the pixel values of the pixel points of each layer of the image in the lung image can be used as the corresponding image features, or the image features of the lung image can be extracted by a feature extraction neural network. The feature extraction neural network may include a residual network or a feature pyramid network, and the lung image is input into the feature extraction neural network to obtain the image features corresponding to the lung image, including the image features of each layer of the image. Alternatively, each layer of the image can be input into the feature extraction neural network separately to obtain the image features of each layer of the image. The image features can be expressed in the form of vectors or matrices, including the feature information of each pixel point of the corresponding image. The present invention does not specifically limit the form of the image features.
[0058] When the image features of each layer of images are obtained, the image features can be optimized to obtain corresponding optimized features. In some possible implementations, convolution processing can be directly performed on the image features of each layer of images to further improve the accuracy of the image features and enrich the detailed feature information to obtain corresponding optimized features. Alternatively, feature fusion can be performed using the image features of adjacent layers of images, and the fusion results can be used to optimize the image features.
[0059] In an embodiment of the present invention, the feature optimization processing is performed on the image features of each layer of images to obtain optimized features corresponding to each layer of images, including: performing multi-image feature fusion processing on adjacent layer images in the lung image to obtain fusion features corresponding to each layer of images in the adjacent layer images, wherein the adjacent layer images in the lung image include a first image arranged in order of increasing layer number, and at least one second image adjacent to the first image, and the fusion features of each image in the adjacent layer images are fused with feature information of any image in the adjacent layer images; single image feature fusion processing is performed on the corresponding image features using the fusion features of each layer of images in the lung image to obtain optimized features of the image.
[0060] In the embodiment of the present invention, adjacent layer images may be defined as including a first image and at least one second image, wherein the second image is an image adjacent to the first image in the direction of increasing layer number, for example, the first image is the i-th layer image, the second image may be the i+1-th layer image, or may be the i+1-th to i+n-th images, where n is an integer greater than 1. In the embodiment of the present invention, n may be an integer less than 5, but is not specifically limited to the present invention. In the embodiment of the present invention, each layer of image may be sequentially determined as the first image in the order of the first to N-th layer images in the lung image, and the feature fusion and correction of the first image may be achieved by combining the features of the second image adjacent to the first image.
[0061] In the embodiment of the present invention, a first fused feature corresponding to the first image and a second fused feature corresponding to the second image can be obtained by multi-image feature fusion between the image features of the first image and the image features of the second image. The multi-image feature fusion process can be used to fuse the image features of the first image and the second image, so that the first fused feature and the second fused feature both include feature information of the first image and the second image. It should be noted that the first image can be any layer of the lung image.
[0062] Through the above configuration, a fusion feature corresponding to each layer of the image in the lung image can be obtained. The fusion feature may include feature information of the layer of image and feature information of images adjacent to the layer of image.
[0063] In some possible implementations, when the fusion features of each layer of images are obtained, the fusion features of the images can be used to perform single image feature fusion processing on the image features of the images. For example, when the first fusion feature of the first image and the second fusion feature of the second image are obtained, the first fusion feature can be used to perform single image feature fusion on the image features of the first image, and the second fusion feature can be used to perform single image feature fusion on the image features of the second image, and the first optimization feature and the second optimization feature can be obtained respectively.
[0064] Among them, through the single image feature fusion processing, the respective image features can be further strengthened on the basis of the fusion features corresponding to each layer. For example, on the basis of the first fusion feature of the first image and the second fusion feature of the second image, the respective image features can be further strengthened, so that the first optimized feature obtained not only has the image features of the first image but also fuses the feature information of the second image, and the second optimized feature obtained not only has the image features of the second image but also fuses the feature information of the first image.
[0065] The following is an explanation of the multi-image feature fusion and single image feature fusion of an embodiment of the present invention in conjunction with the accompanying drawings. Among them, the multi-image feature fusion processing is performed on the adjacent layer images in the lung image to obtain the fusion features corresponding to each layer of the adjacent layer images, including: connecting the image features of the adjacent layer images to obtain a first connection feature; using a first residual network to process the first connection feature to obtain a first residual feature; using at least two convolutional layers to perform convolution processing on the first residual feature respectively, and respectively obtain the fusion features corresponding to the adjacent layer images.
[0066] In the embodiment of the present invention, when performing feature fusion of multiple images, the image features of each image in adjacent layers of images may be connected to obtain a first connection feature. For example, a connection operation may be performed through a connection function (concat) to simply fuse the feature information between adjacent layers of images.
[0067] When the first connection feature is obtained, the first connection feature can be further optimized. In an embodiment of the present invention, a residual network (first residual network) can be used to perform the feature optimization process. The first connection feature can be input into a first residual network (residual block) to perform feature optimization processing to obtain a first residual feature. Through the processing of the first residual network, the feature information in the first connection feature can be further fused and the accuracy of the feature information can be improved, that is, the first residual feature further accurately fuses the feature information in the first image and the second image. Among them, the first residual network can be any residual network structure, and the present invention does not specifically limit this.
[0068] In some possible implementations, when the first residual feature is obtained, different convolutional layers can be used to perform convolution processing on the first residual feature. For example, when the adjacent layers are the first image and the second image, two convolutional layers can be used to perform convolution processing on the first residual feature to obtain a first fusion feature of the first image and a second fusion feature of the second image. The two convolutional layers can be, but are not limited to, 1*1 convolution kernels. The first fusion feature includes feature information of the second image, and the second fusion feature also includes feature information of the first image, that is, the first fusion feature and the second fusion feature both include feature information of the two images.
[0069] Through the above configuration, the fusion of feature information of each image in adjacent layer images can be achieved, that is, the correction accuracy of each layer image in the lung image can be improved by means of inter-layer information fusion.
[0070] In addition, the method of using the fusion features of each layer of images in the lung image to perform single image feature fusion processing on the corresponding image features to obtain the optimized features of the image includes: using the summation processing of the fusion features and image features of the image to obtain the summed features of the image; and using a second residual network to process the summed features of the image to obtain the optimized features of the image.
[0071] In some possible implementations, when the fusion features of each layer of images are obtained, the fusion features and the corresponding image features perform optimization processing of the image features. In this embodiment, the summed features can be obtained by first adding the fusion features and image features of the image. Then, the summed features are optimized using a residual network (a second residual network) to obtain the optimized features of the image. For example, for the first image feature of the first image, the optimization processing can be performed by adding the image features of the first image and the first fusion features. The addition can include the direct addition of the first fusion feature and the image features of the first image, or the weighted addition of the first fusion feature and the image features of the first image, that is, the first fusion feature and the image features of the first image are respectively multiplied by the corresponding weighting coefficients and then added, wherein the weighting coefficient can be a pre-set value or a value learned by the neural network, and the present invention does not specifically limit this.
[0072] Similarly, when the second fusion feature is obtained, the second fusion feature can be used to perform single image feature fusion processing of the second image. The embodiment of the present invention can perform the fusion processing by adding the image feature of the second image and the second fusion feature. The addition can include the direct addition of the second fusion feature and the image feature of the second image, and can also include the weighted addition of the second fusion feature and the image feature of the second image, that is, the second fusion feature and the image feature of the second image are respectively multiplied by the corresponding weighting coefficient and then added, wherein the weighting coefficient can be a pre-set value or a value learned by the neural network, and the present invention does not specifically limit this.
[0073] It should be noted here that the embodiment of the present invention does not specifically limit the time for performing the addition processing on the image features of the first image and the first fusion features, and the time for performing the addition processing on the image features of the second image and the second fusion features. The two can be performed separately or simultaneously.
[0074] Through the above-mentioned summation processing, the feature information of the original image can be further increased on the basis of the fused features. The fusion of single image features can achieve the retention of the feature information of a single layer image at each stage of the network, and then the feature information of a single layer image can be optimized based on the feature information between the optimized multi-layer images. In addition, the embodiment of the present invention can directly use the above-mentioned first summation feature and the second summation feature as the first optimized feature and the second optimized feature, and can also perform subsequent optimization processing to further improve the feature accuracy.
[0075] Through the above configuration, the optimized features of a single layer image in a lung image can be obtained. When the optimized features are obtained, the associated features between the optimized features can be used to perform feature optimization of the lung image.
[0076] In addition, the method of using the correlation features between the optimized features of adjacent layer images in the lung image to perform correction processing on the lung image to obtain a corrected lung image includes: acquiring the correlation features between the optimized features of adjacent layer images in the lung image; using the correlation features between the optimized features of adjacent layer images to perform feature fusion processing on the optimized features respectively corresponding to the adjacent layer images to obtain optimized fusion features; using the optimized fusion features to correct the image features of any image in the adjacent layer images to obtain corrected features of any image; using the corrected features respectively corresponding to each layer image of the lung image to obtain a corrected lung image.
[0077] In the embodiment of the present invention, when the optimized features of each layer of the lung image are obtained, the corrected lung image can be obtained by using the correction features corresponding to each layer of the adjacent lung image.
[0078] In an embodiment of the present invention, when the optimized features of each layer image in the lung image are obtained, the associated features between the optimized features can be determined using the optimized features of each image in the layer image. For example, the associated features between the first optimized feature and the second optimized feature can be further obtained through the first optimized feature corresponding to the first image and the second optimized feature corresponding to the second image. The associated features can represent the degree of association between the feature information corresponding to the same position in the first optimized feature and the second optimized feature. The degree of association can reflect the changes in the first image and the second image for the same object. The same object here can include, for example, the boundary of the lung region. In an embodiment of the present invention, the scales of the images in the lung image can be the same, and the scales of the corresponding optimized features are also the same.
[0079] In addition, when the scales of the obtained first optimized feature and the second optimized feature, or the first fusion feature and the second fusion feature, the first sum feature and the second sum feature, the image feature of the first image and the image feature of the second image are different, the corresponding features can also be adjusted to the same scale, for example, by performing the scale adjustment operation through pooling processing.
[0080] In addition, the embodiment of the present invention can obtain the correlation features between the optimized features of each image in the adjacent layer image through the graph convolutional neural network. For example, the first optimized feature of the first image and the second optimized feature of the second image in the adjacent layer image can be input into the graph convolutional neural network, and the graph convolutional neural network can output the correlation features between the first optimized feature and the second optimized feature after processing, and the elements in the correlation features represent the correlation between the feature information at the same position in the first optimized feature and the second optimized feature.
[0081] In an embodiment of the present invention, before performing the correction operation of each layer of images, a fusion feature (optimized fusion feature) of the optimization features of each layer of images in the adjacent layer of images can also be obtained. For example, a fusion operation of the first optimization feature and the second optimization feature can be performed. Among them, the optimization features of the adjacent layer images can be connected, such as connecting the first optimization feature and the second optimization feature, and the first optimization feature and the second optimization feature can be connected in the channel direction. In an embodiment of the present invention, the connection process can be performed by the concat function to obtain the second connection feature. Then, the activation function can be used to activate the association features between the optimization features of the adjacent layer images, wherein the activation function can be a softmax function, and each correlation degree in the association feature can be used as an input parameter, and then the activation function is used to process each input parameter and output the processed association feature. Furthermore, the product between the activated association feature and the second connection feature can be used to obtain the optimized fusion feature.
[0082] When the optimized fusion features of the adjacent layer images are obtained, the optimized fusion features can be used to perform a correction operation on any image in the adjacent layer images. In particular, the embodiment of the present invention can perform image feature correction by adding the image features of the original image and the optimized fusion features to obtain the corrected image features, that is, the corrected image.
[0083] In addition, the image features and the optimized fusion features of the first image may be summed to obtain a corrected image feature, and then the corrected image of the lung image may be determined based on the corrected image feature. The summation process may be direct addition or weighted addition using a weighting coefficient, and the present invention does not specifically limit this. The corrected image feature may directly correspond to the pixel value of each pixel point of the image, and therefore the corrected image corresponding to the corrected image feature may be directly used. In addition, the corrected image feature may be further convolved to further fuse the feature information and improve the feature accuracy, and then the corrected lung image may be determined based on the features obtained by the convolution process.
[0084] The image correction process of the embodiment of the present invention can be used to achieve at least one of denoising, super-resolution and deblurring of each layer of the lung image, and the image quality can be improved to varying degrees through the corrected image.
[0085] In addition, it should be noted that, before performing the processing of adjacent layer images, the embodiments of the present invention can group the images in the lung image, such as two layers of images as one group, or n layers of images as one group. The above grouping can be performed on the images in the lung image in the order of the first to the Nth layer, and then the images in the same group can be used as the images of adjacent layers.
[0086] When the corrected lung image is obtained, a lung region detection operation, i.e., lung region segmentation processing, can be performed on the corrected lung image. The embodiment of the present invention can use the region growing method to segment the contour of the lung region to be extracted from the corrected lung image, wherein the region growing method can refer to the existing technical means, which is not specifically described in the embodiment of the present invention. Alternatively, the embodiment of the present invention can also input the corrected lung image into a convolutional neural network, and obtain the contour of the lung region to be extracted through the output of the convolutional neural network. The convolutional neural network can be a U-net, but it is not a specific limitation of the present invention.
[0087] In addition, the neural networks involved in the above-mentioned embodiments of the present invention, such as feature extraction neural networks, residual networks, convolutional neural networks, etc., are all network structures that have been trained to achieve corresponding functions and can meet accuracy requirements. Technical personnel in this field can set different accuracy conditions according to needs, and the present invention does not make specific limitations on this.
[0088] Based on the above configuration, the embodiment of the present invention can realize the determination of the contour of the lung image area through the characteristic information of the inter-layer image in the lung image. This configuration can improve the accuracy of the characteristic information of the lung image and at the same time improve the accuracy of the contour of the lung area to be extracted.
[0089] In addition, the embodiment of the present invention also provides an image region extraction device, referring to Figure 2 , the image region extraction device comprises:
[0090] An acquisition module 10 is used to acquire a preset lung region contour and a lung image, and obtain a lung region contour to be extracted according to the lung image;
[0091] A correction module 20, configured to correct an erroneously extracted contour in the to-be-extracted lung region contour by using the preset lung region contour to obtain a corrected lung region contour;
[0092] The extraction module 30 is used to extract the lung region from the lung image according to the corrected lung region contour.
[0093] Furthermore, the device also includes: a judgment module.
[0094] A judgment module, used for judging whether the number of layers of the preset lung area contour is the same as the number of layers of the lung image;
[0095] The extraction module is used to extract the lung region of the lung image according to the corrected lung region contour if they are the same; if they are different, to interpolate the preset lung region contour or the lung image to obtain the preset lung region contour and the lung image with the same number of layers; to extract the lung region of the lung image according to the corrected lung region contour after interpolation, or to extract the lung region of the interpolated lung image according to the corrected lung region contour.
[0096] The correction module 20 comprises:
[0097] A determination unit, used for determining a number of points set on the contour of the lung region to be extracted;
[0098] The correction unit is used to scale the preset lung area contour according to a preset step size, and when the number of points contacted by the scaled preset lung area contour is greater than or equal to a set number, the erroneous contour of the lung area contour to be extracted is corrected by determining the scaled preset lung area contour as the corrected lung area contour.
[0099] The correction unit is specifically used to scale the preset lung area contour according to a preset step size, and when the number of points contacted by the scaled preset lung area contour is greater than or equal to a set number, determine the erroneous extraction contour of the lung area contour to be extracted, and replace the erroneous extraction contour with the corresponding contour of the scaled preset lung area contour, and the replaced lung area contour to be extracted is the corrected lung area contour.
[0100] The determining unit is specifically configured to divide the scaled preset lung region contour into a plurality of preset lung region contour line segments, and divide the to-be-extracted lung region contour into a plurality of to-be-extracted lung region contour line segments, when the scaled preset lung region contour contacts the plurality of points;
[0101] Calculating the distance between the preset lung region contour line segment and the lung region contour line segment to be extracted that have the same starting point and the same end point;
[0102] When the distance is greater than or equal to the set distance, it is determined that the contour line segment of the lung region to be extracted is the erroneously extracted contour.
[0103] The acquisition module 10 is specifically used to perform detail enhancement processing on the image features of the lung image to obtain specific image features; based on the specific image features of adjacent layer images in the lung image, correct the lung image; and use the region generation method to segment the contour of the lung region to be extracted from the corrected lung image.
[0104] The extraction module 30 is specifically used to perform detail enhancement processing on the image features of the lung image to obtain specific image features; correct the lung image based on the specific image features of adjacent layer images in the lung image; and use the region generation method to segment the contour of the lung region to be extracted from the corrected lung image.
[0105] The extraction module 30 is specifically used to correct the erroneously extracted contour in the left lung region contour to be extracted by using the set left lung region contour to obtain a corrected left lung region contour;
[0106] Correcting the right lung region contour to be extracted by using the erroneously extracted contour in the set right lung region contour to obtain a corrected right lung region contour;
[0107] Lung regions are extracted from the lung image according to the corrected left lung region contour and the corrected right lung region contour.
[0108] like Figure 3As shown, an embodiment of the present invention further provides an image region extraction device, which may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0109] Those skilled in the art will understand that Figure 3 The device structure shown in the figure does not constitute a limitation on the image region extraction device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0110] like Figure 3 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and an image region extraction program. The operating system is a program for managing and controlling device hardware and software resources, and supports the operation of the image region extraction program and other software or programs.
[0111] Figure 3 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the image area extraction program stored in the memory 1005 and execute the image area extraction method of the embodiment of the present invention.
[0112] In addition, an embodiment of the present invention further provides a storage medium, on which an image region extraction program is stored. When the image region extraction program is executed by a processor, the steps of the image region extraction method described below are implemented.
[0113] The various embodiments of the image region extraction device and the storage medium of the present invention may refer to the various embodiments of the image region extraction method of the present invention, and will not be described in detail here.
[0114] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0115] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0117] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for extracting an image region, characterized in that: include: Obtaining a preset lung area contour and lung image; Obtaining a lung region contour to be extracted according to the lung image; Correcting an erroneously extracted contour in the to-be-extracted lung region contour by using the preset lung region contour to obtain a corrected lung region contour; Extracting the lung region from the lung image according to the corrected lung region contour; The method of correcting an erroneously extracted contour in the to-be-extracted lung region contour by using the preset lung region contour to obtain a corrected lung region contour includes: Determine a number of points to be set on the contour of the lung region to be extracted; The preset lung region contour is scaled according to a preset step size, and when the number of points contacted by the scaled preset lung region contour is greater than or equal to a set number, an erroneous extraction contour of the lung region contour to be extracted is determined, and the erroneous extraction contour is replaced by a corresponding contour of the scaled preset lung region contour, and the lung region contour to be extracted after replacement is the corrected lung region contour.
2. The method according to claim 1, characterized in that The preset lung region contour is a preset lung region contour of multiple layers of planes, and the lung image is a lung image of multiple layers of planes; Before extracting the lung region from the lung image according to the corrected lung region contour, the method further comprises: Determining whether the number of layers of the preset lung region contour is the same as the number of layers of the lung image; The extracting the lung region from the lung image according to the corrected lung region contour comprises: If they are the same, extracting the lung region from the lung image according to the corrected lung region contour; If they are different, the preset lung area contour or the lung image is interpolated to obtain the preset lung area contour and the lung image with the same number of layers; lung area extraction is performed on the lung image according to the corrected lung area contour after the interpolation processing, or lung area extraction is performed on the lung image after the interpolation processing according to the corrected lung area contour.
3. The method according to claim 1, characterized in that The method for determining the erroneously extracted contour of the to-be-extracted lung region contour comprises: When the scaled preset lung region contour contacts the plurality of points, the scaled preset lung region contour is divided into a plurality of preset lung region contour line segments, and the to-be-extracted lung region contour is divided into a plurality of to-be-extracted lung region contour line segments; Calculating the distance between the preset lung region contour line segment and the lung region contour line segment to be extracted having the same starting point and the same end point; When the distance is greater than or equal to the set distance, it is determined that the contour line segment of the lung region to be extracted is the erroneously extracted contour.
4. The method according to any one of claims 1 to 3, characterized in that: The step of obtaining the contour of the lung region to be extracted according to the lung image comprises: Performing detail enhancement processing on the image features of the lung image to obtain specific image features; Correcting the lung image based on specific image features of adjacent layer images in the lung image; The contour of the lung region to be extracted is segmented from the corrected lung image using the region generation method.
5. The method according to any one of claims 1 to 4, characterized in that: The preset lung region contour includes: setting a left lung region contour and setting a right lung region contour; and extracting the lung region from the lung image according to the corrected lung region contour includes: Correcting an erroneously extracted contour in the left lung region contour to be extracted using the set left lung region contour to obtain a corrected left lung region contour; Correcting the right lung region contour to be extracted by using the erroneously extracted contour in the set right lung region contour to obtain a corrected right lung region contour; Lung regions are extracted from the lung image according to the corrected left lung region contour and the corrected right lung region contour.
6. An image region extraction device, characterized in that: The device comprises: An acquisition module, used to acquire a preset lung region contour and a lung image, and obtain a lung region contour to be extracted according to the lung image; A correction module, used for correcting an erroneously extracted contour in the to-be-extracted lung region contour by using the preset lung region contour to obtain a corrected lung region contour; An extraction module, used for extracting the lung region from the lung image according to the corrected lung region contour; Wherein, the correction module comprises: A determination unit, used for determining a number of points set on the contour of the lung region to be extracted; The correction unit is used to scale the preset lung area contour according to a preset step size, and when the number of points contacted by the scaled preset lung area contour is greater than or equal to a set number, determine an erroneous extraction contour of the lung area contour to be extracted, and replace the erroneous extraction contour with a corresponding contour of the scaled preset lung area contour, and the lung area contour to be extracted after replacement is the corrected lung area contour.
7. An image region extraction device, characterized in that: The image region extraction device comprises: a memory, a processor, and an image region extraction program stored in the memory and executable on the processor, wherein the image region extraction program implements the steps of the image region extraction method as claimed in any one of claims 1 to 5 when executed by the processor.
8. A storage medium, characterized in that: The storage medium stores an image region extraction program, which implements the steps of the image region extraction method according to any one of claims 1 to 5 when executed by the processor.
Citation Information
Patent Citations
Image segmentation method and device, and method for judging image inversion and distinguishing front side and back side of sternum
CN101727666A
Automated method and system for the segmentation of lung regions in computed tomography scans
WO2001054066A1
