CN110414631B - Medical image-based focus detection method, model training method and device - Google Patents

Medical image-based focus detection method, model training method and device Download PDF

Info

Publication number
CN110414631B
CN110414631B CN201910833614.0A CN201910833614A CN110414631B CN 110414631 B CN110414631 B CN 110414631B CN 201910833614 A CN201910833614 A CN 201910833614A CN 110414631 B CN110414631 B CN 110414631B
Authority
CN
China
Prior art keywords
network model
domain data
main task
gradient
task network
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910833614.0A
Other languages
Chinese (zh)
Other versions
CN110414631A (en
Inventor
沈荣波
颜克洲
田宽
江铖
周可
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Huazhong University of Science and Technology
Original Assignee
Tencent Technology Shenzhen Co Ltd
Huazhong University of Science and Technology
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 Tencent Technology Shenzhen Co Ltd, Huazhong University of Science and Technology filed Critical Tencent Technology Shenzhen Co Ltd
Publication of CN110414631A publication Critical patent/CN110414631A/en
Application granted granted Critical
Publication of CN110414631B publication Critical patent/CN110414631B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/03Recognition of patterns in medical or anatomical images

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a focus detection method based on a medical image, which is applied to the field of artificial intelligence, in particular to the field of intelligent medical treatment, and comprises the following steps: acquiring a molybdenum target image to be predicted; obtaining the probability value of each pixel point in the molybdenum target image to be predicted belonging to a focus through a main task network model, wherein the main task network model is obtained through the training of a source domain data set and a domain classification network model, and the domain classification network model is obtained through the training of the source domain data set and a target domain data set; and generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus. The application also provides a method and a device for model training. According to the method and the device, the domain difference problem between the source domain data set and the target domain data set is solved by using the relation between the main task network model and the domain classification network model, so that the main task network model obtains excellent detection performance on the target data set.

Description

Medical image-based focus detection method, model training method and device
The present application claims priority of chinese patent application entitled "method and apparatus for lesion detection based on medical images," method and apparatus for model training, "filed by chinese patent office, application No. 201910087685.0 on 29/1/2019, the entire contents of which are incorporated herein by reference.
Technical Field
The application relates to the field of artificial intelligence medical treatment, in particular to a focus detection method based on medical images, a model training method and a device.
Background
The mammary molybdenum target photography has higher spatial resolution, can display the early symptoms of the breast cancer, and is known as the most reliable and most convenient method for early diagnosis of the breast cancer. With the rapid development of computers and image processing technologies, a clinician is assisted by a computer-aided diagnosis technology to detect suspicious lesions in an image, and the reduction of the false positive rate of diagnosis is of great importance to early diagnosis of breast cancer.
Currently, a neural network model is generally adopted to detect medical images. The method comprises the steps of learning the characteristics of tumor focuses from a known and completely labeled source image data set, training to obtain a neural network model, inputting actually obtained target image data into the neural network model, and outputting a corresponding prediction result through the neural network model.
However, medical images acquired by different medical imaging devices often have different styles, for example, medical images acquired by some devices have higher definition, and medical images acquired by some devices have more noise. The source image data adopted by the training and the predicted target image data have style difference, namely, the data distribution has larger difference, so that the target image data is predicted by the neural network model obtained by the training of the source image data, the prediction effect is poor, and the detection performance is reduced.
Disclosure of Invention
The embodiment of the application provides a focus detection method based on a medical image, a model training method and a device, wherein the relation between a main task network model and a domain classification network model solves the problem of domain difference between a source domain data set and a target domain data set, and the domain difference between the data sets is remarkably inhibited, so that the main task network model obtained through training obtains excellent detection performance on the target data set, and the prediction effect is improved.
In view of the above, a first aspect of the present application provides a lesion detection method based on medical images, including:
acquiring a molybdenum target image to be predicted, wherein the molybdenum target image to be predicted belongs to target domain data;
obtaining a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus through a master task network model, wherein the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, the source domain data in the source domain data set belong to labeled data, and the target domain data in the target domain data set belong to unlabeled data;
and generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not.
A second aspect of the present application provides a method of model training, comprising:
acquiring a molybdenum target image set to be trained, wherein the molybdenum target image set to be trained comprises a target domain data set and a source domain data set, the target domain data set comprises at least one target domain data, the source domain data set comprises at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data;
training a main task network model by adopting a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model;
training the main task network model by adopting a second loss function, the target domain data set and a domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
training the domain classification network model by adopting a third loss function, the source domain data set, the target domain data set and the main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model;
updating parameters of the domain classification network model by adopting the gradient of the domain classification network model;
a third aspect of the present application provides a medical image detection apparatus comprising:
the molybdenum target prediction method comprises the steps of obtaining a molybdenum target image to be predicted, wherein the molybdenum target image to be predicted belongs to target domain data;
the obtaining module is further configured to obtain a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus through a master task network model, where the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, source domain data in the source domain data set belongs to labeled data, and target domain data in the target domain data set belongs to unlabeled data;
and the generating module is used for generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus, which is acquired by the acquiring module, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not.
In one possible design, in a first implementation of the third aspect of an embodiment of the present application,
the obtaining module is specifically configured to perform encoding processing on the molybdenum target image to be predicted through an encoder in the master task network model to obtain an encoded feature map, where the number of dimensions of the encoded feature map is smaller than the number of dimensions of the molybdenum target image to be predicted;
decoding the coded feature map through a decoder in the main task network model to obtain a heat map, wherein the dimension number of the heat map is consistent with the dimension number of the molybdenum target image to be predicted;
and obtaining the probability value of each pixel point belonging to the focus according to the heat map.
In one possible design, in a second implementation of the third aspect of the embodiments of the present application,
the obtaining module is specifically configured to obtain a low-layer feature map, where the low-layer feature map is a feature map of each convolution layer of the molybdenum target image to be predicted passing through an encoder in the main task network model, the number of dimensions of the low-layer feature map is smaller than the number of dimensions of the molybdenum target image to be predicted, and the number of dimensions of the low-layer feature map is greater than the number of dimensions of the encoded feature map;
fusing the selected low-level feature map to a decoder in the main task network model to obtain a target encoder;
and decoding the coded characteristic diagram through the target coder to obtain the heat map.
The present application in a fourth aspect provides a model training apparatus comprising:
the molybdenum target image set to be trained comprises a target domain data set and a source domain data set, wherein the target domain data set comprises at least one target domain data, the source domain data set comprises at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data;
the training module is used for training a main task network model by adopting a first loss function and the source domain data set acquired by the acquisition module to acquire a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model;
the training module is further configured to train the master task network model by using a second loss function, the target domain data set acquired by the acquisition module, and the domain classification network model to obtain a second gradient of the master task network model, where the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the master task network model is used to update parameters of the master task network model;
the training module is further configured to train the domain classification network model by using a third loss function, the source domain data set, the target domain data set, and the master task network model, which are obtained by the obtaining module, to obtain a gradient of the domain classification network model, where the third loss function belongs to a classification loss function of the domain classification network model;
and the updating module is used for updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model obtained by training of the training module.
In one possible design, in a first implementation of the fourth aspect of the embodiments of the present application,
the training module is specifically configured to, in step 1), train the main task network model by using the first loss function and a source domain data subset to obtain a first sub-gradient of the main task network model, where the source domain data subset belongs to part of data in the source domain data set, and the first sub-gradient belongs to the first gradient;
step 2) training the main task network model by adopting the second loss function, a target domain data subset and the domain classification network model to obtain a second sub-gradient of the main task network model, wherein the target domain data subset belongs to partial data in the target domain data set, and the second sub-gradient belongs to the second gradient;
step 3) training the domain classification network model by adopting the third loss function, the source domain data subset, the target domain data subset and the main task network model to obtain the sub-gradient of the domain classification network model;
and repeatedly executing the step 1), the step 2) and the step 3) until N times are reached, executing the step of updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model, wherein N is an integer greater than 1.
In one possible design, in a second implementation of the fourth aspect of the embodiments of the present application,
the training module is specifically configured to obtain a heat map corresponding to each source domain data in the source domain data subset through a first to-be-updated master task network model;
calculating the heat map corresponding to each source domain data and the real data of each source domain data by adopting the first loss function to obtain first difference data;
calculating to obtain the first sub-gradient according to the first difference data;
and updating the first main task network model to be updated according to the first sub-gradient to obtain a second main task network model to be updated.
In one possible design, in a third implementation of the fourth aspect of the embodiments of the present application,
the training module is specifically configured to obtain a heat map of each target domain data in the target domain data subset through the second master task network model to be updated;
acquiring the predicted data of each target domain data through a domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each target domain data and the reverse domain label of each target domain data by adopting the second loss function to obtain second difference data;
calculating to obtain a second sub-gradient according to the second difference data, wherein the second sub-gradient comprises a gradient of the second main task network model to be updated and a gradient of the domain classification network model to be updated;
and updating the second main task network model to be updated according to the second sub-gradient to obtain a third main task network model to be updated.
In one possible design, in a fourth implementation of the fourth aspect of the embodiment of the present application,
the training module is specifically configured to obtain a gradient of the second main task network model to be updated and a gradient of the domain classification network model to be updated according to the second sub-gradient;
and updating the second main task network model to be updated according to the gradient of the second main task network model to be updated so as to obtain a third main task network model to be updated.
In one possible design, in a fifth implementation form of the fourth aspect of the embodiments of the present application,
the training module is specifically configured to obtain a heat map of each source domain data in the source domain data subset through a third main task network model to be updated, and obtain a heat map of each target domain data in the target domain data subset through the third main task network model to be updated;
acquiring the predicted data of each source domain data through the domain classification network model to be updated and the heat map of each source domain data, and acquiring the predicted data of each target domain data through the domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each source domain data, the predicted data of each target domain data, the first real domain label and the second real domain label by adopting the third loss function to obtain third difference data;
and calculating the sub-gradient of the domain classification network model to be updated according to the third difference data.
In one possible design, in a sixth implementation form of the fourth aspect of the embodiment of the present application,
the training module is specifically used for acquiring the sub-gradients of the N domain classification network models;
calculating to obtain an average gradient according to the sub-gradients of the N domain classification network models;
and updating the domain classification network model to be updated by adopting the average gradient to obtain the domain classification network model.
A fifth aspect of the present application provides a medical examination apparatus, comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
acquiring a molybdenum target image to be predicted, wherein the molybdenum target image to be predicted belongs to target domain data;
obtaining a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus through a master task network model, wherein the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, the source domain data in the source domain data set belong to labeled data, and the target domain data in the target domain data set belong to unlabeled data;
generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
A sixth aspect of the present application provides a server comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
acquiring a molybdenum target image set to be trained, wherein the molybdenum target image set to be trained comprises a target domain data set and a source domain data set, the target domain data set comprises at least one target domain data, the source domain data set comprises at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data;
training a main task network model by adopting a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model;
training the main task network model by adopting a second loss function, the target domain data set and a domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
training the domain classification network model by adopting a third loss function, the source domain data set, the target domain data set and the main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model;
updating parameters of the domain classification network model by adopting the gradient of the domain classification network model;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
A seventh aspect of the present application provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the above-described aspects.
An eighth aspect of the present application provides a medical image inspection system, which includes an image scanning apparatus image processing apparatus;
the image scanning device is used for scanning a medical image and sending the medical image to the image processing device;
an image processing apparatus for performing the method of any one of the first aspects or performing the method of any one of the second aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, a focus detection method based on medical images is provided, firstly, a molybdenum target image to be predicted is obtained, wherein, the molybdenum target image to be predicted belongs to the target domain data, then the probability value of each pixel point in the molybdenum target image to be predicted belonging to the focus is obtained through the main task network model, the main task network model is obtained by training a source domain data set and a domain classification network model, the domain classification network model is obtained by training the source domain data set and a target domain data set, source domain data in the source domain data set belong to labeled data, target domain data in the target domain data set belong to unlabeled data, and finally a lump detection result of the molybdenum target image to be predicted can be generated according to the probability value that each pixel point belongs to a focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps. By the mode, the domain classification network model is used for training the main task network model, the problem of domain difference between the source domain data set and the target domain data set is solved, and the domain difference between the data sets is remarkably inhibited, so that the main task network model obtained through training obtains excellent detection performance on the target data set, and the prediction effect is improved.
Drawings
FIG. 1 is a schematic diagram of an architecture of a medical image inspection system according to an embodiment of the present application;
fig. 2 is a schematic diagram of an embodiment of a medical image-based lesion detection method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an embodiment of a method for model training in an embodiment of the present application;
FIG. 4 is a schematic structural diagram of an unsupervised domain adaptive countervailing learning system in an embodiment of the present application;
FIG. 5 is a schematic diagram of a free-response recipient operational characteristic curve for multiple iterations in an application scenario of the present application;
FIG. 6 is a schematic diagram of an embodiment of a medical image detection apparatus according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an embodiment of a model training apparatus according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a medical examination apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a server in the embodiment of the present application.
Detailed Description
The embodiment of the application provides a focus detection method based on a medical image, a model training method and a device, a main task network model is trained by using a domain classification network model, the problem of domain difference between a source domain data set and a target domain data set is solved, and the domain difference between the data sets is obviously inhibited, so that the main task network model obtained by training obtains excellent detection performance on the target data set, and the prediction effect is improved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the present application is mainly applied to an Artificial Intelligence (AI) -based medical diagnosis scenario, and is particularly applied to detecting and analyzing an input medical image, that is, outputting an analysis result of the medical image by using a medical image detection model, so that a medical staff or a researcher can obtain a more accurate diagnosis result. Specifically, referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a medical image detection system in an embodiment of the present application, as shown in the figure, a large number of medical images may be obtained by a medical detection device, and it should be noted that the medical images include, but are not limited to, a Computed Tomography (CT) image, a Magnetic Resonance Imaging (MRI) image, an ultrasound (ultrasound, US) image, and a molybdenum target image.
The medical field based on AI includes Computer Vision technology (CV), which is a science for studying how to make a machine "see", and further refers to using a camera and a Computer to replace human eyes to perform machine Vision such as recognition, tracking and measurement on a target, and further performing image processing, so that the Computer processing becomes an image more suitable for human eyes to observe or transmit to an instrument to detect. As a scientific discipline, computer vision research-related theories and techniques attempt to build artificial intelligence systems that can capture information from images or multidimensional data. The computer vision technology generally includes image processing, image Recognition, image semantic understanding, image retrieval, Optical Character Recognition (OCR), video processing, video semantic understanding, video content/behavior Recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning, map construction, and other technologies, and also includes common biometric technologies such as face Recognition and fingerprint Recognition.
The CT image is composed of a certain number of pixels with different gray scales from black to white which are arranged according to a matrix. These pixels reflect the X-ray absorption coefficients of the corresponding voxels. CT images are represented in different gray scales, reflecting the degree of absorption of X-rays by organs and tissues. Thus, like the black and white image shown in the X-ray image, the black image represents a low absorption region, i.e., a low density region, such as a lung containing much gas; white shading represents a high absorption zone, i.e. a high density zone, such as bone. However, in the CT image, the density resolution of CT is high, that is, the density resolution is high, compared with the X-ray image. Therefore, the CT image can better display organs composed of soft tissues such as brain, spinal cord, mediastinum, lung, liver, gallbladder, pancreas, and pelvic organs, and display images of lesions on a good anatomical image background.
MRI images have been applied to imaging diagnosis of various systems throughout the body. The best effect is craniocerebral, spinal cord, heart great vessel, joint skeleton, soft tissue, pelvic cavity and the like. The heart vessel disease not only can observe the anatomical change of each chamber, great vessel and valve, but also can be used for ventricular analysis, qualitative and semi-quantitative diagnosis, can be used for making a plurality of section images, has higher spatial resolution, displays the overall appearance of the heart and lesion and the relation between the heart and the surrounding structure, and is superior to other X-ray imaging, two-dimensional ultrasound, nuclide and CT examination. When diagnosing encephalomyelitis, it can be used to make coronal, sagittal and transverse images.
The US image reflects the difference of acoustic parameters in the medium, and information other than optical, X-ray, gamma-ray, and the like can be obtained. The ultrasonic wave has good resolving power to the soft tissue of the human body, and is beneficial to identifying the tiny pathological changes of the biological tissue. When the ultrasonic image displays the living tissue, the required image can be obtained without dyeing treatment.
The molybdenum target image is a new digital image technology combining the traditional radiation technology and the modern computer technology, and finally converts an analog image of the common X-ray photography into a digital image which can be processed quantitatively, so that the traditional X-ray photography technology and the image quality are substantially leaped, and a radiologist is more likely to find suspicious malignant lesions in a mammogram, so that the molybdenum target image is considered to be a method which is helpful for improving the early detection rate of breast cancer. The application mainly takes the molybdenum target image for detecting mammary gland as an example for introduction.
The medical detection equipment sends the medical images to the server, the medical images can be detected through the main task network model obtained through training in the server, and the lump detection result is sent to the medical detection equipment. Specifically, the main task network model is obtained through training of a domain classification network model, and a fully-labeled molybdenum target mass detection data set is firstly prepared as a source domain data set, it can be understood that the source domain data set can be a fully-labeled public data set or an existing fully-labeled data set, and samples collected in a molybdenum target mass detection scene in practical application are used as a target domain data set. The unsupervised domain adaptive counterstudy system is trained by utilizing the source domain data set and the target domain data set, a batch of source domain data and target domain data are required to be prepared in each iteration process, and a main task network and a domain classification network are respectively trained in multiple steps in one iteration process. In the prediction process, only the main task network is needed, namely, a test sample is input into the main task network, the region of the tumor focus is given by a heat map output by the main task network, and the contour of the tumor focus is obtained by threshold binarization.
It should be noted that the terminal device includes, but is not limited to, a palm computer, a mobile phone, a printer, a personal computer, a notebook computer, and a tablet computer.
It is understood that the medical examination device, the server and the terminal device included in the medical image examination system may be three independent devices, or may be integrated in the same system, and are not limited herein. It should be understood that the present application can be specifically applied to data screening of breast cancer early screening projects, and data archiving confirmation of medical image data by a medical imaging center, or sorting of historical data.
With reference to fig. 2, a method for detecting a lesion based on a medical image in the present application will be described below, where an embodiment of the method for detecting a lesion based on a medical image in the present application includes:
101. acquiring a molybdenum target image to be predicted, wherein the molybdenum target image to be predicted belongs to target domain data;
in this embodiment, how to predict whether the tumor focus is included through the medical image will be described, in brief, a molybdenum target image to be predicted is first obtained, and the molybdenum target image to be predicted may specifically be a molybdenum target image, and in practical application, may also be other types of medical images. The molybdenum target image to be predicted belongs to target domain data, the target domain data are data which are not marked, the target domain is a data set which actually needs to solve the problem, and in general, high labor cost is needed for marking each target domain data in the target domain data set, so that manual marking can be avoided in a domain adaptive mode. In contrast, the source domain data is labeled data, the source domain data belongs to data in a source domain data set, and the source domain data set is generally a common public data set and is relatively easy to obtain.
102. Obtaining a probability value that each pixel point in a molybdenum target image to be predicted belongs to a focus through a master task network model, wherein the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, the source domain data in the source domain data set belongs to labeled data, and the target domain data in the target domain data set belongs to unlabeled data;
in this embodiment, the trained main task network model is used to predict the test data of the target domain, specifically, the test data of the target domain is the molybdenum target image to be predicted, that is, the molybdenum target image to be predicted is input to the main task network, the main task network outputs a predicted heatmap (heatmap), and the probability value of each pixel point in the molybdenum target image to be predicted, which belongs to a focus, can be obtained according to the heatmap.
It is understood that the main task network model may be a full Convolutional neural network (FCN), or a variety of FCN variants, such as U-Net, and the FCN model will be described as an example, but this is not intended to limit the present application.
The main task network model is obtained by training a source domain data set and a domain classification network model, and in a simple aspect, the domain classification network model is obtained by training the source domain data set and a target domain data set, and the domain classification network model adjusts the characteristics of the target domain to be as close to the characteristics of the source domain as possible by means of countermeasure learning. It should be noted that the training manner of the main task network model will be specifically described in the embodiment corresponding to fig. 3, and this embodiment mainly describes how to predict the medical image by using the main task network model. It is understood that the structure of the domain classification network model may use a fully connected design, or a residual module design, or an initiation module design, etc., which is not limited herein.
103. And generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not.
In this embodiment, the main task network outputs a heat map obtained by prediction, a value of each pixel point in the heat map represents a probability that a corresponding pixel point in the molybdenum target image to be predicted belongs to a tumor focus, and then the heat map is binarized through a threshold value to obtain a contour of the tumor focus, so that a tumor detection result is obtained. Whether the tumor focus exists in the molybdenum target image to be predicted or not can be determined according to the tumor detection result.
In the embodiment of the application, a focus detection method based on medical images is provided, firstly, a molybdenum target image to be predicted is obtained, wherein, the molybdenum target image to be predicted belongs to the target domain data, then the probability value of each pixel point in the molybdenum target image to be predicted belonging to the focus is obtained through the main task network model, the main task network model is obtained by training a source domain data set and a domain classification network model, the domain classification network model is obtained by training the source domain data set and a target domain data set, source domain data in the source domain data set belong to labeled data, target domain data in the target domain data set belong to unlabeled data, and finally a lump detection result of the molybdenum target image to be predicted can be generated according to the probability value that each pixel point belongs to a focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps. By the mode, the domain classification network model is used for training the main task network model, the problem of domain difference between the source domain data set and the target domain data set is solved, and the domain difference between the data sets is remarkably inhibited, so that the main task network model obtained through training obtains excellent detection performance on the target data set, and the prediction effect is improved.
Optionally, on the basis of the embodiment corresponding to fig. 3, in a first optional embodiment of the medical image-based lesion detection method provided in the embodiment of the present application, obtaining, by using the master task network model, a probability value that each pixel point in the molybdenum target image to be predicted belongs to a lesion may include:
encoding the molybdenum target image to be predicted through an encoder in the main task network model to obtain an encoded feature map, wherein the dimension number of the obtained encoded feature map is smaller than that of the molybdenum target image to be predicted;
decoding the coded characteristic diagram through a decoder in the main task network model to obtain a heat diagram, wherein the dimension number of the heat diagram is consistent with the dimension number of the molybdenum target image to be predicted;
and obtaining the probability value of each pixel point belonging to the focus according to the heat map.
In this embodiment, how to obtain the probability value of each pixel point in the molybdenum target image to be predicted belonging to the focus through the master task network model will be described. Specifically, the FCN model in which the molybdenum target image to be predicted is the molybdenum target image and the main task network model is end-to-end is taken as an example for explanation, in the FCN model, an encoder (encoder) uses a convolutional layer to encode and compress the input molybdenum target image to be predicted, and a feature map with a lower dimensionality after encoding is obtained, that is, the dimensionality number of the encoded feature map is smaller than that of the molybdenum target image to be predicted. Next, in the FCN model, a decoder (decoder) performs a decoding operation on the encoded feature map using the deconvolution layer and the upsampling layer, and outputs a heatmap, which may also be referred to as a spatial density estimation map. Wherein the dimension number of the heat map is consistent with the dimension number of the molybdenum target image to be predicted. And finally, obtaining the probability value of each pixel point through the heat map.
The heat map can simply aggregate a large amount of data and represent the data by using a progressive color bar, the final effect is generally better than the direct display of discrete points, and the density degree or the frequency of spatial data can be visually represented. The principle of heat map generation is briefly summarized into four steps, specifically:
(1) a radius is set for the discrete points and a buffer is created.
(2) The buffer for each discrete point is then filled from light to deep, from inside out, using a progressive band of gray (the complete band of gray is 0 to 255).
(3) Since gray values can be superimposed, for the region with buffer intersections, gray values can be superimposed, and the more buffer intersections, the larger the gray value, the hotter the region.
(4) And finally, mapping colors from a color band with 256 colors by taking the superposed gray value as an index, and recoloring the image so as to realize the heat point diagram.
Secondly, in the embodiment of the application, a method for obtaining the probability value of each pixel point in the molybdenum target image to be predicted belonging to the focus through the master task network model is introduced, namely, the molybdenum target image to be predicted is encoded through an encoder in the master task network model to obtain an encoded feature map, the encoded feature map is decoded through a decoder in the master task network model to obtain a heat map, and finally the probability value of each pixel point belonging to the focus can be obtained according to the heat map. Through the mode, the probability value of each pixel point in the molybdenum target image to be predicted, which belongs to the focus, can be determined according to the heat map, the significant region of the tumor focus is explicitly shown by using the heat map, and binarization processing is performed on the heat map by using a threshold value, so that the position and the contour of the significant region of the tumor can be obtained.
Optionally, on the basis of the first embodiment corresponding to fig. 3, in a second optional embodiment of the medical image-based lesion detection method provided in the embodiment of the present application, the decoding, by a decoder in the master task network model, the encoded feature map to obtain a heat map may include:
acquiring a low-layer feature map, wherein the low-layer feature map is a feature map of each convolution layer of the molybdenum target image to be predicted through an encoder in the main task network model, the dimensionality number of the low-layer feature map is smaller than that of the molybdenum target image to be predicted, and the dimensionality number of the low-layer feature map is larger than that of the encoded feature map;
fusing the low-layer feature graph to a decoder in a main task network model to obtain a target encoder;
and decoding the coded feature map through a target coder to obtain the heat map.
In this embodiment, a method for obtaining a heatmap by decoding an encoded feature map through a decoder in a master task network model will be described. In order to improve the accuracy of the pixel-level density estimation, a jump connection mode is also used in the FCN model to fuse the selected low-layer feature map in the encoder into the decoder. Specifically, the network structure of the FCN model may obtain a nonlinear feature mapping and a local-to-global feature mapping, and combines a low-level visual feature (including brightness, texture, color, and the like) and a high-level semantic information (such as a lesion, and the like), it can be understood that the nonlinear feature mapping may predict a high-dimensional complex image, and the local-to-global feature mapping may ensure that an output end has a global sense of view on an input image under a condition of relatively few model parameters. For example, the input molybdenum target image to be predicted is 1024 × 1024, the output from the encoder is 32 × 32, and then a 1024 × 1024 heat map is obtained from the 32 × 32 decoding, which makes the lesion edge more rounded, but loses more detail. Therefore, merging indexes (merging indexes) can be respectively performed on the lower layer feature maps output by the pooled layers after the third group and the fourth group of convolutional layers in the encoder and the output of the second deconvolution and the first deconvolution in the decoder, namely, fusion processing can be performed, wherein the dimensions of the lower layer feature maps are 128 × 128 and 64 × 64, the fused encoder is called a target encoder, and finally, the encoded feature maps are decoded by the target encoder, so that the heatmap is obtained. And finally, performing binarization processing on the heat map by using a threshold value to obtain the position and the contour of the tumor salient region. In order to suppress noise, an image opening operation can be adopted to filter isolated noise points.
Therefore, the dimension number of the low-layer feature map is smaller than that of the molybdenum target image to be predicted, and the dimension number of the low-layer feature map is larger than that of the encoded feature map.
In the embodiment of the application, a method for obtaining a heat map through a main task network model is introduced, that is, a low-layer feature map is obtained first, wherein the low-layer feature map is a feature map of each convolution layer of a molybdenum target image to be predicted through an encoder in the main task network model, the dimension number of the low-layer feature map is smaller than that of the molybdenum target image to be predicted, and the dimension number of the low-layer feature map is larger than that of the encoded feature map, then the low-layer feature map is fused to a decoder in the main task network model to obtain a target encoder, and finally the encoded feature map is decoded through the target encoder to obtain the heat map. Through the mode, the low-layer feature map in the encoder is fused into the decoder in a jumping connection mode in the main task network model, and the network structure can acquire the nonlinear feature mapping, so that the visual feature of the low layer and the semantic information of the high layer are fused, the detail feature is enhanced, and the prediction accuracy is improved.
Based on the above description, the following describes a method for model training in the present application, and referring to fig. 3, an embodiment of a medical image-based lesion detection method in the present application includes:
201. the method comprises the steps of obtaining a molybdenum target image set to be trained, wherein the molybdenum target image set to be trained comprises a target domain data set and a source domain data set, the target domain data set comprises at least one target domain data, the source domain data set comprises at least one source domain data, the source domain data belong to labeled data, and the target domain data belong to unlabeled data;
in this embodiment, in the prediction process, a molybdenum target image set to be trained is first obtained, where the molybdenum target image set to be trained includes a target domain data set and a source domain data set, the target domain data set includes at least one target domain data, the source domain data set includes at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data.
The molybdenum target image to be trained in the molybdenum target image set to be trained may be a molybdenum target image, and in practical application, may also be other types of medical images. At least one target domain data in the target domain data set is data which is not labeled, the target domain is the data set which actually needs to solve the problem, and each target domain data in the target domain data set is not labeled, because the cost for manual labeling is very high, the method can avoid manual labeling in a domain adaptive mode. At least one source domain data in the source domain data set is labeled data, and the source domain data set is generally a universal public data set and is easy to obtain.
202. Training the main task network model by adopting a first loss function and a source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model;
in this embodiment, in order to train the unsupervised domain adaptive confrontation learning system, three loss functions are introduced, which are a first loss function, a second loss function, and a third loss function. Wherein, the first loss function can be a segmentation loss function (Lseg) at the back end of the main task network model, the second loss function can be a fighting learning loss function (Ladv) at the back end of the domain classification network, and the third loss function is a classification loss function (Lcls) at the back end of the domain classification network. Firstly, training a main task network model through a first loss function to obtain a first gradient, and updating the main task network model by using the first gradient.
203. Training the main task network model by adopting a second loss function, a target domain data set and a domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
in this embodiment, in step 202, the main task network model is updated by using the first gradient, and then the main task network model is trained by using the second loss function, the target domain data set, and the domain classification network model, so as to obtain the second gradient of the main task network model, where the second loss function belongs to the antagonistic learning loss function of the domain classification network model. After the second gradient is obtained, the parameters of the master task network model may be updated with the second gradient.
204. Training the domain classification network model by adopting a third loss function, a source domain data set, a target domain data set and a main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model;
in this embodiment, the main task network model is sequentially updated in steps 202 and 203, that is, after the main task network model is updated by using the first gradient and the second gradient, the domain classification network model is trained by using the updated main task network model, that is, the domain classification network model is trained by using the third loss function, the source domain data set, the target domain data set and the main task network model, so as to obtain the gradient of the domain classification network model. Wherein the third loss function belongs to a classification loss function of the domain classification network model.
205. And updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model.
In this embodiment, the parameters of the domain classification network model are updated by using the gradient of the domain classification network model.
In the embodiment of the application, a method for training a model is provided, which includes obtaining a molybdenum target image set to be trained, wherein the molybdenum target image set to be trained includes a target domain data set and a source domain data set, then training a main task network model by using a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, the first gradient of the main task network model is used for updating parameters of the main task network model, then training the main task network model by using a second loss function, the target domain data set and a domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model, and finally, training the domain classification network model by adopting a third loss function, a source domain data set, a target domain data set and a main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model, and the gradient of the domain classification network model is adopted to update the parameters of the domain classification network model. By the method, the completely labeled source data set and the completely unlabeled target data set are used simultaneously, and the domain difference between the data sets can be obviously inhibited, so that the main task network model obtained by training obtains excellent performance on the target domain data set, and the problem of large distribution difference between the source domain data and the target domain data in practical application is solved.
Optionally, on the basis of the embodiment corresponding to fig. 3, in a first optional embodiment of the model training method provided in the embodiment of the present application, training the master task network model by using the first loss function and the source domain data set to obtain the first gradient of the master task network model may include:
step 1) training a main task network model by adopting a first loss function and a source domain data subset to obtain a first sub-gradient of the main task network model, wherein the source domain data subset belongs to partial data in the source domain data subset, and the first sub-gradient belongs to the first gradient;
training the main task network model by using a second loss function, the target domain data set and the domain classification network model to obtain a second gradient of the main task network model, which may include:
step 2) training the main task network model by adopting a second loss function, a target domain data subset and a domain classification network model to obtain a second sub-gradient of the main task network model, wherein the target domain data subset belongs to partial data in the target domain data subset, and the second sub-gradient belongs to the second gradient;
training the domain classification network model by using a third loss function, the source domain data set, the target domain data set and the master task network model to obtain a gradient of the domain classification network model, which may include:
step 3) training the domain classification network model by adopting a third loss function, a source domain data subset, a target domain data subset and a main task network model to obtain a sub-gradient of the domain classification network model;
and repeatedly executing the step 1), the step 2) and the step 3) until N times are reached, executing the step of updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model, wherein N is an integer larger than 1.
In this embodiment, a method for model iterative training will be described. For convenience of understanding, please refer to fig. 4, where fig. 4 is a schematic structural diagram of an unsupervised domain adaptive countermeasure learning system in an embodiment of the present application, and as shown in the figure, each iteration process may be divided into a plurality of sub-steps according to three loss functions, step one, where a main task network model is trained by using a first loss function and a source domain data subset, so as to obtain a first sub-gradient of the main task network model. Specifically, the FCN model may be updated using the source domain data set and a segmentation loss function at the back end of the FCN model. And step two, training the main task network model by adopting a second loss function, the target domain data subset and the domain classification network model to obtain a second sub-gradient of the main task network model. Specifically, the FCN model may be updated with the target domain data set and the opposing learning loss function of the domain classification network backend. And step three, training the domain classification network model by adopting a third loss function, the source domain data subset, the target domain data subset and the main task network model to obtain the sub-gradient of the domain classification network model. Specifically, the domain classification network may be updated with the source domain data set and the target domain data set and with a classification loss function at a back end of the domain classification network.
In this embodiment, an iteration number timer (accum) is designed, the accum starts counting from 0, 1 is added to the accum every time iteration is performed, and when the accum is N, it indicates that step one, step two, and step three are performed N times in sequence. The first step and the second step are to update the model parameters immediately after calculating the gradient, and the third step is to collect the gradient without updating the parameters of the domain classification network model after calculating the gradient, and after completing N iterations, the collected gradient is averaged and then can be used for updating the parameters of the domain classification network model.
Secondly, in the embodiment of the present application, an iterative training mode is provided, that is, a first loss function and a source domain data subset are first used to train a main task network model to obtain a first sub-gradient of the main task network model, a second loss function, a target domain data subset and a domain classification network model are then used to train the main task network model to obtain a second sub-gradient of the main task network model, a third loss function, a source domain data subset, a target domain data subset and a main task network model are then used to train the domain classification network model to obtain a sub-gradient of the domain classification network model, and the above steps are repeatedly performed until N times are reached, and the step of updating parameters of the domain classification network model by using the gradient of the domain classification network model is performed. By the method, the domain classification network does not need to be updated every iteration, but the domain classification network is updated after multiple iterations, so that the calculation amount of network training can be greatly reduced, and the overall training speed can be reduced due to excessive domain classification network updating, so that the overall training speed can be effectively increased by adopting the training method provided by the embodiment.
Optionally, on the basis of the first embodiment corresponding to fig. 3, in a second optional embodiment of the method for training a model provided in the embodiment of the present application, the training the main task network model by using the first loss function and the source domain data subset to obtain the first sub-gradient of the main task network model may include:
acquiring a heat map corresponding to each source domain data in the source domain data subset through a first main task network model to be updated;
calculating the heat map corresponding to each source domain data and the real data of each source domain data by adopting a first loss function to obtain first difference data;
calculating to obtain a first sub-gradient according to the first difference data;
and updating the first main task network model to be updated according to the first sub-gradient to obtain a second main task network model to be updated.
In this embodiment, a method for calculating a first sub-gradient is introduced, where a main task network model is divided into several update stages, a first stage is referred to as a first main task network model to be updated, a second stage is referred to as a second main task network model to be updated, and a third stage is referred to as a third main task network model to be updated, and how to update the first main task network model to be updated is described below, so as to obtain an updated second main task network model to be updated.
Specifically, a batch of source domain data is first input into the first to-be-updated master task network model, where the batch of source domain data may be referred to as a source domain data subset. And outputting the heat map by the first main task network model to be updated. And calculating the heat map corresponding to each source domain data and the real data of each source domain data by using the marked real data of each source domain data and adopting a first loss function to obtain first difference data, wherein the first difference data is used for reflecting the difference between the real data and the predicted heat map. And then, the first difference data is used for calculating a first sub-gradient in the main task network model in the back propagation process, the first sub-gradient is multiplied by the learning rate, and the original model parameters are added to complete the updating of the model parameters once, namely, the first main task network model to be updated can be updated according to the first sub-gradient, so that a second main task network model to be updated is obtained.
The method includes the steps of firstly obtaining a heat map corresponding to each source domain data in a source domain data subset through a first main task network model to be updated, calculating the heat map corresponding to each source domain data and real data of each source domain data by adopting a first loss function to obtain first difference data, calculating to obtain a first sub-gradient according to the first difference data, and updating the first main task network model to be updated according to the first sub-gradient to obtain a second main task network model to be updated. Through the method, the first sub-gradient can be efficiently and accurately obtained by utilizing the first loss function, so that the feasibility and operability of the scheme are improved.
Optionally, on the basis of the second embodiment corresponding to fig. 3, in a third optional embodiment of the model training method provided in the embodiment of the present application, the training of the main task network model by using the second loss function, the target domain data subset and the domain classification network model to obtain a second sub-gradient of the main task network model may include:
acquiring a heat map of each target domain data in the target domain data subset through a second main task network model to be updated;
acquiring the prediction data of each target domain data through the domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each target domain data and the reverse domain label of each target domain data by adopting a second loss function to obtain second difference data;
calculating to obtain a second sub-gradient according to the second difference data, wherein the second sub-gradient comprises the gradient of a second main task network model to be updated and the gradient of a domain classification network model to be updated;
and updating the second main task network model to be updated according to the second sub-gradient to obtain a third main task network model to be updated.
In this embodiment, a calculation of the second sub-gradient is introduced, the main task network model is divided into several update stages, where the first stage is referred to as a first main task network model to be updated, the second stage is referred to as a second main task network model to be updated, and the third stage is referred to as a third main task network model to be updated, and how to update the second main task network model to be updated will be described below, so as to obtain an updated third main task network model to be updated.
Specifically, a batch of target domain data is first input into the second master task network model to be updated, where the batch of target domain data may be referred to as a target domain data subset. And outputting the heat map of each target domain data by the second main task network model to be updated, inputting the heat map into the domain classification network to be updated, and outputting the predicted data of each target domain data. And calculating the predicted data of each target domain data and the reversal domain label of each target domain data by adopting a second loss function to obtain second difference data, wherein the reversal domain label refers to a domain label which assigns source domain data to the target domain data, the label of the source domain is 1, the label of the target domain is 0, and the second difference data is used for reflecting the difference between the real data and the predicted data. And calculating to obtain a second sub-gradient by using second difference data, wherein the second sub-gradient comprises the gradient of the second main task network model to be updated and the gradient of the domain classification network model to be updated, the second sub-gradient is multiplied by the learning rate and is added with the original model parameters to complete the updating of the model parameters once, namely, the second main task network model to be updated is updated according to the second sub-gradient, so that a third main task network model to be updated is obtained.
Further, in the embodiment of the present application, a second sub-gradient is calculated, that is, a heatmap of each target domain data in a target domain data subset is obtained through a second main task network model to be updated, then, predicted data of each target domain data is obtained through a domain classification network model to be updated and the heatmap of each target domain data, then, a second loss function is used to calculate the predicted data of each target domain data and an inversion domain label of each target domain data, so as to obtain second difference data, finally, a second sub-gradient is calculated according to the second difference data, and the second main task network model to be updated is updated according to the second sub-gradient, so as to obtain a third main task network model to be updated. Through the method, the second sub-gradient can be efficiently and accurately obtained by utilizing the second loss function, so that the feasibility and operability of the scheme are improved.
Optionally, on the basis of the third embodiment corresponding to fig. 3, in a fourth optional embodiment of the method for model training provided in the embodiment of the present application, updating the second main task network model to be updated according to the second sub-gradient to obtain a third main task network model to be updated, the method includes:
acquiring the gradient of a second main task network model to be updated and the gradient of a domain classification network model to be updated according to the second sub-gradient;
and updating the second main task network model to be updated according to the gradient of the second main task network model to be updated to obtain a third main task network model to be updated.
In this embodiment, a specific training manner is provided, and in order to resist the stability of learning, the gradient of the domain classification network model to be updated is not updated (i.e., the gradient of the domain classification network model to be updated is frozen, and only the gradient of the second main task network model to be updated is updated). Although the gradient of the second main task network model to be updated and the gradient of the domain classification network model to be updated are obtained at the same time, only the gradient of the second main task network model to be updated is calculated, so that a third main task network model to be updated is obtained.
Furthermore, in this embodiment of the present application, a method for performing model training on frozen parameters is provided, that is, a gradient of the second to-be-updated main task network model and a gradient of the to-be-updated domain classification network model may be obtained according to the second sub-gradient, and then the second to-be-updated main task network model is updated only according to the gradient of the second to-be-updated main task network model, so as to obtain the third to-be-updated main task network model. Through the mode, the parameters of the classification network model of the domain to be updated are frozen, and the model is updated only by adopting the parameters of the second main task network model to be updated, so that the stability of model learning can be effectively improved.
Optionally, on the basis of the first embodiment corresponding to fig. 3, in a fifth optional embodiment of the method for training a model provided in the embodiment of the present application, the training the domain classification network model by using a third loss function, the source domain data subset, the target domain data subset, and the master task network model to obtain a sub-gradient of the domain classification network model may include:
acquiring a heat map of each source domain data in the source domain data subset through a third main task network model to be updated, and acquiring a heat map of each target domain data in the target domain data subset through the third main task network model to be updated;
acquiring the predicted data of each source domain data through the domain classification network model to be updated and the heat map of each source domain data, and acquiring the predicted data of each target domain data through the domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each source domain data, the predicted data of each target domain data, the first real domain label and the second real domain label by adopting a third loss function to obtain third difference data;
and calculating the sub-gradient of the domain classification network model to be updated according to the third difference data.
In this embodiment, a method for calculating parameters of a third sub-model is introduced, a main task network model is divided into several update stages, a first stage is referred to as a first main task network model to be updated, a second stage is referred to as a second main task network model to be updated, and a third stage is referred to as a third main task network model to be updated, and how to update a domain classification network model to be updated is described below, so as to obtain an updated domain classification network model. It should be noted that after N iterations, the classification network model of the domain to be updated is updated only once.
Specifically, a batch of target domain data and a batch of source domain data are input into the third master task network model to be updated, where one batch of target domain data may be referred to as a target domain data subset and one batch of source domain data may be referred to as a source domain data subset. Outputting, by the third to-be-updated master task network model, a heatmap comprising a heatmap for each source domain data and a heatmap for each target domain data. And then inputting the heat map output by the third main task network model to be updated into the domain classification network model to be updated, and outputting the prediction data of each source domain data and the prediction data of each target domain data by the domain classification network model to be updated. And calculating the predicted data of each source domain data, the predicted data of each target domain data, the first real domain label and the second real domain label by using a third loss function to obtain third difference data, wherein the third difference data is used for reflecting the difference between the real domain label and the predicted data. And calculating the gradient of a third main task network model to be updated and the sub-gradient of the domain classification network model to be updated by utilizing the third difference data in the back propagation process, wherein the sub-gradient of the domain classification network model to be updated is multiplied by the learning rate and is added with the original model parameters to finish the updating of the model parameters. And expressing the sub-gradients of the plurality of domain classification network models to be updated as the gradients of the domain classification network models to be updated.
To counter the stability of learning, the gradient in the third main task network model to be updated is not updated (i.e. the gradient of the third main task network model to be updated is frozen, only the gradient of the domain classification network model to be updated is updated). Although the gradient of the third main task network model to be updated and the gradient of the domain classification network model to be updated are obtained at the same time, only the sub-gradients of the domain classification network model to be updated are calculated.
Thirdly, in the embodiment of the present application, a method for updating a domain classification network model is introduced, that is, a heat map of each source domain data in a source domain data subset is obtained through a third master task network model to be updated, and acquiring a heat map of each target domain data in the target domain data subset through a third main task network model to be updated, then, acquiring the prediction data of each source domain data through the domain classification network model to be updated and the heat map of each source domain data, and acquiring the predicted data of each target domain data through the to-be-updated domain classification network model and the heat map of each target domain data, calculating the predicted data of each source domain data, the predicted data of each target domain data, the first real domain label and the second real domain label by adopting a third loss function to obtain third difference data, and finally calculating according to the third difference data to obtain the sub-gradient of the to-be-updated domain classification network model. By the method, the third loss function can be used for efficiently and accurately obtaining the sub-gradient of the domain classification network model to be updated, so that the feasibility and operability of the scheme are improved.
Optionally, on the basis of the fifth embodiment corresponding to fig. 3, in a sixth optional embodiment of the method for model training provided in the embodiment of the present application, the updating the parameters of the domain classification network model by using the gradient of the domain classification network model may include:
acquiring the sub-gradients of the N domain classification network models;
calculating to obtain an average gradient according to the sub-gradients of the N domain classification network models;
and updating the domain classification network model to be updated by adopting the average gradient to obtain the domain classification network model.
In this embodiment, a model updating manner is provided, that is, after the sub-gradient collection of N iterations is completed, gradient averaging may be performed, so as to obtain an average gradient. And finally, updating the domain classification network model to be updated by adopting the average gradient to obtain the domain classification network model.
It will be appreciated that this strategy is equivalent to increasing the training batch size of the domain classification network model and has the effect of balancing the source domain and target domain data.
Further, in the embodiment of the present application, a method for performing model training on frozen parameters is provided, that is, the sub-gradients of N domain classification network models may be obtained first, then an average gradient is calculated according to the sub-gradients of the N domain classification network models, and finally the domain classification network model to be updated is updated by using the average gradient to obtain the domain classification network model. By the method, the gradient of a plurality of batches of data is collected before the domain classification network model is updated, and the average value is taken, which is equivalent to using a plurality of batches of data, namely adding batch values, and meanwhile, the target domain data and the source domain data are adopted in each training, so that the balance of data training is improved, the defect that the convergence speed is slow due to the fact that the batch values are too small and unbalanced in the training mode is overcome, and the training performance is optimized.
The method provided by the present application will be specifically described below in terms of experimental data. Among them, the present application uses 1231 molybdenum target images of a public data set, computerized-based information system digital database for screening mammography (CBIS-DDSM), as a source domain data set, and actually acquires 2194 actual molybdenum target images as a target domain data set, of which 282 are used for testing and 1912 are used for training. For easy understanding, please refer to fig. 5, fig. 5 is a schematic diagram of a free response receiver operation characteristic curve of multiple iterations in an application scenario of the present application, as shown in the figure, for the efficient training method proposed in the present embodiment, we first verify the influence of multiple counted iterations (accum) on the final tumor focus detection performance, and the specific results on the test set are shown in table 1.
TABLE 1
accum 10 20 30 40 50 60 70 80
PAUC 0.8681 0.8803 0.8803 0.9083 0.8781 0.8694 0.8695 0.8754
TPR@2.0FPI 0.9186 0.9251 0.9251 0.9479 0.9218 0.9153 0.9283 0.9251
Second/iteration 6.54 6.08 5.94 5.89 5.84 5.81 5.79 5.77
When the accum is 10, 20, 30, 40, 50, 60, 70, and 80, a True Positive Rate (TPR) when the average number of False Positives (FPI) in each image is 2 and a local area under the curve (PAUC) of the corresponding free response receiver operating characteristic curve can be obtained respectively. From the above test results, it can be found that when the accum iteration is 40, the best PAUC 0.9083 and the best 0.9479TPR @2.0FPI can be obtained. It can be found from a series of accum iteration values that increasing the accum can improve the detection performance, but the performance is lost by the excessively large accum because the domain classification network model is updated by too little amount due to the excessively large accum, and finally the counterlearning is out of balance. Therefore, selecting a proper accum iteration value in the training method is a key step.
To verify the advancement of this scheme, a comparison with the existing scheme is shown in table 2.
TABLE 2
Technical scheme Non-domain adaptation scheme Semantic segmentation domain adaptation scheme against learning This scheme
PAUC 0.4114 0.8022 0.9083
TPR@2.0FPI 0.6026 0.8339 0.9479
s/iter 3.88 15.56 5.89
It follows that the performance of the non-domain-adapted approach is the worst at such problems, since the domain differences between the source domain data set and the target domain data set can severely degrade the performance of the model. The scheme adopts a more efficient training mode, and can obtain better performance and faster training speed in comparison with the scheme of the semantic segmentation domain adaptation method for counterstudy.
Referring to fig. 6, fig. 6 is a schematic diagram of an embodiment of a medical image detection apparatus according to an embodiment of the present application, in which the medical image detection apparatus 30 includes:
the acquiring module 301 is configured to acquire a molybdenum target image to be predicted, where the molybdenum target image to be predicted belongs to target domain data;
the obtaining module 301 is further configured to obtain, through a master task network model, a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus, where the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, source domain data in the source domain data set belongs to labeled data, and target domain data in the target domain data set belongs to unlabeled data;
a generating module 302, configured to generate a lump detection result of the molybdenum target image to be predicted according to the probability value, obtained by the obtaining module 301, that each pixel belongs to a focus, where the lump detection result is used to predict whether the molybdenum target image to be predicted includes a lump.
In this embodiment, the obtaining module 301 obtains an image of the molybdenum target to be predicted, wherein the image of the molybdenum target to be predicted belongs to the target domain data, the obtaining module 301 obtains a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus through a master task network model, wherein the main task network model is obtained by training a source domain data set and a domain classification network model, the domain classification network model is obtained by training the source domain data set and the target domain data set, the source domain data in the source domain data set belong to labeled data, the target domain data in the target domain data set belong to unlabeled data, the generation module 302 generates a tumor detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to a lesion, which is acquired by the acquisition module 301, and the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not.
In the embodiment of the application, a medical image detection device is provided, firstly, the medical image detection device obtains a molybdenum target image to be predicted, wherein, the molybdenum target image to be predicted belongs to the target domain data, then the probability value of each pixel point in the molybdenum target image to be predicted belonging to the focus is obtained through the main task network model, the main task network model is obtained by training a source domain data set and a domain classification network model, the domain classification network model is obtained by training the source domain data set and a target domain data set, source domain data in the source domain data set belong to labeled data, target domain data in the target domain data set belong to unlabeled data, and finally a lump detection result of the molybdenum target image to be predicted can be generated according to the probability value that each pixel point belongs to a focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps. By the mode, the domain classification network model is used for training the main task network model, the problem of domain difference between the source domain data set and the target domain data set is solved, and the domain difference between the data sets is remarkably inhibited, so that the main task network model obtained through training obtains excellent detection performance on the target data set, and the prediction effect is improved.
Alternatively, on the basis of the embodiment corresponding to fig. 6, in another embodiment of the medical image detection apparatus 30 provided in the embodiment of the present application,
the obtaining module 301 is specifically configured to perform encoding processing on the molybdenum target image to be predicted through an encoder in the master task network model to obtain an encoded feature map, where the number of dimensions of the encoded feature map is smaller than the number of dimensions of the molybdenum target image to be predicted;
decoding the coded feature map through a decoder in the main task network model to obtain a heat map, wherein the dimension number of the heat map is consistent with the dimension number of the molybdenum target image to be predicted;
and obtaining the probability value of each pixel point belonging to the focus according to the heat map.
In the embodiment of the application, a medical image detection device for acquiring probability values of all pixel points in a molybdenum target image to be predicted, which belong to focuses, through a master task network model is introduced. Through the mode, the probability value of each pixel point in the molybdenum target image to be predicted, which belongs to the focus, can be determined according to the heat map, the significant region of the tumor focus is explicitly shown by using the heat map, and binarization processing is performed on the heat map by using a threshold value, so that the position and the contour of the significant region of the tumor can be obtained.
Alternatively, on the basis of the embodiment corresponding to fig. 6, in another embodiment of the medical image detection apparatus 30 provided in the embodiment of the present application,
the obtaining module 301 is specifically configured to obtain a low-layer feature map, where the low-layer feature map is a feature map of each convolution layer of the molybdenum target image to be predicted, which passes through an encoder in the master task network model, the number of dimensions of the low-layer feature map is smaller than the number of dimensions of the molybdenum target image to be predicted, and the number of dimensions of the low-layer feature map is greater than the number of dimensions of the encoded feature map;
fusing the selected low-level feature map to a decoder in the main task network model to obtain a target encoder;
and decoding the coded characteristic diagram through the target coder to obtain the heat map.
In the embodiment of the application, a medical image detection device for obtaining a heat map through a main task network model is introduced, that is, a low-layer feature map is obtained first, wherein the low-layer feature map is a feature map of each convolution layer of a molybdenum target image to be predicted through an encoder in the main task network model, the dimension number of the low-layer feature map is smaller than that of the molybdenum target image to be predicted, and the dimension number of the low-layer feature map is larger than that of the encoded feature map, then the low-layer feature map is fused to a decoder in the main task network model to obtain a target encoder, and finally the encoded feature map is decoded by the target encoder to obtain the heat map. Through the mode, the low-layer feature map in the encoder is fused into the decoder in a jumping connection mode in the main task network model, and the network structure can acquire the nonlinear feature mapping, so that the visual feature of the low layer and the semantic information of the high layer are fused, the detail feature is enhanced, and the prediction accuracy is improved.
Referring to fig. 7, fig. 7 is a schematic diagram of an embodiment of a model training apparatus according to an embodiment of the present application, in which the model training apparatus 40 includes:
an obtaining module 401, configured to obtain a molybdenum target image set to be trained, where the molybdenum target image set to be trained includes a target domain data set and a source domain data set, the target domain data set includes at least one target domain data, the source domain data set includes at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data;
a training module 402, configured to train a master task network model by using a first loss function and the source domain data set acquired by the acquisition module 401, so as to obtain a first gradient of the master task network model, where the first loss function belongs to a segmentation loss function of the master task network model, and the first gradient of the master task network model is used to update a parameter of the master task network model;
the training module 402 is further configured to train the master task network model by using a second loss function, the target domain data set obtained by the obtaining module 401, and the domain classification network model to obtain a second gradient of the master task network model, where the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the master task network model is used to update parameters of the master task network model;
the training module 402 is further configured to train the domain classification network model by using a third loss function, the source domain data set, the target domain data set, and the master task network model, which are obtained by the obtaining module 401, to obtain a gradient of the domain classification network model, where the third loss function belongs to a classification loss function of the domain classification network model;
an updating module 403, configured to update parameters of the domain classification network model by using the gradient of the domain classification network model obtained through training by the training module 402.
In this embodiment, an obtaining module 401 obtains a molybdenum target image set to be trained, where the molybdenum target image set to be trained includes a target domain data set and a source domain data set, the target domain data set includes at least one target domain data, the source domain data set includes at least one source domain data, the source domain data belongs to labeled data, the target domain data belongs to unlabeled data, a training module 402 trains a main task network model by using a first loss function and the source domain data set obtained by the obtaining module 401 to obtain a first gradient of the main task network model, where the first loss function belongs to a segmentation loss function of the main task network model, the first gradient of the main task network model is used to update parameters of the main task network model, and the training module 402 uses a second loss function, The target domain data set and the domain classification network model obtained by the obtaining module 401 train the master task network model to obtain a second gradient of the master task network model, wherein the second loss function belongs to a countering learning loss function of the domain classification network model, the second gradient of the master task network model is used to update parameters of the master task network model, the training module 402 trains the domain classification network model by using a third loss function, the source domain data set, the target domain data set and the master task network model obtained by the obtaining module 401, so as to obtain a gradient of the domain classification network model, wherein the third loss function belongs to a classification loss function of the domain classification network model, and the updating module 403 updates the parameters of the domain classification network model by using the gradient of the domain classification network model obtained by the training of the training module 402.
In the embodiment of the application, a method for training a model is provided, which includes obtaining a molybdenum target image set to be trained, wherein the molybdenum target image set to be trained includes a target domain data set and a source domain data set, then training a main task network model by using a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, the first gradient of the main task network model is used for updating parameters of the main task network model, then training the main task network model by using a second loss function, the target domain data set and a domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model, and finally, training the domain classification network model by adopting a third loss function, a source domain data set, a target domain data set and a main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model, and the gradient of the domain classification network model is adopted to update the parameters of the domain classification network model. By the method, the completely labeled source data set and the completely unlabeled target data set are used simultaneously, and the domain difference between the data sets can be obviously inhibited, so that the main task network model obtained by training obtains excellent performance on the target domain data set, and the problem of large distribution difference between the source domain data and the target domain data in practical application is solved.
Optionally, on the basis of the embodiment corresponding to fig. 7, in another embodiment of the model training apparatus 40 provided in the embodiment of the present application,
the training module 402 is specifically configured to train the main task network model by using a first loss function and a source domain data subset in step 1) to obtain a first sub-gradient of the main task network model, where the source domain data subset belongs to part of data in the source domain data set, and the first sub-gradient belongs to the first gradient;
step 2) training the main task network model by adopting a second loss function, a target domain data subset and a domain classification network model to obtain a second sub-gradient of the main task network model, wherein the target domain data subset belongs to partial data in the target domain data subset, and the second sub-gradient belongs to the second gradient;
step 3) training the domain classification network model by adopting a third loss function, a source domain data subset, a target domain data subset and a main task network model to obtain a sub-gradient of the domain classification network model;
and repeatedly executing the step 1), the step 2) and the step 3) until N times are reached, executing the step of updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model, wherein N is an integer larger than 1.
Secondly, in the embodiment of the present application, an iterative training mode is provided, that is, a first loss function and a source domain data subset are first used to train a main task network model to obtain a first sub-gradient of the main task network model, a second loss function, a target domain data subset and a domain classification network model are then used to train the main task network model to obtain a second sub-gradient of the main task network model, a third loss function, a source domain data subset, a target domain data subset and a main task network model are then used to train the domain classification network model to obtain a sub-gradient of the domain classification network model, and the above steps are repeatedly performed until N times are reached, and the step of updating parameters of the domain classification network model by using the gradient of the domain classification network model is performed. By the method, the domain classification network does not need to be updated every iteration, but the domain classification network is updated after multiple iterations, so that the calculation amount of network training can be greatly reduced, and the overall training speed can be reduced due to excessive domain classification network updating, so that the overall training speed can be effectively increased by adopting the training method provided by the embodiment.
Optionally, on the basis of the embodiment corresponding to fig. 7, in another embodiment of the model training apparatus 40 provided in the embodiment of the present application,
the training module 402 is specifically configured to obtain a heatmap corresponding to each source domain data in the source domain data subset through a first to-be-updated master task network model;
calculating the heat map corresponding to each source domain data and the real data of each source domain data by adopting the first loss function to obtain first difference data;
calculating to obtain the first sub-gradient according to the first difference data;
and updating the first main task network model to be updated according to the first sub-gradient to obtain a second main task network model to be updated.
The embodiment of the present application provides a model training apparatus for calculating parameters of a first sub-model, that is, a heat map corresponding to each source domain data in a source domain data subset is obtained through a first main task network model to be updated, the heat map corresponding to each source domain data and real data of each source domain data are calculated by using a first loss function to obtain first difference data, a first sub-gradient is calculated according to the first difference data, and the first main task network model to be updated is updated according to the first sub-gradient to obtain a second main task network model to be updated. Through the method, the first sub-gradient can be efficiently and accurately obtained by utilizing the first loss function, so that the feasibility and operability of the scheme are improved.
Optionally, on the basis of the embodiment corresponding to fig. 7, in another embodiment of the model training apparatus 40 provided in the embodiment of the present application,
the training module 402 is specifically configured to obtain a heat map of each target domain data in the target domain data subset through the second master task network model to be updated;
acquiring the predicted data of each target domain data through a domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each target domain data and the reverse domain label of each target domain data by adopting the second loss function to obtain second difference data;
calculating to obtain a second sub-gradient according to the second difference data, wherein the second sub-gradient comprises a gradient of the second main task network model to be updated and a gradient of the domain classification network model to be updated;
and updating the second main task network model to be updated according to the second sub-gradient to obtain a third main task network model to be updated.
Further, in the embodiment of the present application, a second sub-gradient is calculated, that is, a heatmap of each target domain data in a target domain data subset is obtained through a second main task network model to be updated, then, predicted data of each target domain data is obtained through a domain classification network model to be updated and the heatmap of each target domain data, then, a second loss function is used to calculate the predicted data of each target domain data and an inversion domain label of each target domain data, so as to obtain second difference data, finally, a second sub-gradient is calculated according to the second difference data, and the second main task network model to be updated is updated according to the second sub-gradient, so as to obtain a third main task network model to be updated. Through the method, the second sub-gradient can be efficiently and accurately obtained by utilizing the second loss function, so that the feasibility and operability of the scheme are improved.
Optionally, on the basis of the embodiment corresponding to fig. 7, in another embodiment of the model training apparatus 40 provided in the embodiment of the present application,
the training module 402 is specifically configured to obtain a gradient of the second main task network model to be updated and a gradient of the domain classification network model to be updated according to the second sub-gradient;
and updating the second main task network model to be updated according to the gradient of the second main task network model to be updated so as to obtain a third main task network model to be updated.
Furthermore, in this embodiment of the present application, a method for performing model training on frozen parameters is provided, that is, a gradient of the second to-be-updated main task network model and a gradient of the to-be-updated domain classification network model may be obtained according to the second sub-gradient, and then the second to-be-updated main task network model is updated only according to the gradient of the second to-be-updated main task network model, so as to obtain the third to-be-updated main task network model. Through the mode, the parameters of the classification network model of the domain to be updated are frozen, and the model is updated only by adopting the parameters of the second main task network model to be updated, so that the stability of model learning can be effectively improved.
Optionally, on the basis of the embodiment corresponding to fig. 7, in another embodiment of the model training apparatus 40 provided in the embodiment of the present application,
the training module 402 is specifically configured to obtain a heat map of each source domain data in the source domain data subset through a third main task network model to be updated, and obtain a heat map of each target domain data in the target domain data subset through the third main task network model to be updated;
acquiring the predicted data of each source domain data through the domain classification network model to be updated and the heat map of each source domain data, and acquiring the predicted data of each target domain data through the domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each source domain data, the predicted data of each target domain data, the first real domain label and the second real domain label by adopting the third loss function to obtain third difference data;
and calculating the sub-gradient of the domain classification network model to be updated according to the third difference data.
Thirdly, in the embodiment of the present application, a method for updating a domain classification network model is introduced, that is, a heat map of each source domain data in a source domain data subset is obtained through a third master task network model to be updated, and acquiring a heat map of each target domain data in the target domain data subset through a third main task network model to be updated, then, acquiring the prediction data of each source domain data through the domain classification network model to be updated and the heat map of each source domain data, and acquiring the predicted data of each target domain data through the to-be-updated domain classification network model and the heat map of each target domain data, calculating the predicted data of each source domain data, the predicted data of each target domain data, the first real domain label and the second real domain label by adopting a third loss function to obtain third difference data, and finally calculating according to the third difference data to obtain the sub-gradient of the to-be-updated domain classification network model. By the method, the third loss function can be used for efficiently and accurately obtaining the sub-gradient of the domain classification network model to be updated, so that the feasibility and operability of the scheme are improved.
Optionally, on the basis of the embodiment corresponding to fig. 7, in another embodiment of the model training apparatus 40 provided in the embodiment of the present application,
the training module 402 is specifically configured to obtain the sub-gradients of the N domain classification network models;
calculating to obtain an average gradient according to the sub-gradients of the N domain classification network models;
and updating the domain classification network model to be updated by adopting the average gradient to obtain the domain classification network model.
Further, in the embodiment of the present application, a method for performing model training on frozen parameters is provided, that is, the sub-gradients of N domain classification network models may be obtained first, then an average gradient is calculated according to the sub-gradients of the N domain classification network models, and finally the domain classification network model to be updated is updated by using the average gradient to obtain the domain classification network model. By the method, the gradient of a plurality of batches of data is collected before the domain classification network model is updated, and the average value is taken, which is equivalent to using a plurality of batches of data, namely adding batch values, and meanwhile, the target domain data and the source domain data are adopted in each training, so that the balance of data training is improved, the defect that the convergence speed is slow due to the fact that the batch values are too small and unbalanced in the training mode is overcome, and the training performance is optimized.
The embodiment of the present application further provides another medical image detection apparatus, as shown in fig. 8, for convenience of description, only the portions related to the embodiment of the present application are shown, and details of the specific technology are not disclosed, please refer to the method portion of the embodiment of the present application. The terminal may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a point of sale (POS), a vehicle-mounted computer, and the like, taking the terminal as a medical detection device as an example:
fig. 8 is a block diagram illustrating a partial structure of a medical detection device related to a terminal provided in an embodiment of the present application. Referring to fig. 8, the medical examination apparatus includes: radio Frequency (RF) circuitry 510, memory 520, input unit 530, display unit 540, sensor 550, audio circuitry 560, wireless fidelity (WiFi) module 570, processor 580, and power supply 590. Those skilled in the art will appreciate that the medical detection device configuration shown in FIG. 8 does not constitute a limitation of medical detection devices, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The following describes the components of the medical examination apparatus in detail with reference to fig. 8:
RF circuit 510 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for processing downlink information of a base station after receiving the downlink information to processor 580; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 510 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 510 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to global system for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), etc.
The memory 520 may be used to store software programs and modules, and the processor 580 may execute various functional applications and data processing of the medical testing device by operating the software programs and modules stored in the memory 520. The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the stored data area may store data (such as audio data, a phonebook, etc.) created according to the use of the medical examination device, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the medical examination apparatus. Specifically, the input unit 530 may include a touch panel 531 and other input devices 532. The touch panel 531, also called a touch screen, can collect touch operations of a user on or near the touch panel 531 (for example, operations of the user on or near the touch panel 531 by using any suitable object or accessory such as a finger or a stylus pen), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 531 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 580, and can receive and execute commands sent by the processor 580. In addition, the touch panel 531 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 530 may include other input devices 532 in addition to the touch panel 531. In particular, other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 540 may be used to display information input by or provided to the user and various menus of the medical testing device. The display unit 540 may include a display panel 541, and optionally, the display panel 541 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 531 may cover the display panel 541, and when the touch panel 531 detects a touch operation on or near the touch panel 531, the touch panel is transmitted to the processor 580 to determine the type of the touch event, and then the processor 580 provides a corresponding visual output on the display panel 541 according to the type of the touch event. Although in fig. 8, the touch panel 531 and the display panel 541 are two separate components to implement the input and output functions of the medical detection device, in some embodiments, the touch panel 531 and the display panel 541 may be integrated to implement the input and output functions of the medical detection device.
The medical detection device may also include at least one sensor 550, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 541 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 541 and/or the backlight when the medical detection apparatus is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of medical detection equipment, and related functions (such as pedometer and tapping) for vibration recognition; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the medical detection device, detailed descriptions thereof are omitted.
Audio circuitry 560, speaker 561, microphone 562 may provide an audio interface between the user and the medical detection device. The audio circuit 560 may transmit the electrical signal converted from the received audio data to the speaker 561, and convert the electrical signal into a sound signal by the speaker 561 for output; microphone 562, on the other hand, converts collected sound signals into electrical signals that are received by audio circuit 560 and converted into audio data that is processed by audio data output processor 580 and either passed through RF circuit 510 for transmission to, for example, another medical detection device, or output to memory 520 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the medical detection equipment can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 570, and provides wireless broadband internet access for the user. Although fig. 8 shows the WiFi module 570, it is understood that it does not belong to the essential constitution of the medical detection device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
Processor 580 is the control center for the medical testing device, interfaces and circuitry to connect the various components of the overall medical testing device, and performs the various functions and processes of the medical testing device by running or executing software programs and/or modules stored in memory 520 and invoking data stored in memory 520 to thereby monitor the medical testing device as a whole. Alternatively, processor 580 may include one or more processing units; optionally, processor 580 may integrate an application processor, which handles primarily the operating system, user interface, applications, etc., and a modem processor, which handles primarily the wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 580.
The medical sensing device also includes a power supply 590 (e.g., a battery) for powering the various components, which may optionally be logically coupled to the processor 580 via a power management system to manage charging, discharging, and power consumption via the power management system.
Although not shown, the medical detection device may further include a camera, a bluetooth module, etc., which will not be described herein.
In the embodiment of the present application, the processor 580 included in the medical detection apparatus also has the following functions:
acquiring a molybdenum target image to be predicted, wherein the molybdenum target image to be predicted belongs to target domain data;
obtaining a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus through a master task network model, wherein the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, the source domain data in the source domain data set belong to labeled data, and the target domain data in the target domain data set belong to unlabeled data;
and generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not.
Optionally, the processor 580 is specifically configured to perform the following functions:
encoding the molybdenum target image to be predicted through an encoder in the main task network model to obtain an encoded feature map, wherein the dimension number of the encoded feature map is smaller than that of the molybdenum target image to be predicted;
decoding the coded feature map through a decoder in the main task network model to obtain a heat map, wherein the dimension number of the heat map is consistent with the dimension number of the molybdenum target image to be predicted;
and obtaining the probability value of each pixel point belonging to the focus according to the heat map.
Optionally, the processor 580 is specifically configured to perform the following functions:
acquiring a low-layer feature map, wherein the low-layer feature map is a feature map of each convolution layer of the molybdenum target image to be predicted passing through an encoder in the main task network model, the dimension number of the low-layer feature map is smaller than that of the molybdenum target image to be predicted, and the dimension number of the low-layer feature map is larger than that of the encoded feature map;
fusing the selected low-level feature map to a decoder in the main task network model to obtain a target encoder;
and decoding the coded characteristic diagram through the target coder to obtain the heat map.
Fig. 9 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 600 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 622 (e.g., one or more processors) and a memory 632, and one or more storage media 630 (e.g., one or more mass storage devices) for storing applications 642 or data 644. Memory 632 and storage medium 630 may be, among other things, transient or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, the central processor 622 may be configured to communicate with the storage medium 630 and execute a series of instruction operations in the storage medium 630 on the server 600.
The server 600 may also include one or more power supplies 626, one or more wired or wireless network interfaces 650, one or more input-output interfaces 658, and/or one or more operating systems 641, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
The steps performed by the server in the above embodiments may be based on the server structure shown in fig. 9.
In the embodiment of the present application, the CPU 622 included in the server also has the following functions:
acquiring a molybdenum target image set to be trained, wherein the molybdenum target image set to be trained comprises a target domain data set and a source domain data set, the target domain data set comprises at least one target domain data, the source domain data set comprises at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data;
training a main task network model by adopting a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model;
training the main task network model by adopting a second loss function, the target domain data set and a domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
training the domain classification network model by adopting a third loss function, the source domain data set, the target domain data set and the main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model;
and updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model.
Optionally, the CPU 622 is specifically configured to perform the following functions:
step 1) training the main task network model by using the first loss function and a source domain data subset to obtain a first sub-gradient of the main task network model, wherein the source domain data subset belongs to partial data in the source domain data subset, and the first sub-gradient belongs to the first gradient;
step 2) training the main task network model by adopting the second loss function, a target domain data subset and the domain classification network model to obtain a second sub-gradient of the main task network model, wherein the target domain data subset belongs to partial data in the target domain data set, and the second sub-gradient belongs to the second gradient;
step 3) training the domain classification network model by adopting the third loss function, the source domain data subset, the target domain data subset and the main task network model to obtain the sub-gradient of the domain classification network model;
and repeatedly executing the step 1), the step 2) and the step 3) until N times are reached, executing the step of updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model, wherein N is an integer greater than 1.
Optionally, the CPU 622 is specifically configured to perform the following functions:
acquiring a heat map corresponding to each source domain data in the source domain data subset through a first main task network model to be updated;
calculating the heat map corresponding to each source domain data and the real data of each source domain data by adopting the first loss function to obtain first difference data;
calculating to obtain the first sub-gradient according to the first difference data;
and updating the first main task network model to be updated according to the first sub-gradient to obtain a second main task network model to be updated.
Optionally, the CPU 622 is specifically configured to perform the following functions:
acquiring a heat map of each target domain data in the target domain data subset through the second master task network model to be updated;
acquiring the predicted data of each target domain data through a domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each target domain data and the reverse domain label of each target domain data by adopting the second loss function to obtain second difference data;
calculating to obtain a second sub-gradient according to the second difference data, wherein the second sub-gradient comprises a gradient of the second main task network model to be updated and a gradient of the domain classification network model to be updated;
and updating the second main task network model to be updated according to the second sub-gradient to obtain a third main task network model to be updated.
Optionally, the CPU 622 is specifically configured to perform the following functions:
acquiring the gradient of the second main task network model to be updated and the gradient of the domain classification network model to be updated according to the second sub-gradient;
and updating the second main task network model to be updated according to the gradient of the second main task network model to be updated so as to obtain a third main task network model to be updated.
Optionally, the CPU 622 is specifically configured to perform the following functions:
acquiring the predicted data of each source domain data through the domain classification network model to be updated and the heat map of each source domain data, and acquiring the predicted data of each target domain data through the domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each source domain data, the predicted data of each target domain data, the first real domain label and the second real domain label by adopting the third loss function to obtain third difference data;
and calculating the sub-gradient of the domain classification network model to be updated according to the third difference data.
Optionally, the CPU 622 is specifically configured to perform the following functions:
acquiring the sub-gradients of the N domain classification network models;
calculating to obtain an average gradient according to the sub-gradients of the N domain classification network models;
and updating the domain classification network model to be updated by adopting the average gradient to obtain the domain classification network model.
With the research and progress of artificial intelligence technology, the artificial intelligence technology is developed and applied in a plurality of fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, unmanned aerial vehicles, robots, smart medical care, smart customer service, and the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (15)

1. A lesion detection method based on medical images is characterized by comprising the following steps:
acquiring a molybdenum target image to be predicted, wherein the molybdenum target image to be predicted belongs to target domain data;
obtaining a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus through a master task network model, wherein the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, the source domain data in the source domain data set belong to labeled data, and the target domain data in the target domain data set belong to unlabeled data;
generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not;
the training of the master task network model specifically comprises: training the main task network model by adopting a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model; training the main task network model by adopting a second loss function, the target domain data set and the domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
the training of the domain classification network model specifically comprises: and training the domain classification network model by adopting a third loss function, the source domain data set, the target domain data set and the main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model, and the gradient of the domain classification network model is used for updating the parameters of the domain classification network model.
2. The method for detecting the focus according to claim 1, wherein the obtaining, by a master task network model, a probability value that each pixel point in the molybdenum target image to be predicted belongs to the focus comprises:
encoding the molybdenum target image to be predicted through an encoder in the main task network model to obtain an encoded feature map, wherein the dimension number of the encoded feature map is smaller than that of the molybdenum target image to be predicted;
decoding the coded feature map through a decoder in the main task network model to obtain a heat map, wherein the dimension number of the heat map is consistent with the dimension number of the molybdenum target image to be predicted;
and obtaining the probability value of each pixel point belonging to the focus according to the heat map.
3. The lesion detection method of claim 2, wherein the decoding, by a decoder in the master task network model, the encoded feature map to obtain a heat map comprises:
acquiring a low-layer feature map, wherein the low-layer feature map is a feature map of each convolution layer of the molybdenum target image to be predicted passing through an encoder in the main task network model, the dimension number of the low-layer feature map is smaller than that of the molybdenum target image to be predicted, and the dimension number of the low-layer feature map is larger than that of the encoded feature map;
fusing the selected low-level feature map to a decoder in the main task network model to obtain a target encoder;
and decoding the coded characteristic diagram through the target coder to obtain the heat map.
4. A method of model training, comprising:
acquiring a molybdenum target image set to be trained, wherein the molybdenum target image set to be trained comprises a target domain data set and a source domain data set, the target domain data set comprises at least one target domain data, the source domain data set comprises at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data;
training a main task network model by adopting a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model;
training the main task network model by adopting a second loss function, the target domain data set and a domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
training the domain classification network model by adopting a third loss function, the source domain data set, the target domain data set and the main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model;
and updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model.
5. The method of claim 4, wherein the master task network model is a full convolutional neural network model;
the first loss function is a segmentation loss function at the rear end of the full convolution neural network model;
the second loss function is an antagonistic learning loss function at the rear end of the domain classification network model;
the third loss function is a classification loss function at the back end of the domain classification network model.
6. The method of claim 4 or 5, wherein training a master task network model using a first loss function and the source domain data set to obtain a first gradient of the master task network model comprises:
step 1) training the main task network model by using the first loss function and a source domain data subset to obtain a first sub-gradient of the main task network model, wherein the source domain data subset belongs to partial data in the source domain data subset, and the first sub-gradient belongs to the first gradient;
the training the main task network model by using a second loss function, the target domain data set and a domain classification network model to obtain a second gradient of the main task network model includes:
step 2) training the main task network model by adopting the second loss function, a target domain data subset and the domain classification network model to obtain a second sub-gradient of the main task network model, wherein the target domain data subset belongs to partial data in the target domain data set, and the second sub-gradient belongs to the second gradient;
the training the domain classification network model by using a third loss function, the source domain data set, the target domain data set and the main task network model to obtain a gradient of the domain classification network model includes:
step 3) training the domain classification network model by adopting the third loss function, the source domain data subset, the target domain data subset and the main task network model to obtain the sub-gradient of the domain classification network model;
and repeatedly executing the step 1), the step 2) and the step 3) until N times are reached, executing the step of updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model, wherein N is an integer greater than 1.
7. The method of claim 6, wherein training the master task network model using the first penalty function and a subset of source domain data to obtain a first sub-gradient of the master task network model comprises:
acquiring a heat map corresponding to each source domain data in the source domain data subset through a first main task network model to be updated;
calculating the heat map corresponding to each source domain data and the real data of each source domain data by adopting the first loss function to obtain first difference data;
calculating to obtain the first sub-gradient according to the first difference data;
and updating the first main task network model to be updated according to the first sub-gradient to obtain a second main task network model to be updated.
8. The method of claim 7, wherein training the master task network model using the second loss function, a subset of target domain data, and the domain classification network model to obtain a second sub-gradient of the master task network model comprises:
acquiring a heat map of each target domain data in the target domain data subset through the second master task network model to be updated;
acquiring the predicted data of each target domain data through a domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each target domain data and the reverse domain label of each target domain data by adopting the second loss function to obtain second difference data;
calculating to obtain a second sub-gradient according to the second difference data, wherein the second sub-gradient comprises a gradient of the second main task network model to be updated and a gradient of the domain classification network model to be updated;
and updating the second main task network model to be updated according to the second sub-gradient to obtain a third main task network model to be updated.
9. The method of claim 8, wherein the updating the second main task network model to be updated according to the second sub-gradient to obtain a third main task network model to be updated comprises:
acquiring the gradient of the second main task network model to be updated and the gradient of the domain classification network model to be updated according to the second sub-gradient;
and updating the second main task network model to be updated according to the gradient of the second main task network model to be updated so as to obtain a third main task network model to be updated.
10. The method of claim 6, wherein the training the domain classification network model using the third loss function, the subset of source domain data, the subset of target domain data, and the master task network model to obtain the sub-gradients of the domain classification network model comprises:
acquiring a heat map of each source domain data in the source domain data subset through a third main task network model to be updated, and acquiring the heat map of each target domain data in the target domain data subset through the third main task network model to be updated;
acquiring the predicted data of each source domain data through the domain classification network model to be updated and the heat map of each source domain data, and acquiring the predicted data of each target domain data through the domain classification network model to be updated and the heat map of each target domain data;
calculating the predicted data of each source domain data, the predicted data of each target domain data, the first real domain label and the second real domain label by adopting the third loss function to obtain third difference data;
and calculating the sub-gradient of the domain classification network model to be updated according to the third difference data.
11. A medical image detection apparatus, characterized by comprising:
the molybdenum target prediction method comprises the steps of obtaining a molybdenum target image to be predicted, wherein the molybdenum target image to be predicted belongs to target domain data;
the obtaining module is further configured to obtain a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus through a master task network model, where the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, source domain data in the source domain data set belongs to labeled data, and target domain data in the target domain data set belongs to unlabeled data;
the generating module is used for generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus, which is acquired by the acquiring module, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not;
the training of the master task network model specifically comprises: training the main task network model by adopting a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model; training the main task network model by adopting a second loss function, the target domain data set and the domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
the training of the domain classification network model specifically comprises: and training the domain classification network model by adopting a third loss function, the source domain data set, the target domain data set and the main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model, and the gradient of the domain classification network model is used for updating the parameters of the domain classification network model.
12. A model training apparatus, comprising:
the molybdenum target image set to be trained comprises a target domain data set and a source domain data set, wherein the target domain data set comprises at least one target domain data, the source domain data set comprises at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data;
the training module is used for training a main task network model by adopting a first loss function and the source domain data set acquired by the acquisition module to acquire a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model;
the training module is further configured to train the master task network model by using a second loss function, the target domain data set acquired by the acquisition module, and the domain classification network model to obtain a second gradient of the master task network model, where the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the master task network model is used to update parameters of the master task network model;
the training module is further configured to train the domain classification network model by using a third loss function, the source domain data set, the target domain data set, and the master task network model, which are obtained by the obtaining module, to obtain a gradient of the domain classification network model, where the third loss function belongs to a classification loss function of the domain classification network model;
and the updating module is used for updating the parameters of the domain classification network model by adopting the gradient of the domain classification network model obtained by training of the training module.
13. A medical testing device, comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
acquiring a molybdenum target image to be predicted, wherein the molybdenum target image to be predicted belongs to target domain data;
obtaining a probability value that each pixel point in the molybdenum target image to be predicted belongs to a focus through a master task network model, wherein the master task network model is obtained through training of a source domain data set and a domain classification network model, the domain classification network model is obtained through training of the source domain data set and a target domain data set, the source domain data in the source domain data set belong to labeled data, and the target domain data in the target domain data set belong to unlabeled data;
generating a lump detection result of the molybdenum target image to be predicted according to the probability value of each pixel point belonging to the focus, wherein the lump detection result is used for predicting whether the molybdenum target image to be predicted contains lumps or not;
the training of the master task network model specifically comprises: training the main task network model by adopting a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model; training the main task network model by adopting a second loss function, the target domain data set and the domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
the training of the domain classification network model specifically comprises: training the domain classification network model by adopting a third loss function, the source domain data set, the target domain data set and the main task network model to obtain a gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model, and the gradient of the domain classification network model is used for updating parameters of the domain classification network model;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
14. A server, comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
acquiring a molybdenum target image set to be trained, wherein the molybdenum target image set to be trained comprises a target domain data set and a source domain data set, the target domain data set comprises at least one target domain data, the source domain data set comprises at least one source domain data, the source domain data belongs to labeled data, and the target domain data belongs to unlabeled data;
training a main task network model by adopting a first loss function and the source domain data set to obtain a first gradient of the main task network model, wherein the first loss function belongs to a segmentation loss function of the main task network model, and the first gradient of the main task network model is used for updating parameters of the main task network model;
training the main task network model by adopting a second loss function, the target domain data set and a domain classification network model to obtain a second gradient of the main task network model, wherein the second loss function belongs to an antagonistic learning loss function of the domain classification network model, and the second gradient of the main task network model is used for updating parameters of the main task network model;
training the domain classification network model by adopting a third loss function, the source domain data set, the target domain data set and the main task network model to obtain the gradient of the domain classification network model, wherein the third loss function belongs to the classification loss function of the domain classification network model;
updating parameters of the domain classification network model by adopting the gradient of the domain classification network model;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
15. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any of claims 1 to 3, or perform the method of any of claims 4 to 10.
CN201910833614.0A 2019-01-29 2019-09-04 Medical image-based focus detection method, model training method and device Active CN110414631B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2019100876850 2019-01-29
CN201910087685 2019-01-29

Publications (2)

Publication Number Publication Date
CN110414631A CN110414631A (en) 2019-11-05
CN110414631B true CN110414631B (en) 2022-02-01

Family

ID=68370154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910833614.0A Active CN110414631B (en) 2019-01-29 2019-09-04 Medical image-based focus detection method, model training method and device

Country Status (1)

Country Link
CN (1) CN110414631B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111341441A (en) * 2020-03-02 2020-06-26 刘四花 Gastrointestinal disease model construction method and diagnosis system
CN111428770A (en) * 2020-03-19 2020-07-17 苏州杰锐思智能科技股份有限公司 Network model training and inductance defect identification method and device, and electronic equipment
CN114004328A (en) * 2020-07-27 2022-02-01 华为技术有限公司 AI model updating method, device, computing equipment and storage medium
CN112215255B (en) * 2020-09-08 2023-08-18 深圳大学 Training method of target detection model, target detection method and terminal equipment
CN113241156B (en) * 2021-06-04 2024-04-23 华中科技大学 Marking method and system of orthopedics focus counting network based on detection guidance
CN114332128B (en) * 2021-12-30 2022-07-26 推想医疗科技股份有限公司 Medical image processing method and apparatus, electronic device, and computer storage medium
CN114445670B (en) * 2022-04-11 2022-07-12 腾讯科技(深圳)有限公司 Training method, device and equipment of image processing model and storage medium
CN114882372A (en) * 2022-07-11 2022-08-09 浙江大华技术股份有限公司 Target detection method and device
CN115439699B (en) * 2022-10-25 2023-06-30 北京鹰瞳科技发展股份有限公司 Training method of target detection model, target detection method and related products
CN115375955B (en) * 2022-10-25 2023-04-18 北京鹰瞳科技发展股份有限公司 Training method of target detection model, target detection method and related product
CN116128863B (en) * 2023-03-01 2023-09-12 北京医准智能科技有限公司 Medical image processing method, device and equipment

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294506A (en) * 2015-06-10 2017-01-04 华中师范大学 The viewpoint data classification method of domain-adaptive and device
US9892361B2 (en) * 2015-01-21 2018-02-13 Siemens Healthcare Gmbh Method and system for cross-domain synthesis of medical images using contextual deep network
CN107909566A (en) * 2017-10-28 2018-04-13 杭州电子科技大学 A kind of image-recognizing method of the cutaneum carcinoma melanoma based on deep learning
CN108062753A (en) * 2017-12-29 2018-05-22 重庆理工大学 The adaptive brain tumor semantic segmentation method in unsupervised domain based on depth confrontation study
CN108268870A (en) * 2018-01-29 2018-07-10 重庆理工大学 Multi-scale feature fusion ultrasonoscopy semantic segmentation method based on confrontation study
CN108399431A (en) * 2018-02-28 2018-08-14 国信优易数据有限公司 Disaggregated model training method and sorting technique
CN108596174A (en) * 2018-04-28 2018-09-28 中南大学 A kind of lesion localization method of skin disease image
CN108647741A (en) * 2018-05-18 2018-10-12 湖北工业大学 A kind of image classification method and system based on transfer learning
CN108846444A (en) * 2018-06-23 2018-11-20 重庆大学 The multistage depth migration learning method excavated towards multi-source data
CN109102496A (en) * 2018-07-10 2018-12-28 武汉科技大学 The method and device in confrontation model identification tumor of breast region is generated based on variation
CN109168003A (en) * 2018-09-04 2019-01-08 中国科学院计算技术研究所 A method of generating the neural network model for being used for video estimation
CN109165725A (en) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 Neural network federation modeling method, equipment and storage medium based on transfer learning
CN109190707A (en) * 2018-09-12 2019-01-11 深圳市唯特视科技有限公司 A kind of domain adapting to image semantic segmentation method based on confrontation study
CN109189921A (en) * 2018-08-07 2019-01-11 阿里巴巴集团控股有限公司 Comment on the training method and device of assessment models

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10474929B2 (en) * 2017-04-25 2019-11-12 Nec Corporation Cyclic generative adversarial network for unsupervised cross-domain image generation

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9892361B2 (en) * 2015-01-21 2018-02-13 Siemens Healthcare Gmbh Method and system for cross-domain synthesis of medical images using contextual deep network
CN106294506A (en) * 2015-06-10 2017-01-04 华中师范大学 The viewpoint data classification method of domain-adaptive and device
CN107909566A (en) * 2017-10-28 2018-04-13 杭州电子科技大学 A kind of image-recognizing method of the cutaneum carcinoma melanoma based on deep learning
CN108062753A (en) * 2017-12-29 2018-05-22 重庆理工大学 The adaptive brain tumor semantic segmentation method in unsupervised domain based on depth confrontation study
CN108268870A (en) * 2018-01-29 2018-07-10 重庆理工大学 Multi-scale feature fusion ultrasonoscopy semantic segmentation method based on confrontation study
CN108399431A (en) * 2018-02-28 2018-08-14 国信优易数据有限公司 Disaggregated model training method and sorting technique
CN108596174A (en) * 2018-04-28 2018-09-28 中南大学 A kind of lesion localization method of skin disease image
CN108647741A (en) * 2018-05-18 2018-10-12 湖北工业大学 A kind of image classification method and system based on transfer learning
CN108846444A (en) * 2018-06-23 2018-11-20 重庆大学 The multistage depth migration learning method excavated towards multi-source data
CN109102496A (en) * 2018-07-10 2018-12-28 武汉科技大学 The method and device in confrontation model identification tumor of breast region is generated based on variation
CN109189921A (en) * 2018-08-07 2019-01-11 阿里巴巴集团控股有限公司 Comment on the training method and device of assessment models
CN109165725A (en) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 Neural network federation modeling method, equipment and storage medium based on transfer learning
CN109168003A (en) * 2018-09-04 2019-01-08 中国科学院计算技术研究所 A method of generating the neural network model for being used for video estimation
CN109190707A (en) * 2018-09-12 2019-01-11 深圳市唯特视科技有限公司 A kind of domain adapting to image semantic segmentation method based on confrontation study

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Domain-Adversarial Training of Neural Networks;Ganin Y. et al.;《 Advances in Computer Vision and Pattern Recognition》;20170913;1-21 *
Semantic-Aware Generative Adversarial Nets for Unsupervised Domain Adaptation in Chest X-Ray Segmentation;Cheng C et al.;《https://arxiv.org/abs/1806.00600v2》;20180605;1-8 *
Unsupervised Domain Adaptation in Brain Lesion Segmentation with Adversarial Networks;Kamnitsas K et al.;《https://arxiv.org/abs/1612.08894v1》;20161228;1-13 *
乳腺钼靶图像癌变区域分类与检测的深度计算;季卫萍;《中国优秀硕士学位论文全文数据库信息科技辑》;20180315(第3期);全文 *
面向医疗图像诊断的迁移学习策略;姜云鹏;《中国优秀硕士学位论文全文数据库信息科技辑》;20190115(第1期);全文 *

Also Published As

Publication number Publication date
CN110414631A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN110414631B (en) Medical image-based focus detection method, model training method and device
CN110738263B (en) Image recognition model training method, image recognition method and image recognition device
CN110473186B (en) Detection method based on medical image, model training method and device
CN110517759B (en) Method for determining image to be marked, method and device for model training
CN109493328B (en) Medical image display method, viewing device and computer device
CN111598900B (en) Image region segmentation model training method, segmentation method and device
CN107492099B (en) Medical image analysis method, medical image analysis system, and storage medium
CN108464840B (en) Automatic detection method and system for breast lumps
CN109934220B (en) Method, device and terminal for displaying image interest points
CN111091127A (en) Image detection method, network model training method and related device
CN112435341B (en) Training method and device for three-dimensional reconstruction network, and three-dimensional reconstruction method and device
KR101589172B1 (en) Method for processing volumetric image data
CN107194163A (en) A kind of display methods and system
CN110009656B (en) Target object determination method and device, storage medium and electronic device
Yang et al. AX-Unet: A deep learning framework for image segmentation to assist pancreatic tumor diagnosis
CN113724188A (en) Method for processing focus image and related device
CN111798424B (en) Medical image-based nodule detection method and device and electronic equipment
CN113705595A (en) Method, device and storage medium for predicting degree of abnormal cell metastasis
CN113177953B (en) Liver region segmentation method, liver region segmentation device, electronic equipment and storage medium
CN113205148A (en) Medical image frame interpolation method and terminal for iterative interlayer information fusion
WO2020093987A1 (en) Medical image processing method and system, computer device, and readable storage medium
WO2023060735A1 (en) Image generation model training and image generation methods, apparatus, device, and medium
CN115661176A (en) Three-dimensional body construction method and device based on CT image, storage medium and terminal
CN117994620A (en) Fusion method, device and equipment of CT image and MR image and storage medium
Shruti et al. Identification of Challenges and Limitations of Current Methods for Detection and Segmentation of Brain Tumor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant