WO2021073120A1 - Method and device for marking lung area shadows in medical image, server, and storage medium - Google Patents

Method and device for marking lung area shadows in medical image, server, and storage medium Download PDF

Info

Publication number
WO2021073120A1
WO2021073120A1 PCT/CN2020/093516 CN2020093516W WO2021073120A1 WO 2021073120 A1 WO2021073120 A1 WO 2021073120A1 CN 2020093516 W CN2020093516 W CN 2020093516W WO 2021073120 A1 WO2021073120 A1 WO 2021073120A1
Authority
WO
WIPO (PCT)
Prior art keywords
lung
model
image
preset
training
Prior art date
Application number
PCT/CN2020/093516
Other languages
French (fr)
Chinese (zh)
Inventor
刘新卉
王健宗
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021073120A1 publication Critical patent/WO2021073120A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30061Lung

Definitions

  • This application belongs to the field of artificial intelligence technology, and in particular relates to a method, device, server and storage medium for shadow marking of lung regions in medical images.
  • the embodiments of the present application provide a method, a device, a server, and a storage medium for dividing the lung region of medical images to solve the problem of the inability to accurately mark the lungs in the prior art.
  • the first aspect of the embodiments of the present application provides a method for shadow marking of lung regions in medical images, including:
  • the lung region division model is based on a first preset number of first medical images, training In the completed U-Net model, the first medical image includes a medical image with uneven shadow distribution;
  • the lung area image of the feature point, the trained neural network model, and the first lung area image includes a shadow area;
  • the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are marked.
  • a second aspect of the embodiments of the present application provides a lung region shadow marking device for medical imaging, including:
  • the dividing module is configured to perform lung region segmentation on the medical image containing lungs according to the pre-trained lung region division model to obtain lung region images, and the lung region division model is the first preset number according to the first preset number.
  • a medical image, a trained U-Net model, the first medical image includes a medical image with uneven shadow distribution;
  • the detection module is configured to detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number of pre-set key feature points.
  • An image of a lung area marked with key feature points of the lungs, a trained neural network model, and the first lung area image includes a shadow area;
  • the marking module is configured to partition the lung area image based on the preset key feature points contained in the lung area image, and mark the shadows contained in the lung area after the partition.
  • the third aspect of the embodiments of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program when the computer program is executed. The steps of the method for shadow marking of lung regions in medical images as described above.
  • the fourth aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the lung area shadow of the medical image is realized as described above. Mark the steps of the method.
  • the embodiment of the application has the beneficial effect that the lung area segmentation is performed on the medical image containing the lungs according to the lung area division model completed in advance to obtain the lung area image.
  • the division model is a U-Net model that has been trained based on a first preset number of first medical images; the pre-trained lung key feature point detection model is used to detect the preset key feature points contained in the lung region image,
  • the lung key feature point detection model is a neural network model that has been trained based on a second preset number of lung area images pre-marked with lung key feature points; based on the preset key points contained in the lung area image
  • the feature points partition the lung area map, and mark the shadows contained in the lung area after the partition.
  • the lung region division model is a model trained according to a first preset number of first medical images
  • the first medical images include medical images with uneven shadow distribution
  • the pre-trained lung key feature point detection model is According to a second preset number of models trained on the first lung region image pre-marked with key feature points of the lungs, the first lung region image includes a shadow region; therefore, the lung region is divided according to the pre-trained lung region
  • the model performs lung region segmentation on medical images containing lungs, which can accurately segment the lung regions without being affected by the uneven distribution of shadows in the medical images, and then detect the model pair based on the pre-trained lung key feature points.
  • the lung area is detected with preset key feature points, and the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are divided Marking can accurately determine the lung area where the shadow area is located, and improve the accuracy of the position marking of the shadow area.
  • FIG. 1 is a flow chart of the implementation of a method for shadow marking of lung regions in medical images provided by the first embodiment of the present application;
  • FIG. 2 is a flowchart of the implementation of a method for shadow marking of lung regions in medical images provided by the second embodiment of the present application;
  • FIG. 3 is a flowchart of the implementation of a method for shadow marking of lung regions in medical images provided by the third embodiment of the present application;
  • FIG 4 is a flow chart of the specific implementation of S103 in Figure 1;
  • Fig. 5 is a schematic diagram of functional modules of a lung region shadow marking device for medical images provided by the present application.
  • Fig. 6 is a schematic diagram of the internal functions of the server provided by the present application.
  • FIG. 1 it is a flowchart of the implementation of the method for shadow marking of lung regions in medical images provided by the first embodiment of the present application, and the execution subject of this embodiment is a server. The details are as follows:
  • S101 Perform lung region segmentation on a medical image containing lungs according to a pre-trained lung region division model to obtain a lung region image, where the lung region division model is based on a first preset number of first medical images ,
  • the trained U-Net model the first medical image includes a medical image with uneven shadow distribution.
  • medical images containing lungs are an important basis for the diagnosis of pneumoconiosis.
  • Common medical images containing lungs are pneumoconiosis chest radiographs, also called chest X-rays. In the process of pneumoconiosis diagnosis, doctors need to judge the texture and characteristics of each lung area in medical images including lungs based on experience.
  • the medical image containing the lungs is first segmented into lung regions, specifically, segmentation is performed according to the lung region segmentation model completed in advance.
  • the pre-trained lung region division model is a U-Net model.
  • the pre-trained lung key feature point detection model is a neural network model
  • the neural network model includes a feature layer and a detection layer
  • the detection layer is a Gaussian mixture model (Gaussian model).
  • GMM Gaussian mixture model
  • the GMM model is used to perform cluster analysis on the features of each layer of the feature layer, perform feature positioning on the features of each layer of the feature layer from coarse to fine, and finally obtain the feature layer Accurate positioning model of each layer feature.
  • the GMM model includes a convolutional layer of CL1-CL4,
  • CL1-CL3 includes a convolutional layer conv and a maximum pooling layer MP, respectively
  • CL4 includes a convolution with a 2 ⁇ 2 convolution kernel.
  • Layer composition, FC5-FC6 are fully linked layers.
  • the preset key feature points include the first lung tip, the first low diaphragm, the second lung tip, and the second low diaphragm; it is understandable that in some other embodiments, The preset key feature points may also include the first phrenic top and the second phrenic top, which are not specifically limited here.
  • S103 includes:
  • S1031 Generate a first straight line based on the first lung apex and the second lung apex;
  • the human body contains left and right lung lobes.
  • the lung apexes contained in the left and right lung lobes in the medical imaging image are preset as the first lung apex and the second lung apex, respectively.
  • the lower diaphragm is preset as the first lower diaphragm and the second lower diaphragm respectively, and a first straight line is generated based on the first lung apex and the second lung apex.
  • S1032 Generate a second straight line based on the first diaphragm bottom and the second diaphragm bottom.
  • S1033 Determine a vertical line segment between the first straight line and the second straight line, and obtain third halves of the vertical line segment.
  • the vertical line segment between the first straight line and the second straight line is determined, the vertical line segment is equally divided to make the lung partial area more accurate.
  • the number of lung areas in the lungs usually needs to be determined according to actual application scenarios.
  • the lung area is usually determined by the type of disease caused by the occurrence of lesions in the lung area. How many lung regions are divided into, in a possible implementation manner, the vertical distance of the lung tip is divided into three equal parts, specifically, the three equal points of the vertical line segment are obtained.
  • S1034 Generate a horizontal line based on each equal division point, and use the first straight line, the second straight line, the vertical line segment, and each horizontal line as a dividing reference line, and compare the divided lung regions The shadow is marked.
  • marking the shadows contained in the lung area is of great significance in the medical field.
  • the lung area is accurately segmented. It is particularly important to determine the shadow contained in the lung area after each segmentation, which is the basis for accurate diagnosis of the disease.
  • lung disease diagnosis can be performed more accurately on medical images including lungs. This is because the severity of lung disease is not only related to the density of lung shadows, but also closely related to the distribution area of lung shadows. Therefore, after the lung area is partitioned according to preset key feature points, it can be more convenient and accurate Determine the shadow density of each lung area to improve the accuracy of lung disease diagnosis.
  • the lung region shadow marking method for medical images proposed in this application performs lung region segmentation on the medical image containing the lungs according to the pre-trained lung region division model to obtain the lung region image.
  • the lung region division model is a U-Net model that is trained based on the first preset number of first medical images; the pre-trained lung key feature point detection model detects the preset key contained in the lung region image Feature points, the lung key feature point detection model is a neural network model that has been trained based on a second preset number of lung area images pre-marked with lung key feature points; based on the lung area image contained The preset key feature points divide the lung area map, and mark the shadows contained in the divided lung areas.
  • the lung region division model is a model trained according to a first preset number of first medical images
  • the first medical images include medical images with uneven shadow distribution
  • the pre-trained lung key feature point detection model is According to a second preset number of models trained on the first lung region image pre-marked with key feature points of the lungs, the first lung region image includes a shadow region; therefore, the lung region is divided according to the pre-trained lung region
  • the model performs lung region segmentation on medical images containing lungs, which can accurately segment the lung regions without being affected by the uneven distribution of shadows in the medical images, and then detect the model pair based on the pre-trained lung key feature points.
  • the lung area is detected with preset key feature points, and the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are divided Marking can accurately determine the lung area where the shadow area is located, and improve the accuracy of the position marking of the shadow area.
  • FIG. 3 it is a flow chart of the implementation of the method for shadow marking of lung regions in medical images provided by the second embodiment of the present application. It can be seen from FIG. 3 that compared with the embodiment shown in FIG. 1, the specific implementation process of S206-S209 and S101-S103 are the same in this embodiment. The difference is that S201-S205 are included before S206. Among them, S201-S205 The specific implementation process is as follows.
  • S201 Acquire a first preset number of first medical images, and divide the first medical images into a first proportion of training samples and a second proportion of test samples.
  • the first medical image is a medical image in which the lung area is pre-divided; it is understandable that the preset number of first medical images can be obtained from a medical image library, in order to improve the accuracy of model training , Divide the preset number of first medical images into a preset ratio (for example, 7:3), and generate a training sample set generated from training samples of the first ratio and a test sample set generated from test samples of the second ratio .
  • a preset ratio for example, 7:3
  • image transformation is performed on the training sample of the first proportion according to a preset image transformation function to obtain an image of a preset size (such as 224*224); this is due to the human body
  • a preset image transformation function such as 224*224
  • the organs of are in different states at any time, and in some cases they will be squeezed by other organs and the shape will be distorted. Therefore, before performing model training, perform image transformations on the training samples, including stretching, scaling, translation and other transformations. ; Inputting the image of the preset size into the input network of the U-Net model for training can improve the efficiency and accuracy of model training.
  • the preset image size transformation function may be:
  • fx represents the zoom ratio in the width direction
  • fy represents the zoom ratio in the height direction
  • src represents the image before transformation
  • S203 Input the test sample of the second proportion into the U-Net model, and obtain a second medical image output by the U-Net model, in which the lung region is divided.
  • the U-Net model will output the second medical image dividing the lung area.
  • the higher the accuracy of the U-Net model training the higher the output The higher the coincidence rate of the divided lung area in the second medical image with the divided lung area in the training sample.
  • the U-Net model is the lung region division model.
  • the coincidence rate of the second medical image and the preset lung area of each sample in the test sample set is recorded as IOU, then
  • C represents the lung area of the second medical image
  • G represents the lung area in the test sample
  • S205 If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model fails , Increase the number of samples in the training sample set, and execute S202.
  • the lung region shadow marking method for medical images proposed in this application performs lung region segmentation on a medical image containing lungs according to a pre-trained lung region division model to obtain a lung region image.
  • the lung region division model In order to train the completed U-Net model according to the first preset number of first medical images; to detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, the The lung key feature point detection model is a neural network model that is trained based on a second preset number of lung region images pre-marked with lung key feature points; based on the preset key feature points contained in the lung region image
  • the lung area map is divided into regions, and the shadows contained in the divided lung regions are marked.
  • the lung region division model is a model trained according to a first preset number of first medical images
  • the first medical images include medical images with uneven shadow distribution
  • the pre-trained lung key feature point detection model is According to a second preset number of models trained on the first lung region image pre-marked with key feature points of the lungs, the first lung region image includes a shadow region; therefore, the lung region is divided according to the pre-trained lung region
  • the model performs lung region segmentation on medical images containing lungs, which can accurately segment the lung regions without being affected by the uneven distribution of shadows in the medical images, and then detect the model pair based on the pre-trained lung key feature points.
  • the lung area is detected with preset key feature points, and the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are divided Marking can accurately determine the lung area where the shadow area is located, and improve the accuracy of the position marking of the shadow area.
  • the above S201 to S205 are the training process for the U-Net model. It is understandable that in different embodiments, the training process for the U-Net model is not limited to the above S201 to S205, for example In an optional implementation manner, the training of the U-Net model can be completed through the following steps, which are detailed as follows:
  • the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
  • the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed.
  • the first medical image in the sample set is input to the U-Net model for training.
  • the loss function of the trained U-Net model is:
  • w(x) is a function of measuring pixel x, which is defined as follows:
  • w c (x) is a function mapping related to the target area (lung area) to which x pixels belong, d 1 (x) is the distance between x pixels and the target area, and d 2 (x) is x The pixel is the second closest distance to the target area.
  • w 0 and ⁇ are the two parameters of the model; p 1 (x) represents the probability that the pixel point x belongs to the target area (lung area).
  • FIG. 4 it is a flow chart of the implementation of the method for shadow marking of lung regions in medical images provided by the third embodiment of the present application. It can be seen from FIG. 4 that compared with the embodiment shown in FIG. 1, the specific implementation processes of S301-S303 and S101-S103 are the same in this embodiment. The difference is that S304-307 are also included before S303, where S304 and S302 can be executed at the same time, or alternatively, the specific implementation process of S304-S307 is as follows.
  • S304 Input a second preset number of training samples into the feature layer of the neural network model for training, and obtain a second lung region image output by the feature layer;
  • the training sample is a first lung region image pre-labeled with key feature points of the lungs
  • the second lung region image is a picture of the feature layer labeled with key feature points of the lungs.
  • the detection layer performs cluster analysis on the second lung area image, and clusters to obtain a third lung area image including the preset key feature points.
  • the number of FC5 in the full link layer of the detection layer is assumed to be K.
  • the value of K remains unchanged at 1 until the GMM model starts to converge, and the value of K starts to change;
  • the training samples are subjected to cluster analysis on the features obtained by the CL4 layer.
  • the clustering analysis of the GMM model the value of K begins to change, and finally the first K category containing the preset key feature points is obtained. Image of three lung regions.
  • the image obtained contains the preset The similarity between the lung region image of the key feature point and the third lung region image of the K category including the preset key feature point.
  • the loss function of the CNN neural network model can be expressed as:
  • preset key feature points can be preset according to the geometric characteristics of the lung and the diseased area, and no specific limitation is made here.
  • the preset key feature points include a first lung apex, a first diaphragm bottom, a second lung apex, and a second diaphragm bottom.
  • the lung region shadow marking method for medical images proposed in this application performs lung region segmentation on the medical image containing the lungs according to the pre-trained lung region division model to obtain lung region images.
  • the lung region division model is a U-Net model that is trained based on the first preset number of first medical images; the pre-trained lung key feature point detection model detects the preset key contained in the lung region image Feature points, the lung key feature point detection model is a neural network model that has been trained based on a second preset number of lung area images pre-marked with lung key feature points; based on the lung area image contained The preset key feature points divide the lung area map, and mark the shadows contained in the divided lung areas.
  • the lung region division model is a model trained according to a first preset number of first medical images
  • the first medical images include medical images with uneven shadow distribution
  • the pre-trained lung key feature point detection model is According to a second preset number of models trained on the first lung region image pre-marked with key feature points of the lungs, the first lung region image includes a shadow region; therefore, the lung region is divided according to the pre-trained lung region
  • the model performs lung region segmentation on medical images containing lungs, which can accurately segment the lung regions without being affected by the uneven distribution of shadows in the medical images, and then detect the model pair based on the pre-trained lung key feature points.
  • Fig. 5 is a schematic diagram of functional modules of a lung region shadow marking device for medical images provided by the present application.
  • the lung region dividing device 5 for medical imaging in this embodiment includes: a dividing module 510, a detecting module 520, and a dividing module 530. among them,
  • the dividing module 510 is configured to perform lung region segmentation on medical images containing lungs according to the pre-trained lung region division model to obtain lung region images, and the lung region division model is based on a first preset number A first medical image, a trained U-Net model, where the first medical image includes medical images with uneven shadow distribution;
  • the detection module 520 is configured to detect preset key feature points contained in the lung region image according to a pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number A first lung region image pre-marked with key feature points of the lungs, a trained neural network model, and the first lung region image includes a shadow region;
  • the partition module 530 is configured to partition the lung area image based on preset key feature points included in the lung area image, and mark the shadows included in the lung area after the partition.
  • it also includes:
  • the acquisition module is configured to acquire a first preset number of first medical images, and divide the first medical images into a training sample set and a test sample set of a preset ratio, and the first medical image is pre-divided into lungs Regional medical imaging;
  • a training module configured to input the first medical image in the training sample set into a U-Net model for training
  • An obtaining module configured to input the first medical image in the test sample set into the U-Net model to obtain a second medical image output by the U-Net model;
  • the first determining module is configured to determine whether the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is greater than or equal to a preset coincidence rate threshold value, then determine that the U- The test of the Net model is passed, and the U-Net model is a trained lung region division model;
  • the second determining module is configured to determine whether the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to a preset coincidence rate threshold value If the test of the model fails, increase the number of samples in the training sample set, and execute the input of the first medical image in the training sample set into the U-Net model for training.
  • the damage function of the trained U-Net model is:
  • w(x) is defined as follows:
  • w c (x) is the preset mapping function related to the lung area to which the x-th pixel belongs
  • d 1 (x) is the distance between the x-th pixel and the lung area
  • d 2 (x ) Is the second closest distance of the x-th pixel to the lung area
  • w 0 and ⁇ are the constant terms of the model
  • p 1 (x) represents the probability that the x-th pixel belongs to the lung area.
  • it also includes:
  • An image obtaining module configured to input a second preset number of training samples into the feature layer for training, and obtain a second lung region image output by the feature layer, where the training samples are pre-labeled with key lung feature points
  • the first lung region image of the second lung region image is a picture in which the key feature points of the lung are marked on the feature layer;
  • a cluster analysis module configured to perform cluster analysis on the first lung region image based on the detection layer to obtain a third lung region image containing the preset key feature points
  • the first comparison module is configured to: if the similarities between all the second lung area images and the third lung area images are less than a preset similarity threshold, the neural network model is all the training completed Describe the key feature point detection model of the lungs;
  • the second comparison module is configured to increase the number of training samples if the similarity between the second lung area image and the third lung area image is greater than or equal to a preset similarity threshold, and then restart The input of the preset number of training samples into the feature layer for training is performed, and the second lung region image output by the feature layer is obtained.
  • the preset key feature points include a first lung apex, a first diaphragm base, a second lung apex, and a second diaphragm base marking module 530, including:
  • a first generating unit configured to generate a first straight line based on the first lung apex and the second lung apex;
  • a second generating unit configured to generate a second straight line based on the first diaphragm bottom and the second diaphragm bottom;
  • An obtaining and generating unit configured to determine a vertical line segment between the first straight line and the second straight line, and obtain the third halves of the vertical line segment;
  • the third generating unit is used to generate a horizontal line based on each bisector respectively;
  • the marking unit is configured to use the first straight line, the second straight line, the vertical line segment, and each of the horizontal lines as the dividing reference line to obtain a preset number of lung regions, including the divided lung regions The shadow is marked.
  • Fig. 6 is a schematic diagram of the internal functions of the server provided by the present application.
  • the server 6 of this embodiment includes a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and running on the processor 60, such as a lung area shadow marking program for medical images.
  • the processor 60 executes the computer program 62, the steps in the embodiment of the shadow marking method for the lung area of each medical image described above are implemented, such as steps 101 to 103 shown in FIG. 1.
  • the processor 60 executes the computer program 62, the functions of the various modules/units in the above-mentioned embodiment of the lung region shadow marking device for medical images, such as the functions of the modules 510 to 530 shown in FIG.
  • the computer program 62 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 61 and executed by the processor 60 to complete the application.
  • the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 62 in the server 6.
  • the computer program 62 can be divided into a partition module, a detection module, and a partition module (a module in a virtual device), and the specific functions of each module are as follows:
  • the dividing module is configured to perform lung region segmentation on the medical image containing lungs according to the pre-trained lung region division model to obtain lung region images, and the lung region division model is the first preset number according to the first preset number.
  • a medical image, a trained U-Net model, the first medical image includes a medical image with uneven shadow distribution;
  • the detection module is configured to detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number of pre-set key feature points.
  • An image of a lung area marked with key feature points of the lungs, a trained neural network model, and the first lung area image includes a shadow area;
  • the partition module is configured to partition the lung area image based on the preset key feature points contained in the lung area image, and mark the shadows contained in the lung area after the partition.
  • the processor is further configured to:
  • the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is not passed, and increase The number of samples in the training sample set is executed, and the first medical image in the training sample set is input to the U-Net model for training.
  • the processor is further configured to:
  • the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
  • the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed.
  • the first medical image in the sample set is input to the U-Net model for training.
  • the loss function of the trained U-Net model is:
  • w(x) is defined as follows:
  • L is the probability that the xth pixel belongs to the preset lung area
  • w(x) is
  • w c (x) is the preset mapping function related to the lung area to which the xth pixel belongs
  • d 1 (x) is the distance between the xth pixel and the lung area
  • d 2 (x) is the second closest distance from the xth pixel to the lung area
  • w 0 and ⁇ are constant terms
  • p 1 (x ) Is the probability that the xth pixel belongs to the lung area.
  • the pre-trained neural network model includes a feature layer and a detection layer; the processor is configured to:
  • a second preset number of training samples are input to the feature layer for training, and a second lung region image output by the feature layer is obtained.
  • the training sample is a first lung region pre-labeled with key feature points of the lungs An image, where the second lung region image is a picture in which key feature points of the lung are marked on the feature layer;
  • the detection layer performs cluster analysis on the second lung region image to obtain a third lung region image including the preset key feature points;
  • the neural network model is the trained lung key feature point detection model ;
  • the similarity between the second lung area image and the third lung area image is greater than or equal to the preset similarity threshold, the number of training samples is increased, and the preset number of The training samples are input to the feature layer for training, and the second lung region image output by the feature layer is obtained.
  • the processor is further configured to:
  • the first straight line, the second straight line, the vertical line segment, and each horizontal line as a dividing reference line, a preset number of lung regions are obtained, and the shadows included in the divided lung regions are marked.
  • the detection layer includes a Gaussian mixture model model
  • the Gaussian mixture model model includes a convolutional layer of CL1-CL4
  • CL1-CL3 includes a convolutional layer and a maximum pooling layer, respectively.
  • CL4 includes a convolutional layer with a 2 ⁇ 2 convolution kernel
  • FC5-FC6 is a fully-linked layer.
  • a computer-readable storage medium is also provided, and the computer-readable storage medium may be non-volatile or volatile.
  • a computer program is stored thereon, and the computer program includes program instructions. When the program instructions are executed by the processor, they are used to implement the following steps:
  • the lung region division model is based on a first preset number of first medical images, training In the completed U-Net model, the first medical image includes a medical image with uneven shadow distribution;
  • the preset key feature points contained in the lung region image are detected, and the lung key feature point detection model is based on a second preset number of pre-labeled lung keys
  • the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are marked.
  • the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is not passed, and increase The number of samples in the training sample set is executed, and the first medical image in the training sample set is input to the U-Net model for training.
  • the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
  • the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed.
  • the first medical image in the sample set is input to the U-Net model for training.
  • w(x) is defined as follows:
  • L is the probability that the Xth pixel belongs to the preset lung region
  • w(x) is
  • w c (x) is the preset mapping function related to the lung region to which the xth pixel belongs
  • d 1 (x) is the distance between the xth pixel and the lung area
  • d 2 (x) is the distance between the xth pixel and the lung area
  • w 0 and ⁇ are constant terms
  • p 1 (x ) Is the probability that the xth pixel belongs to the lung area.
  • a second preset number of training samples are input to the feature layer for training, and a second lung region image output by the feature layer is obtained.
  • the training sample is a first lung region pre-labeled with key feature points of the lungs An image, where the second lung region image is a picture in which key feature points of the lung are marked on the feature layer;
  • the detection layer performs cluster analysis on the second lung region image to obtain a third lung region image including the preset key feature points;
  • the neural network model is the trained lung key feature point detection model ;
  • the similarity between the second lung area image and the third lung area image is greater than or equal to the preset similarity threshold, the number of training samples is increased, and the preset number of The training samples are input to the feature layer for training, and the second lung region image output by the feature layer is obtained.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Apparatus For Radiation Diagnosis (AREA)
  • Image Analysis (AREA)

Abstract

A method and a device for marking lung area shadows in a medical image, a server and a storage medium, the method comprising: performing lung area segmentation on a medical image containing lungs according to a pre-trained lung area division model to obtain a lung area image; detecting preset key feature points contained in the lung area image according to a pre-trained lung key feature point detection model; and partitioning the lung area image on the basis of the preset key feature points contained in the lung area image and marking shadows contained in partitioned lung areas.

Description

医学影像的肺部区域阴影标记方法、装置、服务器及存储介质Shadow marking method, device, server and storage medium for lung area of medical image
本申请要求于2019年10月17日提交中国专利局、申请号为2019109890853,发明名称为“医学影像的肺部区域阴影标记方法、装置、服务器及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on October 17, 2019, with application number 2019109890853, and the invention titled "Method, Apparatus, Server, and Storage Medium for Shadow Marking of Lung Regions for Medical Imaging". The entire content is incorporated into this application by reference.
技术领域Technical field
本申请属于人工智能技术领域,尤其涉及一种医学影像的肺部区域阴影标记方法、装置、服务器及存储介质。This application belongs to the field of artificial intelligence technology, and in particular relates to a method, device, server and storage medium for shadow marking of lung regions in medical images.
背景技术Background technique
目前,在需要基于肺部区域的分区进行相关研究的领域,主要是研究人员依据经验对DR设备拍摄的医学影像(X光影像)中肺部进行分区,并根据分区之后各个肺部分区内阴影的密集度,以及各个肺部分区内阴影的大小进行相关的研究。发明人发现,在X光影像中各阴影的分布不均匀,且有些阴影区域的位置很难准确定位,导致无法凭经验准确地对肺部区域的阴影进行标记。At present, in the areas where relevant research needs to be done based on the partition of the lung area, researchers mainly use experience to partition the lungs in the medical images (X-ray images) taken by the DR equipment, and according to the shadows of each lung part after the partition. The density of each lung area and the size of the shadow in each lung area were studied. The inventor found that the distribution of the shadows in the X-ray image is uneven, and the positions of some shadow areas are difficult to accurately locate, which makes it impossible to accurately mark the shadows of the lung area based on experience.
发明内容Summary of the invention
有鉴于此,本申请实施例提供了医学影像的肺部区域划分方法、装置、服务器及存储介质,以解决现有技术中无法准确进行肺部阴影标记的问题。In view of this, the embodiments of the present application provide a method, a device, a server, and a storage medium for dividing the lung region of medical images to solve the problem of the inability to accurately mark the lungs in the prior art.
本申请实施例的第一方面提供了一种医学影像的肺部区域阴影标记方法,包括:The first aspect of the embodiments of the present application provides a method for shadow marking of lung regions in medical images, including:
根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;Perform lung region segmentation on medical images containing lungs according to the pre-trained lung region division model to obtain lung region images. The lung region division model is based on a first preset number of first medical images, training In the completed U-Net model, the first medical image includes a medical image with uneven shadow distribution;
根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;Detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number of pre-labeled lung keys The lung area image of the feature point, the trained neural network model, and the first lung area image includes a shadow area;
基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are marked.
本申请实施例的第二方面提供了一种医学影像的肺部区域阴影标记装置,包括:A second aspect of the embodiments of the present application provides a lung region shadow marking device for medical imaging, including:
划分模块,用于根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;The dividing module is configured to perform lung region segmentation on the medical image containing lungs according to the pre-trained lung region division model to obtain lung region images, and the lung region division model is the first preset number according to the first preset number. A medical image, a trained U-Net model, the first medical image includes a medical image with uneven shadow distribution;
检测模块,用于根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;The detection module is configured to detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number of pre-set key feature points. An image of a lung area marked with key feature points of the lungs, a trained neural network model, and the first lung area image includes a shadow area;
标记模块,用于基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The marking module is configured to partition the lung area image based on the preset key feature points contained in the lung area image, and mark the shadows contained in the lung area after the partition.
本申请实施例的第三方面提供了一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述的医学影像的肺部区域阴影标记方法的步骤。The third aspect of the embodiments of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and running on the processor. The processor executes the computer program when the computer program is executed. The steps of the method for shadow marking of lung regions in medical images as described above.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上所述医学影像的肺部区域阴影标记方法的步骤。The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the lung area shadow of the medical image is realized as described above. Mark the steps of the method.
本申请实施例与现有技术相比存在的有益效果是:根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型;根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的肺部区域图像,训练完成的神经网络模型;基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图进行分区,对分区后的肺部区域包含的阴影进行标记。由于肺部区域划分模型为根据第一预设数量的第一医学影像训练完成的模型,所述第一医学影像包括阴影分布不均匀的医学影像;预先训练完成的肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像训练完成的模型,所述第一肺部区域图像包括阴影区域;因此,根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,能够不受医学影像中各阴影分布不均匀的影响,准确对肺部区域进行分割,再根据预先训练完成的肺部关键特征点检测模型对分割之后的肺部区域进行预设关键特征点的检测,并基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记,能够准确确定阴影区域所在的肺部区域,提高阴影区域位置标记的准确性。Compared with the prior art, the embodiment of the application has the beneficial effect that the lung area segmentation is performed on the medical image containing the lungs according to the lung area division model completed in advance to obtain the lung area image. The division model is a U-Net model that has been trained based on a first preset number of first medical images; the pre-trained lung key feature point detection model is used to detect the preset key feature points contained in the lung region image, The lung key feature point detection model is a neural network model that has been trained based on a second preset number of lung area images pre-marked with lung key feature points; based on the preset key points contained in the lung area image The feature points partition the lung area map, and mark the shadows contained in the lung area after the partition. Since the lung region division model is a model trained according to a first preset number of first medical images, the first medical images include medical images with uneven shadow distribution; the pre-trained lung key feature point detection model is According to a second preset number of models trained on the first lung region image pre-marked with key feature points of the lungs, the first lung region image includes a shadow region; therefore, the lung region is divided according to the pre-trained lung region The model performs lung region segmentation on medical images containing lungs, which can accurately segment the lung regions without being affected by the uneven distribution of shadows in the medical images, and then detect the model pair based on the pre-trained lung key feature points. After segmentation, the lung area is detected with preset key feature points, and the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are divided Marking can accurately determine the lung area where the shadow area is located, and improve the accuracy of the position marking of the shadow area.
附图说明Description of the drawings
图1是本申请第一实施例提供的医学影像的肺部区域阴影标记方法的实现流程图;FIG. 1 is a flow chart of the implementation of a method for shadow marking of lung regions in medical images provided by the first embodiment of the present application;
图2是本申请第二实施例提供的医学影像的肺部区域阴影标记方法的实现流程图;2 is a flowchart of the implementation of a method for shadow marking of lung regions in medical images provided by the second embodiment of the present application;
图3是本申请第三实施例提供的医学影像的肺部区域阴影标记方法的实现流程图;FIG. 3 is a flowchart of the implementation of a method for shadow marking of lung regions in medical images provided by the third embodiment of the present application;
图4是图1中S103的具体实施流程图;Figure 4 is a flow chart of the specific implementation of S103 in Figure 1;
图5是本申请提供的医学影像的肺部区域阴影标记装置的功能模块示意图;Fig. 5 is a schematic diagram of functional modules of a lung region shadow marking device for medical images provided by the present application;
图6是本申请提供的服务器的内部功能示意图。Fig. 6 is a schematic diagram of the internal functions of the server provided by the present application.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of this application.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。如图1所示,是 本申请第一实施例提供的医学影像的肺部区域阴影标记方法的实现流程图,本实施例的执行主体为服务器。详述如下:In order to illustrate the technical solution described in the present application, specific embodiments are used for description below. As shown in Fig. 1, it is a flowchart of the implementation of the method for shadow marking of lung regions in medical images provided by the first embodiment of the present application, and the execution subject of this embodiment is a server. The details are as follows:
S101,根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像。可以理解地,包含肺部的医学影像是尘肺病诊断过程中的重要依据,常见的包含肺部的医学影像为尘肺胸片,也称X光胸片。在尘肺病诊断过程中,医生需要根据经验判断包含肺部的医学影像中各肺区的纹理及特征。在本方案的实施例中,为了提高医生诊断的准确性,首先对包含肺部的医学影像进行肺部区域分割,具体地,根据预先训练完成的肺部区域划分模型进行分割。所述预先训练完成的肺部区域划分模型为U-Net模型。S101: Perform lung region segmentation on a medical image containing lungs according to a pre-trained lung region division model to obtain a lung region image, where the lung region division model is based on a first preset number of first medical images , The trained U-Net model, the first medical image includes a medical image with uneven shadow distribution. Understandably, medical images containing lungs are an important basis for the diagnosis of pneumoconiosis. Common medical images containing lungs are pneumoconiosis chest radiographs, also called chest X-rays. In the process of pneumoconiosis diagnosis, doctors need to judge the texture and characteristics of each lung area in medical images including lungs based on experience. In the embodiment of this solution, in order to improve the accuracy of the doctor's diagnosis, the medical image containing the lungs is first segmented into lung regions, specifically, segmentation is performed according to the lung region segmentation model completed in advance. The pre-trained lung region division model is a U-Net model.
S102,根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域。S102. Detect preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number of pre-labeled lungs. The first lung region image of the key feature points, the trained neural network model, and the first lung region image includes the shadow region.
优选地,在本实施例中,所述预先训练完成的肺部关键特征点检测模型为神经网络模型,所述神经网络模型包括特征层和检测层,所述检测层为混合高斯模型模型(Gaussian Mixture Model,GMM),所述GMM模型用于对所述特征层的各层特征进行聚类分析,对所述特征层的各层特征由粗到精进行特征定位,最后得到所述特征层的各层特征的准确定位的模型。Preferably, in this embodiment, the pre-trained lung key feature point detection model is a neural network model, the neural network model includes a feature layer and a detection layer, and the detection layer is a Gaussian mixture model (Gaussian model). Mixture Model, GMM), the GMM model is used to perform cluster analysis on the features of each layer of the feature layer, perform feature positioning on the features of each layer of the feature layer from coarse to fine, and finally obtain the feature layer Accurate positioning model of each layer feature.
优选地,在本实施例中,所述GMM模型包括CL1-CL4的卷积层,CL1-CL3分别包括卷积层conv和最大池化层MP,CL4包括卷积核为2×2的卷积层构成,FC5-FC6为全链接层。Preferably, in this embodiment, the GMM model includes a convolutional layer of CL1-CL4, CL1-CL3 includes a convolutional layer conv and a maximum pooling layer MP, respectively, and CL4 includes a convolution with a 2×2 convolution kernel. Layer composition, FC5-FC6 are fully linked layers.
S103,基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。S103, partition the lung area image based on preset key feature points included in the lung area image, and mark the shadows included in the lung area after the partition.
进一步地,在本实施例中,所述预设关键特征点包括第一肺尖、第一膈低、第二肺尖以及第二膈低;可以理解的是,在其他一些实施例中,所述预设关键特征点还可以包括第一膈顶以及第二膈顶,具体在此不做限制。Further, in this embodiment, the preset key feature points include the first lung tip, the first low diaphragm, the second lung tip, and the second low diaphragm; it is understandable that in some other embodiments, The preset key feature points may also include the first phrenic top and the second phrenic top, which are not specifically limited here.
具体地,如图2所示,是图1中S103的具体实施流程图,由图2可知,S103包括:Specifically, as shown in FIG. 2, it is a flow chart of the specific implementation of S103 in FIG. 1. As can be seen from FIG. 2, S103 includes:
S1031,基于所述第一肺尖和所述第二肺尖生成第一直线;S1031: Generate a first straight line based on the first lung apex and the second lung apex;
通常,人体包含有左右两侧肺叶,在本实施例中,将医学影像图像中左右两侧肺叶包含的肺尖分别预设为第一肺尖和第二肺尖,将左右两侧肺叶包含的膈低分别预设为第一膈低和第二膈低,基于所述第一肺尖和所述第二肺尖生成第一直线。Generally, the human body contains left and right lung lobes. In this embodiment, the lung apexes contained in the left and right lung lobes in the medical imaging image are preset as the first lung apex and the second lung apex, respectively. The lower diaphragm is preset as the first lower diaphragm and the second lower diaphragm respectively, and a first straight line is generated based on the first lung apex and the second lung apex.
S1032,基于所述第一膈底和所述第二膈底生成第二直线。S1032: Generate a second straight line based on the first diaphragm bottom and the second diaphragm bottom.
S1033,确定所述第一直线和所述第二直线之间的垂直线段,获取所述垂直线段的三等分点。S1033: Determine a vertical line segment between the first straight line and the second straight line, and obtain third halves of the vertical line segment.
具体地,在本实施例中,在确定了所述第一直线和所述第二直线之间的垂直线段后,将所述垂直线段进行等分,使得肺部分区更精准。Specifically, in this embodiment, after the vertical line segment between the first straight line and the second straight line is determined, the vertical line segment is equally divided to make the lung partial area more accurate.
可以理解的是,将肺部分为多少个肺区,通常需要根据实际应用场景进行确定,例如,在诊断肺病的过程中,通常以肺部区域发生病变而导致的疾病类型来确定将肺部区域分为多少个肺区,在一种可能的实现方式中,将所述肺尖垂直距离分为三等分,具体地,获取所述垂直线段的三等分点。It is understandable that the number of lung areas in the lungs usually needs to be determined according to actual application scenarios. For example, in the process of diagnosing lung disease, the lung area is usually determined by the type of disease caused by the occurrence of lesions in the lung area. How many lung regions are divided into, in a possible implementation manner, the vertical distance of the lung tip is divided into three equal parts, specifically, the three equal points of the vertical line segment are obtained.
可以理解地是,在不同的实施过程中,随着应用场景的不同,可以分为任意等分,在此不做具体限制。It is understandable that in different implementation processes, with different application scenarios, it can be divided into arbitrarily equal parts, and there is no specific limitation here.
S1034,分别基于每个等分点生成水平线,以所述第一直线、所述第二直线、所述垂直线段以及每条所述水平线为分割基准线,对分区后的肺部区域包含的阴影进行标记。S1034: Generate a horizontal line based on each equal division point, and use the first straight line, the second straight line, the vertical line segment, and each horizontal line as a dividing reference line, and compare the divided lung regions The shadow is marked.
可以理解地,对肺部区域包含的阴影进行标记,在医学领域具有非常重要的意义,例如,在基于医学影像进行肺部疾病,如肺癌,肺结核的诊断过程中,对肺部区域进行准确分割以及确定每个分割之后的肺区包含的阴影尤为重要,是疾病准确诊断的基础。基于每个肺区内阴影的密度及大小可以更准确地对包含肺部的医学影像进行肺病诊断。这是由于肺部疾病的严重程度不仅与肺部阴影的密度相关,还与肺部阴影的分布区域密切相关,因此,将肺部区域根据预设关键特征点进行分区之后,可以更方便准确地确定每个肺区的阴影密度,提高肺病诊断的准确性。Understandably, marking the shadows contained in the lung area is of great significance in the medical field. For example, in the diagnosis of lung diseases such as lung cancer and tuberculosis based on medical images, the lung area is accurately segmented. It is particularly important to determine the shadow contained in the lung area after each segmentation, which is the basis for accurate diagnosis of the disease. Based on the density and size of shadows in each lung area, lung disease diagnosis can be performed more accurately on medical images including lungs. This is because the severity of lung disease is not only related to the density of lung shadows, but also closely related to the distribution area of lung shadows. Therefore, after the lung area is partitioned according to preset key feature points, it can be more convenient and accurate Determine the shadow density of each lung area to improve the accuracy of lung disease diagnosis.
通过上述分析可知,本申请提出的医学影像的肺部区域阴影标记方法,根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型;根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的肺部区域图像,训练完成的神经网络模型;基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图进行分区,对分区后的肺部区域包含的阴影进行标记。由于肺部区域划分模型为根据第一预设数量的第一医学影像训练完成的模型,所述第一医学影像包括阴影分布不均匀的医学影像;预先训练完成的肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像训练完成的模型,所述第一肺部区域图像包括阴影区域;因此,根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,能够不受医学影像中各阴影分布不均匀的影响,准确对肺部区域进行分割,再根据预先训练完成的肺部关键特征点检测模型对分割之后的肺部区域进行预设关键特征点的检测,并基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记,能够准确确定阴影区域所在的肺部区域,提高阴影区域位置标记的准确性。From the above analysis, it can be seen that the lung region shadow marking method for medical images proposed in this application performs lung region segmentation on the medical image containing the lungs according to the pre-trained lung region division model to obtain the lung region image. The lung region division model is a U-Net model that is trained based on the first preset number of first medical images; the pre-trained lung key feature point detection model detects the preset key contained in the lung region image Feature points, the lung key feature point detection model is a neural network model that has been trained based on a second preset number of lung area images pre-marked with lung key feature points; based on the lung area image contained The preset key feature points divide the lung area map, and mark the shadows contained in the divided lung areas. Since the lung region division model is a model trained according to a first preset number of first medical images, the first medical images include medical images with uneven shadow distribution; the pre-trained lung key feature point detection model is According to a second preset number of models trained on the first lung region image pre-marked with key feature points of the lungs, the first lung region image includes a shadow region; therefore, the lung region is divided according to the pre-trained lung region The model performs lung region segmentation on medical images containing lungs, which can accurately segment the lung regions without being affected by the uneven distribution of shadows in the medical images, and then detect the model pair based on the pre-trained lung key feature points. After segmentation, the lung area is detected with preset key feature points, and the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are divided Marking can accurately determine the lung area where the shadow area is located, and improve the accuracy of the position marking of the shadow area.
具体地,如图3所示,是本申请第二实施例提供的医学影像的肺部区域阴影标记方法的实现流程图。由图3可知,本实施例与图1所示实施例相比,S206-S209与S101-S103的具体实施过程相同,不同之处在于,在S206之前包括S201-S205,其中,S201-S205的具体实施过程如下所述。Specifically, as shown in FIG. 3, it is a flow chart of the implementation of the method for shadow marking of lung regions in medical images provided by the second embodiment of the present application. It can be seen from FIG. 3 that compared with the embodiment shown in FIG. 1, the specific implementation process of S206-S209 and S101-S103 are the same in this embodiment. The difference is that S201-S205 are included before S206. Among them, S201-S205 The specific implementation process is as follows.
S201,获取第一预设数量的第一医学影像,将所述第一医学影像分为第一比例的训练 样本和第二比例的测试样本。S201: Acquire a first preset number of first medical images, and divide the first medical images into a first proportion of training samples and a second proportion of test samples.
具体地,所述第一医学影像为预先划分了肺部区域的医学影像;可以理解地,可以从医学专用图像库中获取所述预设数量的第一医学影像,为了提高模型训练的准确性,将所述预设数量的第一医学影像分为预设比例(例如7:3),生成由第一比例的训练样本生成的训练样本集和由第二比例的测试样本生成的测试样本集。Specifically, the first medical image is a medical image in which the lung area is pre-divided; it is understandable that the preset number of first medical images can be obtained from a medical image library, in order to improve the accuracy of model training , Divide the preset number of first medical images into a preset ratio (for example, 7:3), and generate a training sample set generated from training samples of the first ratio and a test sample set generated from test samples of the second ratio .
S202,将所述第一比例的训练样本输入预先建立的U-Net模型,进行训练。S202: Input the training samples of the first proportion into a pre-established U-Net model for training.
优选地,在进行训练之前,根据预设的图像变换函数对所述第一比例的训练样本进行图像变换(res ize),得到预设大小(如224*224)的图像;这是由于人体内的器官随时会处于不同的状态,且在有些情况下会被其他器官挤压使得形状发生扭曲,因此,在进行模型训练之前,对训练样本进行图像变换,包括拉伸,放缩,平移等变换;将所述预设大小的图像输入U-Net模型的输入网络,进行训练,可以提高模型训练的效率和准确率。Preferably, before training, image transformation (resize) is performed on the training sample of the first proportion according to a preset image transformation function to obtain an image of a preset size (such as 224*224); this is due to the human body The organs of are in different states at any time, and in some cases they will be squeezed by other organs and the shape will be distorted. Therefore, before performing model training, perform image transformations on the training samples, including stretching, scaling, translation and other transformations. ; Inputting the image of the preset size into the input network of the U-Net model for training can improve the efficiency and accuracy of model training.
优选地,所述预设的图像大小变换函数可以为:Preferably, the preset image size transformation function may be:
ds ize=Size(round(fx*src),round(fy*src))dsize=Size(round(fx*src),round(fy*src))
其中,fx:表示宽度(width)方向的缩放比例,fy:表示高度(height)方向的缩放比例,src表示变换之前的图像。Among them, fx: represents the zoom ratio in the width direction, fy: represents the zoom ratio in the height direction, and src represents the image before transformation.
可选地,还可以对所述训练样本中每个样本对应的像素点求二值掩码,然后生成对应的二值图像;根据所述二值图像训练所述U-Net模型。Optionally, it is also possible to calculate a binary mask for the pixel points corresponding to each sample in the training sample, and then generate a corresponding binary image; train the U-Net model according to the binary image.
S203,将所述第二比例的测试样本输入所述U-Net模型,得到所述U-Net模型输出的划分了肺部区域的第二医学影像。S203: Input the test sample of the second proportion into the U-Net model, and obtain a second medical image output by the U-Net model, in which the lung region is divided.
可以理解地,随着模型训练的进行,U-Net模型在训练完成之后,会输出划分了肺部区域的第二医学影像,具体地,U-Net模型训练的准确率越高,其输出的第二医学影像中划分的肺部区域与训练样本中划分的肺部区域的重合率越高。Understandably, as the model training progresses, after the training is completed, the U-Net model will output the second medical image dividing the lung area. Specifically, the higher the accuracy of the U-Net model training, the higher the output The higher the coincidence rate of the divided lung area in the second medical image with the divided lung area in the training sample.
S204,若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率大于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为所述肺部区域划分模型。S204: If the coincidence rate of the second medical image and the lung region of each sample in the test sample set is greater than or equal to a preset coincidence rate threshold, it is determined that the test of the U-Net model is passed. The U-Net model is the lung region division model.
具体地,所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率记为IOU,则Specifically, the coincidence rate of the second medical image and the preset lung area of each sample in the test sample set is recorded as IOU, then
Figure PCTCN2020093516-appb-000001
Figure PCTCN2020093516-appb-000001
其中C表示第二医学影像的肺部区域,G表示测试样本中的肺部区域。Where C represents the lung area of the second medical image, and G represents the lung area in the test sample.
S205,若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率小于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行S202。本申请提出的医学影像的肺部区域阴影标记方法,根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net 模型;根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的肺部区域图像,训练完成的神经网络模型;基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图进行分区,对分区后的肺部区域包含的阴影进行标记。由于肺部区域划分模型为根据第一预设数量的第一医学影像训练完成的模型,所述第一医学影像包括阴影分布不均匀的医学影像;预先训练完成的肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像训练完成的模型,所述第一肺部区域图像包括阴影区域;因此,根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,能够不受医学影像中各阴影分布不均匀的影响,准确对肺部区域进行分割,再根据预先训练完成的肺部关键特征点检测模型对分割之后的肺部区域进行预设关键特征点的检测,并基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记,能够准确确定阴影区域所在的肺部区域,提高阴影区域位置标记的准确性。需要说明的是,上述S201~S205为对所述U-Net模型的训练过程,可以理解地,在不同的实施例中,对所述U-Net模型的训练过程不限于上述S201~S205,例如,在一种可选的实现方式中,可以通过下述步骤完成对所述U-Net模型的训练,详述如下:S205: If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model fails , Increase the number of samples in the training sample set, and execute S202. The lung region shadow marking method for medical images proposed in this application performs lung region segmentation on a medical image containing lungs according to a pre-trained lung region division model to obtain a lung region image. The lung region division model In order to train the completed U-Net model according to the first preset number of first medical images; to detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, the The lung key feature point detection model is a neural network model that is trained based on a second preset number of lung region images pre-marked with lung key feature points; based on the preset key feature points contained in the lung region image The lung area map is divided into regions, and the shadows contained in the divided lung regions are marked. Since the lung region division model is a model trained according to a first preset number of first medical images, the first medical images include medical images with uneven shadow distribution; the pre-trained lung key feature point detection model is According to a second preset number of models trained on the first lung region image pre-marked with key feature points of the lungs, the first lung region image includes a shadow region; therefore, the lung region is divided according to the pre-trained lung region The model performs lung region segmentation on medical images containing lungs, which can accurately segment the lung regions without being affected by the uneven distribution of shadows in the medical images, and then detect the model pair based on the pre-trained lung key feature points. After segmentation, the lung area is detected with preset key feature points, and the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are divided Marking can accurately determine the lung area where the shadow area is located, and improve the accuracy of the position marking of the shadow area. It should be noted that the above S201 to S205 are the training process for the U-Net model. It is understandable that in different embodiments, the training process for the U-Net model is not limited to the above S201 to S205, for example In an optional implementation manner, the training of the U-Net model can be completed through the following steps, which are detailed as follows:
获取第一预设数量的第一医学影像,将所述第一医学影像分为第一比例的训练样本和第二比例的测试样本;Acquiring a first preset number of first medical images, and dividing the first medical images into training samples of a first proportion and test samples of a second proportion;
将所述第一比例的训练样本输入预先建立的U-Net模型,进行训练;Input the training samples of the first proportion into a pre-established U-Net model for training;
将所述第二比例的测试样本输入所述U-Net模型,得到所述U-Net模型输出的每个所述测试样本对应的划分了肺部区域的第二医学影像;Inputting the test samples of the second ratio into the U-Net model to obtain a second medical image corresponding to each of the test samples output by the U-Net model, with a lung area divided;
获取所述U-Net模型的损失函数的目标值,所述目标值为所述U-Net模型对每个所述测试样本进行分析,所述U-Net模型的损失函数的值;Acquiring a target value of the loss function of the U-Net model, where the target value is the U-Net model analyzing each test sample, and the value of the loss function of the U-Net model;
若所述目标值的变化率小于预设的变化率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
若所述目标值的变化率大于或者等于预设的变化率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed. The first medical image in the sample set is input to the U-Net model for training.
在一种可选的实现方式中,训练完成的U-Net模型的损失函数为:In an optional implementation, the loss function of the trained U-Net model is:
Figure PCTCN2020093516-appb-000002
Figure PCTCN2020093516-appb-000002
其中,w(x)为衡量像素点x的函数,其定义如下:Among them, w(x) is a function of measuring pixel x, which is defined as follows:
Figure PCTCN2020093516-appb-000003
Figure PCTCN2020093516-appb-000003
其中,w c(x)是一个和x像素点所属的目标区域(肺部区域)相关的函数映射,d 1(x)是x像素点距离目标区域最近的距离,d 2(x)是x像素点距离目标区域第二近的距离。w 0和σ是模型的两个参数;p 1(x)表示像素点x属于目标区域(肺部区域)的概率。 Among them, w c (x) is a function mapping related to the target area (lung area) to which x pixels belong, d 1 (x) is the distance between x pixels and the target area, and d 2 (x) is x The pixel is the second closest distance to the target area. w 0 and σ are the two parameters of the model; p 1 (x) represents the probability that the pixel point x belongs to the target area (lung area).
具体地,如图4所示,是本申请第三实施例提供的医学影像的肺部区域阴影标记方法的实现流程图。由图4可知,本实施例与图1所示实施例相比,S301-S303与S101-S103的具体实施过程相同。不同之处在于,在S303之前还包括S304-307,其中,S304与S302可以同时执行,也可以择一执行,S304-S307的具体实施过程如下所述。Specifically, as shown in FIG. 4, it is a flow chart of the implementation of the method for shadow marking of lung regions in medical images provided by the third embodiment of the present application. It can be seen from FIG. 4 that compared with the embodiment shown in FIG. 1, the specific implementation processes of S301-S303 and S101-S103 are the same in this embodiment. The difference is that S304-307 are also included before S303, where S304 and S302 can be executed at the same time, or alternatively, the specific implementation process of S304-S307 is as follows.
S304,将第二预设数量的训练样本输入神经网络模型的特征层进行训练,获得所述特征层输出的第二肺部区域图像;S304: Input a second preset number of training samples into the feature layer of the neural network model for training, and obtain a second lung region image output by the feature layer;
具体地,所述训练样本为预先标注了肺部关键特征点的第一肺部区域图像,所述第二肺部区域图像为所述特征层标注了肺部关键特征点的图片。Specifically, the training sample is a first lung region image pre-labeled with key feature points of the lungs, and the second lung region image is a picture of the feature layer labeled with key feature points of the lungs.
S305,所述检测层将所述第二肺部区域图像进行聚类分析,聚类得到包含有所述预设关键特征点的第三肺部区域图像。S305: The detection layer performs cluster analysis on the second lung area image, and clusters to obtain a third lung area image including the preset key feature points.
具体地,所述检测层的全链接层FC5的数量,假设为K,在训练过程中,K的值保持不变为1,直至GMM模型开始收敛,K的值开始发生变化;通过GMM模型将所述训练样本经过CL4层得到的特征进行聚类分析,在此过程中,随着GMM模型的聚类分析,K的值开始变化,最后得到K类包含有所述预设关键特征点的第三肺部区域图像。Specifically, the number of FC5 in the full link layer of the detection layer is assumed to be K. During the training process, the value of K remains unchanged at 1 until the GMM model starts to converge, and the value of K starts to change; The training samples are subjected to cluster analysis on the features obtained by the CL4 layer. In this process, with the clustering analysis of the GMM model, the value of K begins to change, and finally the first K category containing the preset key feature points is obtained. Image of three lung regions.
S306,若所有所述第二肺部区域图像与所述第三肺部区域图像的相似度均小于预设的相似度阈值,则所述神经网络模型为训练完成的所述肺部关键特征点检测模型。S306: If the similarities between all the second lung region images and the third lung region images are less than a preset similarity threshold, the neural network model is the key feature points of the lungs that have been trained Check the model.
具体地,分别将所有所述第二肺部区域图像重新输入所述神经网络模型,计算所述GMM模型的CL4层将所述第二肺部区域图像进行分析之后得到的包含有所述预设关键特征点的肺部区域图像与所述K类包含有所述预设关键特征点的第三肺部区域图像之间的相似度。Specifically, all the images of the second lung region are re-input to the neural network model respectively, and the CL4 layer of the GMM model is calculated. After analyzing the image of the second lung region, the image obtained contains the preset The similarity between the lung region image of the key feature point and the third lung region image of the K category including the preset key feature point.
S307,若有所述第二肺部区域图像与所述第三肺部区域图像的相似度大于或等于预设的相似度阈值,则增加所述训练样本的数量,重新执行S305。S307: If the similarity between the second lung area image and the third lung area image is greater than or equal to a preset similarity threshold, increase the number of training samples, and perform S305 again.
需要说明的是,由于不同形态的肺在膈顶位置的特征显著的不同,因此在模型的训练过程中,首先将所述训练样本的特征进行聚类分析,使得能够更加准确的针对不同形态的肺找到对应的膈顶位置,所述膈顶位置为所述肺部的关键特征点。It should be noted that because the features of different forms of lungs at the top of the diaphragm are significantly different, in the training process of the model, first perform cluster analysis on the features of the training samples, so that it can be more accurate for different forms of The lung finds the corresponding position of the apex of the diaphragm, and the position of the apex of the diaphragm is a key feature point of the lung.
优选地,在本方案中,所述CNN神经网络模型的损失函数可以表示为:Preferably, in this solution, the loss function of the CNN neural network model can be expressed as:
Figure PCTCN2020093516-appb-000004
Figure PCTCN2020093516-appb-000004
需要说明的是,所述预设关键特征点根据肺部的几何特征以及病变区域可以进行预先设置,在此,不做具体的限定。It should be noted that the preset key feature points can be preset according to the geometric characteristics of the lung and the diseased area, and no specific limitation is made here.
优选地,在本实施例中,所述预设关键特征点包括第一肺尖、第一膈底、第二肺尖以及第二膈底。Preferably, in this embodiment, the preset key feature points include a first lung apex, a first diaphragm bottom, a second lung apex, and a second diaphragm bottom.
由上述分析可知,本申请提出的医学影像的肺部区域阴影标记方法,根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型;根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的肺部区域图像,训练完成的神经网络模型;基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图进行分区,对分区后的肺部区域包含的阴影进行标记。由于肺部区域划分模型为根据第一预设数量的第一医学影像训练完成的模型,所述第一医学影像包括阴影分布不均匀的医学影像;预先训练完成的肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像训练完成的模型,所述第一肺部区域图像包括阴影区域;因此,根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,能够不受医学影像中各阴影分布不均匀的影响,准确对肺部区域进行分割,再根据预先训练完成的肺部关键特征点检测模型对分割之后的肺部区域进行预设关键特征点的检测,并基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记,能够准确确定阴影区域所在的肺部区域,提高阴影区域位置标记的准确性。图5是本申请提供的医学影像的肺部区域阴影标记装置的功能模块示意图。如图5所示,该实施例的医学影像的肺部区域划分装置5包括:划分模块510、检测模块520以及分区模块530。其中,From the above analysis, it can be seen that the lung region shadow marking method for medical images proposed in this application performs lung region segmentation on the medical image containing the lungs according to the pre-trained lung region division model to obtain lung region images. The lung region division model is a U-Net model that is trained based on the first preset number of first medical images; the pre-trained lung key feature point detection model detects the preset key contained in the lung region image Feature points, the lung key feature point detection model is a neural network model that has been trained based on a second preset number of lung area images pre-marked with lung key feature points; based on the lung area image contained The preset key feature points divide the lung area map, and mark the shadows contained in the divided lung areas. Since the lung region division model is a model trained according to a first preset number of first medical images, the first medical images include medical images with uneven shadow distribution; the pre-trained lung key feature point detection model is According to a second preset number of models trained on the first lung region image pre-marked with key feature points of the lungs, the first lung region image includes a shadow region; therefore, the lung region is divided according to the pre-trained lung region The model performs lung region segmentation on medical images containing lungs, which can accurately segment the lung regions without being affected by the uneven distribution of shadows in the medical images, and then detect the model pair based on the pre-trained lung key feature points. After segmentation, the lung area is detected with preset key feature points, and the lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are divided Marking can accurately determine the lung area where the shadow area is located, and improve the accuracy of the position marking of the shadow area. Fig. 5 is a schematic diagram of functional modules of a lung region shadow marking device for medical images provided by the present application. As shown in FIG. 5, the lung region dividing device 5 for medical imaging in this embodiment includes: a dividing module 510, a detecting module 520, and a dividing module 530. among them,
划分模块510,用于根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;The dividing module 510 is configured to perform lung region segmentation on medical images containing lungs according to the pre-trained lung region division model to obtain lung region images, and the lung region division model is based on a first preset number A first medical image, a trained U-Net model, where the first medical image includes medical images with uneven shadow distribution;
检测模块520,用于根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;The detection module 520 is configured to detect preset key feature points contained in the lung region image according to a pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number A first lung region image pre-marked with key feature points of the lungs, a trained neural network model, and the first lung region image includes a shadow region;
分区模块530,用于基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The partition module 530 is configured to partition the lung area image based on preset key feature points included in the lung area image, and mark the shadows included in the lung area after the partition.
优选地,还包括:Preferably, it also includes:
获取模块,用于获取第一预设数量的第一医学影像,将所述第一医学影像分为预设比 例的训练样本集和测试样本集,所述第一医学影像为预先划分了肺部区域的医学影像;The acquisition module is configured to acquire a first preset number of first medical images, and divide the first medical images into a training sample set and a test sample set of a preset ratio, and the first medical image is pre-divided into lungs Regional medical imaging;
训练模块,用于将所述训练样本集中的所述第一医学影像输入U-Net模型,进行训练;A training module, configured to input the first medical image in the training sample set into a U-Net model for training;
获得模块,用于将所述测试样本集中的所述第一医学影像输入所述U-Net模型,获得所述U-Net模型输出的第二医学影像;An obtaining module, configured to input the first medical image in the test sample set into the U-Net model to obtain a second medical image output by the U-Net model;
第一确定模块,用于在若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率大于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;The first determining module is configured to determine whether the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is greater than or equal to a preset coincidence rate threshold value, then determine that the U- The test of the Net model is passed, and the U-Net model is a trained lung region division model;
第二确定模块,用于若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率小于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。The second determining module is configured to determine whether the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to a preset coincidence rate threshold value If the test of the model fails, increase the number of samples in the training sample set, and execute the input of the first medical image in the training sample set into the U-Net model for training.
优选地,所述训练完成的U-Net模型的损伤函数为:Preferably, the damage function of the trained U-Net model is:
Figure PCTCN2020093516-appb-000005
Figure PCTCN2020093516-appb-000005
其中,w(x)定义如下:Among them, w(x) is defined as follows:
Figure PCTCN2020093516-appb-000006
Figure PCTCN2020093516-appb-000006
其中,w c(x)是预设的和第x个像素点所属的肺部区域相关的映射函数,d 1(x)是第x个像素点距离肺部区域最近的距离,d 2(x)是第x个像素点距离肺部区域第二近的距离,w 0和σ是模型的常数项,p 1(x)表示第x个像素点属于肺部区域的概率。 Among them, w c (x) is the preset mapping function related to the lung area to which the x-th pixel belongs, d 1 (x) is the distance between the x-th pixel and the lung area, and d 2 (x ) Is the second closest distance of the x-th pixel to the lung area, w 0 and σ are the constant terms of the model, and p 1 (x) represents the probability that the x-th pixel belongs to the lung area.
优选地,还包括:Preferably, it also includes:
获得图像模块,用于将第二预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像,所述训练样本为预先标注了肺部关键特征点的第一肺部区域图像,所述第二肺部区域图像为所述特征层标注了肺部关键特征点的图片;An image obtaining module, configured to input a second preset number of training samples into the feature layer for training, and obtain a second lung region image output by the feature layer, where the training samples are pre-labeled with key lung feature points The first lung region image of the second lung region image is a picture in which the key feature points of the lung are marked on the feature layer;
聚类分析模块,用于基于所述检测层将所述第一肺部区域图像进行聚类分析,得到包含有所述预设关键特征点的第三肺部区域图像;A cluster analysis module, configured to perform cluster analysis on the first lung region image based on the detection layer to obtain a third lung region image containing the preset key feature points;
第一比较模块,用于在若所有所述第二肺部区域图像与所述第三肺部区域图像的相似度均小于预设的相似度阈值,则所述神经网络模型为训练完成的所述肺部关键特征点检测模型;The first comparison module is configured to: if the similarities between all the second lung area images and the third lung area images are less than a preset similarity threshold, the neural network model is all the training completed Describe the key feature point detection model of the lungs;
第二比较模块,用于在若有所述第二肺部区域图像与所述第三肺部区域图像的相似度大于或等于预设的相似度阈值,则增加所述训练样本的数量,重新执行所述将预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像。The second comparison module is configured to increase the number of training samples if the similarity between the second lung area image and the third lung area image is greater than or equal to a preset similarity threshold, and then restart The input of the preset number of training samples into the feature layer for training is performed, and the second lung region image output by the feature layer is obtained.
优选地,所述预设关键特征点包括第一肺尖、第一膈底、第二肺尖以及第二膈底标记模块530,包括:Preferably, the preset key feature points include a first lung apex, a first diaphragm base, a second lung apex, and a second diaphragm base marking module 530, including:
第一生成单元,用于基于所述第一肺尖和所述第二肺尖生成第一直线;A first generating unit, configured to generate a first straight line based on the first lung apex and the second lung apex;
第二生成单元,用于基于所述第一膈底和所述第二膈底生成第二直线;A second generating unit, configured to generate a second straight line based on the first diaphragm bottom and the second diaphragm bottom;
获取生成单元,用于确定所述第一直线和所述第二直线之间的垂直线段,获取所述垂直线段的三等分点;An obtaining and generating unit, configured to determine a vertical line segment between the first straight line and the second straight line, and obtain the third halves of the vertical line segment;
第三生成单元,用于分别基于每个等分点生成水平线;The third generating unit is used to generate a horizontal line based on each bisector respectively;
标记单元,用于以所述第一直线、所述第二直线、所述垂直线段以及每条所述水平线为分割基准线,获得预设数量的肺区,对分区后的肺部区域包含的阴影进行标记。The marking unit is configured to use the first straight line, the second straight line, the vertical line segment, and each of the horizontal lines as the dividing reference line to obtain a preset number of lung regions, including the divided lung regions The shadow is marked.
图6是本申请提供的服务器的内部功能示意图。如图6所示,该实施例的服务器6包括:处理器60、存储器61以及存储在存储器61中并可在处理器60上运行的计算机程序62,例如医学影像的肺部区域阴影标记程序。处理器60执行计算机程序62时实现上述各个医学影像的肺部区域阴影标记方法实施例中的步骤,例如图1所示的步骤101至103。或者,处理器60执行计算机程序62时实现上述医学影像的肺部区域阴影标记装置实施例中各模块/单元的功能,例如图5所示模块510至530的功能。Fig. 6 is a schematic diagram of the internal functions of the server provided by the present application. As shown in FIG. 6, the server 6 of this embodiment includes a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and running on the processor 60, such as a lung area shadow marking program for medical images. When the processor 60 executes the computer program 62, the steps in the embodiment of the shadow marking method for the lung area of each medical image described above are implemented, such as steps 101 to 103 shown in FIG. 1. Alternatively, when the processor 60 executes the computer program 62, the functions of the various modules/units in the above-mentioned embodiment of the lung region shadow marking device for medical images, such as the functions of the modules 510 to 530 shown in FIG.
示例性的,计算机程序62可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在存储器61中,并由处理器60执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序62在服务器6中的执行过程。例如,计算机程序62可以被分割成划分模块、检测模块以及分区模块(虚拟装置中的模块),各模块具体功能如下:Exemplarily, the computer program 62 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 61 and executed by the processor 60 to complete the application. The one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 62 in the server 6. For example, the computer program 62 can be divided into a partition module, a detection module, and a partition module (a module in a virtual device), and the specific functions of each module are as follows:
划分模块,用于根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;The dividing module is configured to perform lung region segmentation on the medical image containing lungs according to the pre-trained lung region division model to obtain lung region images, and the lung region division model is the first preset number according to the first preset number. A medical image, a trained U-Net model, the first medical image includes a medical image with uneven shadow distribution;
检测模块,用于根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;The detection module is configured to detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number of pre-set key feature points. An image of a lung area marked with key feature points of the lungs, a trained neural network model, and the first lung area image includes a shadow area;
分区模块,用于基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The partition module is configured to partition the lung area image based on the preset key feature points contained in the lung area image, and mark the shadows contained in the lung area after the partition.
可选的,在一些可行的实施方式中,所述处理器还用于:Optionally, in some feasible implementation manners, the processor is further configured to:
获取第一预设数量的第一医学影像,将所述第一医学影像分为第一比例的训练样本和第二比例的测试样本,所述第一医学影像为预先划分了肺部区域的医学影像;Acquire a first preset number of first medical images, divide the first medical image into a training sample of a first proportion and a test sample of a second proportion, and the first medical image is a medical image with a lung area divided in advance image;
将所述第一比例的训练样本输入所述U-Net模型,进行训练;Input the training samples of the first proportion into the U-Net model for training;
将所述第二比例的测试样本输入所述U-Net模型,得到所述U-Net模型输出的每个所述测试样本对应的划分了肺部区域的第二医学影像;Inputting the test samples of the second ratio into the U-Net model to obtain a second medical image corresponding to each of the test samples output by the U-Net model, with a lung area divided;
若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率大于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is greater than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is passed, and U-Net model is the lung region division model after training;
若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率小于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is not passed, and increase The number of samples in the training sample set is executed, and the first medical image in the training sample set is input to the U-Net model for training.
可选的,在一些可行的实施方式中,所述处理器还用于:Optionally, in some feasible implementation manners, the processor is further configured to:
获取所述U-Net模型的损失函数的目标值,所述目标值为所述U-Net模型对每个所述测试样本进行分析,所述U-Net模型的损失函数的值;Acquiring a target value of the loss function of the U-Net model, where the target value is the U-Net model analyzing each test sample, and the value of the loss function of the U-Net model;
若所述目标值的变化率小于预设的变化率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
若所述目标值的变化率大于或者等于预设的变化率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed. The first medical image in the sample set is input to the U-Net model for training.
可选的,在一些可行的实施方式中,所述训练完成的U-Net模型的损失函数为:Optionally, in some feasible implementation manners, the loss function of the trained U-Net model is:
Figure PCTCN2020093516-appb-000007
Figure PCTCN2020093516-appb-000007
其中,w(x)定义如下:Among them, w(x) is defined as follows:
Figure PCTCN2020093516-appb-000008
Figure PCTCN2020093516-appb-000008
其中,L是第X个像素点属于预设肺部区域的概率w(x)是,w c(x)是预设的和第x个像素点所属的肺部区域相关的映射函数,d 1(x)是第x个像素点距离肺部区域最近的距离,d 2(x)是第x个像素点距离肺部区域第二近的距离,w 0和σ是常数项, p 1(x)是第x个像素点属于肺部区域的概率。 Among them, L is the probability that the xth pixel belongs to the preset lung area, w(x) is, w c (x) is the preset mapping function related to the lung area to which the xth pixel belongs, d 1 (x) is the distance between the xth pixel and the lung area, d 2 (x) is the second closest distance from the xth pixel to the lung area, w 0 and σ are constant terms, p 1 (x ) Is the probability that the xth pixel belongs to the lung area.
可选的,在一些可行的实施方式中,所述预先训练完成的神经网络模型包括特征层和检测层;所述处理器用于:Optionally, in some feasible implementation manners, the pre-trained neural network model includes a feature layer and a detection layer; the processor is configured to:
将第二预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像,所述训练样本为预先标注了肺部关键特征点的第一肺部区域图像,所述第二肺部区域图像为所述特征层标注了肺部关键特征点的图片;A second preset number of training samples are input to the feature layer for training, and a second lung region image output by the feature layer is obtained. The training sample is a first lung region pre-labeled with key feature points of the lungs An image, where the second lung region image is a picture in which key feature points of the lung are marked on the feature layer;
所述检测层将所述第二肺部区域图像进行聚类分析,得到包含有所述预设关键特征点的第三肺部区域图像;The detection layer performs cluster analysis on the second lung region image to obtain a third lung region image including the preset key feature points;
若所有所述第二肺部区域图像与所述第三肺部区域图像的相似度均小于预设的相似度阈值,则所述神经网络模型为训练完成的所述肺部关键特征点检测模型;If the similarities between all the second lung region images and the third lung region images are less than the preset similarity threshold, the neural network model is the trained lung key feature point detection model ;
若有所述第二肺部区域图像与所述第三肺部区域图像的相似度大于或等于预设的相似度阈值,则增加所述训练样本的数量,重新执行所述将预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像。If the similarity between the second lung area image and the third lung area image is greater than or equal to the preset similarity threshold, the number of training samples is increased, and the preset number of The training samples are input to the feature layer for training, and the second lung region image output by the feature layer is obtained.
可选的,在一些可行的实施方式中,所述处理器还用于:Optionally, in some feasible implementation manners, the processor is further configured to:
基于所述第一肺尖和所述第二肺尖生成第一直线;Generating a first straight line based on the first lung tip and the second lung tip;
基于所述第一膈底和所述第二膈底生成第二直线;Generating a second straight line based on the first diaphragm bottom and the second diaphragm bottom;
确定所述第一直线和所述第二直线之间的垂直线段,获取所述垂直线段的三等分点;Determine the vertical line segment between the first straight line and the second straight line, and obtain the third halves of the vertical line segment;
分别基于每个等分点生成水平线;Generate a horizontal line based on each division point;
以所述第一直线、所述第二直线、所述垂直线段以及每条所述水平线为分割基准线,获得预设数量的肺区,对分区后的肺部区域包含的阴影进行标记。Using the first straight line, the second straight line, the vertical line segment, and each horizontal line as a dividing reference line, a preset number of lung regions are obtained, and the shadows included in the divided lung regions are marked.
可选的,在一些可行的实施方式中,所述检测层包括混合高斯模型模型,所述混合高斯模型模型包括CL1-CL4的卷积层,CL1-CL3分别包括卷积层和最大池化层,CL4包括卷积核为2×2的卷积层,FC5-FC6为全链接层。Optionally, in some feasible implementation manners, the detection layer includes a Gaussian mixture model model, and the Gaussian mixture model model includes a convolutional layer of CL1-CL4, and CL1-CL3 includes a convolutional layer and a maximum pooling layer, respectively. , CL4 includes a convolutional layer with a 2×2 convolution kernel, and FC5-FC6 is a fully-linked layer.
在示例性实施例中,还提供了一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性。其上存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:In an exemplary embodiment, a computer-readable storage medium is also provided, and the computer-readable storage medium may be non-volatile or volatile. A computer program is stored thereon, and the computer program includes program instructions. When the program instructions are executed by the processor, they are used to implement the following steps:
根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;Perform lung region segmentation on medical images containing lungs according to the pre-trained lung region division model to obtain lung region images. The lung region division model is based on a first preset number of first medical images, training In the completed U-Net model, the first medical image includes a medical image with uneven shadow distribution;
根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;According to the pre-trained lung key feature point detection model, the preset key feature points contained in the lung region image are detected, and the lung key feature point detection model is based on a second preset number of pre-labeled lung keys A first lung region image of a feature point, a trained neural network model, the first lung region image including a shadow region;
基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are marked.
可选的,在一些可行的实施方式中,所述程序指令被处理器执行时,还用于实现以下步骤:Optionally, in some feasible implementation manners, when the program instructions are executed by the processor, they are further used to implement the following steps:
获取第一预设数量的第一医学影像,将所述第一医学影像分为第一比例的训练样本和第二比例的测试样本,所述第一医学影像为预先划分了肺部区域的医学影像;Acquire a first preset number of first medical images, divide the first medical image into a training sample of a first proportion and a test sample of a second proportion, and the first medical image is a medical image with a lung area divided in advance image;
将所述第一比例的训练样本输入所述U-Net模型,进行训练;Input the training samples of the first proportion into the U-Net model for training;
将所述第二比例的测试样本输入所述U-Net模型,得到所述U-Net模型输出的每个所述测试样本对应的划分了肺部区域的第二医学影像;Inputting the test samples of the second ratio into the U-Net model to obtain a second medical image corresponding to each of the test samples output by the U-Net model, with a lung area divided;
若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率大于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is greater than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is passed, and U-Net model is the lung region division model after training;
若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率小于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is not passed, and increase The number of samples in the training sample set is executed, and the first medical image in the training sample set is input to the U-Net model for training.
可选的,在一些可行的实施方式中,所述程序指令被处理器执行时,还用于实现以下步骤:Optionally, in some feasible implementation manners, when the program instructions are executed by the processor, they are further used to implement the following steps:
获取所述U-Net模型的损失函数的目标值,所述目标值为所述U-Net模型对每个所述测试样本进行分析,所述U-Net模型的损失函数的值;Acquiring a target value of the loss function of the U-Net model, where the target value is the U-Net model analyzing each test sample, and the value of the loss function of the U-Net model;
若所述目标值的变化率小于预设的变化率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
若所述目标值的变化率大于或者等于预设的变化率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed. The first medical image in the sample set is input to the U-Net model for training.
可选的,在一些可行的实施方式中,所述程序指令被处理器执行时,还用于实现以下步骤:Optionally, in some feasible implementation manners, when the program instructions are executed by the processor, they are further used to implement the following steps:
Figure PCTCN2020093516-appb-000009
Figure PCTCN2020093516-appb-000009
其中,w(x)定义如下:Among them, w(x) is defined as follows:
Figure PCTCN2020093516-appb-000010
Figure PCTCN2020093516-appb-000010
其中,L是第X个像素点属于预设肺部区域的概率w(x)是,w c(x)是预设的和第x 个像素点所属的肺部区域相关的映射函数,d 1(x)是第x个像素点距离肺部区域最近的距离,d 2(x)是第x个像素点距离肺部区域第二近的距离,w 0和σ是常数项,p 1(x)是第x个像素点属于肺部区域的概率。 Among them, L is the probability that the Xth pixel belongs to the preset lung region, w(x) is, w c (x) is the preset mapping function related to the lung region to which the xth pixel belongs, d 1 (x) is the distance between the xth pixel and the lung area, d 2 (x) is the distance between the xth pixel and the lung area, w 0 and σ are constant terms, p 1 (x ) Is the probability that the xth pixel belongs to the lung area.
可选的,在一些可行的实施方式中,所述程序指令被处理器执行时,还用于实现以下步骤:Optionally, in some feasible implementation manners, when the program instructions are executed by the processor, they are further used to implement the following steps:
将第二预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像,所述训练样本为预先标注了肺部关键特征点的第一肺部区域图像,所述第二肺部区域图像为所述特征层标注了肺部关键特征点的图片;A second preset number of training samples are input to the feature layer for training, and a second lung region image output by the feature layer is obtained. The training sample is a first lung region pre-labeled with key feature points of the lungs An image, where the second lung region image is a picture in which key feature points of the lung are marked on the feature layer;
所述检测层将所述第二肺部区域图像进行聚类分析,得到包含有所述预设关键特征点的第三肺部区域图像;The detection layer performs cluster analysis on the second lung region image to obtain a third lung region image including the preset key feature points;
若所有所述第二肺部区域图像与所述第三肺部区域图像的相似度均小于预设的相似度阈值,则所述神经网络模型为训练完成的所述肺部关键特征点检测模型;If the similarities between all the second lung region images and the third lung region images are less than the preset similarity threshold, the neural network model is the trained lung key feature point detection model ;
若有所述第二肺部区域图像与所述第三肺部区域图像的相似度大于或等于预设的相似度阈值,则增加所述训练样本的数量,重新执行所述将预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像。If the similarity between the second lung area image and the third lung area image is greater than or equal to the preset similarity threshold, the number of training samples is increased, and the preset number of The training samples are input to the feature layer for training, and the second lung region image output by the feature layer is obtained.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (20)

  1. 一种医学影像的肺部区域阴影标记方法,其中,包括:A method for shadow marking of lung regions in medical imaging, which includes:
    根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;Perform lung region segmentation on medical images containing lungs according to the pre-trained lung region division model to obtain lung region images. The lung region division model is based on a first preset number of first medical images, training In the completed U-Net model, the first medical image includes a medical image with uneven shadow distribution;
    根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;According to the pre-trained lung key feature point detection model, the preset key feature points contained in the lung region image are detected, and the lung key feature point detection model is based on a second preset number of pre-labeled lung keys A first lung region image of a feature point, a trained neural network model, the first lung region image including a shadow region;
    基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are marked.
  2. 如权利要求1所述的医学影像的肺部区域阴影标记方法,其中,在所述根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域之前,包括:The lung region shadow marking method for medical images according to claim 1, wherein before the lung region segmentation is performed on the medical image containing the lungs according to the lung region division model completed in advance, the lung region is obtained ,include:
    获取第一预设数量的第一医学影像,将所述第一医学影像分为第一比例的训练样本和第二比例的测试样本,所述第一医学影像为预先划分了肺部区域的医学影像;Acquire a first preset number of first medical images, divide the first medical image into a training sample of a first proportion and a test sample of a second proportion, and the first medical image is a medical image with a lung area divided in advance image;
    将所述第一比例的训练样本输入所述U-Net模型,进行训练;Input the training samples of the first proportion into the U-Net model for training;
    将所述第二比例的测试样本输入所述U-Net模型,得到所述U-Net模型输出的每个所述测试样本对应的划分了肺部区域的第二医学影像;Inputting the test samples of the second ratio into the U-Net model to obtain a second medical image corresponding to each of the test samples output by the U-Net model, with a lung area divided;
    若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率大于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is greater than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is passed, and U-Net model is the lung region division model after training;
    若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率小于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is not passed, and increase The number of samples in the training sample set is executed, and the first medical image in the training sample set is input to the U-Net model for training.
  3. 如权利要求2所述的医学影像的肺部区域阴影标记方法,其中,在所述将所述第二比例的测试样本输入所述U-Net模型,得到所述U-Net模型输出的每个所述测试样本对应的划分了肺部区域的第二医学影像之后,包括:The method for marking the lung area shadows of medical images according to claim 2, wherein, in the step of inputting the test sample of the second proportion into the U-Net model, each output of the U-Net model is obtained. After the second medical image of the lung region corresponding to the test sample is divided, it includes:
    获取所述U-Net模型的损失函数的目标值,所述目标值为所述U-Net模型对每个所述测试样本进行分析,所述U-Net模型的损失函数的值;Acquiring a target value of the loss function of the U-Net model, where the target value is the U-Net model analyzing each test sample, and the value of the loss function of the U-Net model;
    若所述目标值的变化率小于预设的变化率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
    若所述目标值的变化率大于或者等于预设的变化率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed. The first medical image in the sample set is input to the U-Net model for training.
  4. 如权利要求3所述的医学影像的肺部区域阴影标记方法,其中,所述训练完成的U-Net模型的损失函数为:The shadow marking method for lung regions of medical images according to claim 3, wherein the loss function of the trained U-Net model is:
    Figure PCTCN2020093516-appb-100001
    Figure PCTCN2020093516-appb-100001
    其中,w(x)定义如下:Among them, w(x) is defined as follows:
    Figure PCTCN2020093516-appb-100002
    Figure PCTCN2020093516-appb-100002
    其中,L是第X个像素点属于预设肺部区域的概率w(x)是,w c(x)是预设的和第x个像素点所属的肺部区域相关的映射函数,d 1(x)是第x个像素点距离肺部区域最近的距离,d 2(x)是第x个像素点距离肺部区域第二近的距离,w 0和σ是常数项,p 1(x)是第x个像素点属于肺部区域的概率。 Among them, L is the probability that the xth pixel belongs to the preset lung area, w(x) is, w c (x) is the preset mapping function related to the lung area to which the xth pixel belongs, d 1 (x) is the distance between the xth pixel and the lung area, d 2 (x) is the second closest distance from the xth pixel to the lung area, w 0 and σ are constant terms, p 1 (x ) Is the probability that the x-th pixel belongs to the lung area.
  5. 如权利要求1所述的医学影像的肺部区域阴影标记方法,其中,所述预先训练完成的神经网络模型包括特征层和检测层;The method for marking lung area shadows in medical images according to claim 1, wherein the pre-trained neural network model includes a feature layer and a detection layer;
    在所述根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域包含的预设关键特征点之前,包括:Before the detecting the preset key feature points contained in the lung region according to the pre-trained lung key feature point detection model, the method includes:
    将第二预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像,所述训练样本为预先标注了肺部关键特征点的第一肺部区域图像,所述第二肺部区域图像为所述特征层标注了肺部关键特征点的图片;A second preset number of training samples are input to the feature layer for training, and a second lung region image output by the feature layer is obtained. The training sample is a first lung region pre-labeled with key feature points of the lungs An image, where the second lung region image is a picture in which key feature points of the lung are marked on the feature layer;
    所述检测层将所述第二肺部区域图像进行聚类分析,得到包含有所述预设关键特征点的第三肺部区域图像;The detection layer performs cluster analysis on the second lung region image to obtain a third lung region image including the preset key feature points;
    若所有所述第二肺部区域图像与所述第三肺部区域图像的相似度均小于预设的相似度阈值,则所述神经网络模型为训练完成的所述肺部关键特征点检测模型;If the similarities between all the second lung region images and the third lung region images are less than the preset similarity threshold, the neural network model is the trained lung key feature point detection model ;
    若有所述第二肺部区域图像与所述第三肺部区域图像的相似度大于或等于预设的相似度阈值,则增加所述训练样本的数量,重新执行所述将预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像。If the similarity between the second lung area image and the third lung area image is greater than or equal to the preset similarity threshold, the number of training samples is increased, and the preset number of The training samples are input to the feature layer for training, and the second lung region image output by the feature layer is obtained.
  6. 如权利要求1所述的医学影像的肺部区域阴影标记方法,其中,所述预设关键特征点包括第一肺尖、第一膈底、第二肺尖以及第二膈底;所述基于所述肺部区域包含的预设 关键特征点将所述肺部区域进行分区,获得预设数量的肺区,包括:The method for marking lung area shadows in medical images according to claim 1, wherein the preset key feature points include a first lung apex, a first diaphragmatic floor, a second lung apex, and a second diaphragmatic floor; The preset key feature points included in the lung area partition the lung area to obtain a preset number of lung areas, including:
    基于所述第一肺尖和所述第二肺尖生成第一直线;Generating a first straight line based on the first lung tip and the second lung tip;
    基于所述第一膈底和所述第二膈底生成第二直线;Generating a second straight line based on the first diaphragm bottom and the second diaphragm bottom;
    确定所述第一直线和所述第二直线之间的垂直线段,获取所述垂直线段的三等分点;Determine the vertical line segment between the first straight line and the second straight line, and obtain the third halves of the vertical line segment;
    分别基于每个等分点生成水平线;Generate a horizontal line based on each division point;
    以所述第一直线、所述第二直线、所述垂直线段以及每条所述水平线为分割基准线,获得预设数量的肺区,对分区后的肺部区域包含的阴影进行标记。Using the first straight line, the second straight line, the vertical line segment, and each horizontal line as a dividing reference line, a preset number of lung regions are obtained, and the shadows included in the divided lung regions are marked.
  7. 如权利要求5所述的医学影像的肺部区域阴影标记方法,其中,所述检测层包括混合高斯模型模型,所述混合高斯模型模型包括CL1-CL4的卷积层,CL1-CL3分别包括卷积层和最大池化层,CL4包括卷积核为2×2的卷积层,FC5-FC6为全链接层。The method for marking lung area shadows in medical images according to claim 5, wherein the detection layer includes a Gaussian mixture model model, and the Gaussian mixture model model includes convolutional layers of CL1-CL4, and CL1-CL3 respectively include volume Build-up layer and maximum pooling layer, CL4 includes a convolutional layer with a 2×2 convolution kernel, and FC5-FC6 are fully-linked layers.
  8. 一种医学影像的肺部区域阴影标记装置,其中,包括:A shadow marking device for lung area in medical imaging, which includes:
    划分模块,用于根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;The dividing module is configured to perform lung region segmentation on the medical image containing lungs according to the pre-trained lung region division model to obtain lung region images, and the lung region division model is the first preset number according to the first preset number. A medical image, a trained U-Net model, the first medical image includes a medical image with uneven shadow distribution;
    检测模块,用于根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;The detection module is configured to detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number of pre-set key feature points. An image of a lung area marked with key feature points of the lungs, a trained neural network model, and the first lung area image includes a shadow area;
    标记模块,用于基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The marking module is configured to partition the lung area image based on the preset key feature points contained in the lung area image, and mark the shadows contained in the lung area after the partition.
  9. 一种服务器,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:A server includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the memory The program instructions of, where:
    根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;Perform lung region segmentation on medical images containing lungs according to the pre-trained lung region division model to obtain lung region images. The lung region division model is based on a first preset number of first medical images, training In the completed U-Net model, the first medical image includes a medical image with uneven shadow distribution;
    根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;According to the pre-trained lung key feature point detection model, the preset key feature points contained in the lung region image are detected, and the lung key feature point detection model is based on a second preset number of pre-labeled lung keys A first lung region image of a feature point, a trained neural network model, the first lung region image including a shadow region;
    基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are marked.
  10. 如权利要求9所述的服务器,其中,所述处理器用于:The server of claim 9, wherein the processor is configured to:
    获取第一预设数量的第一医学影像,将所述第一医学影像分为第一比例的训练样本和第二比例的测试样本,所述第一医学影像为预先划分了肺部区域的医学影像;Acquire a first preset number of first medical images, divide the first medical image into a training sample of a first proportion and a test sample of a second proportion, and the first medical image is a medical image with a lung area divided in advance image;
    将所述第一比例的训练样本输入所述U-Net模型,进行训练;Input the training samples of the first proportion into the U-Net model for training;
    将所述第二比例的测试样本输入所述U-Net模型,得到所述U-Net模型输出的每个所 述测试样本对应的划分了肺部区域的第二医学影像;Inputting the test samples of the second ratio into the U-Net model to obtain a second medical image corresponding to each of the test samples output by the U-Net model, which divided the lung area;
    若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率大于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is greater than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is passed, and U-Net model is the lung region division model after training;
    若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率小于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is not passed, and increase The number of samples in the training sample set is executed, and the first medical image in the training sample set is input to the U-Net model for training.
  11. 如权利要求10所述的服务器,其中,所述处理器用于:The server of claim 10, wherein the processor is configured to:
    获取所述U-Net模型的损失函数的目标值,所述目标值为所述U-Net模型对每个所述测试样本进行分析,所述U-Net模型的损失函数的值;Acquiring a target value of the loss function of the U-Net model, where the target value is the U-Net model analyzing each test sample, and the value of the loss function of the U-Net model;
    若所述目标值的变化率小于预设的变化率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
    若所述目标值的变化率大于或者等于预设的变化率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed. The first medical image in the sample set is input to the U-Net model for training.
  12. 如权利要求11所述的服务器,其中,所述训练完成的U-Net模型的损失函数为:The server according to claim 11, wherein the loss function of the trained U-Net model is:
    Figure PCTCN2020093516-appb-100003
    Figure PCTCN2020093516-appb-100003
    其中,w(x)定义如下:Among them, w(x) is defined as follows:
    Figure PCTCN2020093516-appb-100004
    Figure PCTCN2020093516-appb-100004
    其中,L是第X个像素点属于预设肺部区域的概率w(x)是,w c(x)是预设的和第x个像素点所属的肺部区域相关的映射函数,d 1(x)是第x个像素点距离肺部区域最近的距离,d 2(x)是第x个像素点距离肺部区域第二近的距离,w 0和σ是常数项,p 1(x) 是第x个像素点属于肺部区域的概率。 Among them, L is the probability that the xth pixel belongs to the preset lung area, w(x) is, w c (x) is the preset mapping function related to the lung area to which the xth pixel belongs, d 1 (x) is the distance between the xth pixel and the lung area, d 2 (x) is the distance between the xth pixel and the lung area, w 0 and σ are constant terms, p 1 (x ) Is the probability that the xth pixel belongs to the lung area.
  13. 如权利要求9所述的服务器,其中,所述预先训练完成的神经网络模型包括特征层和检测层;9. The server of claim 9, wherein the pre-trained neural network model includes a feature layer and a detection layer;
    所述处理器用于:The processor is used for:
    将第二预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像,所述训练样本为预先标注了肺部关键特征点的第一肺部区域图像,所述第二肺部区域图像为所述特征层标注了肺部关键特征点的图片;A second preset number of training samples are input to the feature layer for training, and a second lung region image output by the feature layer is obtained. The training sample is a first lung region pre-labeled with key feature points of the lungs An image, where the second lung region image is a picture in which key feature points of the lung are marked on the feature layer;
    所述检测层将所述第二肺部区域图像进行聚类分析,得到包含有所述预设关键特征点的第三肺部区域图像;The detection layer performs cluster analysis on the second lung region image to obtain a third lung region image including the preset key feature points;
    若所有所述第二肺部区域图像与所述第三肺部区域图像的相似度均小于预设的相似度阈值,则所述神经网络模型为训练完成的所述肺部关键特征点检测模型;If the similarities between all the second lung region images and the third lung region images are less than the preset similarity threshold, the neural network model is the trained lung key feature point detection model ;
    若有所述第二肺部区域图像与所述第三肺部区域图像的相似度大于或等于预设的相似度阈值,则增加所述训练样本的数量,重新执行所述将预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像。If the similarity between the second lung area image and the third lung area image is greater than or equal to the preset similarity threshold, the number of training samples is increased, and the preset number of The training samples are input to the feature layer for training, and the second lung region image output by the feature layer is obtained.
  14. 如权利要求9所述的服务器,其中,所述处理器用于:The server of claim 9, wherein the processor is configured to:
    基于所述第一肺尖和所述第二肺尖生成第一直线;Generating a first straight line based on the first lung tip and the second lung tip;
    基于所述第一膈底和所述第二膈底生成第二直线;Generating a second straight line based on the first diaphragm bottom and the second diaphragm bottom;
    确定所述第一直线和所述第二直线之间的垂直线段,获取所述垂直线段的三等分点;Determine the vertical line segment between the first straight line and the second straight line, and obtain the third halves of the vertical line segment;
    分别基于每个等分点生成水平线;Generate a horizontal line based on each division point;
    以所述第一直线、所述第二直线、所述垂直线段以及每条所述水平线为分割基准线,获得预设数量的肺区,对分区后的肺部区域包含的阴影进行标记。Using the first straight line, the second straight line, the vertical line segment, and each of the horizontal lines as a dividing reference line, a preset number of lung regions are obtained, and the shadows included in the divided lung regions are marked.
  15. 如权利要求13所述的服务器,其中,所述检测层包括混合高斯模型模型,所述混合高斯模型模型包括CL1-CL4的卷积层,CL1-CL3分别包括卷积层和最大池化层,CL4包括卷积核为2×2的卷积层,FC5-FC6为全链接层。The server according to claim 13, wherein the detection layer includes a Gaussian mixture model model, the Gaussian mixture model model includes a convolutional layer of CL1-CL4, and CL1-CL3 respectively include a convolutional layer and a maximum pooling layer, CL4 includes a convolutional layer with a 2×2 convolution kernel, and FC5-FC6 are fully linked layers.
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
    根据预先训练完成的肺部区域划分模型对包含肺部的医学影像进行肺部区域分割,得到肺部区域图像,所述肺部区域划分模型为根据第一预设数量的第一医学影像,训练完成的U-Net模型,所述第一医学影像包括阴影分布不均匀的医学影像;Perform lung region segmentation on medical images containing lungs according to the pre-trained lung region division model to obtain lung region images. The lung region division model is based on a first preset number of first medical images, training In the completed U-Net model, the first medical image includes a medical image with uneven shadow distribution;
    根据预先训练完成的肺部关键特征点检测模型检测所述肺部区域图像包含的预设关键特征点,所述肺部关键特征点检测模型为根据第二预设数量的预先标注了肺部关键特征点的第一肺部区域图像,训练完成的神经网络模型,所述第一肺部区域图像包括阴影区域;Detect the preset key feature points contained in the lung region image according to the pre-trained lung key feature point detection model, and the lung key feature point detection model is based on a second preset number of pre-labeled lung keys A first lung region image of a feature point, a trained neural network model, the first lung region image including a shadow region;
    基于所述肺部区域图像包含的预设关键特征点将所述肺部区域图像进行分区,对分区后的肺部区域包含的阴影进行标记。The lung area image is partitioned based on the preset key feature points contained in the lung area image, and the shadows contained in the lung area after the partition are marked.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:15. The computer-readable storage medium of claim 16, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    获取第一预设数量的第一医学影像,将所述第一医学影像分为第一比例的训练样本和第二比例的测试样本,所述第一医学影像为预先划分了肺部区域的医学影像;Acquire a first preset number of first medical images, divide the first medical image into a training sample of a first proportion and a test sample of a second proportion, and the first medical image is a medical image with a lung area divided in advance image;
    将所述第一比例的训练样本输入所述U-Net模型,进行训练;Input the training samples of the first proportion into the U-Net model for training;
    将所述第二比例的测试样本输入所述U-Net模型,得到所述U-Net模型输出的每个所述测试样本对应的划分了肺部区域的第二医学影像;Inputting the test samples of the second ratio into the U-Net model to obtain a second medical image corresponding to each of the test samples output by the U-Net model, with a lung area divided;
    若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率大于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is greater than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is passed, and U-Net model is the lung region division model after training;
    若所述第二医学影像与预设的所述测试样本集中各样本的肺部区域的重合率小于或者等于预设的重合率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the coincidence rate of the second medical image and the lung region of each sample in the preset test sample set is less than or equal to the preset coincidence rate threshold, it is determined that the test of the U-Net model is not passed, and increase The number of samples in the training sample set is executed, and the first medical image in the training sample set is input to the U-Net model for training.
  18. 如权利要求17所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:17. The computer-readable storage medium of claim 17, wherein, when the program instructions are executed by the processor, they are further used to implement the following steps:
    获取所述U-Net模型的损失函数的目标值,所述目标值为所述U-Net模型对每个所述测试样本进行分析,所述U-Net模型的损失函数的值;Acquiring a target value of the loss function of the U-Net model, where the target value is the U-Net model analyzing each test sample, and the value of the loss function of the U-Net model;
    若所述目标值的变化率小于预设的变化率阈值,则确定对所述U-Net模型的测试通过,所述U-Net模型为训练完成的肺部区域划分模型;If the rate of change of the target value is less than a preset rate of change threshold, it is determined that the test of the U-Net model is passed, and the U-Net model is a lung region division model that has been trained;
    若所述目标值的变化率大于或者等于预设的变化率阈值,则确定对所述U-Net模型的测试不通过,增加所述训练样本集中样本的数量,并执行所述将所述训练样本集中的所述第一医学影像输入所述U-Net模型,进行训练。If the rate of change of the target value is greater than or equal to the preset rate of change threshold, it is determined that the test of the U-Net model fails, the number of samples in the training sample set is increased, and the training is performed. The first medical image in the sample set is input to the U-Net model for training.
  19. 如权利要求18所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:18. The computer-readable storage medium of claim 18, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    Figure PCTCN2020093516-appb-100005
    Figure PCTCN2020093516-appb-100005
    其中,w(x)定义如下:Among them, w(x) is defined as follows:
    Figure PCTCN2020093516-appb-100006
    Figure PCTCN2020093516-appb-100006
    其中,L是第X个像素点属于预设肺部区域的概率w(x)是,w c(x)是预设的和第x 个像素点所属的肺部区域相关的映射函数,d 1(x)是第x个像素点距离肺部区域最近的距离,d 2(x)是第x个像素点距离肺部区域第二近的距离,w 0和σ是常数项,p 1(x)是第x个像素点属于肺部区域的概率。 Among them, L is the probability that the Xth pixel belongs to the preset lung region, w(x) is, w c (x) is the preset mapping function related to the lung region to which the xth pixel belongs, d 1 (x) is the distance between the xth pixel and the lung area, d 2 (x) is the distance between the xth pixel and the lung area, w 0 and σ are constant terms, p 1 (x ) Is the probability that the xth pixel belongs to the lung area.
  20. 如权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:15. The computer-readable storage medium of claim 16, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    将第二预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像,所述训练样本为预先标注了肺部关键特征点的第一肺部区域图像,所述第二肺部区域图像为所述特征层标注了肺部关键特征点的图片;A second preset number of training samples are input to the feature layer for training, and a second lung region image output by the feature layer is obtained. The training sample is a first lung region pre-labeled with key feature points of the lungs An image, where the second lung region image is a picture in which key feature points of the lung are marked on the feature layer;
    所述检测层将所述第二肺部区域图像进行聚类分析,得到包含有所述预设关键特征点的第三肺部区域图像;The detection layer performs cluster analysis on the second lung region image to obtain a third lung region image including the preset key feature points;
    若所有所述第二肺部区域图像与所述第三肺部区域图像的相似度均小于预设的相似度阈值,则所述神经网络模型为训练完成的所述肺部关键特征点检测模型;If the similarities between all the second lung region images and the third lung region images are less than the preset similarity threshold, the neural network model is the trained lung key feature point detection model ;
    若有所述第二肺部区域图像与所述第三肺部区域图像的相似度大于或等于预设的相似度阈值,则增加所述训练样本的数量,重新执行所述将预设数量的训练样本输入所述特征层进行训练,获得所述特征层输出的第二肺部区域图像。If the similarity between the second lung area image and the third lung area image is greater than or equal to the preset similarity threshold, the number of training samples is increased, and the preset number of The training samples are input to the feature layer for training, and the second lung region image output by the feature layer is obtained.
PCT/CN2020/093516 2019-10-17 2020-05-29 Method and device for marking lung area shadows in medical image, server, and storage medium WO2021073120A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910989085.3A CN110930414A (en) 2019-10-17 2019-10-17 Lung region shadow marking method and device of medical image, server and storage medium
CN201910989085.3 2019-10-17

Publications (1)

Publication Number Publication Date
WO2021073120A1 true WO2021073120A1 (en) 2021-04-22

Family

ID=69849210

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093516 WO2021073120A1 (en) 2019-10-17 2020-05-29 Method and device for marking lung area shadows in medical image, server, and storage medium

Country Status (2)

Country Link
CN (1) CN110930414A (en)
WO (1) WO2021073120A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930414A (en) * 2019-10-17 2020-03-27 平安科技(深圳)有限公司 Lung region shadow marking method and device of medical image, server and storage medium
TWI783219B (en) * 2020-04-01 2022-11-11 緯創資通股份有限公司 Medical image recognition method and medical image recognition device
CN111861984B (en) * 2020-06-08 2023-12-22 北京深睿博联科技有限责任公司 Method and device for determining lung region, computer equipment and storage medium
CN113409924A (en) * 2021-07-01 2021-09-17 上海市第一人民医院 Artificial intelligence-based lung examination image auxiliary marking method and system
CN114511562B (en) * 2022-04-19 2022-07-15 深圳市疾病预防控制中心(深圳市卫生检验中心、深圳市预防医学研究所) Big data-based chronic obstructive pneumonia risk prediction system, method and equipment
CN115222805B (en) * 2022-09-20 2023-01-13 威海市博华医疗设备有限公司 Prospective imaging method and device based on lung cancer image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107808377A (en) * 2017-10-31 2018-03-16 北京青燕祥云科技有限公司 The localization method and device of focus in a kind of lobe of the lung
CN108537793A (en) * 2018-04-17 2018-09-14 电子科技大学 A kind of pulmonary nodule detection method based on improved u-net networks
US20190102893A1 (en) * 2017-10-03 2019-04-04 Konica Minolta, Inc. Dynamic image processing apparatus
CN110930414A (en) * 2019-10-17 2020-03-27 平安科技(深圳)有限公司 Lung region shadow marking method and device of medical image, server and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109993733A (en) * 2019-03-27 2019-07-09 上海宽带技术及应用工程研究中心 Detection method, system, storage medium, terminal and the display system of pulmonary lesions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190102893A1 (en) * 2017-10-03 2019-04-04 Konica Minolta, Inc. Dynamic image processing apparatus
CN107808377A (en) * 2017-10-31 2018-03-16 北京青燕祥云科技有限公司 The localization method and device of focus in a kind of lobe of the lung
CN108537793A (en) * 2018-04-17 2018-09-14 电子科技大学 A kind of pulmonary nodule detection method based on improved u-net networks
CN110930414A (en) * 2019-10-17 2020-03-27 平安科技(深圳)有限公司 Lung region shadow marking method and device of medical image, server and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LAN TIAN, LI YUANYUAN, MURUGI JONAH KIMANI, DING YI, QIN ZHIGUANG: "RUN:Residual U-Net for Computer-Aided Detection of Pulmonary Nodules without Candidate Selection", 30 May 2018 (2018-05-30), XP055802437, Retrieved from the Internet <URL:https://arxivbs/1805.11856v1.org/a> [retrieved on 20210507] *
RONNEBERGER, OLAF ET AL.: "U-Net: Convolutional Networks for Biomedical Image Segmentation", 《HTTPS://ARXIV.ORG/ABS/1505.04597V1》, 18 May 2015 (2015-05-18), XP05580230 *
YUAN TIAN;CHENG HONGYANG;CHEN YUNHONG;ZHANG HAIRONG;WANG WENJUN: "Pulmonary CT image segmentation algorithm based on U-NET network", AUTOMATION & INSTRUMENTATION, no. 6, 30 June 2017 (2017-06-30), pages 59 - 61, XP009527391, ISSN: 1001-9227, DOI: 10.14016/j.cnki.1001-9227.2017.06.059 *

Also Published As

Publication number Publication date
CN110930414A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
WO2021073120A1 (en) Method and device for marking lung area shadows in medical image, server, and storage medium
US11961233B2 (en) Method and apparatus for training image segmentation model, computer device, and storage medium
WO2020215672A1 (en) Method, apparatus, and device for detecting and locating lesion in medical image, and storage medium
JP6947759B2 (en) Systems and methods for automatically detecting, locating, and semantic segmenting anatomical objects
CN111047591A (en) Focal volume measuring method, system, terminal and storage medium based on deep learning
US20190065897A1 (en) Medical image analysis method, medical image analysis system and storage medium
WO2020182036A1 (en) Image processing method and apparatus, server, and storage medium
WO2020238044A1 (en) Method and device for constructing 3d unet network model for tumor detection, and storage medium
CN108615237A (en) A kind of method for processing lung images and image processing equipment
CN113610845B (en) Construction method and prediction method of tumor local control prediction model and electronic equipment
CN110415792B (en) Image detection method, image detection device, computer equipment and storage medium
CN110600122A (en) Digestive tract image processing method and device and medical system
JP2022502751A (en) Face keypoint detection method, device, computer equipment and computer program
US20220036561A1 (en) Method for image segmentation, method for training image segmentation model
CN106548492A (en) Determine method and device, the image acquiring method of matching double points
KR20210038987A (en) System for automatic tumor detection and classification
CN108062749B (en) Identification method and device for levator ani fissure hole and electronic equipment
TW202125415A (en) Training method, equipment and storage medium of 3d target detection and model
JP6824845B2 (en) Image processing systems, equipment, methods and programs
CN110189307B (en) Pulmonary nodule detection method and system based on multi-model fusion
US20220036575A1 (en) Method for measuring volume of organ by using artificial neural network, and apparatus therefor
US20210248716A1 (en) Systems and methods for consistent presentation of medical images using deep neural networks
CN111462060A (en) Method and device for detecting standard section image in fetal ultrasonic image
EP3971830B1 (en) Pneumonia sign segmentation method and apparatus, medium and electronic device
CN111340756A (en) Medical image lesion detection and combination method, system, terminal and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20876866

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20876866

Country of ref document: EP

Kind code of ref document: A1