Pathology image automatic segmentation system based on deep learning
1. A pathology image automatic segmentation system based on deep learning is characterized in that:
the image acquisition module is used for acquiring a plurality of pathological images;
the image segmentation module is connected with the image acquisition module and is used for uniformly dividing a plurality of pathological images into a plurality of segmentation images;
the image labeling module is connected with the image segmentation module and used for dividing the segmented image into a plurality of regions according to a preset clustering algorithm and marking each region according to a label in each region to obtain a plurality of label images;
the model training module is respectively connected with the image segmentation module and the image labeling module and is used for training the segmentation image and the label image as input and the corresponding real segmentation image as output to obtain a deep learning segmentation network model;
the prediction module is connected with the model training module and used for inputting the segmentation images to be segmented and the label images into the deep learning segmentation network model to obtain prediction segmentation images;
and the model training module is used for processing the real segmentation images and the corresponding prediction segmentation images to obtain a prediction accuracy rate and carrying out parameter optimization adjustment on the deep learning segmentation network model according to the prediction accuracy rate.
2. The automatic pathological image segmentation system according to claim 1, further comprising a preprocessing module, wherein the preprocessing module is respectively connected to the image acquisition module and the image segmentation module, and is configured to perform filtering processing on the pathological image by using a preset filtering algorithm, obtain the filtered pathological image, and output the filtered pathological image to the image segmentation module.
3. The pathological image automatic segmentation system according to claim 2, characterized in that: the preset filtering algorithm comprises the following steps:
median filtering, and/or arithmetic mean filtering, and/or first-order lag filtering, and/or weighted recursive mean filtering.
4. The pathological image automatic segmentation system according to claim 1, characterized in that: the model training module comprises:
the set unit is used for taking the plurality of segmentation images and the plurality of corresponding label images as a data set, selecting part of the segmentation images and the corresponding label images in the data set to form a training set, and selecting part of the segmentation images and the corresponding label images in the data set to form a verification set;
the training unit is connected with the set unit and used for training a plurality of segmentation images in the training set and the corresponding label images to obtain a deep learning initial segmentation model by taking the real segmentation images as output;
and the verification unit is respectively connected with the collection unit and the training unit and is used for carrying out parameter optimization adjustment on the deep learning initial segmentation model according to the verification set to obtain the deep learning segmentation network model.
5. The pathological image automatic segmentation system according to claim 4, wherein the model training module further comprises a testing unit, the testing unit is respectively connected to the aggregation unit and the verification unit, and the testing unit comprises:
the set subunit is used for selecting part of the segmentation images in the data set and the corresponding label images to form a test set;
the segmentation subunit is connected with the set subunit and is used for inputting a plurality of segmentation images in a test set and the corresponding label images into the deep learning segmentation network model to obtain corresponding prediction segmentation images;
and the prediction subunit is connected with the segmentation subunit and is used for processing the real segmentation images and the corresponding prediction segmentation images to obtain the prediction accuracy, and performing parameter optimization adjustment on the deep learning segmentation network model when the preset accuracy is not greater than a preset threshold until the preset accuracy is greater than the preset threshold.
6. The automated pathological image segmentation system according to claim 5, wherein the training set, the validation set, and the test set form the data set according to a preset ratio, and the preset ratio is 6:2: 2.
7. The pathological image automatic segmentation system according to claim 1, wherein the preset clustering algorithm comprises:
a K-means algorithm, a K-means algorithm or a CLARANS algorithm.
Background
Deep Learning (DL) is a new research direction in the field of Machine Learning (ML), which is introduced into Machine Learning to make it closer to the original target, Artificial Intelligence (AI).
Deep learning is the intrinsic law and expression level of the learning sample data, and the information obtained in the learning process is very helpful for the interpretation of data such as characters, images and sounds. The final aim of the method is to enable the machine to have the analysis and learning capability like a human, and to recognize data such as characters, images and sounds. Deep learning is a complex machine learning algorithm, and achieves the effect in speech and image recognition far exceeding the prior related art.
Deep learning has achieved many achievements in search technology, data mining, machine learning, machine translation, natural language processing, multimedia learning, speech, recommendation and personalization technologies, and other related fields. The deep learning enables the machine to imitate human activities such as audio-visual and thinking, solves a plurality of complex pattern recognition problems, and makes great progress on the artificial intelligence related technology.
Image segmentation is a technique and process for dividing an image into several specific regions with unique properties and extracting an object of interest. It is a key step from image processing to image analysis. The existing image segmentation methods mainly include the following categories: a threshold-based segmentation method, a region-based segmentation method, an edge-based segmentation method, a particular theory-based segmentation method, and the like. From a mathematical point of view, image segmentation is the process of dividing a digital image into mutually disjoint regions. The process of image segmentation is also a labeling process, i.e. pixels belonging to the same region are assigned the same number.
The image tags are widely applied to a plurality of industries of the Internet, are used for converting visual information of images into semantic information, and are used for better understanding and analyzing the images by allocating correct and appropriate tags to the images.
At present, most of the existing technical schemes adopt a manual labeling mode to label images to be segmented, but the manual labeling has high requirements on labeling personnel, and the labeling personnel need to have enough prior knowledge, so that the difficulty of manual labeling is high, and the cost is too high. Meanwhile, the prior technical scheme has lower precision of image segmentation and larger error, and is not beneficial to the development of clinical medicine.
Disclosure of Invention
The invention aims to provide a pathological image automatic segmentation system based on deep learning, which realizes unsupervised pathological image segmentation, improves the image segmentation precision and reduces the segmentation error.
In order to achieve the above purpose, the basic scheme of the invention is as follows:
the image acquisition module is used for acquiring a plurality of pathological images;
the image segmentation module is connected with the image acquisition module and is used for uniformly dividing a plurality of pathological images into a plurality of segmentation images;
the image labeling module is connected with the image segmentation module and used for dividing the segmented image into a plurality of regions according to a preset clustering algorithm and marking each region according to a label in each region to obtain a plurality of label images;
the model training module is respectively connected with the image segmentation module and the image labeling module and is used for training the segmentation image and the label image as input and the corresponding real segmentation image as output to obtain a deep learning segmentation network model;
the prediction module is connected with the model training module and used for inputting the segmentation images to be segmented and the label images into the deep learning segmentation network model to obtain prediction segmentation images;
and the model training module is used for processing the real segmentation images and the corresponding prediction segmentation images to obtain a prediction accuracy rate and carrying out parameter optimization adjustment on the deep learning segmentation network model according to the prediction accuracy rate.
The automatic pathological image segmentation system further comprises a preprocessing module, wherein the preprocessing module is respectively connected with the image acquisition module and the image segmentation module and is used for filtering the pathological image by adopting a preset filtering algorithm to obtain the filtered pathological image and outputting the filtered pathological image to the image segmentation module.
Further, the preset filtering algorithm includes:
median filtering, and/or arithmetic mean filtering, and/or first-order lag filtering, and/or weighted recursive mean filtering.
Further, the model training module comprises:
the set unit is used for taking the plurality of segmentation images and the plurality of corresponding label images as a data set, selecting part of the segmentation images and the corresponding label images in the data set to form a training set, and selecting part of the segmentation images and the corresponding label images in the data set to form a verification set;
the training unit is connected with the set unit and used for training a plurality of segmentation images in the training set and the corresponding label images to obtain a deep learning initial segmentation model by taking the real segmentation images as output;
and the verification unit is respectively connected with the collection unit and the training unit and is used for carrying out parameter optimization adjustment on the deep learning initial segmentation model according to the verification set to obtain the deep learning segmentation network model.
Further, the model training module further includes a testing unit, the testing unit is respectively connected to the aggregation unit and the verification unit, and the testing unit includes:
the set subunit is used for selecting part of the segmentation images in the data set and the corresponding label images to form a test set;
the segmentation subunit is connected with the set subunit and is used for inputting the plurality of segmentation images and the plurality of label images in the test set into the deep learning segmentation network model to obtain corresponding prediction segmentation images;
and the prediction subunit is connected with the segmentation subunit and is used for processing the real segmentation images and the corresponding prediction segmentation images to obtain the prediction accuracy, and performing parameter optimization adjustment on the deep learning segmentation network model when the preset accuracy is not greater than a preset threshold until the preset accuracy is greater than the preset threshold.
Further, the training set, the verification set and the test set form the data set according to a preset proportion, and the preset proportion is 6:2: 2.
Further, the preset clustering algorithm includes:
a K-means algorithm, a K-means algorithm or a CLARANS algorithm.
Compared with the prior art, the scheme has the beneficial effects that:
according to the technical scheme, the clustering algorithm is used for integrating the segmentation images to obtain the label images, unsupervised pathological image segmentation is realized, high-difficulty manual labeling is avoided, and the cost of manual labeling is avoided; meanwhile, the segmentation image to be segmented and the label image are input into the deep learning network model to obtain a prediction segmentation image which is used as a reference basis of clinical medicine by a clinician, so that the pathological image segmentation efficiency is effectively improved; according to the technical scheme, the deep learning segmentation network model is adjusted according to the comparison result of the prediction accuracy and the preset threshold, so that the image segmentation precision is improved, and the segmentation error is reduced.
Drawings
Fig. 1 is a schematic structural diagram of an automatic pathological image segmentation system according to the present invention.
Detailed Description
The invention will be described in further detail by means of specific embodiments with reference to the accompanying drawings:
the invention relates to a pathological image automatic segmentation system based on deep learning, as shown in figure 1, comprising:
the image acquisition module 1 is used for acquiring a plurality of pathological images;
the image segmentation module 2 is connected with the image acquisition module 1 and is used for uniformly dividing a plurality of pathological images into a plurality of segmentation images;
the image labeling module 3 is connected with the image segmentation module 2 and is used for dividing the segmented image into a plurality of regions according to a preset clustering algorithm and marking each region according to a label in each region to obtain a plurality of label images;
the model training module 4 is respectively connected with the image segmentation module 2 and the image labeling module 3 and is used for training a segmentation image and a label image as input and a corresponding real segmentation image as output to obtain a deep learning segmentation network model;
the prediction module 5 is connected with the model training module 4 and used for inputting the segmentation images to be segmented and the label images into the deep learning segmentation network model to obtain prediction segmentation images;
the model training module 4 processes the real segmentation images and the corresponding prediction segmentation images to obtain a prediction accuracy, and performs parameter optimization adjustment on the deep learning segmentation network model according to the prediction accuracy.
Specifically, in this embodiment, the image capturing module 1 may be a common camera cooperating with a scanner, a video camera cooperating with an image capturing card, a microscopic digital camera, or a scanner. Several pathological images are acquired as raw data by the image acquisition module 1.
According to the technical scheme, the pathological image is firstly segmented into a plurality of segmented images through the image segmentation module 2, so that the further processing is facilitated. The image labeling module 3 divides the segmented image into a plurality of regions according to a clustering algorithm, and then labels each region according to the label in each region, so as to obtain a label image, and professional labeling personnel are not required to perform manual labeling, so that the high difficulty of manual labeling is avoided, the cost of manual labeling is avoided, and unsupervised performance is realized. Wherein, the preset clustering algorithm used in the technical scheme comprises: a K-means algorithm, a K-means algorithm or a CLARANS algorithm. The model training module 4 takes the input of the segmentation image and the label image as input, takes the corresponding real segmentation image of the segmentation image as output, and trains to obtain the deep learning network model. The prediction module 5 inputs the segmentation image to be segmented and the label image into the deep learning network model to obtain a prediction segmentation image which is used as a reference basis of clinical medicine by a clinician, so that the efficiency and the accuracy of pathological image segmentation are effectively improved.
In a preferred embodiment of the present invention, the automatic pathological image segmentation system further includes a preprocessing module 6, and the preprocessing module 6 is respectively connected to the image acquisition module 1 and the image segmentation module 2, and is configured to perform filtering processing on the pathological image by using a preset filtering algorithm, obtain a filtered pathological image, and output the filtered pathological image to the image segmentation module 2.
Specifically, in this embodiment, the preprocessing module 6 is arranged to perform filtering processing on the pathology images acquired by the image acquisition module 1 by using a preset filtering algorithm, so as to filter some invalid pathology images, reduce the system load, improve the processing efficiency of the technical scheme, and improve the accuracy of segmentation of the pathology images. Wherein, the preset filtering algorithm comprises:
median filtering, and/or arithmetic mean filtering, and/or first-order lag filtering, and/or weighted recursive mean filtering.
In a preferred embodiment of the present invention, the model training module 4 comprises:
the collecting unit 41 is configured to use the plurality of segmented images and the plurality of corresponding label images as a data set, select a part of the segmented images and the corresponding label images in the data set to form a training set, and select a part of the segmented images and the corresponding label images in the data set to form a verification set;
the training unit 42 is connected with the aggregation unit 41 and is used for taking a plurality of segmentation images and a plurality of label images in a training set as input, taking a real segmentation image as output and training to obtain a deep learning initial segmentation model;
and the verification unit 43 is respectively connected with the aggregation unit 41 and the training unit 42, and is used for performing parameter optimization adjustment on the deep learning initial segmentation model according to the verification set to obtain a deep learning segmentation network model.
Specifically, in the present embodiment, the aggregation unit 41 is provided to input the cut image and the label image into the data set, thereby aggregating the data. The deep learning initial network model is trained by the training unit 42 according to the segmentation images, the label images and the corresponding real segmentation images in the training set. And then, the verification unit 43 performs parameter optimization adjustment on the deep learning initial segmentation model by using the segmentation images, the label images and the corresponding real segmentation images in the verification set, so that the verification accuracy of the deep learning initial segmentation model is gradually improved, and the deep learning initial segmentation model is output as a deep learning segmentation network model until the verification accuracy is greater than a preset verification threshold.
In the preferred embodiment of the present invention, the model training module 4 further includes a testing unit 44, the testing unit 44 is respectively connected to the aggregation unit and the verification unit 43, the testing unit 44 includes:
the set subunit 441 is configured to select a part of the segmented images in the data set and corresponding label images to form a test set;
the segmentation subunit 442, connected to the set subunit 441, is configured to input the multiple segmented images and the multiple label images in the test set to the deep learning segmentation network model, so as to obtain corresponding predicted segmented images;
the predicting sub-unit 443, connected to the segmenting sub-unit 442, is configured to obtain a prediction accuracy according to the plurality of real segmented images and the plurality of corresponding prediction segmented images, and perform parameter optimization adjustment on the deep learning segmentation network model when the preset accuracy is not greater than a preset threshold until the preset accuracy is greater than the preset threshold.
Specifically, in this embodiment, when the true segmented image and the corresponding plurality of predicted segmented images are consistent, the prediction accuracy is 1, and when the true segmented image and the corresponding plurality of predicted segmented images are inconsistent, the prediction accuracy is 0. By arranging the prediction subunit 443, the prediction accuracy of the deep learning segmentation network model is limited, and when the prediction accuracy is lower than a preset threshold, parameter optimization adjustment needs to be performed on the deep learning segmentation network model, so that the prediction accuracy is ensured, high accuracy of image segmentation is ensured, and segmentation errors are effectively reduced.
Further, the training set, the verification set and the test set form a data set according to a preset proportion, and the preset proportion is 6:2: 2.
The foregoing is merely an example of the present invention and common general knowledge of known specific structures and features of the embodiments is not described herein in any greater detail. It should be noted that, for those skilled in the art, without departing from the structure of the present invention, several changes and modifications can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicability of the patent. The scope of the claims of the present application shall be determined by the contents of the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims.