CN114529749A - Pathological image classification device and method and use method of device - Google Patents

Pathological image classification device and method and use method of device Download PDF

Info

Publication number
CN114529749A
CN114529749A CN202011227352.2A CN202011227352A CN114529749A CN 114529749 A CN114529749 A CN 114529749A CN 202011227352 A CN202011227352 A CN 202011227352A CN 114529749 A CN114529749 A CN 114529749A
Authority
CN
China
Prior art keywords
image data
small
classification
region
abnormal
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.)
Pending
Application number
CN202011227352.2A
Other languages
Chinese (zh)
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.)
Beijing Boco Inter Telecom Technology Co ltd
Original Assignee
Beijing Boco Inter Telecom Technology Co ltd
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 Beijing Boco Inter Telecom Technology Co ltd filed Critical Beijing Boco Inter Telecom Technology Co ltd
Priority to CN202011227352.2A priority Critical patent/CN114529749A/en
Publication of CN114529749A publication Critical patent/CN114529749A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Epidemiology (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Image Analysis (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention discloses a pathological image classification device, comprising: the image data set generating unit is used for sampling the morphological digital slice to generate a small block image data set I; the system is also used for sampling the morphological digital slices and generating a small image data set II by combining a set data set rule; the region classification unit is used for calculating a prediction region classification label of the small image data in the small image data set; combining the small images into regions on the morphological digital slices in combination with a preset region classification rule; the pathological classification unit is used for calculating a predicted pathological classification label of small abnormal image data in the small image data set II; and calculating the predicted pathological classification label of the small abnormal image data in the same abnormal area to obtain the pathological classification label of the abnormal area. The invention also discloses a pathological image classification method; a method for using a pathological image classification device. By the method and the device, the pathological image can be classified more quickly and accurately.

Description

Pathological image classification device and method and use method of device
Technical Field
The invention relates to the field of image recognition and deep learning, in particular to a pathological image classification technology.
Background
The pathology images are the gold standard for the final diagnosis of cancer. However, the pathological image classification based on manual work of doctors currently not only has the problems of time consumption and labor consumption, but also the diagnosis result is easily influenced by subjective human factors such as doctor experience, level and the like; the introduction of the computer aided diagnosis system can not only improve the diagnosis efficiency, but also assist in providing more objective and accurate diagnosis results. In recent years, some convolutional neural network models are used for automatic classification of pathological images by computer-aided diagnosis systems, and the ResNet convolutional neural network is most widely applied. However, as the ResNet convolutional neural network is designed for natural images, the required number of layers is generally deep and the calculation is time-consuming if a relatively accurate image identification result is to be obtained; on the other hand, the model parameters are more, and the parameters need to be trained through a large amount of training data to obtain higher accuracy. However, because the pathological image data set is small in scale, the model is directly used in a computer-aided diagnosis system to automatically classify pathological images, so that an overfitting phenomenon is easy to generate, and the accuracy and the reliability of classification are reduced.
Therefore, a new device and method for rapidly and accurately classifying pathological images is urgently needed.
Disclosure of Invention
The invention discloses a pathological image classification device, comprising:
the image data set generating unit is used for sampling a morphological digital slice which is a carrier of a pathological image, and generating a small block image data set I which comprises all small block image data; the morphological digital slice is further used for sampling the morphological digital slice, and a small block image data set II is generated by combining a set data set rule, wherein the small block image data set II only contains small block abnormal image data;
the region classification unit is used for receiving the small block image data in the small block image data set I generated by the image data set generation unit, constructing a shallow convolutional neural network model I, and calculating prediction region classification labels of all small block image data in the small block image data set I according to a set parameter I; combining a preset region classification rule, synthesizing a region of the small image on a morphological digital slice, and writing a region classification label of the region into a label of the morphological digital slice; the area comprises a normal area and an abnormal area;
the pathology classification unit is used for receiving small abnormal image data in a small image data set II generated by the image data set generation unit, and calculating prediction pathology classification labels of all small abnormal image data in the small image data set II according to a set parameter II through a convolution neural network model II; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section.
Wherein the image dataset generation unit further comprises:
the image acquisition module is used for performing tiled sampling on the morphological digital slice by using a sliding window to acquire a plurality of small images; the parameters of the sliding window are configurable;
the data set generation module is used for receiving the small block image acquired by the image acquisition module, reading and recording the label of the small block image on the morphological digital slice, generating small block image data and adding the small block image data to a small block image data set I; and the image acquisition module is also used for receiving the small block image acquired by the image acquisition module, reading and recording the label of the small block image on the morphological digital slice, generating small block abnormal image data by combining the set data set rule, and adding the small block abnormal image data to a small block image data set II.
Wherein the region classification unit further comprises:
the region prediction module is used for receiving small block image data in a small block image data set I generated by the data set generation module, constructing a shallow convolutional neural network model I, wherein the shallow convolutional neural network model I is formed by stacking a specific number of convolutional layers, a quick connection module, an average pooling layer, convolutional layers and classifiers, calculating prediction region classification labels of all small block image data in the small block image data set I according to a set parameter I, writing the prediction region classification labels into the small block image data, obtaining updated small block image data and outputting the updated small block image data to the region classification module;
the region classification module is used for receiving all small block image data in a small block image data set I obtained by the region prediction module; combining with a preset region classification rule, combining the small images into a region on the morphological digital slice, and writing a region classification label of the region into the label of the morphological digital slice.
Wherein the pathology classification unit further comprises:
the pathology prediction module is used for receiving the small abnormal image data in the small image data set II generated by the data set generation module, setting a parameter II by combining a preset pathology classification standard through a convolution neural network model II, calculating a prediction pathology classification label of all the small abnormal image data in the small image data set II according to the set parameter II, writing the prediction pathology classification label into the small abnormal image data, obtaining updated small abnormal image data and outputting the updated small abnormal image data to the pathology classification module;
the pathology classification module is used for receiving all small abnormal image data in the small image data set II obtained by the pathology prediction module; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section.
In order to improve the accuracy of the device, it is preferable that the device further comprises:
the training unit is used for calculating a region classification error according to a prediction region classification label and an original region classification label which are obtained for small block image data in a small block image data set I, and updating and setting the parameter I according to the region classification error; the second parameter is updated and set according to the pathological classification error calculated according to the predicted pathological classification label and the original pathological classification label acquired from the abnormal small image data in the second small image data set; the system is also used for calculating a regional pathological classification error according to the obtained pathological classification label of the abnormal region and the original pathological classification label, and updating and setting the parameter III according to the regional pathological classification error;
wherein the training unit further comprises:
the parameter one training module is used for calculating a region classification error according to a prediction region classification label and an original region classification label which are obtained for small block image data in a small block image data set one, and updating and setting the parameter one according to the region classification error;
a second parameter training module, configured to calculate a pathological classification error according to a predicted pathological classification label and an original pathological classification label obtained for small abnormal image data in a second small image data set, and update and set a second parameter according to the pathological classification error;
a parameter three training module, configured to calculate a region-level pathological classification error according to the obtained pathological classification label and original pathological classification label of the abnormal region, and update and set the parameter three according to the region-level pathological classification error;
the small image data set I can be divided into a training set, a verification set and a test set;
the small image data set II can be divided into a training set, a verification set and a test set.
The invention also discloses a pathological image classification method, which comprises the following steps:
(11) sampling a morphological digital slice to generate a small block image data set I, wherein the morphological digital slice is a carrier of a pathological image, and the small block image data set I comprises all small block image data;
(12) constructing a shallow convolutional neural network model I, and calculating prediction region classification labels of all small block image data in the small block image data set I according to a set parameter I; combining a preset region classification rule, synthesizing a region of the small image on a morphological digital slice, and writing a region classification label of the region into a label of the morphological digital slice; the area comprises a normal area and an abnormal area;
(13) sampling the morphological digital slice, and generating a second small-block image data set by combining a set data set rule, wherein the second small-block image data set only contains small-block abnormal image data;
(14) calculating prediction pathology classification labels of all small abnormal image data in the small image data set II according to a set parameter II through a convolution neural network model II; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section.
Further, the method for generating the first patch image data set in step (11) specifically includes:
using a sliding window to perform tiled sampling on the morphological digital slice to acquire a plurality of small images; the parameters of the sliding window are configurable;
sampling, and simultaneously reading and recording the label of the small image on the morphological digital slice, wherein the label comprises position information;
generating small block image data, and adding the small block image data to a small block image data set I; the small image data includes image information and a label, and the label includes an annotation.
Further, the method of step (12) specifically includes:
constructing a shallow convolutional neural network model I, wherein the shallow convolutional neural network model I is formed by stacking a specific number of convolutional layers, a quick connection module, an average pooling layer, convolutional layers and classifiers, calculating prediction region classification labels of all small image data in a small image data set I according to a set parameter I, writing the prediction region classification labels into the small image data, and obtaining updated small image data;
combining a preset region classification rule, synthesizing regions of the small images on the morphological digital slice, and writing a region classification label of the region into the label of the morphological digital slice.
Further, the method for generating the second small block image number set in step (13) specifically includes:
using a sliding window to perform tiled sampling on the morphological digital slice to acquire a plurality of small images; the parameters of the sliding window are configurable;
sampling, and simultaneously reading and recording the label of the small image on the morphological digital slice; the label comprises position information, a region classification label and belonging region information;
combining the set data set rule to generate small abnormal image data with abnormal area classification labels, and adding the small abnormal image data to a small image data set II; the small abnormal image data comprises image information and a label, and the label comprises an annotation.
Further, the method of step (14) specifically includes:
setting a parameter II by combining a convolutional neural network model II with a preset pathological classification standard, calculating a prediction pathological classification label of all small abnormal image data in the small image data set II according to the set parameter II, and writing the prediction pathological classification label into the small abnormal image data to obtain updated small abnormal image data;
inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section.
In order to improve the accuracy of classification, preferably, the method further comprises:
calculating a region classification error according to a prediction region classification label and an original region classification label acquired from small block image data in a small block image data set I, and updating and setting the parameter I according to the region classification error;
calculating a pathological classification error according to a predicted pathological classification label and an original pathological classification label acquired from small abnormal image data in a small image data set II, and updating and setting the parameter II according to the pathological classification error;
calculating a region level pathological classification error according to the obtained pathological classification label of the abnormal region and the original pathological classification label, and updating and setting the parameter III according to the region level pathological classification error;
the small image data set I can be divided into a training set, a verification set and a test set;
the small image data set II can be divided into a training set, a verification set and a test set.
The invention also discloses a use method of the pathological image classification device, according to which the device can be trained as a high-precision classification device, the method comprises the following steps:
selecting a morphological digital slice with labels including original region classification labels and original pathology classification labels, and dividing the morphological digital slice into a training set, a verification set and a test set according to a certain proportion;
step (21), an image data set generating unit samples the morphological digital slice of the training set to obtain a plurality of small images, and simultaneously reads and records labels of the small images on the morphological digital slice to generate small image data which is added to a small image data set I of the training set; each small block image data in the small block image data set I of the training set comprises image information and a label; the label comprises position information, an original region classification label and an original pathology classification label which are acquired from the label;
preferably, a data set rule can be preset, small images in a single region are screened out, small image data are generated, and the small image data are added to a small image data set I of the test set;
step (22), a region classification unit receives small block image data in a small block image data set I of a training set generated by the image data set generation unit, constructs a shallow convolutional neural network model I, calculates prediction region classification labels of all small block image data in the small block image data set I of the training set according to a set parameter I, writes the prediction region classification labels into the small block image data, and obtains updated small block image data;
step (23), the training unit calculates a region classification error according to the obtained predicted region classification label and original region classification label, and updates and sets the first parameter according to the region classification error;
repeatedly executing the steps (22) to (23) until the corresponding times of execution according to the training algebra set by the training unit are finished; obtaining an optimal parameter I;
step (24), an image data set generating unit samples morphological digital slices of the training set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the training set; each small abnormal image data in the small image data set II of the training set comprises image information and a label; the labels comprise position information, original region classification labels, belonging region information and original pathology classification labels which are acquired from the labels;
step (25), a pathology classification unit receives small abnormal image data in a small image data set II of the training set generated by the image data set generation unit, calculates a predicted pathology classification label of the small abnormal image data in the small image data set II of the training set according to a set parameter II through a convolution neural network model II, writes the predicted pathology classification label into the small abnormal image data, and obtains updated small abnormal image data;
step (26), the training unit calculates a pathological classification error according to the acquired predicted pathological classification label and the original pathological classification label, and updates and sets the parameter two according to the pathological classification error;
repeatedly executing the steps (25) to (26) until the corresponding times of execution according to the training algebra set by the training unit are finished; acquiring an optimal parameter II;
step (27), an image data set generating unit samples the morphological digital slices of the verification set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the verification set; each small abnormal image data in the small image data set II of the verification set comprises image information and a label; the labels comprise position information, original region classification labels, belonging region information and original pathology classification labels which are acquired from the labels;
step (28), a pathology classification unit receives the small abnormal image data in the small image data set II of the verification set generated by the image data set generation unit, and calculates a prediction pathology classification label of the small abnormal image data in the small image data set II of the verification set according to a set parameter II through a convolution neural network model II and writes the prediction pathology classification label into the small abnormal image data to obtain updated small abnormal image data;
step (29), the pathology classification unit inputs the predicted pathology classification labels of the small abnormal image data in the same abnormal region into a linear regression model, and calculates the predicted pathology classification labels of the small abnormal image data in the same abnormal region according to a set parameter III to obtain the pathology classification labels of the abnormal regions;
step (210), the training unit calculates a region level pathological classification error according to the obtained pathological classification label of the abnormal region and an original pathological classification label, and updates and sets the parameter III according to the region level pathological classification error;
repeatedly executing the steps (29) to (210) until the corresponding times of execution according to the training algebra set by the training unit are finished; and obtaining an optimal parameter III.
The invention also discloses a use method of the pathological image classification device, and the method can be used for evaluating the performance of the device and comprises the following steps:
selecting a morphological digital slice with labels including original region classification labels and original pathology classification labels, and dividing the morphological digital slice into a training set, a verification set and a test set according to a certain proportion;
the image data set generating unit samples the morphological digital slices of the test set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices at the same time to generate small image data, and adds the small image data to a small image data set I of the test set; each small block image data in the small block image data set I of the test set comprises image information and a label; the label comprises position information, an original region classification label and an original pathology classification label which are acquired from the label;
the region classification unit receives the small block image data in the small block image data set I of the test set generated by the image data set generation unit, constructs a shallow convolutional neural network model I, and calculates prediction region classification labels of all small block image data in the small block image data set I of the test set according to a set parameter I;
the image data set generating unit samples the morphological digital slices of the test set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the test set; each small abnormal image data in the small image data set II of the test set comprises image information and a label; the labels comprise position information, original region classification labels, belonging region information and original pathology classification labels which are acquired from the labels;
the pathology classification unit receives the small abnormal image data in the small image data set II of the test set generated by the image data set generation unit, and calculates prediction pathology classification labels of all small abnormal image data in the small image data set II of the test set according to a set parameter II through a convolution neural network model II; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, and calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III to obtain the pathology classification labels of the abnormal area.
Compared with the prior art, the pathological image classification method has the advantages of achieving the effect of rapidly and accurately classifying pathological images through the following innovation and remarkably improving the pathological image classification performance of a computer-aided diagnosis system.
1. A two-stage structure is designed, and the original one-step pathological image classification method is optimized. The first-stage classification firstly classifies normal and abnormal regions of pathological images, and the second-stage classification only classifies pathological regions. The complex N-class (multi-class) problem is split into a two-class problem and an N-1 class problem.
2. And when the first level is classified, constructing a new shallow convolutional neural network model. The number of layers of the new shallow convolutional neural network is small, so that the operation amount and the operation time can be reduced, and the speed is increased; the new shallow convolutional neural network model also needs fewer parameters, and optimal parameters can be obtained by using a small-scale data set for training, so that overfitting of the model is reduced; the prediction accuracy is improved.
3. And in the second-level classification, only the pathological images in the abnormal area are classified, so that the input data volume is reduced, and the calculation speed is favorably improved. Connecting the convolution neural network model and the linear regression model in series; training a linear regression model to adaptively carry out weighted voting on the prediction labels of the small images; and a small block image which is positioned in the center of the abnormal region, contains less noise information and has stronger pathological representation effect is given greater weight, so that the prediction precision of the model on the pathological classification label is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a pathological image classification device according to an embodiment of the present disclosure;
fig. 2-1 is a schematic structural diagram of another pathological image classification device according to a second embodiment of the present application;
fig. 2-2 is a schematic structural diagram of a region prediction module according to a second embodiment of the present disclosure;
fig. 2-3 are schematic structural diagrams of a pathology prediction module provided in the second embodiment of the present application;
fig. 3 is a schematic flowchart of a pathological image classification method according to a third embodiment of the present application;
fig. 4 is a flowchart illustrating a method for using a pathological image classification device according to a fourth embodiment of the present disclosure;
fig. 5 is a schematic flowchart of a method for using another pathological image classification device according to a fifth embodiment of the present application;
fig. 6 is a schematic flowchart of a method according to a sixth embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
As shown in fig. 1, a pathological image classification device includes:
an image data set generating unit M1 for sampling a morphological digital slice, which is a carrier of a pathological image, to generate a patch image data set one containing all patch image data; the morphological digital slice is further used for sampling the morphological digital slice, and generating a second small block image data set by combining a set data set rule, wherein the second small block image data set only contains abnormal small block image data.
The morphological digital section (WSI) is a digital section which is formed by scanning and seamlessly splicing traditional glass sections by utilizing a full-automatic microscope scanning system and combining a virtual section software system to generate a Whole full-field-of-view (white Slide Image), which is called WSI for short. The morphological digital slices carry annotations in addition to the images. The labeling information comprises axis coordinate system position information, region classification information and pathology classification information.
The area is generally divided into an abnormal area and a normal area. The abnormal region is a region which is interested by the user and needs to be further classified. For example, when pathological classification is performed on breast cancer, a cancer region is an abnormal region, and a non-cancer region is a normal region; the cancer area is further divided into benign, slightly invasive and invasive cancer. The present invention does not limit the criteria and methods for determining and classifying abnormal regions.
In general, the steps of sampling a morphological digital slice to generate a patch image data set are: and (4) performing tiled sampling on the morphological digital slice by using a sliding window with the size l and the step length s to obtain a small image. And reading and recording marks of the WSI at corresponding positions as labels of the small block images according to the positions of the small block images in the WSI, generating small block image data, and adding the small block image data to a small block image data set X. X ═ X1,x2,...,xN]Representing a data set of all patch image data, each sample X of the data set XiEach of { i ═ 1, 2., N } includes image information and a label. Where N is the number of small block image data samples.
Preferably, a data set rule may be set, and samples that meet the data set rule are screened out and added to the patch image data set. For example: the length of the central side of a small block image obtained by sampling is specified to be
Figure BDA0002764013150000111
When the area of the region belonging to the single region reaches a proportionality coefficient r, generating small image data, and adding the small image data into a small image data set; can also advance oneThe step provides for screening only small blocks of abnormal image data within a single abnormal region. The data set rule is set, so that small image data which contain less noise information and have stronger pathological representation effect can be screened out.
A region classification unit M2, configured to receive the first patch image data in the first patch image data set generated by the image data set generation unit M1, construct a first shallow convolutional neural network model, and calculate prediction region classification labels of all the first patch image data in the first patch image data set according to a set first parameter; combining a preset region classification rule, synthesizing a region of the small image on a morphological digital slice, and writing a region classification label of the region into a label of the morphological digital slice; the area comprises a normal area and an abnormal area.
Constructing a shallow convolutional neural network model I, and calculating prediction region classification labels of all small images in the small image dataset I according to a set parameter I; the first parameter can be initialized according to actual experience, and can also be updated according to the region classification error, so that the accuracy of predicting the region classification label is improved.
A region classification rule may be defined, for example, it may be defined that small images with the same prediction region classification label and the same position information are in the same region. And synthesizing the small images which accord with the rules into the same region in the WSI, and writing the region classification label into the label.
A pathology classification unit M3, configured to receive the second abnormal patch image data in the second patch image data set generated by the image data set generation unit M1, and calculate predicted pathology classification labels of all second abnormal patch image data in the second patch image data set according to a second set parameter through a second convolutional neural network model; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section.
And setting a parameter II by combining a convolutional neural network model II with a preset pathological classification standard, and calculating the predicted pathological classification labels of all abnormal small image data in the small image data set II according to the set parameter II. For example, breast cancer areas are further classified into benign, slightly invasive and invasive cancers. A ResNet-50 network is selected and the node of the fully connected layer is set to 3 for determining the cancer type of the cancer region. The second parameter can be initialized according to actual experience, and can also be updated according to pathological classification errors, so that the accuracy of predicting the pathological classification label is improved.
And inputting the predicted pathological classification labels of the small abnormal image data in the same abnormal region into a linear regression model, and weighting and voting according to a set parameter III to obtain the pathological classification labels of the abnormal region. The third parameter can be initialized according to actual experience, and can also be updated according to regional pathological classification errors, so that the accuracy of the regional pathological classification label is improved.
As can be seen from the above embodiments, the present application provides a pathological image classification device. The first-level structure acquires small image data by sampling WSI; synthesizing an area on the WSI according to the predicted area classification label of the small block image data obtained through calculation, and writing the area classification label into the label of the WSI; the second-level structure samples the WSI again to obtain small abnormal image data; and obtaining the area level pathological classification label of the WSI through the calculated prediction pathological classification label of the small abnormal image data. The original one-step pathological image classification method is optimized through a two-stage structure. The first-stage classification firstly classifies normal and abnormal regions of pathological images, and the second-stage classification only classifies pathological regions. The complex N-class (multi-class) problem is split into a two-class problem and an N-1 class problem. The pathological images can be classified quickly and accurately.
In order to better illustrate the invention, a second embodiment is given to explain the working principle of each unit and module in detail, as shown in fig. 2-1.
The image dataset generation unit M1 may further include:
the image acquisition module M11 is used for performing tiled sampling on the morphological digital slice by using a sliding window to acquire a plurality of small images; the parameters of the sliding window are configurable;
the data set generating module M12 is used for receiving the small block image acquired by the image acquisition module M11, reading and recording the label of the small block image on the morphological digital slice, generating small block image data, and adding the small block image data to a small block image data set I; the image acquisition module M11 is further configured to receive the small block image acquired by the image acquisition module M11, read and record the label of the small block image on the morphological digital slice, generate small block abnormal image data by combining the set data set rule, and add the small block abnormal image data to the small block image data set II.
Selecting a group of morphological digital slices which are correctly classified and marked with original region classification labels and original pathology classification labels, and dividing the morphological digital slices into a training set, a verification set and a test set according to a certain proportion. When the training set is used as target data of the device, training of the convolutional neural network is completed according to set training parameters, and after a certain level of precision is achieved, the parameters of the convolutional neural network are determined to form a fixed convolutional neural network model. When the verification set is used as target data of the device, training of the regression model is completed according to set training parameters, and after a certain level of precision is achieved, the parameters of the regression model are determined to form a fixed regression model. When the test set is used as the target data of the device, the obtained label can be compared with the original label to evaluate the performance of the device.
The region classification unit M2 may further include:
the region prediction module M21 is configured to receive the small block image data in the small block image data set i generated by the data set generation module M12, construct a shallow convolutional neural network model i, where the shallow convolutional neural network model i is formed by stacking a specific number of convolutional layers, a shortcut connection module, an average pooling layer, convolutional layers, and a classifier, calculate prediction region classification labels of all small block image data in the small block image data set i according to a set parameter i, write the prediction region classification labels into the small block image data, obtain updated small block image data, and output the updated small block image data to the region classification module M22.
The region prediction module M21 adopts the newly constructed shallow convolutional neural network model I to perform prediction. The shallow convolutional neural network model I consists of convolutional layers, a quick connection module, an average pooling layer, convolutional layers and a classifier in specific number; the classifier is used for outputting corresponding classification labels according to the characteristics acquired by the convolutional neural network and in combination with preset classification standards. As shown in fig. 2-2, in the present embodiment, a shallow convolutional neural network model i is adopted, in which a 7 × 7 convolutional layer, three fast connection modules, an average pooling layer, a 1 × 1 convolutional layer, and a Softmax classifier are sequentially stacked; the quick connection module is composed of two 3 x 3 convolution layers and a quick connection bypass. The number of each component can be flexibly set according to actual conditions. The invention does not limit the choice of classifier.
A region classification module M22, configured to receive all the small block image data in the small block image data set one obtained by the region prediction module M21; combining with a preset region classification rule, combining the small images into a region on the morphological digital slice, and writing a region classification label of the region into the label of the morphological digital slice.
The pathology classification unit M3, further comprising:
the pathology prediction module M31 is configured to receive the second abnormal patch image data in the second patch image data set generated by the data set generation module M12, set a second parameter according to a preset pathology classification standard through a second convolutional neural network model, calculate prediction pathology classification labels of all the second abnormal patch image data in the second patch image data set according to the set second parameter, write the second abnormal patch image data in the second patch image data set, obtain updated second abnormal patch image data, and output the updated second abnormal patch image data to the pathology classification module M32.
The pathology prediction module M31 uses the convolutional neural network model two for prediction. The convolutional neural network model II consists of a convolutional neural network and a classifier; the classifier is used for outputting corresponding classification labels according to the characteristics acquired by the convolutional neural network and in combination with preset classification standards. As shown in fig. 2-3, in this embodiment, a convolutional neural network model two formed by connecting a ResNet-50 network and a Softmax classifier in series is adopted. The present invention does not limit the choice of convolutional neural networks and classifiers.
A pathology classification module M32, configured to receive all abnormal small block image data in the small block image data set two obtained by the pathology prediction module M31; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section. The calculation formula is as follows:
Figure BDA0002764013150000151
wherein L isrPathological Classification Label, L, representing abnormal regioniAnd theta represents a parameter three, namely a coefficient of a linear regression model.
The training unit M4, further comprising:
and the parameter one training module M41 is configured to receive a prediction region classification label obtained by the region prediction module M21 for the patch image data in the patch image data set one and an original region classification label obtained by the data set generation module M12, calculate a region classification error, and update and set the parameter one according to the region classification error. The method specifically comprises the following steps:
taking a training set as target data of the device;
setting training parameters; the training parameters mainly comprise: learning rate, weight reduction rate, training batch and training algebra;
initializing a first parameter;
the region classification error, i.e., the loss function of the classifier, is calculated using the predicted region classification labels of all the patch image data in the patch image dataset one of the training set acquired by the region prediction module M21 and the original region classification labels acquired by the dataset generation module M12. Training a convolutional neural network by using a random gradient descent method to obtain optimal parameters;
and performing back propagation according to the initial region classification error, and updating the first parameter. In the iteration process, the region classification error is gradually reduced along with the increase of the training algebra until a convergence state is reached. And finishing the training algebra and determining an optimal convolution neural network model parameter I.
And the second parameter training module M42 is configured to receive the predicted pathology classification labels of all the abnormal small block image data in the second small block image data set of the training set, which are obtained by the pathology prediction module M31 for the abnormal small block image data in the second small block image data set, and the original pathology classification label obtained by the data set generating module M12, calculate a pathology classification error, and update and set the second parameter according to the pathology classification error. The method specifically comprises the following steps:
taking a training set as target data of the device;
and setting training parameters. The training parameters mainly comprise: learning rate, weight reduction rate, training batch and training algebra;
initializing a second parameter;
the pathology classification error, that is, the loss function of the classifier is calculated using the predicted pathology classification label of all the abnormal patch image data in the patch image dataset two of the training set acquired by the pathology prediction module M31 and the original pathology classification label acquired by the dataset generation module M12. The convolutional neural network is trained using a stochastic gradient descent method to obtain optimal parameters.
And performing back propagation according to the initial pathological classification error, and updating the second parameter. In the iteration process, the pathological classification error is gradually reduced along with the increase of the training algebra until a convergence state is reached. And finishing the training algebra and determining the optimal convolution neural network model parameter II.
And the parameter three-training module M43 is used for receiving the pathology classification labels of the abnormal regions obtained by the pathology classification module M32 and the original pathology classification labels of the abnormal regions obtained from the WSI to calculate region-level pathology classification errors, namely a loss function of the linear regression model. And updating and setting the parameter three according to the region level pathological classification error. The method specifically comprises the following steps:
taking the verification set as target data of the device;
and setting training parameters. The training parameters mainly comprise training algebra;
initializing a parameter III;
using the pathology classification label of the abnormal region obtained by the pathology classification module M32 and the original pathology classification label of the abnormal region obtained from WSI, the region-level pathology classification error, i.e., the loss function of the linear regression model, is calculated. Its loss function C is defined as:
Figure BDA0002764013150000171
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0002764013150000172
the original pathology classification label representing the jth abnormal region,
Figure BDA0002764013150000173
a pathology classification label representing the jth abnormal region.
And updating the parameter three until the loss function C reaches a convergence state. And finishing the training algebra and determining the optimal regression model parameter III.
Therefore, when the first-stage classification is carried out, a new shallow convolutional neural network model is constructed. The number of layers of the new shallow convolutional neural network is small, so that the operation amount and the operation time can be reduced, and the speed is increased; the new shallow convolutional neural network model also needs fewer parameters, and optimal parameters can be obtained by using a small-scale data set for training, so that overfitting of the model is reduced; the prediction accuracy is improved. In the second classification, only the images of the abnormal area are classified, so that the input data volume is reduced, and the calculation speed can be increased. Connecting the convolution neural network model and the linear regression model in series; training a linear regression model to adaptively carry out weighted voting on the prediction labels of the small images; and a small block image which is positioned in the center of the abnormal region, contains less noise information and has stronger pathological representation effect is given greater weight, so that the prediction precision of the model on the pathological classification label is effectively improved.
The third embodiment of the invention discloses a pathological image classification method, as shown in fig. 3.
Step S31: sampling a morphological digital slice to generate a small block image data set I, wherein the morphological digital slice is a carrier of a pathological image, and the small block image data set I comprises all small block image data;
step S32: constructing a shallow convolutional neural network model I, and calculating prediction region classification labels of all small block image data in the small block image data set I according to a set parameter I; combining a preset region classification rule, synthesizing the small images into regions on the morphological digital slice, and writing region classification labels of the regions into the labels of the morphological digital slice; the area comprises a normal area and an abnormal area;
step S33: sampling the morphological digital slice, and generating a second small-block image data set by combining a set data set rule, wherein the second small-block image data set only contains small-block abnormal image data;
step S34: calculating prediction pathology classification labels of all small abnormal image data in the small image data set II according to a set parameter II through a convolution neural network model II; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section.
The invention content of the method part is similar to that of the device part, and the detailed description can refer to the device part and is not repeated herein.
From the above embodiments, the present application provides a new pathological image classification method. A two-stage structure is designed, and the original one-step pathological image classification method is optimized. The first-stage classification firstly classifies normal and abnormal regions of pathological images, and the second-stage classification only classifies pathological regions. Splitting a complex N classification (multi-classification) problem into a two-classification problem and an N-1 classification problem; when the first level is classified, a new shallow convolutional neural network model is constructed, the model parameters are reduced, the model speed is increased, and the overfitting of the model is reduced; in the second classification, only the images of the abnormal area are classified, so that the input data volume is reduced, and the calculation speed can be increased. Connecting the convolution neural network model and the linear regression model in series; training a linear regression model to adaptively carry out weighted voting on the prediction labels of the small images; and a small block image which is positioned in the center of the abnormal region, contains less noise information and has stronger pathological representation effect is given greater weight, so that the prediction precision of the model on the pathological classification label is effectively improved.
The method effectively improves the classification speed and the classification precision, and the classification performance of the pathological images is obviously improved.
In order to explain the working principle and the using method of the pathological image classification device in the training set and the verification set in detail, a fourth embodiment of the invention is specially provided, which comprises the following steps:
selecting a group of morphological digital slices which are correctly classified and marked with original region classification labels and original pathology classification labels, and dividing the morphological digital slices into a training set, a verification set and a test set according to a certain proportion. And (4) taking the training set and the verification set as target data of the device, and determining the optimal device parameters through training.
S401, an image data set generating unit samples morphological digital slices of a training set to generate a small image data set I;
an image data set generating unit samples the morphological digital slice of the training set to obtain a plurality of small images, and simultaneously reads and records labels of the small images on the morphological digital slice to generate small image data which is added to a small image data set I of the training set; each small block image data in the small block image data set I of the training set comprises image information and a label; the label comprises position information, an original region classification label and an original pathology classification label which are acquired from the label;
preferably, a preset data set rule can be combined to screen out small images in a single region, small image data are generated, and the small image data are added to a small image data set I of the test set; the data set rule is set, so that small images which contain less noise information and have stronger pathological representation effects can be screened out. The method is beneficial to obtaining the optimal parameters and improving the classification precision of the device.
Step S402, an area classification unit receives small block image data in a small block image data set I of a training set generated by the image data set generation unit, a shallow convolutional neural network model I is constructed, prediction area classification labels of all small block image data in the small block image data set I of the training set are calculated according to a set parameter I, and the small block image data are written in the small block image data, so that updated small block image data are obtained.
In step S403, the training unit calculates a region classification error according to the obtained predicted region classification label and original region classification label, and updates and sets the parameter one according to the region classification error.
Step S404, judging whether the corresponding times of the training algebra set by the training unit is executed, if not, returning to the step S402; if the execution is complete, the optimal parameter one is determined.
Step S405, an image data set generating unit samples the morphological digital slices of the training set to generate a small image data set II of the training set;
an image data set generating unit samples the morphological digital slices of the training set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data with abnormal area classification labels by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the training set; each small abnormal image data in the small image data set II of the training set comprises image information and a label; the labels comprise position information, original region classification labels, region information and original pathology classification labels which are obtained from the labels.
Step S406, the pathology classification unit receives the small abnormal image data in the small image data set II of the training set generated by the image data set generation unit, calculates the prediction pathology classification label of the small abnormal image data in the small image data set II of the training set according to the set parameter II through the convolution neural network model II, and writes the prediction pathology classification label into the small abnormal image data to obtain updated small abnormal image data.
In step S407, the training unit calculates a pathological classification error according to the acquired predicted pathological classification label and original pathological classification label, and updates and sets the parameter two according to the pathological classification error.
Step S408, judging whether the corresponding times of the training algebra set by the training unit is finished, if not, returning to the step S406; if the execution is complete, the optimal parameter two is determined.
Step 409, an image data set generating unit samples the morphological digital slices of the verification set to generate a small image data set II of the verification set;
the image data set generating unit samples the morphological digital slices of the verification set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the verification set; each small abnormal image data in the small image data set II of the verification set comprises image information and a label; the labels comprise position information, original region classification labels, belonging region information and original pathology classification labels which are obtained from the labels.
Step S410, the pathology classification unit receives the small abnormal image data in the small image data set II of the verification set generated by the image data set generation unit, and calculates the prediction pathology classification label of the small abnormal image data in the small image data set II of the verification set according to the set parameter II through the convolution neural network model II and writes the prediction pathology classification label into the small abnormal image data to obtain updated small abnormal image data.
Step S411, the pathology classification unit inputs the predicted pathology classification label of the small abnormal image data in the same abnormal region into a linear regression model, and calculates the predicted pathology classification label of the small abnormal image data in the same abnormal region according to a set parameter III to obtain the pathology classification label of the abnormal region.
In step S412, the training unit calculates a region-level pathological classification error according to the obtained pathological classification label of the abnormal region and the original pathological classification label, and updates and sets the parameter three according to the region-level pathological classification error.
Step S413, determining whether to execute the corresponding times of the training algebra set by the training unit, and if not, returning to step S411; if the execution is complete, the optimal parameter three is determined.
The embodiment is a process of completing training by using a pathological image classification device, classifying images according to initialized parameters by using data of a training set and a verification set, and adjusting the parameters according to classification errors, so that the parameters of the pathological image classification device are in the optimal state, the error of a classification result is minimum, and the accuracy is highest.
In order to explain the working principle and the using method of the pathological image classification device in the test set in detail, a fifth embodiment of the invention is specially provided, which comprises the following steps:
selecting a group of morphological digital slices which are correctly classified and marked with original region classification labels and original pathology classification labels, and dividing the morphological digital slices into a training set, a verification set and a test set according to a certain proportion. The test set is used as target data of the device, and the obtained label can be compared with the original label to evaluate the performance of the device.
Step S51, the image data set generating unit samples the morphological digital slice of the test set to generate a small image data set I of the test set;
the image data set generating unit samples the morphological digital slices of the test set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices at the same time to generate small image data, and adds the small image data to a small image data set I of the test set; each small block image data in the small block image data set I of the test set comprises image information and a label; the labels comprise position information, original region classification labels and original pathology classification labels acquired from the labels.
In step S52, the region classification unit receives the patch image data in the patch image data set one of the test set generated by the image data set generation unit, constructs a shallow convolutional neural network model one, and calculates the predicted region classification labels of all patch image data in the patch image data set one of the test set according to the set parameter one.
And calculating the classification accuracy of the prediction region classification according to whether the prediction region classification label of the sample in the small block image data set I of the test set is consistent with the original region classification label.
Step S53, the image data set generating unit samples the morphological digital slice of the test set to generate a small image data set II of the test set;
the image data set generating unit samples the morphological digital slices of the test set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the test set; each small abnormal image data in the small image data set II of the test set comprises image information and a label; the labels comprise position information, original region classification labels, belonging region information and original pathology classification labels which are obtained from the labels.
Step S54, a pathology classification unit receives the small abnormal image data in the small image data set II of the test set generated by the image data set generation unit, and a predicted pathology classification label of all the small abnormal image data in the small image data set II of the test set is calculated through a convolution neural network model II according to a set parameter II; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, and calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III to obtain the pathology classification labels of the abnormal area.
And calculating the classification accuracy of the predicted pathological classification according to whether the pathological classification label of the abnormal region is consistent with the original region level pathological classification label.
The present embodiment is a process of testing a pathology image classification apparatus using a test set. According to the training steps in the fourth embodiment, a pathological image classification device has reached a more accurate state. And the accuracy of the sample in the test set is tested, so that the performance of the device can be evaluated.
In order to explain the working principle and the working process of the device in more detail, the following embodiment six of the invention is given, and is explained by combining the examples:
this example uses as an example sample set a clinical image dataset of breast cancer containing high quality morphological digital slices of 186 patients, the regions of WSI having been correctly labeled as cancerous and non-cancerous, the cancerous regions being successively subdivided into three categories labeled benign, slightly invasive and invasive cancer. The WSI is divided into a training set, a verification set and a test set according to a certain proportion. In this example, 88 sheets were used to construct the training set, 21 sheets were used to construct the validation set, and the remaining 77 sheets were used to construct the test set.
In the embodiment, a shallow convolutional neural network model I constructed by a pathological image classification device is used for judging whether a small image is a cancer region or not; judging the pathological type of the small cancer region image by using a convolution neural network model II adopted by a pathological image classification device; a region-level pathology classification label is then obtained using a linear regression model.
Step S61, the image data set generating unit samples the morphological digital slice to generate a small block image data set I;
and (3) acquiring a small image by using a sliding window tiled sample with the size of 224 and the step size of 112, and simultaneously reading and recording the label of the small image on the WSI to generate small image data. When 100% of the central region of the small image with a side length of 112 is located in a single region, the small image data will be put into the small image data set one. Patch image dataset-X obtained from training set WSI samplingtrain1A small image data set I obtained from WSI sampling of the verification set is marked as Xval1And marking the small block image data set I obtained by sampling the WSI as Xtest1
Step S62, the image data set generating unit samples the morphological digital slice to generate a small block image data set II;
and (3) using a sliding window with the size of 1200 and the step length of 600 to tile and sample to obtain a small image, and simultaneously reading and recording the label of the small image on the WSI to generate small image data. When 100% of the central area of the small image with the side length of 600 is located in the single abnormal area, the small image is put into the small image data set two. A small image data set obtained from WSI sampling of the training set is recorded as Xtrain2And a small image data set obtained by sampling from the verification set WSI is recorded as Xval2And a small image data set obtained by sampling the WSI is recorded as Xtest2
In the embodiment, whether the single region belongs to the single region is judged through the original classification label of the sample set, namely the single region is divided into four types of non-cancerous region, benign region, micro-invasive cancer and invasive cancer; in particular, to accommodate the convolutional neural network model used in this example, the image size in the patch image dataset two is adjusted to 224 × 224.
Step S63, constructing model
The shallow convolutional neural network model I is used for judging the region classification of the small image and consists of convolutional layers, a quick connection module, an average pooling layer, convolutional layers and classifiers in specific number, and the shallow convolutional neural network model I is formed by sequentially stacking a 7 × 7 convolutional layer, three quick connection modules, an average pooling layer, a 1 × 1 convolutional layer and a Softmax classifier; the quick connection module is composed of two 3 x 3 convolution layers and a quick connection bypass. The Softmax classifier presets classification standards and outputs 2 x 1 prediction probability vectors, namely values of 2 category labels corresponding to cancerous and non-cancerous regions.
The convolutional neural network model is used for judging pathological classification of the small images, and is particularly divided into benign, micro-invasive cancer and invasive cancer. The convolutional neural network model two used in this example is formed by connecting a ResNet-50 network and a Softmax classifier in series. Modifying the node of the ResNet-50 network full connection layer into 3; the Softmax classifier presets classification standards and outputs 3 multiplied by 1 prediction probability vectors, namely values corresponding to 3 category labels of benign, micro-invasive cancer and invasive cancer.
Step S64, training a shallow convolutional neural network model I and determining a parameter I
(1) Setting training parameters: set learning rate of training to 10-4Setting the weight reduction rate to be 0.9, setting the training batch to be 100 and the training algebra to be 50;
(2) initializing a first parameter;
(3) mixing Xtrain1Inputting small block image data into a shallow convolutional neural network model I, carrying out forward propagation on image features, and outputting a prediction region classification label by a Softmax classifier;
(4) and calculating the loss of Softmaxloss, performing backward propagation according to the loss, and updating the parameter one. And finishing the training algebra and determining an optimal first parameter of the shallow convolutional neural network model.
Step S65, training the convolution neural network model II, and determining the parameter II
(1) Setting training parameters: set learning rate of training to 10-4The weight reduction rate is 0.9, the training batch is set as 100, and the training algebra is set as 50;
(2) initializing a second parameter;
(3) mixing Xtrain2Inputting small block image data into a convolution neural network model II, carrying out forward propagation on image features, and outputting a prediction pathology classification label by a Softmax classifier;
(4) and calculating Softmaxloss, performing backward propagation according to the loss, and updating the second parameter. And finishing the training algebra and determining the optimal convolution neural network model parameter II.
Step S66, training a linear regression model and determining a parameter III
(1) Setting training parameters: setting a training algebra to be 50;
(2) initializing a parameter III;
(3) mixing Xval2Inputting the small image data into a convolution neural network model II to obtain a predicted pathology classification label; inputting the obtained predicted pathological classification label of the small abnormal image data in the same abnormal region into a linear regression model, and calculating the pathological classification label L of the abnormal regionr
(3) A loss function of the linear regression model is calculated. And updating and setting the coefficient of the regression model, namely the parameter three, according to the loss function of the regression model. And finishing the training algebra and determining the optimal regression model parameter III.
Step S67, testing the model
The parameters of the model are set as the optimal parameters determined after training and adjustment by the training unit;
(1) mixing Xtest1Inputting small block image data into a shallow convolutional neural network model I, carrying out forward propagation on image features, and outputting a prediction region classification label by a Softmax classifier;
(2) according to Xtest1Whether the predicted region classification label of the small block image data is consistent with the original region classification label or not is judged, and the accuracy of cancer region screening of the device is calculated;
(3) mixing Xtest2Inputting the small image data into a second convolutional neural network model and a linear regression model which are connected in series to obtain a pathological classification label of an abnormal region;
(4) and calculating the cancer type classification accuracy of the device according to whether the pathological classification label of the abnormal region is consistent with the original pathological classification label.
Firstly, training a first parameter of a first shallow convolutional neural network model for judging a cancer region and a non-cancer region of a small image by using training set data; training a parameter II of a convolution neural network II for judging the cancer type of the small abnormal image by using the training set data; then training a parameter III of a linear regression model for obtaining the pathological classification label of the abnormal region by using the verification set data; finally, the performance of a pathological image classification device, which has reached a more accurate state, is tested using the test set data.
Using samples of the same breast cancer clinical image dataset, the accuracy and time consumption of both methods are shown in table 1 below, comparing the ResNet-50 based classification method with the methods disclosed herein, and it can be seen that the results of the present invention are more dominant.
TABLE 1 Classification accuracy and time comparison of breast cancer clinical image datasets
Figure BDA0002764013150000261
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The method disclosed by the embodiment corresponds to the device disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the device part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as 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 should be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the application described herein may be practiced in sequences other than those illustrated.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A pathological image classification device, comprising:
the image data set generating unit is used for sampling a morphological digital slice which is a carrier of a pathological image, and generating a small block image data set I which comprises all small block image data; the morphological digital slice is further used for sampling the morphological digital slice, and a small block image data set II is generated by combining a set data set rule, wherein the small block image data set II only contains small block abnormal image data;
the region classification unit is used for receiving the small block image data in the small block image data set I generated by the image data set generation unit, constructing a shallow convolutional neural network model I, and calculating prediction region classification labels of all small block image data in the small block image data set I according to a set parameter I; combining a preset region classification rule, synthesizing a region of the small image on a morphological digital slice, and writing a region classification label of the region into a label of the morphological digital slice; the area comprises a normal area and an abnormal area;
the pathology classification unit is used for receiving small abnormal image data in a small image data set II generated by the image data set generation unit, and calculating prediction pathology classification labels of all small abnormal image data in the small image data set II according to a set parameter II through a convolution neural network model II; inputting the predicted pathological classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathological classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathological classification labels of the abnormal area and writing the labels into the morphological digital slices.
2. The apparatus according to claim 1, wherein the image dataset generation unit further comprises:
the image acquisition module is used for performing tiled sampling on the morphological digital slice by using a sliding window to acquire a plurality of small images; the parameters of the sliding window are configurable;
the data set generation module is used for receiving the small block image acquired by the image acquisition module, reading and recording the label of the small block image on the morphological digital slice, generating small block image data and adding the small block image data to a small block image data set I; and the image acquisition module is also used for receiving the small block image acquired by the image acquisition module, reading and recording the label of the small block image on the morphological digital slice, generating small block abnormal image data by combining the set data set rule, and adding the small block abnormal image data to a small block image data set II.
3. The apparatus of claim 2, wherein the region classification unit further comprises:
the region prediction module is used for receiving small block image data in a small block image data set I generated by the data set generation module, constructing a shallow convolutional neural network model I, wherein the shallow convolutional neural network model I is formed by stacking a specific number of convolutional layers, a quick connection module, an average pooling layer, convolutional layers and classifiers, calculating prediction region classification labels of all small block image data in the small block image data set I according to a set parameter I, writing the prediction region classification labels into the small block image data, obtaining updated small block image data and outputting the updated small block image data to the region classification module;
the region classification module is used for receiving all small block image data in a small block image data set I obtained by the region prediction module; combining with a preset region classification rule, combining the small images into a region on the morphological digital slice, and writing a region classification label of the region into the label of the morphological digital slice.
4. The apparatus of claim 3, wherein the pathology classification unit further comprises:
the pathology prediction module is used for receiving the small abnormal image data in the small image data set II generated by the data set generation module, setting a parameter II by combining a preset pathology classification standard through a convolution neural network model II, calculating a prediction pathology classification label of all the small abnormal image data in the small image data set II according to the set parameter II, writing the prediction pathology classification label into the small abnormal image data, obtaining updated small abnormal image data and outputting the updated small abnormal image data to the pathology classification module;
the pathology classification module is used for receiving all small abnormal image data in the small image data set II obtained by the pathology prediction module; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section.
5. The apparatus of any of claims 1-4, further comprising:
the training unit is used for calculating a region classification error according to a prediction region classification label and an original region classification label which are obtained for small block image data in a small block image data set I, and updating and setting the parameter I according to the region classification error; the second parameter is updated and set according to the pathological classification error calculated according to the predicted pathological classification label and the original pathological classification label acquired from the abnormal small image data in the second small image data set; the system is also used for calculating a region level pathological classification error according to the obtained pathological classification label and the original pathological classification label of the abnormal region, and updating and setting the parameter III according to the region level pathological classification error;
the training unit further comprises:
the parameter one training module is used for calculating a region classification error according to a prediction region classification label and an original region classification label which are obtained for small block image data in a small block image data set one, and updating and setting the parameter one according to the region classification error;
a second parameter training module, configured to calculate a pathological classification error according to a predicted pathological classification label and an original pathological classification label obtained for small abnormal image data in a second small image data set, and update and set a second parameter according to the pathological classification error;
a parameter three training module, configured to calculate a regional pathological classification error according to the obtained pathological classification label of the abnormal region and an original pathological classification label, and update and set the parameter three according to the regional pathological classification error;
the small image data set I can be divided into a training set, a verification set and a test set;
the small image data set II can be divided into a training set, a verification set and a test set.
6. A method for classifying pathological images, the method comprising the steps of:
(11) sampling a morphological digital slice to generate a small block image data set I, wherein the morphological digital slice is a carrier of a pathological image, and the small block image data set I comprises all small block image data;
(12) constructing a shallow convolutional neural network model I, and calculating prediction region classification labels of all small block image data in the small block image data set I according to a set parameter I; combining a preset region classification rule, synthesizing the small images into regions on the morphological digital slice, and writing region classification labels of the regions into the labels of the morphological digital slice; the area comprises a normal area and an abnormal area;
(13) sampling the morphological digital slice, and generating a second small-block image data set by combining a set data set rule, wherein the second small-block image data set only contains small-block abnormal image data;
(14) calculating prediction pathology classification labels of all small abnormal image data in the small image data set II according to a set parameter II through a convolution neural network model II; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathology classification labels of the abnormal area, and writing the obtained pathology classification labels into the morphological digital section.
7. The method of claim 6, wherein the step (11) of generating the first patch image dataset comprises:
using a sliding window to perform tiled sampling on the morphological digital slice to acquire a plurality of small images; the parameters of the sliding window are configurable;
sampling, and simultaneously reading and recording the label of the small image on the morphological digital slice, wherein the label comprises position information;
generating small block image data, and adding the small block image data to a small block image data set I; the tile image data includes image information and a label, the label including an annotation.
8. The method according to claim 7, characterized in that the method of step (12) comprises in particular:
constructing a shallow convolutional neural network model I, wherein the shallow convolutional neural network model I is formed by stacking a specific number of convolutional layers, a quick connection module, an average pooling layer, convolutional layers and classifiers, calculating prediction region classification labels of all small image data in a small image data set I according to a set parameter I, writing the prediction region classification labels into the small image data, and obtaining updated small image data;
combining with a preset region classification rule, combining the small images into a region on the morphological digital slice, and writing a region classification label of the region into the label of the morphological digital slice.
9. The method according to claim 8, wherein the step (13) of generating a second patch image data set specifically comprises:
using a sliding window to perform tiled sampling on the morphological digital slice to acquire a plurality of small images; the parameters of the sliding window are configurable;
sampling, and simultaneously reading and recording the label of the small image on the morphological digital slice; the label comprises position information, a region classification label and belonging region information;
combining the set data set rule to generate small abnormal image data with abnormal area classification labels, and adding the small abnormal image data to a small image data set II; the small abnormal image data comprises image information and a label, and the label comprises an annotation.
10. The method according to claim 9, wherein the method of step (14) comprises:
setting a parameter II by combining a convolutional neural network model II with a preset pathological classification standard, calculating a prediction pathological classification label of all small abnormal image data in the small image data set II according to the set parameter II, and writing the prediction pathological classification label into the small abnormal image data to obtain updated small abnormal image data;
inputting the predicted pathological classification labels of the small abnormal image data in the same abnormal area into a linear regression model, calculating the predicted pathological classification labels of the small abnormal image data in the same abnormal area according to a set parameter III, obtaining the pathological classification labels of the abnormal area and writing the labels into the morphological digital slices.
11. The method according to any one of claims 6-10, further comprising:
calculating a region classification error according to a prediction region classification label and an original region classification label acquired from small block image data in a small block image data set I, and updating and setting the parameter I according to the region classification error;
calculating a pathological classification error according to a predicted pathological classification label and an original pathological classification label acquired from small abnormal image data in a small image data set II, and updating and setting the parameter II according to the pathological classification error;
calculating a region level pathological classification error according to the obtained pathological classification label of the abnormal region and the original pathological classification label, and updating and setting the parameter III according to the region level pathological classification error;
the small image data set I can be divided into a training set, a verification set and a test set;
the small image data set II can be divided into a training set, a verification set and a test set.
12. A method for using a pathological image classification device, the method comprising:
selecting a morphological digital slice with labels including original region classification labels and original pathology classification labels, and dividing the morphological digital slice into a training set, a verification set and a test set according to a certain proportion;
step (21), an image data set generating unit samples the morphological digital slice of the training set to obtain a plurality of small images, and simultaneously reads and records labels of the small images on the morphological digital slice to generate small image data which is added to a small image data set I of the training set; each small block image data in the small block image data set I of the training set comprises image information and a label; the label comprises position information, an original region classification label and an original pathology classification label which are acquired from the label;
preferably, a data set rule can be preset, small images in a single region are screened out, small image data are generated, and the small image data are added to a small image data set I of the test set;
step (22), a region classification unit receives small block image data in a small block image data set I of a training set generated by the image data set generation unit, constructs a shallow convolutional neural network model I, calculates prediction region classification labels of all small block image data in the small block image data set I of the training set according to a set parameter I, writes the prediction region classification labels into the small block image data, and obtains updated small block image data;
step (23), the training unit calculates a region classification error according to the obtained predicted region classification label and original region classification label, and updates and sets the first parameter according to the region classification error;
repeatedly executing the steps (22) to (23) until the corresponding times of execution according to the training algebra set by the training unit are finished; obtaining an optimal parameter I;
step (24), an image data set generating unit samples the morphological digital slices of the training set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the training set; each small abnormal image data in the small image data set II of the training set comprises image information and a label; the labels comprise position information, original region classification labels, belonging region information and original pathology classification labels which are acquired from the labels;
step (25), a pathology classification unit receives small abnormal image data in a small image data set II of the training set generated by the image data set generation unit, calculates a predicted pathology classification label of the small abnormal image data in the small image data set II of the training set according to a set parameter II through a convolution neural network model II, writes the predicted pathology classification label into the small abnormal image data, and obtains updated small abnormal image data;
step (26), the training unit calculates a pathological classification error according to the acquired predicted pathological classification label and the original pathological classification label, and updates and sets the parameter two according to the pathological classification error;
repeatedly executing the steps (25) to (26) until the corresponding times of execution according to the training algebra set by the training unit are finished; acquiring an optimal parameter II;
step (27), an image data set generating unit samples the morphological digital slices of the verification set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the verification set; each small abnormal image data in the small image data set II of the verification set comprises image information and a label; the labels comprise position information, original region classification labels, belonging region information and original pathology classification labels which are acquired from the labels;
step (28), a pathology classification unit receives the small abnormal image data in the small image data set II of the verification set generated by the image data set generation unit, and calculates a prediction pathology classification label of the small abnormal image data in the small image data set II of the verification set according to a set parameter II through a convolution neural network model II and writes the prediction pathology classification label into the small abnormal image data to obtain updated small abnormal image data;
step (29), the pathology classification unit inputs the predicted pathology classification labels of the small abnormal image data in the same abnormal region into a linear regression model, and calculates the predicted pathology classification labels of the small abnormal image data in the same abnormal region according to a set parameter III to obtain the pathology classification labels of the abnormal regions;
step (210), the training unit calculates a region level pathological classification error according to the obtained pathological classification label of the abnormal region and an original pathological classification label, and updates and sets the parameter III according to the region level pathological classification error;
repeatedly executing the steps (29) to (210) until the corresponding times of execution according to the training algebra set by the training unit are finished; and obtaining an optimal parameter III.
13. A method for using a pathological image classification device, the method comprising:
selecting a morphological digital slice with labels including original region classification labels and original pathology classification labels, and dividing the morphological digital slice into a training set, a verification set and a test set according to a certain proportion;
the image data set generating unit samples the morphological digital slices of the test set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices at the same time to generate small image data, and adds the small image data to a small image data set I of the test set; each small block image data in the small block image data set I of the test set comprises image information and a label; the label comprises position information, an original region classification label and an original pathology classification label which are acquired from the label;
the region classification unit receives the small block image data in the small block image data set I of the test set generated by the image data set generation unit, constructs a shallow convolutional neural network model I, and calculates prediction region classification labels of all small block image data in the small block image data set I of the test set according to a set parameter I;
the image data set generating unit samples the morphological digital slices of the test set to obtain a plurality of small images, reads and records labels of the small images on the morphological digital slices, generates small abnormal image data by combining a set data set rule, and adds the small abnormal image data to a small image data set II of the test set; each small abnormal image data in the small image data set II of the test set comprises image information and a label; the labels comprise position information, original region classification labels, belonging region information and original pathology classification labels which are acquired from the labels;
the pathology classification unit receives the small abnormal image data in the small image data set II of the test set generated by the image data set generation unit, and calculates prediction pathology classification labels of all small abnormal image data in the small image data set II of the test set according to a set parameter II through a convolution neural network model II; inputting the predicted pathology classification labels of the small abnormal image data in the same abnormal area into a linear regression model, and calculating the predicted pathology classification labels of the small abnormal image data in the same abnormal area according to a set parameter III to obtain the pathology classification labels of the abnormal area.
CN202011227352.2A 2020-11-06 2020-11-06 Pathological image classification device and method and use method of device Pending CN114529749A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011227352.2A CN114529749A (en) 2020-11-06 2020-11-06 Pathological image classification device and method and use method of device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011227352.2A CN114529749A (en) 2020-11-06 2020-11-06 Pathological image classification device and method and use method of device

Publications (1)

Publication Number Publication Date
CN114529749A true CN114529749A (en) 2022-05-24

Family

ID=81618411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011227352.2A Pending CN114529749A (en) 2020-11-06 2020-11-06 Pathological image classification device and method and use method of device

Country Status (1)

Country Link
CN (1) CN114529749A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116230208A (en) * 2023-02-15 2023-06-06 北京透彻未来科技有限公司 Gastric mucosa inflammation typing auxiliary diagnosis system based on deep learning

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116230208A (en) * 2023-02-15 2023-06-06 北京透彻未来科技有限公司 Gastric mucosa inflammation typing auxiliary diagnosis system based on deep learning
CN116230208B (en) * 2023-02-15 2023-09-19 北京透彻未来科技有限公司 Gastric mucosa inflammation typing auxiliary diagnosis system based on deep learning

Similar Documents

Publication Publication Date Title
CN112635063B (en) Comprehensive lung cancer prognosis prediction model, construction method and device
CN109086799A (en) A kind of crop leaf disease recognition method based on improvement convolutional neural networks model AlexNet
EP1739580B1 (en) Categorization including dependencies between different category systems
CN109993236A (en) Few sample language of the Manchus matching process based on one-shot Siamese convolutional neural networks
CN108629772A (en) Image processing method and device, computer equipment and computer storage media
CN113378791B (en) Cervical cell classification method based on double-attention mechanism and multi-scale feature fusion
CN116564409A (en) Machine learning-based identification method for sequencing data of transcriptome of metastatic breast cancer
CN118312816A (en) Cluster weighted clustering integrated medical data processing method and system based on member selection
CN114529749A (en) Pathological image classification device and method and use method of device
CN110472659A (en) Data processing method, device, computer readable storage medium and computer equipment
CN117371511A (en) Training method, device, equipment and storage medium for image classification model
CN108509840A (en) The hyperspectral remote sensing image band selection method of Optimization Mechanism is remembered based on quantum
Maiti et al. Detection of skin cancer using neural architecture search with model quantization
CN110942808A (en) Prognosis prediction method and prediction system based on gene big data
CN116129185A (en) Fuzzy classification method for tongue-like greasy feature of traditional Chinese medicine based on collaborative updating of data and model
CN113838519B (en) Gene selection method and system based on adaptive gene interaction regularization elastic network model
CN113610350B (en) Complex working condition fault diagnosis method, equipment, storage medium and device
CN115881232A (en) ScRNA-seq cell type annotation method based on graph neural network and feature fusion
CN115661498A (en) Self-optimization single cell clustering method
CN115620913A (en) Graph convolution network-based tumor recurrence prediction method after liver transplantation
CN115762796A (en) Target model acquisition method, prognosis evaluation value determination method, device, equipment and medium
CN114999661A (en) Construction method of skin cancer identification model, skin cancer identification device and electronic equipment
CN114139588A (en) Depth feature fusion-based pathological image classification device and method and use method of device
CN114708347A (en) Lung nodule CT image classification method based on self-adaptive selection dual-source-domain heterogeneous migration learning
CN109493929B (en) Low redundancy feature selection method based on grouping variables

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