Detection device, training method, training device, equipment and medium

文档序号:9308 发布日期:2021-09-17 浏览:25次 中文

1. An emphysema grade detection device, comprising:

the acquisition module is used for acquiring a target lung image;

the first extraction module is used for respectively extracting a whole lung feature, a lung parenchyma feature and an emphysema feature based on the target lung image;

a second extraction module to determine associated features based on the full lung features, the parenchymal lung features, and the emphysema features;

and the determining module is used for inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into a trained emphysema grade determining model and determining the emphysema grade corresponding to the target lung image.

2. The detection apparatus according to claim 1, wherein the first extraction module comprises:

and the first extraction unit is used for inputting the target lung image into a whole lung feature extraction model to obtain the whole lung features.

3. The detection apparatus according to claim 1, wherein the first extraction module comprises:

a segmentation unit, configured to segment a lung parenchyma image in the target lung image based on a contour of the lung parenchyma;

and the second extraction unit is used for inputting the lung parenchymal image into a lung parenchymal feature extraction model to obtain the lung parenchymal feature.

4. The detection apparatus according to claim 3, wherein the segmentation unit includes:

and the segmentation subunit is used for inputting the target lung image into a lung segmentation model to obtain a lung parenchyma image.

5. The detection apparatus according to claim 3, wherein the first extraction module comprises:

the acquiring unit is used for acquiring an emphysema image by utilizing the lung parenchyma image and a preset gray value range;

and the third extraction unit is used for determining the emphysema characteristics according to the number of pixel points in the emphysema image.

6. The detection apparatus according to claim 5, wherein the third extraction unit comprises:

and the extraction subunit is used for inputting the emphysema image into an emphysema feature extraction model to obtain the emphysema features.

7. The detection apparatus according to claim 1, wherein the second extraction module comprises:

and the fourth extraction module is used for simultaneously inputting the whole lung features, the lung parenchyma features and the emphysema features into an associated feature extraction model to obtain the associated features.

8. The apparatus of claim 1, further comprising:

and the preprocessing module is used for adjusting the target lung image into a target lung image with a preset size.

9. A training method of an emphysema grade determination model is characterized by comprising the following steps:

acquiring a lung training sample set; the lung training sample set comprises at least one training sample, and each training sample comprises a lung image and an emphysema grade corresponding to the lung image;

for each training sample, respectively inputting the lung images in the training sample into a full lung feature extraction model to be trained, a lung parenchyma extraction model to be trained and an emphysema feature extraction model to be trained to obtain full lung features, lung parenchyma features and emphysema features of the lung images; inputting the full lung features, the lung parenchymal features and the emphysema features of the lung images into an associated feature extraction model to be trained to obtain associated features of the lung images; inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into an emphysema grade determination model to be trained to obtain a training result; determining a training loss value according to the training result and the emphysema grade corresponding to the lung image in the training sample; and adjusting parameters in the full lung feature extraction model to be trained, the lung parenchyma extraction model to be trained, the emphysema feature extraction model to be trained and the emphysema grade determination model to be trained on the basis of the training loss value.

10. Training device for an emphysema grade determination model, comprising:

the sample acquisition module is used for acquiring a lung training sample set; the lung training sample set comprises at least one training sample, and each training sample comprises a lung image and an emphysema grade corresponding to the lung image;

the training module is used for respectively inputting the lung images in the training samples into a full lung feature extraction model to be trained, a lung parenchyma extraction model to be trained and an emphysema feature extraction model to be trained aiming at each training sample to obtain the full lung features, the lung parenchyma features and the emphysema features of the lung images; inputting the full lung features, the lung parenchymal features and the emphysema features of the lung images into an associated feature extraction model to be trained to obtain associated features of the lung images; inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into an emphysema grade determination model to be trained to obtain a training result; determining a training loss value according to the training result and the emphysema grade corresponding to the lung image in the training sample; and adjusting parameters in the full lung feature extraction model to be trained, the lung parenchyma extraction model to be trained, the emphysema feature extraction model to be trained, the association feature extraction model to be trained and the emphysema grade determination model to be trained on the basis of the training loss value.

11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method as claimed in claim 9 are implemented when the processor executes the computer program.

12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method as set forth in claim 9.

Background

Chronic Obstructive Pulmonary Disease (COPD) includes chronic bronchitis and/or emphysema characterized by airflow obstruction. For emphysema, the disease, the primary symptom of the patient is dyspnea. According to the dyspnea condition of a patient, emphysema diseases can be classified into 5 grades, the patient with grade 0 suffers from dyspnea during severe activity, the patient with grade 1 suffers from dyspnea when walking fast on a flat ground or climbing a gentle slope, the patient with grade 2 suffers from dyspnea, the patient with grade 2 suffers from slowness when walking on a flat ground compared with the same age, or the patient with grade 3 suffers from stopping to have a rest, the patient with grade 3 suffers from dyspnea when walking on a flat ground by about 100 meters, the patient with grade 4 suffers from severe dyspnea, and the patient cannot leave home.

Disclosure of Invention

In view of the above, an object of the present application is to provide a detection apparatus, a training method, a training apparatus, a device and a medium, which are used to solve the problem of inaccurate determination of emphysema grade in the prior art.

In a first aspect, an embodiment of the present application provides a device for detecting an emphysema grade, including:

the acquisition module is used for acquiring a target lung image;

the first extraction module is used for respectively extracting a whole lung feature, a lung parenchyma feature and an emphysema feature based on the target lung image;

a second extraction module to determine associated features based on the full lung features, the parenchymal lung features, and the emphysema features;

and the determining module is used for inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into a trained emphysema grade determining model and determining the emphysema grade corresponding to the target lung image.

Optionally, the first extracting module includes:

and the first extraction unit is used for inputting the target lung image into a whole lung feature extraction model to obtain the whole lung features.

Optionally, the first extracting module includes:

a segmentation unit, configured to segment a lung parenchyma image in the target lung image based on a contour of the lung parenchyma;

and the second extraction unit is used for inputting the lung parenchymal image into a lung parenchymal feature extraction model to obtain the lung parenchymal feature.

Optionally, the dividing unit includes:

and the segmentation subunit is used for inputting the target lung image into a lung segmentation model to obtain a lung parenchyma image.

Optionally, the first extracting module includes:

the acquiring unit is used for acquiring an emphysema image by utilizing the lung parenchyma image and a preset gray value range;

and the third extraction unit is used for determining the emphysema characteristics according to the number of pixel points in the emphysema image.

Optionally, the third extracting unit includes:

and the extraction subunit is used for inputting the emphysema image into an emphysema feature extraction model to obtain the emphysema features.

Optionally, the second extraction module includes:

and the fourth extraction module is used for simultaneously inputting the whole lung features, the lung parenchyma features and the emphysema features into an associated feature extraction model to obtain the associated features.

Optionally, the apparatus further includes:

and the preprocessing module is used for adjusting the target lung image into a target lung image with a preset size.

In a second aspect, an embodiment of the present application provides a training method for an emphysema grade determination model, including:

acquiring a lung training sample set; the lung training sample set comprises at least one training sample, and each training sample comprises a lung image and an emphysema grade corresponding to the lung image;

for each training sample, respectively inputting the lung images in the training sample into a full lung feature extraction model to be trained, a lung parenchyma extraction model to be trained and an emphysema feature extraction model to be trained to obtain full lung features, lung parenchyma features and emphysema features of the lung images; inputting the full lung features, the lung parenchymal features and the emphysema features of the lung images into an associated feature extraction model to be trained to obtain associated features of the lung images; inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into an emphysema grade determination model to be trained to obtain a training result; determining a training loss value according to the training result and the emphysema grade corresponding to the lung image in the training sample; and adjusting parameters in the full lung feature extraction model to be trained, the lung parenchyma extraction model to be trained, the emphysema feature extraction model to be trained and the emphysema grade determination model to be trained on the basis of the training loss value.

In a third aspect, an embodiment of the present application provides a training apparatus for an emphysema grade determination model, including:

the sample acquisition module is used for acquiring a lung training sample set; the lung training sample set comprises at least one training sample, and each training sample comprises a lung image and an emphysema grade corresponding to the lung image;

the training module is used for respectively inputting the lung images in the training samples into a full lung feature extraction model to be trained, a lung parenchyma extraction model to be trained and an emphysema feature extraction model to be trained aiming at each training sample to obtain the full lung features, the lung parenchyma features and the emphysema features of the lung images; inputting the full lung features, the lung parenchymal features and the emphysema features of the lung images into an associated feature extraction model to be trained to obtain associated features of the lung images; inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into an emphysema grade determination model to be trained to obtain a training result; determining a training loss value according to the training result and the emphysema grade corresponding to the lung image in the training sample; and adjusting parameters in the full lung feature extraction model to be trained, the lung parenchyma extraction model to be trained, the emphysema feature extraction model to be trained, the association feature extraction model to be trained and the emphysema grade determination model to be trained on the basis of the training loss value.

In a fourth aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the training method for the emphysema grade determination model described above when executing the computer program.

In a fifth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to execute the steps of the training method for the emphysema grade determination model.

The device for detecting the emphysema grade, provided by the embodiment of the application, comprises the steps of firstly, obtaining a target lung image; secondly, respectively extracting a whole lung feature, a lung parenchyma feature and an emphysema feature based on the target lung image; thirdly, determining a correlation characteristic based on the whole lung characteristic, the lung parenchymal characteristic and the emphysema characteristic; and finally, inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into a trained emphysema grade determination model, and determining the emphysema grade corresponding to the target lung image.

In some embodiments, first, a whole lung feature, a lung parenchyma feature and an emphysema feature are extracted from a target lung image, a lung parenchyma image and an emphysema image respectively, then, associated features of the three features are extracted by using the whole lung feature, the lung parenchyma feature and the emphysema feature, and finally, the emphysema grade is determined by using the whole lung feature, the lung parenchyma feature, the emphysema feature and the associated features.

In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.

Fig. 1 is a schematic diagram of an apparatus for detecting emphysema grade according to an embodiment of the present disclosure;

FIG. 2 is a schematic illustration of a lung image provided by an embodiment of the present application;

fig. 3 is a schematic diagram of a lung parenchyma image according to an embodiment of the present application;

fig. 4 is a schematic view of an emphysema image according to an embodiment of the present disclosure;

FIG. 5 is a flowchart illustrating a detailed method for determining emphysema grade according to an embodiment of the present disclosure;

fig. 6 is a schematic flowchart illustrating a method for detecting emphysema grade according to an embodiment of the present disclosure;

fig. 7 is a schematic flowchart illustrating a training method of an emphysema grade determination model according to an embodiment of the present application;

fig. 8 is a schematic diagram of a training apparatus for an emphysema grade determination model according to an embodiment of the present application;

fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.

According to the dyspnea condition of a patient, emphysema diseases can be classified into 5 grades, the patient with grade 0 suffers from dyspnea during severe activity, the patient with grade 1 suffers from dyspnea when walking fast on a flat ground or climbing a gentle slope, the patient with grade 2 suffers from dyspnea, the patient with grade 2 suffers from slowness when walking on a flat ground compared with the same age, or the patient with grade 3 suffers from stopping to have a rest, the patient with grade 3 suffers from dyspnea when walking on a flat ground by about 100 meters, the patient with grade 4 suffers from severe dyspnea, and the patient cannot leave home. That is, the emphysema grade of a patient is basically determined empirically, but the physical quality of each person is different, and thus, it is not accurate to determine the emphysema grade of a patient only empirically.

The embodiment of the application provides a detection device of emphysema grade, as shown in fig. 1, includes:

an obtaining module 101, configured to obtain a target lung image;

a first extraction module 102, configured to extract a whole lung feature, a lung parenchyma feature, and an emphysema feature, respectively, based on the target lung image;

a second extraction module 103, configured to determine a correlation feature based on the whole lung feature, the lung parenchymal feature, and the emphysema feature;

a determining module 104, configured to input a fusion feature obtained by superimposing the full lung feature, the lung parenchyma feature, the emphysema feature, and the association feature into a trained emphysema grade determining model, and determine an emphysema grade corresponding to the target lung image.

In the above-mentioned acquisition module 101, the target lung image is a medical image for which emphysema grade needs to be determined. The medical image is a medical image formed by performing cross-sectional scans one by one around a certain part of the body of a patient together with a detector with extremely high sensitivity by using an X-ray beam, a gamma ray, an ultrasonic wave and the like which are precisely collimated to obtain a plurality of images corresponding to the cross-sectional scans. The medical image comprises a plurality of pixels, each pixel has a corresponding gray value, and the gray value can reflect the absorption degree of different tissues of a human body to X-rays. The human tissue can distinguish 2000 different gray values on the medical image, and the 2000 different gray values include various body tissues such as blood, water, soft tissue, bone, air, lung tissue and the like. Generally, after a medical image is acquired, in order to highlight a certain tissue so as to observe the tissue in the medical image, windowing processing needs to be performed on the medical image, that is, corresponding body tissue is highlighted in the medical image according to a preset window width and window level. The gray value corresponding to the window level of the lung tissue is-600, and the gray value corresponding to the window width is 1500, so that the gray value range corresponding to the lung tissue is [ L-W/2, L + W/2], where L is the window level and W is the window width, that is, the gray value range corresponding to the lung tissue is-1350 to 150. And screening pixel points in the lung image according to the gray value range corresponding to the lung tissue in the medical image, wherein the screened pixel points can form the lung image highlighting the lung tissue. As shown in fig. 2, the lung image includes lung tissue, other body tissue (blood vessels, trachea, etc.) with similar gray values corresponding to the lung tissue, and a background. Based on the lung image, an image corresponding to the lung tissue is cut out from the lung image, that is, in the original lung image, an image corresponding to the background region is removed according to the contour line of the lung parenchyma, as shown in fig. 3, and then the lung parenchyma image can be obtained. Generally, the gray value of the focus corresponding to the emphysema is less than-950, so that the gray value of the pixel point with the gray value less than-950 is reserved in the lung parenchyma image based on the lung parenchyma image, and the gray values of other pixel points are adjusted to be 0, as shown in fig. 4, so that the emphysema image can be obtained.

In the first extraction module 102, the full lung features are image features extracted from the target lung image, and the full lung features may include association features of the lung parenchyma with other body tissues, association features of the lung parenchyma with a background region, and the like. The lung parenchymal features are image features extracted from the lung parenchymal image. The emphysema features are image features extracted from the emphysema image, and can also be volume features of body tissues corresponding to the emphysema in the target lung image.

In specific implementation, after the target lung image is obtained, a lung parenchyma image is obtained based on the target lung image, an emphysema image is obtained based on the lung parenchyma image, and corresponding whole lung features, lung parenchyma features and emphysema features are extracted based on the three images respectively.

Before obtaining the lung parenchyma image based on the target lung image, the size of the target lung image needs to be reconstructed, and since there may be cases where the sizes of the lung images from different sources are inconsistent, for example, at least one of the length, the width, and the number of layers of the images is inconsistent, in order to accurately extract the features, the size of the lung images from different sizes needs to be reconstructed, that is, the sizes need to be unified. Specifically, the size of the target lung image is adjusted to 180 × 150 × 180 (length × width × layer) using a bilinear difference method. After the target lung image is reconstructed in size, the method in the first extraction module 102 may be continuously performed, which may improve the accuracy of extracting the features. That is, the detection device of emphysema grade that this application provided still includes:

and the preprocessing module is used for adjusting the target lung image into a target lung image with a preset size.

In the preprocessing module, the preset size is manually preset, for example, 180 × 150 × 180 size (length × width × layer), that is, the target lung image is adjusted to a size of 180 pixels in length and 150 pixels in width, and the number of layers is adjusted to 180 layers. When models (a whole lung feature extraction model, a lung parenchyma feature extraction model, an emphysema feature extraction model, a lung segmentation model and the like, and models used in the detection process of emphysema grades) are trained, the sizes of training samples are uniform, and the influence of different sizes on training precision is reduced, so that the target lung image also needs to be adjusted to a preset size in the detection process.

In the second extraction module 103, the relevant features are features corresponding to relevant information among the whole lung features, the lung parenchyma features, and the emphysema features. Specifically, the whole lung feature, the lung parenchyma feature and the emphysema feature are simultaneously input into the same feature extraction model, and then the correlation features of the three features can be obtained.

In the above determination module 104, an emphysema grade determination model is used to determine the grade of emphysema in the target lung image, and the emphysema grade determination model is a convolutional neural network model (e.g., a 3D ResNet18 model). For convenience of calculation, the features obtained in the present application are all represented by a matrix with the same dimension (for example, a 512-dimensional matrix), and therefore, the superposition of the whole lung features, the lung parenchyma features, the emphysema features, and the associated features is that the matrices corresponding to the features are superposed, and then the matrix corresponding to the superposed fusion features can be obtained.

In specific implementation, the fusion features are input into the trained emphysema grade determination model, so that a probability value for representing the emphysema grade can be obtained, and the emphysema grade corresponding to the target lung image is determined according to the probability value. Emphysema grades are generally divided into four grades, and each grade has a corresponding probability value range.

In the embodiment provided by the application, the method executed by the above four virtual devices determines the emphysema grade based on the whole lung features, the lung parenchyma features, the emphysema features and the association features, that is, the features of a single image (the target lung image, the lung parenchyma image and the emphysema images respectively) are considered, and the association features among different images are also considered, so that the accuracy of determining the emphysema grade is improved.

In the application, the full-lung feature is extracted from the target lung image, and the target lung image includes, in addition to the image corresponding to the lung tissue, other body tissues (blood vessels, trachea, etc.) with similar gray values corresponding to the lung tissue and a background, so that the correlation feature between the lung tissue and the other tissues can be extracted from the target lung image. That is, the first extraction module includes:

and the first extraction unit is used for inputting the target lung image into a whole lung feature extraction model to obtain the whole lung features.

In the first extraction unit described above, the whole lung feature extraction model is a model for extracting features from a lung image. The whole lung feature extraction model is obtained based on a large number of training samples.

The lung parenchymal features are extracted from a lung parenchymal image determined based on a target lung image, that is, a first extraction module, including:

a segmentation unit, configured to segment a lung parenchyma image in the target lung image based on a contour of the lung parenchyma;

and the second extraction unit is used for inputting the lung parenchymal image into a lung parenchymal feature extraction model to obtain the lung parenchymal feature.

In the segmentation unit, the target lung image includes lung parenchyma, and the contour of the lung parenchyma can separate the lung tissue from other body tissues and the background region, and further, the target lung image is segmented according to the contour of the lung parenchyma to remove other body tissues and the background region, so that the lung parenchyma image can be obtained. In this application, the target lung image may be segmented based on a lung segmentation model, that is, the segmentation unit includes:

and the segmentation subunit is used for inputting the target lung image into a lung segmentation model to obtain a lung parenchyma image.

In the segmentation subunit, the lung segmentation model is used for a model for segmenting the lung parenchymal region and the background region in the target lung image. The lung segmentation model used here is trained, and is trained based on the following steps:

acquiring a lung parenchyma training sample set; the training sample set comprises at least one training sample, and the training sample comprises a lung image and a corresponding lung parenchymal image;

and aiming at each training sample, taking the lung image as the input of the lung segmentation model to be trained, taking the lung parenchyma image as the output of the lung segmentation model to be trained, and training the lung segmentation model to be trained.

The lung parenchyma image is an image in which a contour region of the lung parenchyma is marked in the lung image.

In the second extraction unit, the lung parenchymal feature extraction model is used for extracting the lung parenchymal features from the lung parenchymal image.

The lung parenchyma image corresponding to the lung parenchyma area is extracted from the target lung image by using the lung segmentation model, and furthermore, when the characteristics of the lung parenchyma image are extracted, the influence of extrapulmonary and other information can be removed, and more accurate lung parenchyma characteristics can be obtained.

The ratio of the volume of the emphysema to the volume of the lung parenchyma has great correlation with the emphysema grade, so when determining the emphysema grade, emphysema characteristics also need to be extracted, the emphysema characteristics are extracted from an emphysema image, and the emphysema image is determined based on the lung parenchyma image, and the first extraction module comprises:

the acquiring unit is used for acquiring an emphysema image by utilizing the lung parenchyma image and a preset gray value range;

and the third extraction unit is used for determining the emphysema characteristics according to the number of pixel points in the emphysema image.

In the above-described acquisition unit, the preset gradation value range refers to a range in which the gradation value is less than-950. The gray value of the focus corresponding to the emphysema in the lung image is smaller than-950, so that the emphysema image can be determined by using the preset gray value range directly in the lung parenchyma image in order to reduce the influence of the outside of the lung and other information.

When acquiring the emphysema image, the gray value of the pixel points with the gray value greater than or equal to-950 in the lung parenchyma image can be adjusted to be 0 to acquire the emphysema image, or the pixel points with the gray value greater than or equal to-950 are directly deducted from the lung parenchyma image, and the obtained pixel points are deducted to form the emphysema image.

In the third extraction unit, the emphysema image is composed of multiple layers, and in the multiple layers of images, namely in a three-dimensional space, the obtained pixel points are deducted to have own positions, each pixel point also has own volume, and then the volume of the focus corresponding to the emphysema can be determined according to the number of the obtained pixel points and the volume of each pixel point, and then the emphysema characteristics are determined according to the volume of the focus corresponding to the emphysema. Can extract the characteristic to the emphysema image based on emphysema characteristic extraction model in this application, that is, the third extracts the unit, includes:

and the extraction subunit is used for inputting the emphysema image into an emphysema feature extraction model to obtain the emphysema features.

In the extraction subunit, the emphysema feature extraction model is used for extracting emphysema features from the emphysema image. The emphysema feature extraction model used herein is trained based on a large number of training samples.

The correlation features are features corresponding to the correlation information in the target lung image, the lung parenchyma image and the emphysema image, and therefore the second extraction module comprises:

and the fourth extraction module is used for simultaneously inputting the whole lung features, the lung parenchyma features and the emphysema features into an associated feature extraction model to obtain the associated features.

In the fourth extraction module, the associated feature extraction module is configured to extract associated features from the whole lung features, the lung parenchyma features, and the emphysema features. In the application, there may be one or more associated feature extraction models, and the more associated feature extraction models, the more associated features among the extracted full lung features, lung parenchymal features and emphysema features, and the more accurate the emphysema grade calculated by using the associated features.

The whole lung feature extraction model, the lung parenchyma feature extraction model, the emphysema feature extraction model and the correlation feature extraction model are convolutional neural network models.

The embodiment of the application provides a method for determining emphysema grade, as shown in fig. 6, comprising the following steps:

s601, acquiring a target lung image;

s602, respectively extracting a whole lung feature, a lung parenchyma feature and an emphysema feature based on the target lung image;

s603, respectively calculating a first correlation characteristic, a second correlation characteristic and a third correlation characteristic according to the whole lung characteristic, the lung parenchyma characteristic and the emphysema characteristic;

s604, inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics, the first association characteristics, the second association characteristics and the third association characteristics into a trained emphysema grade determination model, and determining an emphysema grade corresponding to the target lung image.

Optionally, in step S602, extracting a full lung feature based on the target lung image, including:

step 6021, inputting the target lung image into a whole lung feature extraction model to obtain the whole lung feature.

In step 6021 described above, the whole lung feature extraction model is a model for extracting features from the lung image.

Optionally, in step S602, extracting lung parenchymal features based on the target lung image, including:

step 6022, segmenting the target lung image to obtain a lung parenchyma image based on the outline of the lung parenchyma;

step 6023, inputting the lung parenchyma image into a lung parenchyma feature extraction model to obtain the lung parenchyma feature.

Optionally, step 6022, comprises:

step 60221, inputting the target lung image into the lung segmentation model to obtain a lung parenchyma image.

Optionally, in step S602, based on the target lung image, extracting emphysema features includes:

step 6024, acquiring an emphysema image by using the lung parenchyma image and a preset gray value range;

step 6025, determining the emphysema characteristics according to the number of pixel points in the emphysema image.

Optionally, step 6025 includes:

step 60251, inputting the emphysema image into an emphysema feature extraction model to obtain the emphysema features.

Optionally, step S603 includes:

and 6031, inputting the full lung features, the lung parenchyma features and the emphysema features into an associated feature extraction model to obtain the associated features.

Optionally, the method further includes:

and step 604, adjusting the target lung image into a target lung image with a preset size.

According to the scheme, the full lung features, the lung parenchyma features and the emphysema features are extracted from the target lung image, the lung parenchyma image and the emphysema image respectively, then the full lung features, the lung parenchyma features and the emphysema features are used for extracting the association features of the three features, and finally the full lung features, the lung parenchyma features, the emphysema features and the association features are used for determining the emphysema grade.

Based on the above method for determining the emphysema grade, the present application takes three associated feature extraction models as an example, and introduces details of the whole process for determining the emphysema grade, as shown in fig. 5, an object lung image 501 to be detected is obtained, a lung parenchyma image 502 is extracted from the object lung image 501 by using a lung segmentation model, an emphysema image 503 is extracted from the lung parenchyma image, a whole lung feature 507 is extracted from the object lung image 501 by using a whole lung feature extraction model 504, a lung parenchyma feature 508 is extracted from the lung parenchyma image 502 by using a lung parenchyma feature extraction model 505, and an emphysema feature 509 is extracted from the emphysema image 503 by using an emphysema feature extraction model 506. Inputting the whole lung features 507, the lung parenchyma features 508 and the emphysema features 509 into a first association feature extraction model 510 to obtain first association features 513; inputting the whole lung features 507, the lung parenchyma features 508 and the emphysema features 509 into a second association feature extraction model 511 to obtain second association features 514; inputting the whole lung features 507, the lung parenchyma features 508 and the emphysema features 509 into a third associated feature extraction model 512 to obtain third associated features 515. Finally, the full lung feature 507, the lung parenchyma feature 508, the emphysema feature 509, the first association feature 513, the second association feature 514, and the third association feature 515 are superimposed to obtain a fused feature 516. The fusion features 516 are input into the emphysema grade determination model 517, and the emphysema grade corresponding to the target image can be obtained.

In the process of determining the emphysema grade, a plurality of models (the plurality of models comprise a whole lung feature extraction model 504, a lung parenchyma feature extraction model 505, an emphysema feature extraction model 506, a first association feature extraction model 510, a second association feature extraction model 511, a third association feature extraction model 512 and an emphysema grade determination model 517) are included, the plurality of models can be used as a whole, namely, a comprehensive emphysema grade determination model, in the training process, the comprehensive emphysema grade determination model to be trained is used as a training object, before the comprehensive emphysema grade determination model to be trained is not trained, the whole lung feature extraction model 504, the lung parenchyma feature extraction model 505 and the emphysema feature extraction model 506 are the same convolution model (for example, a convolution kernel of 3 x 3), and in the training process, the whole lung feature extraction model 504, the lung parenchyma feature extraction model and the emphysema grade determination model are respectively used, Parameters in the lung parenchymal feature extraction model 505 and the emphysema feature extraction model 506 are adjusted, and after a trained comprehensive emphysema grade determination model is obtained, the obtained whole lung feature extraction model 504, the lung parenchymal feature extraction model 505 and the emphysema feature extraction model 506 are three models with different parameters. Before the comprehensive emphysema grade determining model to be trained is not trained, the first relevant feature extraction model 510, the second relevant feature extraction model 511 and the third relevant feature extraction model 512 are also the same convolution kernel (for example, convolution kernel of 1 × 1 × 1), parameters in the first relevant feature extraction model 510, the second relevant feature extraction model 511 and the third relevant feature extraction model 512 are adjusted in the training process, and then after the trained comprehensive emphysema grade determining model is obtained, the first relevant feature extraction model 510, the second relevant feature extraction model 511 and the third relevant feature extraction model 512 are three training models with different parameters.

Specifically, the comprehensive emphysema grade determination model is obtained by training through the following steps:

105, acquiring a lung training sample set; the lung training sample set comprises at least one training sample, and each training sample comprises a lung image and an emphysema grade corresponding to the lung image;

step 106, inputting the lung image into a comprehensive emphysema grade determination model to be trained aiming at each training sample to obtain a training result; calculating a loss value according to the training result and the emphysema grade corresponding to the lung image in the training sample, and adjusting parameters in the comprehensive emphysema grade determination model to be trained on the basis of the loss value.

In the step 105, the lung image is the privacy of the patient, so if the lung image is used as a training sample, a large number of lung images for training may not be found, and the generalization performance of the trained model is poor. Therefore, in order to increase the training sample, the data enhancement technology can be adopted in the application, data enhancement is carried out on the existing lung images, more kinds of lung images are obtained, and then the training sample can be enriched, the generalization performance and the robustness of the model can be improved, and the over-fitting effect can be prevented, wherein the data enhancement technology comprises the following steps: geometric transformation techniques (e.g., flip, rotate, crop, warp, scale, etc.), color transformation techniques (e.g., noise, blur, color transformation, wipe, fill, etc.). Certainly, before the lung image is used for model training, image standardization processing can be carried out, and the image data of the lung image accords with the data centralization data distribution rule, so that the lung image subjected to the image standardization processing well trains the comprehensive emphysema grade determination model to be trained, a better generalization effect is obtained, and the accuracy of the model for determining the emphysema grade is improved.

In the above step 106, parameters in the comprehensive emphysema grade determination model to be trained are adjusted by using the loss value, that is, parameters of a whole lung feature extraction model 504, a lung parenchyma feature extraction model 505, an emphysema feature extraction model 506, a first associated feature extraction model 510, a second associated feature extraction model 511, a third associated feature extraction model 512 and an emphysema grade determination model 517 included in the comprehensive emphysema grade determination model are adjusted by using the loss value, and when the loss value reaches a preset precision, training of the comprehensive emphysema grade determination model is completed.

The comprehensive emphysema grade determining model is composed of a plurality of sub models, wherein the plurality of sub models are a whole lung feature extraction model, a lung parenchyma extraction model, an emphysema feature extraction model, an association feature extraction model and an emphysema grade determining model respectively. Therefore, in the training of the comprehensive emphysema grade determination model to be trained, namely, in the comprehensive emphysema grade determination model to be trained, each sub-model to be trained is trained. The application provides a detailed training method of an emphysema grade determination model, as shown in fig. 7, comprising the following steps:

s701, acquiring a lung training sample set; the lung training sample set comprises at least one training sample, and each training sample comprises a lung image and an emphysema grade corresponding to the lung image;

s702, aiming at each training sample, respectively inputting the lung images in the training sample into a full lung feature extraction model to be trained, a lung parenchyma extraction model to be trained and an emphysema feature extraction model to be trained to obtain full lung features, lung parenchyma features and emphysema features of the lung images; inputting the full lung features, the lung parenchymal features and the emphysema features of the lung images into an associated feature extraction model to be trained to obtain associated features of the lung images; inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into an emphysema grade determination model to be trained to obtain a training result; determining a training loss value according to the training result and the emphysema grade corresponding to the lung image in the training sample; and adjusting parameters in the full lung feature extraction model to be trained, the lung parenchyma extraction model to be trained, the emphysema feature extraction model to be trained and the emphysema grade determination model to be trained on the basis of the training loss value.

Optionally, in step S702, inputting the lung image in the training sample into a to-be-trained lung parenchyma extraction model to obtain the lung parenchyma features of the lung image, where the step S includes:

segmenting the lung image to obtain a lung parenchyma image based on the outline of the lung parenchyma;

and inputting the lung parenchymal image of the lung image into a to-be-trained lung parenchymal feature extraction model to obtain the lung parenchymal feature of the lung image.

Optionally, segmenting the lung image to obtain a lung parenchyma image based on the outline of the lung parenchyma, including:

and inputting the lung image into a lung segmentation model to obtain a lung parenchyma image of the lung image.

Optionally, in step S702, the lung image in the training sample is input to an emphysema feature extraction model to be trained, so as to obtain emphysema features of the lung image, where the step S includes:

acquiring an emphysema image of the lung image by using the lung parenchyma image of the lung image and a preset gray value range;

determining the emphysema characteristics of the lung images according to the number of pixel points in the emphysema images of the lung images;

and inputting the emphysema image of the lung image into the to-be-trained emphysema feature extraction model to obtain the emphysema features of the lung image.

Optionally, before step S702, the method further includes:

and aiming at each training sample, adjusting the lung image in the training sample into a target lung image with a preset size.

The trained whole lung feature extraction model, lung parenchyma feature extraction model, emphysema feature extraction model, correlation feature extraction model and emphysema grade determination model can be obtained by training through the emphysema grade determination model training method.

The application also provides a training device of emphysema grade, as shown in fig. 8, include:

a sample acquiring module 801, configured to acquire a lung training sample set; the lung training sample set comprises at least one training sample, and each training sample comprises a lung image and an emphysema grade corresponding to the lung image;

a training module 802, configured to, for each training sample, respectively input the lung images in the training sample into a full lung feature extraction model to be trained, a lung parenchyma extraction model to be trained, and an emphysema feature extraction model to be trained, so as to obtain a full lung feature, a lung parenchyma feature, and an emphysema feature of the lung image; inputting the full lung features, the lung parenchymal features and the emphysema features of the lung images into an associated feature extraction model to be trained to obtain associated features of the lung images; inputting the fusion characteristics obtained by superposing the whole lung characteristics, the lung parenchyma characteristics, the emphysema characteristics and the correlation characteristics into an emphysema grade determination model to be trained to obtain a training result; determining a training loss value according to the training result and the emphysema grade corresponding to the lung image in the training sample; and adjusting parameters in the full lung feature extraction model to be trained, the lung parenchyma extraction model to be trained, the emphysema feature extraction model to be trained, the association feature extraction model to be trained and the emphysema grade determination model to be trained on the basis of the training loss value.

Optionally, the training module 802 includes:

a segmentation unit, configured to segment a lung parenchyma image in the lung image based on a contour of the lung parenchyma;

and the first extraction unit is used for inputting the lung parenchymal image of the lung image into a to-be-trained lung parenchymal feature extraction model to obtain the lung parenchymal feature of the lung image.

Optionally, the segmentation unit includes:

and the segmentation subunit is used for inputting the lung image into a lung segmentation model to obtain a lung parenchyma image of the lung image.

Optionally, the training module 802 includes:

the screening unit is used for acquiring an emphysema image of the lung image by utilizing the lung parenchyma image of the lung image and a preset gray value range;

the determining unit is used for determining the emphysema characteristics of the lung image according to the number of pixel points in the emphysema image of the lung image;

and the second extraction unit is used for inputting the emphysema image of the lung image into the to-be-trained emphysema feature extraction model to obtain the emphysema features of the lung image.

Optionally, the training apparatus further includes:

and the preprocessing module is used for adjusting the lung images in the training samples into target lung images with preset sizes aiming at each training sample.

Corresponding to the method for detecting the emphysema grade in fig. 6, an embodiment of the present application further provides a computer apparatus 900, as shown in fig. 9, the apparatus includes a memory 901, a processor 902, and a computer program stored in the memory 901 and executable on the processor 902, where the processor 902 implements the method for detecting the emphysema grade when executing the computer program.

Corresponding to the method for detecting emphysema grade in fig. 6, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the method for determining emphysema grade.

Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, and when a computer program on the storage medium is executed, the method for determining the emphysema grade can be executed, so as to solve the problem of inaccurate determination of the emphysema grade in the prior art, in the present application, first, a whole lung feature, a lung parenchyma feature, and an emphysema feature are extracted from a target lung image, a lung parenchyma image, and an emphysema image, then, an associated feature of the three features is extracted by using the whole lung feature, the lung parenchyma feature, and the emphysema feature, and finally, the emphysema grade is determined by using the whole lung feature, the lung parenchyma feature, the emphysema feature, and the associated feature, that is, in this embodiment, not only the feature of a single image is considered, but also the associated features between different images are considered, the feature extraction capability is increased, and further, the emphysema grade is determined by utilizing the fusion characteristics of the various characteristics, so that the accuracy of determining the emphysema grade is improved.

The computer device 900 according to the embodiment of the present application may also operate a training method of the emphysema grade determination model shown in fig. 7, in addition to the above method for detecting the emphysema grade.

Also, a computer-readable storage medium provided in an embodiment of the present application may be used to perform the method for detecting the emphysema grade, and may also be used to perform a method for training an emphysema grade determination model as shown in fig. 7.

In the embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.

Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:基于异质噪声特性的图像去噪方法、设备及介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!