CN109300530B - Pathological picture recognition method and device - Google Patents

Pathological picture recognition method and device Download PDF

Info

Publication number
CN109300530B
CN109300530B CN201810896157.5A CN201810896157A CN109300530B CN 109300530 B CN109300530 B CN 109300530B CN 201810896157 A CN201810896157 A CN 201810896157A CN 109300530 B CN109300530 B CN 109300530B
Authority
CN
China
Prior art keywords
neural network
pathological
deep neural
training
different types
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810896157.5A
Other languages
Chinese (zh)
Other versions
CN109300530A (en
Inventor
孙宇
季加孚
王鑫宇
李元骏
李子禹
吴晓江
步召德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Imprint Information Technology (beijing) Co Ltd
BEIJING TUMOUR HOSPITAL
Original Assignee
Imprint Information Technology (beijing) Co Ltd
BEIJING TUMOUR HOSPITAL
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 Imprint Information Technology (beijing) Co Ltd, BEIJING TUMOUR HOSPITAL filed Critical Imprint Information Technology (beijing) Co Ltd
Priority to CN201810896157.5A priority Critical patent/CN109300530B/en
Publication of CN109300530A publication Critical patent/CN109300530A/en
Application granted granted Critical
Publication of CN109300530B publication Critical patent/CN109300530B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Biomedical Technology (AREA)
  • Radiology & Medical Imaging (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a pathological picture identification method and a pathological picture identification device, wherein the method comprises the following steps: acquiring a pathological picture to be identified; inputting the pathological picture to be recognized into a plurality of different types of deep neural network models generated by pre-training, recognizing the pathological picture to be recognized, and obtaining a preliminary recognition result by each type of deep neural network model; the method comprises the following steps that a plurality of deep neural network models of different types are generated according to pre-training of a plurality of pathological image samples; and fusing the primary recognition results obtained by the deep neural network models of different types to obtain the final recognition result of the pathological picture to be recognized. According to the technical scheme, the efficiency and the accuracy of pathological picture identification are improved.

Description

病理图片的识别方法及装置Pathological picture recognition method and device

技术领域technical field

本发明涉及医疗技术领域,尤其涉及病理图片的识别方法及装置。The present invention relates to the field of medical technology, and in particular, to a method and device for identifying pathological pictures.

背景技术Background technique

淋巴结转移是肿瘤最常见的转移方式。进展期胃癌的根治性切除手术包括彻底切除胃癌原发病灶,转移淋巴结及受侵的组织、脏器。胃癌术后的病理诊断是胃癌诊断的金标准,为病人的分期和治疗提供重要依据。而病理诊断中淋巴结是否转移的评估更是诊断中的关键,需要病理医生对每个淋巴结进行逐一认真、仔细观察,整个过程不但耗时耗力,依赖经验,准确率不太理想,而且不同经验的医生对同一病理图片可能存在不同识别结论的风险。Lymph node metastasis is the most common way of tumor metastasis. Radical resection of advanced gastric cancer includes complete resection of the primary tumor of gastric cancer, metastatic lymph nodes, and invaded tissues and organs. Postoperative pathological diagnosis of gastric cancer is the gold standard for the diagnosis of gastric cancer and provides an important basis for the staging and treatment of patients. In the pathological diagnosis, the evaluation of whether lymph node metastasis is the key to the diagnosis. Pathologists need to carefully and carefully observe each lymph node one by one. The whole process is not only time-consuming and labor-intensive, but also depends on experience. The accuracy rate is not ideal, and different experience There is a risk that the same pathological picture may have different identification conclusions by doctors.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种病理图片的识别方法,用以提高病理图片识别的效率和准确率,该方法包括:An embodiment of the present invention provides a method for identifying a pathological picture to improve the efficiency and accuracy of identifying a pathological picture, and the method includes:

获取待识别病理图片;Obtain pathological pictures to be identified;

将待识别病理图片输入预先训练生成的多个不同类型的深度神经网络模型,对待识别病理图片进行识别,每一类型的深度神经网络模型得到一初步识别结果;所述多个不同类型的深度神经网络模型根据多个病理图片样本预先训练生成;Input the pathological picture to be identified into multiple different types of deep neural network models generated by pre-training, identify the pathological picture to be identified, and obtain a preliminary identification result for each type of deep neural network model; the multiple different types of deep neural network models The network model is pre-trained and generated according to multiple pathological image samples;

对多个不同类型的深度神经网络模型得到的初步识别结果进行融合,得到所述待识别病理图片的最终识别结果。The preliminary identification results obtained by a plurality of different types of deep neural network models are fused to obtain the final identification result of the pathological picture to be identified.

本发明实施例还提供一种病理图片的识别装置,用以提高病理图片识别的效率和准确率,该装置包括:The embodiment of the present invention also provides a pathological picture recognition device to improve the efficiency and accuracy of pathological picture recognition, the device includes:

获取单元,用于获取待识别病理图片;an acquisition unit for acquiring pathological pictures to be identified;

识别单元,用于将待识别病理图片输入预先训练生成的多个不同类型的深度神经网络模型,对待识别病理图片进行识别,每一类型的深度神经网络模型得到一初步识别结果;所述多个不同类型的深度神经网络模型根据多个病理图片样本预先训练生成;The identification unit is used to input the pathological pictures to be identified into multiple different types of deep neural network models generated by pre-training, identify the pathological pictures to be identified, and obtain a preliminary identification result for each type of deep neural network model; Different types of deep neural network models are pre-trained and generated based on multiple pathological image samples;

融合单元,用于对多个不同类型的深度神经网络模型得到的初步识别结果进行融合,得到所述待识别病理图片的最终识别结果。The fusion unit is used to fuse the preliminary recognition results obtained by a plurality of different types of deep neural network models to obtain the final recognition result of the pathological picture to be recognized.

本发明实施例还提供一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述病理图片的识别方法。An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the above pathological picture recognition method when the processor executes the computer program.

本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有执行上述病理图片的识别方法的计算机程序。An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for executing the above method for identifying a pathological picture.

本发明实施例提供的技术方案,先获取待识别病理图片,再将待识别病理图片输入预先训练生成的多个不同类型的深度神经网络模型,对待识别病理图片进行识别,每一类型的深度神经网络模型得到一初步识别结果;该多个不同类型的深度神经网络模型根据多个病理图片样本预先训练生成;最后,对多个不同类型的深度神经网络模型得到的初步识别结果进行融合,得到所述待识别病理图片的最终识别结果,由于训练好的深度神经网络模型具有病理图片自动识别功能,将病理图片输入该深度神经网络模型,即可识别出病理图片上可能有恶性病变的区域,实现对病理图片的良恶性分类,整个过程省时、省力,不但提高了病理图片识别的效率,而且不依赖于医生的个人经验,最终识别结果为对多个不同类型的深度神经网络模型得到的初步识别结果融合得到,大大提高了病理图片识别的准确率。The technical solution provided by the embodiment of the present invention is to first obtain the pathological picture to be identified, and then input the to-be-identified pathological picture into a plurality of different types of deep neural network models generated by pre-training, and identify the to-be-identified pathological picture. The network model obtains a preliminary identification result; the multiple different types of deep neural network models are pre-trained and generated according to multiple pathological image samples; finally, the preliminary identification results obtained by the multiple different types of deep neural network models are fused to obtain the The final recognition result of the pathological image to be recognized is described. Since the trained deep neural network model has the function of automatic recognition of pathological images, the pathological image can be input into the deep neural network model, and the area that may have malignant lesions on the pathological image can be identified. For the classification of benign and malignant pathological pictures, the whole process saves time and effort, which not only improves the efficiency of pathological picture recognition, but also does not depend on the personal experience of doctors. The recognition results are obtained by fusion, which greatly improves the accuracy of pathological image recognition.

本发明实施例提供的技术方案不仅可以应用于胃淋巴结癌转移病理图片的识别,还可以应用于其它癌症病理图片的识别。The technical solutions provided by the embodiments of the present invention can be applied not only to the identification of pathological pictures of gastric lymph node cancer metastasis, but also to the identification of pathological pictures of other cancers.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts. In the attached image:

图1为本发明实施例中病理图片的识别方法的流程示意图;1 is a schematic flowchart of a method for identifying a pathological picture in an embodiment of the present invention;

图2为本发明实施例中病理图片的识别方法的一具体示例图;2 is a specific example diagram of a method for identifying a pathological picture in an embodiment of the present invention;

图3为本发明实施例中多GPU并行训练原理示意图;3 is a schematic diagram of a multi-GPU parallel training principle in an embodiment of the present invention;

图4为本发明实施例中病理图片的识别装置的示意图。FIG. 4 is a schematic diagram of an apparatus for recognizing a pathological picture in an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚明白,下面结合附图对本发明实施例做进一步详细说明。在此,本发明的示意性实施例及其说明用于解释本发明,但并不作为对本发明的限定。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention more clearly understood, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but not to limit the present invention.

在介绍本发明实施例之前,首先对本发明涉及的专业术语进行介绍。Before introducing the embodiments of the present invention, the technical terms involved in the present invention are first introduced.

1、假阳性率:false positive rate,实际为阴性、模型预测为阳性的样本个数在所有阴性样本中的比例。1. False positive rate: false positive rate, the ratio of the number of samples that are actually negative and predicted by the model to be positive among all negative samples.

2、假阴性率:false negative rate,实际为阳性、模型预测为阴性的样本个数在所有阳性样本中的比例。2. False negative rate: false negative rate, the ratio of the number of samples that are actually positive and predicted by the model to be negative among all positive samples.

3、准确率:Accuracy=(预测正确的样本数)/(总样本数)。3. Accuracy rate: Accuracy=(number of correct predicted samples)/(total number of samples).

4、训练集:输入给模型训练的带有标注癌细胞区域(病变区域)的胃淋巴结癌转移数字病理图像。4. Training set: digital pathological images of gastric lymph node cancer metastasis with annotated cancer cell areas (lesion areas) input to the model training.

5、测试集:未输入给模型训练的带有标注癌细胞区域(病变区域)的胃淋巴结癌转移数字病理图像。5. Test set: digital pathological images of gastric lymph node cancer metastasis with annotated cancer cell areas (lesion areas) that are not input to model training.

6、验证集:不带有标注癌细胞区域(病变区域)的胃淋巴结癌转移数字病理图像6. Validation set: digital pathological images of gastric lymph node cancer metastasis without annotated cancer cell area (lesion area)

7、迁移学习(Transfer learning):7. Transfer learning:

把已训练好的模型参数迁移到新的模型,来加快新模型训练。Transfer the trained model parameters to the new model to speed up the new model training.

8、scn文件:一种医疗图片存储格式,读取时需要特殊处理。8. scn file: a medical image storage format, which requires special processing when reading.

9、Top5错误率:imagenet图像通常有1000个可能的类别,对每幅图像可以同时预测5个类别标签,当其中有任何一次预测对了,结果都算对,当5次全都错了的时候,才算预测错误,这时候的分类错误率就叫top5错误率。9. Top5 error rate: imagenet images usually have 1000 possible categories. For each image, 5 category labels can be predicted at the same time. When any one of the predictions is correct, the result is correct. When all 5 are wrong. , it is the prediction error, and the classification error rate at this time is called the top5 error rate.

10、HE染色:苏木精-伊红染色法(hematoxylin-eosin staining),苏木精染液为碱性,主要使细胞核内的染色质与胞质内的核酸着紫蓝色;伊红为酸性染料,主要使细胞质和细胞外基质中的成分着红色。10. HE staining: hematoxylin-eosin staining, the hematoxylin staining solution is alkaline, which mainly makes the chromatin in the nucleus and the nucleic acid in the cytoplasm to be purple-blue; eosin is Acid dyes, mainly red color components in the cytoplasm and extracellular matrix.

11、阴性样本:不包含癌细胞的样本,也叫可以做负样本:正常或良性病变病理图片。11. Negative samples: samples that do not contain cancer cells, also called negative samples: pathological pictures of normal or benign lesions.

12、阳性样本:包含癌细胞的样本,也可以叫做正样本:恶性病变病理图片。12. Positive samples: samples containing cancer cells, also known as positive samples: pathological pictures of malignant lesions.

本发明实施例的发明目的是:针对胃癌患者手术清扫的淋巴结的病理切片,根据病理组织切片上淋巴结的各项特征做出有无癌细胞的诊断,如果有癌细胞则显示其位置。The purpose of the present invention is to make a diagnosis of the presence or absence of cancer cells according to the characteristics of the lymph nodes on the pathological tissue slices of the lymph nodes surgically removed from patients with gastric cancer, and to display the location of cancer cells if there are cancer cells.

随着中国60岁及以上人口占总人口的比例不断增加,按照癌症在人口中的发病率测算,患癌症的人口数量将快速增加。这会导致医疗资源更加紧张。在癌症诊断过程中,病理诊断是最终确诊的金标准。传统淋巴结癌转移的诊断,需要病理科医生,在显微镜下反复观察淋巴结,确定淋巴结的个数及各个淋巴结有无癌转移。受限于医生经验和医生疲劳状态,会发生一定概率的误诊和漏诊。本发明准确率在patch级别达到了99.80%,假阳性率在patch级别低于0.06%,有效地辅助医生诊断,降低了医生的误诊率和漏诊率,最终提升患者的就医体验。As the proportion of China's population aged 60 and above to the total population continues to increase, the number of people suffering from cancer will increase rapidly based on the incidence of cancer in the population. This will lead to further strain on medical resources. In the process of cancer diagnosis, pathological diagnosis is the gold standard for final diagnosis. The traditional diagnosis of lymph node cancer metastasis requires a pathologist to observe the lymph nodes repeatedly under a microscope to determine the number of lymph nodes and whether each lymph node has cancer metastasis. Limited by the doctor's experience and the doctor's fatigue state, there will be a certain probability of misdiagnosis and missed diagnosis. The accuracy rate of the invention reaches 99.80% at the patch level, and the false positive rate is lower than 0.06% at the patch level, which effectively assists doctors in diagnosis, reduces the misdiagnosis rate and missed diagnosis rate of doctors, and finally improves the medical treatment experience of patients.

那么接着,对发明人从发现技术问题到提出本发明实施例方案的过程进行介绍。Then, the process of the inventor from discovering the technical problem to proposing the solution according to the embodiment of the present invention will be introduced.

从上世纪70年代至今,机器学习技术不断快速发展,提高了人类的生产效率。在机器学习发展过程中,硬件性能和有效数据量一直制约了机器学习的发展。在2010年前后,硬件性能大幅度提升和大量高质量数据的积累促使机器学习的一个重要组成部分-深度学习,在算法和应用上有了很大的突破。在图像处理上,深度学习模型在分类、检测、分割等任务上都取得了跨越式的进展。在有效数据量较大的情况下,使用适当的深度学习模型对数据建模,其效果往往由于传统机器学习的效果,而且其对不同数据集具有迁移学习的能力,明显降低了传统机器学习中进行特征工程的成本。所以发明人在本发明中主要采用了神经网络模型来对数据进行建模。From the 1970s to the present, machine learning technology has continued to develop rapidly, improving human productivity. In the process of machine learning development, hardware performance and the amount of effective data have always restricted the development of machine learning. Around 2010, the substantial improvement of hardware performance and the accumulation of a large amount of high-quality data prompted an important part of machine learning - deep learning, to make great breakthroughs in algorithms and applications. In image processing, deep learning models have made leaps and bounds in tasks such as classification, detection, and segmentation. In the case of a large amount of effective data, using an appropriate deep learning model to model the data, the effect is often due to the effect of traditional machine learning, and it has the ability to transfer learning to different data sets, which significantly reduces the traditional machine learning. The cost of doing feature engineering. Therefore, the inventor mainly adopts the neural network model to model the data in the present invention.

目前医学数字病理图像的诊断,普遍采用了切patch/训练分类模型/预测的大致流程。在这个过程中,切patch主要采用了256*256,512*512,1024*1024三种规格。分类模型主要采用了在学术数据集ImageNet上Top5准确率效果较好的模型,如Inception模型系列,ResNet模型系列,VGG模型系列。预测时用单一训练好的模型对新数据得到结果。由于ImageNet数据集和数字病理图像在特征提取方面有很多相似之处,所以ImageNet数据集上效果好的模型运用到数字病理图像数据集上也能获得较好的结果。对模型进行训练/测试过程中,现有实现方案不断根据现有数据对模型进行调整已达到更好的效果。At present, the diagnosis of medical digital pathological images generally adopts the general process of patching/training classification model/prediction. In this process, the cut patch mainly adopts three specifications of 256*256, 512*512 and 1024*1024. The classification model mainly adopts the models with better accuracy of Top5 on the academic dataset ImageNet, such as the Inception model series, the ResNet model series, and the VGG model series. Use a single trained model to get results on new data when making predictions. Since the ImageNet dataset and digital pathology images have many similarities in feature extraction, the model that works well on the ImageNet dataset can also achieve better results when applied to the digital pathology image dataset. During the training/testing process of the model, the existing implementation scheme continuously adjusts the model according to the existing data to achieve better results.

然而,发明人发现现有方案存在如下技术问题,并针对发现的技术问题提出了相应的解决方案:However, the inventor found that the existing solutions have the following technical problems, and proposed corresponding solutions for the discovered technical problems:

A.在确定所使用的模型时,受代码实现限制和硬件限制,只挑选1个深度模型进行训练和测试。限于同一深度模型的表达能力,模型片面的优化了某一性能指标而使另外一些性能指标偏低。由于发明人考虑到了这个技术问题,提出的技术方案是:首先选择了6个模型进行训练,分析其特点,然后使用3个模型的结果综合处理得到最终结果,在patch级别上,把假阳性控制在0.06%的同时,保证假阴性率在0.3%以下,总体准确率在99.8%以上。A. When determining the model to be used, due to the limitations of code implementation and hardware, only one deep model is selected for training and testing. Limited to the expressive ability of the same depth model, the model unilaterally optimizes a certain performance index while making other performance indicators low. Since the inventor has considered this technical problem, the technical solution proposed is: firstly select 6 models for training, analyze their characteristics, and then use the results of the 3 models to comprehensively process to obtain the final result, at the patch level, control false positives While 0.06%, the false negative rate is guaranteed to be below 0.3%, and the overall accuracy rate is above 99.8%.

B.在进行模型训练时,使用单GPU的训练速度较慢,没有充分利用多GPU的并行计算优势。由于发明人考虑到了这个技术问题,提出了使用多GPU进行训练,在同样训练数据量的情况下,减少了模型训练时间,使训练阶段模型调试的时间缩短,节省了开发人员的时间。B. During model training, the training speed of using a single GPU is slow, and the parallel computing advantages of multiple GPUs are not fully utilized. Considering this technical problem, the inventor proposes to use multiple GPUs for training. With the same amount of training data, the model training time is reduced, the model debugging time in the training phase is shortened, and the developer's time is saved.

C.模型预测改进阶段,现有的实现方案中,从已有数据中挖掘更多信息以改进模型。如果遇到模型没处理过的癌细胞类别,则模型无法识别,模型迭代的方向不贴和病理诊断实际。由于发明人考虑到了这个技术问题,提出了技术方案:通过不断结合医学专业知识,补充模型没处理过的数字病理图片,使模型能识别更多的癌细胞形态,有效降低漏检率,迭代模型的方向更符合病理图片的识别需要,也可以说是病理诊断实际需求。C. Model prediction improvement stage. In the existing implementation scheme, more information is mined from the existing data to improve the model. If it encounters a cancer cell category that the model has not processed, the model cannot recognize it, and the direction of the model iteration is not consistent with the actual pathological diagnosis. Considering this technical problem, the inventor proposed a technical solution: by continuously combining medical professional knowledge, supplementing the digital pathological pictures that the model has not processed, so that the model can identify more cancer cell forms, effectively reduce the missed detection rate, and iterate the model. The direction is more in line with the identification needs of pathological pictures, which can also be said to be the actual needs of pathological diagnosis.

发明人提出的方案涉及基于深度学习分类模型(深度神经网络模型)的癌细胞检测。按照流程该方法可以包括:1.从数字病理scn格式文件中获取阳性patch样本(正样本)和阴性patch样本(负样本);2.综合分析阴性和阳性patch样本的情况,选择6种合适的深度学习分类模型,充分利用不同模型的优势;3.用训练集数据对上述确定的6种深度神经网络模型在多GPU环境下进行训练,使各个模型具备预测数字病理图像中各个淋巴结上patch良恶性的能力;4.用测试集对各个模型性能进行详细的测试,测试各个模型的性能,包括,假阳性率,假阴性率,准确率;5.根据各个模型的性能表现综合优选3个模型,融合3个模型在验证集上的结果以提高准确率、降低假阳性率、假阴性率的目的。6.分析最终预测结果,充分结合医生的专业知识,补充新的训练数据,针对性的迭代模型,进一步提高识别准确率。下面对该病理图片的识别方案进行详细介绍如下。The solution proposed by the inventor involves cancer cell detection based on a deep learning classification model (deep neural network model). According to the process, the method may include: 1. Obtaining positive patch samples (positive samples) and negative patch samples (negative samples) from digital pathology scn format files; 2. Comprehensively analyzing the conditions of negative and positive patch samples, and selecting 6 suitable patch samples The deep learning classification model makes full use of the advantages of different models; 3. Use the training set data to train the six deep neural network models determined above in a multi-GPU environment, so that each model has the ability to predict the best patches on each lymph node in the digital pathological image. Malignant ability; 4. Use the test set to test the performance of each model in detail, and test the performance of each model, including false positive rate, false negative rate, and accuracy rate; 5. According to the performance of each model, 3 models are comprehensively selected , fuse the results of the three models on the validation set to improve the accuracy and reduce the false positive rate and false negative rate. 6. Analyze the final prediction results, fully combine the professional knowledge of doctors, supplement new training data, and target iterative models to further improve the recognition accuracy. The identification scheme of the pathological picture is described in detail as follows.

图1为本发明实施例中病理图片的识别方法的流程示意图,如图1所示,该方法包括如下步骤:FIG. 1 is a schematic flowchart of a method for identifying a pathological picture in an embodiment of the present invention. As shown in FIG. 1 , the method includes the following steps:

步骤101:获取待识别病理图片;Step 101: Obtain the pathological picture to be identified;

步骤102:将待识别病理图片输入预先训练生成的多个不同类型的深度神经网络模型,对待识别病理图片进行识别,每一类型的深度神经网络模型得到一初步识别结果;该多个不同类型的深度神经网络模型根据多个病理图片样本预先训练生成;Step 102: Input the pathological picture to be identified into a plurality of different types of deep neural network models generated by pre-training, identify the pathological picture to be identified, and obtain a preliminary identification result for each type of deep neural network model; The deep neural network model is pre-trained and generated according to multiple pathological image samples;

步骤103:对多个不同类型的深度神经网络模型得到的初步识别结果进行融合,得到待识别病理图片的最终识别结果。Step 103: Fusion of preliminary identification results obtained by multiple different types of deep neural network models to obtain a final identification result of the pathological picture to be identified.

本发明实施例提供的技术方案,先获取待识别病理图片,再将待识别病理图片输入预先训练生成的多个不同类型的深度神经网络模型,对待识别病理图片进行识别,每一类型的深度神经网络模型得到一初步识别结果;该多个不同类型的深度神经网络模型根据多个病理图片样本预先训练生成;最后,对多个不同类型的深度神经网络模型得到的初步识别结果进行融合,得到所述待识别病理图片的最终识别结果,由于训练好的深度神经网络模型具有病理图片自动识别功能,将病理图片输入该深度神经网络模型,即可识别出病理图片上可能有恶性病变的区域,实现对病理图片的良恶性分类,整个过程省时、省力,不但提高了病理图片识别的效率,而且不依赖于医生的个人经验,最终识别结果为对多个不同类型的深度神经网络模型得到的初步识别结果融合得到,大大提高了病理图片识别的准确率。The technical solution provided by the embodiment of the present invention is to first obtain the pathological picture to be identified, and then input the to-be-identified pathological picture into a plurality of different types of deep neural network models generated by pre-training, and identify the to-be-identified pathological picture. The network model obtains a preliminary identification result; the multiple different types of deep neural network models are pre-trained and generated according to multiple pathological image samples; finally, the preliminary identification results obtained by the multiple different types of deep neural network models are fused to obtain the The final recognition result of the pathological image to be recognized is described. Since the trained deep neural network model has the function of automatic recognition of pathological images, the pathological image can be input into the deep neural network model, and the area that may have malignant lesions on the pathological image can be identified. For the classification of benign and malignant pathological pictures, the whole process saves time and effort, which not only improves the efficiency of pathological picture recognition, but also does not depend on the personal experience of doctors. The recognition results are obtained by fusion, which greatly improves the accuracy of pathological image recognition.

下面结合附图2,针对本发明实施例中病理图片的识别方法的各个步骤进行详细介绍如下。Hereinafter, with reference to FIG. 2 , each step of the method for identifying a pathological picture in the embodiment of the present invention will be described in detail as follows.

第一,介绍预先训练生成多个不同类型的深度神经网络模型的过程。First, the process of pre-training to generate multiple different types of deep neural network models is introduced.

在一实施例中,按照如下方法预先训练生成所述多个不同类型的深度神经网络模型:In one embodiment, the multiple different types of deep neural network models are pre-trained and generated according to the following method:

获得样本数据,所述样本数据包括正样本和负样本,所述正样本为恶性病变病理图片,所述负样本为正常或良性病变病理图片,所述恶性病变病理图片上标记出病变区域;Obtaining sample data, the sample data includes positive samples and negative samples, the positive samples are pathological pictures of malignant lesions, the negative samples are pathological pictures of normal or benign lesions, and the lesion area is marked on the pathological pictures of malignant lesions;

将所述样本数据划分为训练集、测试集和验证集;dividing the sample data into a training set, a test set and a validation set;

利用所述训练集对第一集合中的多个不同类型的深度神经网络模型进行训练;Using the training set to train a plurality of different types of deep neural network models in the first set;

利用所述测试集对训练好的第一集合中的多个不同类型的深度神经网络模型进行测试;Use the test set to test multiple different types of deep neural network models in the trained first set;

根据测试结果,从所述第一集合中的多个不同类型的深度神经网络模型中筛选出多个深度神经网络模型作为第二集合;According to the test result, a plurality of deep neural network models are selected from the plurality of different types of deep neural network models in the first set as the second set;

利用所述验证集对第二集合中的多个不同类型的深度神经网络模型进行融合验证,得到所述预先训练生成的多个不同类型的深度神经网络模型。The verification set is used to perform fusion verification on a plurality of different types of deep neural network models in the second set, to obtain a plurality of different types of deep neural network models generated by the pre-training.

具体实施时,首先介绍获取训练数据(样本数据)的过程,胃淋巴结癌转移数字病理图片的存储和标注:In the specific implementation, the process of acquiring training data (sample data), the storage and labeling of digital pathological pictures of gastric lymph node cancer metastasis are introduced first:

根据医学临床上的规范操作,先把胃癌患者的淋巴结组织用HE染色的方式进行染色,做成病理切片。然后利用数字病理扫描仪40倍扫描得到数字病理图片,存储在磁盘介质上,得到scn格式的图片。一张scn图片在磁盘上存储的物理大小范围0.4GB–8GB,像素的数量级为10^9–10^10。由具备良好专业能力的病理科医生使用ImageScope软件对数字病理图片进行标注,把癌症区域勾画出来。勾画的数据保存为特定格式的xml标签文件以便程序读取。According to the standard operation in medical clinic, the lymph node tissue of patients with gastric cancer was first stained with HE staining to make pathological sections. Then use a digital pathology scanner to scan 40 times to obtain a digital pathological picture, store it on a disk medium, and obtain a picture in scn format. The physical size of an scn image stored on disk ranges from 0.4GB to 8GB, with pixels on the order of 10^9–10^10. Pathologists with good professional ability use ImageScope software to annotate digital pathology pictures and delineate cancer areas. The sketched data is saved as an xml tag file in a specific format for the program to read.

其次,介绍获取样本数据之后,对样本数据的预处理过程,获取阳性/阴性patch(正/负样本):Secondly, after the sample data is obtained, the preprocessing process of the sample data is introduced to obtain positive/negative patches (positive/negative samples):

在一个实施例中,在获得样本数据后,进一步按如下方式对所述样本数据进行预处理:In one embodiment, after obtaining the sample data, the sample data is further preprocessed as follows:

对于每一负样本,进行如下预处理:For each negative sample, the following preprocessing is performed:

将正常或良性病变病理图片从RGB颜色格式转化为HSV颜色格式;Convert normal or benign lesions pathological pictures from RGB color format to HSV color format;

将HSV颜色格式的正常或良性病变病理图片的饱和度调整到预设阈值;Adjust the saturation of normal or benign lesions pathological pictures in HSV color format to a preset threshold;

在饱和度调整到预设阈值后的正常或良性病变病理图片的前景细胞区域,提取多个预设像素大小的块patch图片;In the foreground cell area of the normal or benign pathological image after the saturation is adjusted to the preset threshold, extract a plurality of block patch images of preset pixel size;

判断预设像素大小的patch图片中包含的前景所占整张patch图片的第一比例,在所述第一比例小于第一预设比例值时,删除所述预设像素大小的patch图片;Determine the first proportion of the foreground contained in the patch picture with the preset pixel size to the entire patch picture, and delete the patch picture with the preset pixel size when the first proportion is less than the first preset proportion value;

对于每一正样本,进行如下预处理:For each positive sample, the following preprocessing is performed:

在恶性病变病理图片上标记的病变区域中提取多个预设步长的patch图片;Extracting patch images with multiple preset steps in the lesion area marked on the pathological image of the malignant lesion;

判断预设步长的patch图片中包含的前景所占整张patch图片的第二比例,在所述第二比例小于第二预设比例值时,删除所述预设步长的patch图片;预设步长的patch图片中包含的前景为病变区域。Judging the second proportion of the foreground contained in the patch picture of the preset step size to the entire patch picture, when the second proportion is less than the second preset proportion value, delete the patch picture of the preset step size; Let the foreground contained in the patch image of the stride size be the lesion area.

具体实施时,上述第一预设比例值和第二预设比例值可以根据实际工作需要进行灵活设置,二者可以相同,也可以不相同,例如下文提到的0.85。上述预设像素大小可以是下文提到的224*224像素,当然也可以是112*112,128*128,256*256,512*512像素或相近大小的。上述预设步长可以是下文提到的112*112,当然也可以是128*128或相近大小的。During specific implementation, the above-mentioned first preset ratio value and second preset ratio value can be flexibly set according to actual work needs, and the two can be the same or different, such as 0.85 mentioned below. The above-mentioned preset pixel size may be 224*224 pixels mentioned below, and of course may be 112*112, 128*128, 256*256, 512*512 pixels or similar sizes. The above-mentioned preset step size can be 112*112 mentioned below, and of course it can also be 128*128 or a similar size.

具体实施时,数字病理图片的像素数量很大,这会导致模型后续搭建和训练过程中,内存不足的问题。为了解决这一问题,本发明采用了patch级别分类的方式来解决硬件内存不足的限制,由此,这一模块把数字病理图片切分成224*224像素的patch。具体做法如下:During the specific implementation, the number of pixels of digital pathological pictures is large, which will lead to the problem of insufficient memory during the subsequent construction and training of the model. In order to solve this problem, the present invention adopts the method of patch-level classification to solve the limitation of insufficient hardware memory. Therefore, this module divides the digital pathological picture into patches of 224*224 pixels. The specific methods are as follows:

对于整张图片为阴性的样本,首先把图片从RGB颜色格式转化为HSV颜色格式,然后在饱和度H这一层确定合适的阈值,用来把图片细胞前景和没有细胞的背景空白处区分开。在前景细胞区域,按照从左到右,从上到下,不重叠的取224*224像素的patch图片,保证每一块前景区域都有相应的patch。然后判断patch中包含的前景所占整张patch的比例,如果该比例小于0.85则说明patch中包含背景较多,删掉这张patch。最后留下来的patch即为本张病理图片处理后的数据,作为下一模块中模型的输入。对每一张阴性病理图像样本重复此操作。For samples whose entire image is negative, first convert the image from RGB color format to HSV color format, and then determine an appropriate threshold at the saturation H layer to distinguish the foreground cells of the image from the blank spaces in the background without cells . In the foreground cell area, from left to right, from top to bottom, take 224*224 pixel patch images without overlapping, to ensure that each foreground area has a corresponding patch. Then determine the proportion of the foreground contained in the patch to the entire patch. If the proportion is less than 0.85, it means that the patch contains a lot of background, so delete this patch. The patch left at the end is the processed data of this pathological image, which is used as the input of the model in the next module. Repeat this for each negative pathology image sample.

对于阳性病理图片样本,用程序解析xml标签文件,读取标签时,应注意区分不同的封闭区域以及描述区域的坐标点。此时,把勾画区域内部作为前景,其它部分作为背景。由于总体来看阳性区域的面积要小于阴性图片上的区域,为了得到更多的阳性patch以平衡阴/阳性样本数量,在阳性病理图片的阳性区域中,采用了重叠1/2的方式,取224*224像素的patch,即用112*112的步长在阳性区域中从左到右,从上到下,依次提取patch。在阳性区域边缘部分,判断patch中包含前景的比例,如果此比例小于0.85则删除这张patch。对每一张阳性病理图像样本重复此操作,得到下一模块中需要的数据。For positive pathological image samples, use the program to parse the xml tag file, and when reading the tag, attention should be paid to distinguish between different closed areas and the coordinate points describing the area. At this time, the inside of the sketched area is used as the foreground, and the other parts are used as the background. Since the area of the positive area is generally smaller than the area on the negative image, in order to obtain more positive patches to balance the number of negative/positive samples, in the positive area of the positive pathological image, the method of overlapping 1/2 is adopted, taking A patch of 224*224 pixels, that is, with a step size of 112*112, in the positive area, from left to right, from top to bottom, extract the patches in turn. At the edge of the positive area, determine the proportion of the patch that contains the foreground, and delete the patch if the proportion is less than 0.85. Repeat this operation for each positive pathological image sample to obtain the data required in the next module.

接着,再介绍对样本数据进行预处理之后,训练生成所述多个不同类型的深度神经网络模型的过程。Next, the process of training and generating the multiple different types of deep neural network models after preprocessing the sample data is introduced.

(1)划分训练/测试数据,确定6个要训练的模型:(1) Divide the training/test data and determine 6 models to be trained:

在一实施例中,所述第一集合中的多个不同类型的深度神经网络模型包括:inception v3模型、resnet18模型、resnet34模型、resnet50模型、VGG16模型和VGG19模型。In one embodiment, the multiple different types of deep neural network models in the first set include: inception v3 model, resnet18 model, resnet34 model, resnet50 model, VGG16 model, and VGG19 model.

具体实施时,对得到的正负样本patch,本发明将其中80%作为训练集,20%用做测试集,测试集用于在模型训练过程中不断修正模型,使模型性能达到理想水平。通过对分类模型的调研,结合本数据的特点,本发明选中了6个模型(第一集合中的多个不同类型的深度神经网络模型)在相同训练集上训练,选用模型分别为:inception v3,resnet18,resnet34,resnet50,VGG16和VGG19。选中的模型在学术数据集和真实分类任务中已被广泛应用,然而发明人根据大量实验,选用了上述6个模型。每个模型有不同的特点:inceptionv3混合了不同的网络子结构以提升模型的通用性;resnet18网络较浅,对数据量小或者数据差异不大的情况效果较好;resnet34平衡了模型描述能力和训练速度;resnet50与相同层数的网络结构相比,训练的速度相对较快;VGG16和VGG19模型中参数较多,占用计算资源较多,表达能力丰富。不同的模型在本发明数据集中的性能表现不同,通过对多种模型的实验验证,进一步优选效果较好的模型,提升总体性能指标。此模块中确定的6个模型,为之后的模型优选和结果融合提供了先决条件,为后续提高识别准确率奠定基础。During specific implementation, the present invention uses 80% of the obtained positive and negative sample patches as a training set and 20% as a test set, and the test set is used to continuously revise the model during the model training process to make the model performance reach an ideal level. Through the investigation of classification models, combined with the characteristics of this data, the present invention selects 6 models (a plurality of different types of deep neural network models in the first set) to train on the same training set, and the selected models are: inception v3 , resnet18, resnet34, resnet50, VGG16 and VGG19. The selected models have been widely used in academic datasets and real-world classification tasks, however, the inventors selected the above 6 models based on extensive experiments. Each model has different characteristics: inceptionv3 mixes different network substructures to improve the versatility of the model; resnet18 has a shallow network, which is better for situations where the amount of data is small or the data difference is not large; resnet34 balances the model description ability and Training speed; compared with the network structure of the same number of layers, resnet50 has a relatively fast training speed; VGG16 and VGG19 models have more parameters, occupy more computing resources, and have rich expression capabilities. Different models have different performances in the data set of the present invention. Through the experimental verification of various models, the model with better effect is further optimized to improve the overall performance index. The six models identified in this module provide prerequisites for subsequent model selection and result fusion, and lay a foundation for subsequent improvement of the recognition accuracy.

具体实施时,选用模型的模型数量可以是其他数目,也可以是其他类型的模型。During specific implementation, the number of models selected for the model may be other numbers, or may be other types of models.

(2)模型训练和测试迭代:(2) Model training and testing iterations:

在本发明实例中,模型的实现参考相关论文和现有实现方案,并根据patch数据特点选择初始的网络参数:学习率及其走势规划,patch大小,预测分类个数,梯度下降优化算法,初始化权重。对每个模型进行训练和测试,根据测试结果来分析模型目前的性能,调整训练参数以提升该模型各项性能。经过5-10次训练和测试迭代,把每一个模型的能力发挥到极致,得到在本数据集下该模型最佳性能。In the example of the present invention, the implementation of the model refers to relevant papers and existing implementation schemes, and selects initial network parameters according to the characteristics of patch data: learning rate and its trend planning, patch size, number of predicted classifications, gradient descent optimization algorithm, initialization Weights. Train and test each model, analyze the current performance of the model according to the test results, and adjust the training parameters to improve the performance of the model. After 5-10 iterations of training and testing, the ability of each model was maximized to obtain the best performance of the model in this dataset.

在一实施例中,利用所述训练集对第一集合中的多个不同类型的深度神经网络模型进行训练,包括:对第一集合中的多个不同类型的深度神经网络模型进行并行训练,其中,使用2个图形处理器GPU对每一个模型进行训练。In one embodiment, using the training set to train a plurality of different types of deep neural network models in the first set includes: performing parallel training on a plurality of different types of deep neural network models in the first set, Among them, each model is trained using 2 graphics processing unit GPUs.

具体实施时,本发明实施例利用了多GPU计算资源来加快训练速度,从总体上缩短了模型训练测试迭代的周期。在多GPU实现中,需要对不同GPU计算得到的梯度进行融合,本发明采用的融合方式为求和,或者求平均值。在本数据集上,求和的效果更佳,所以本发明选择了多GPU计算梯度求和的方式。经过发明人大量的实验,提出了方案:确定了对单一模型训练所用GPU的个数,对于每个模型,用2个GPU能减少80%的训练时间,如使用更多GPU,由于多GPU同步成本较高,其加速效果没有显著提升。在训练过程中,每一个模型使用2个GPU进行加速训练,6个模型同时训练,充分利用了12个GPU的计算资源。During specific implementation, the embodiment of the present invention utilizes multiple GPU computing resources to speed up the training speed, thereby shortening the model training and testing iteration cycle as a whole. In multi-GPU implementation, it is necessary to fuse the gradients calculated by different GPUs, and the fusion method adopted in the present invention is summation or average value. On this data set, the effect of summation is better, so the present invention selects the method of calculating the gradient summation by multiple GPUs. After a lot of experiments by the inventor, the scheme is proposed: the number of GPUs used for training a single model is determined. For each model, using 2 GPUs can reduce the training time by 80%. If more GPUs are used, due to the synchronization of multiple GPUs The cost is higher, and its acceleration effect is not significantly improved. During the training process, each model uses 2 GPUs for accelerated training, and 6 models are trained at the same time, making full use of the computing resources of 12 GPUs.

(3)下面介绍并行训练多模型的详细过程。(3) The detailed process of parallel training of multiple models is described below.

在一个实施例中,使用2个图形处理器GPU对每一个模型进行训练,可以包括:In one embodiment, using 2 graphics processing units (GPUs) to train each model may include:

将训练集数据平均分为互不重叠的第一训练数据流和第二训练数据流;Divide the training set data into equally non-overlapping first training data streams and second training data streams;

在第一训练数据流中获取预设数据量的病理图片输入到当前模型,模型经过计算得到第一损失函数值,损失函数对每个变量求偏导数,得到变量的第一梯度值;Obtaining a pathological picture with a preset amount of data in the first training data stream and inputting it to the current model, the model obtains a first loss function value through calculation, and the loss function calculates a partial derivative for each variable to obtain the first gradient value of the variable;

在第二训练数据流中获取预设数据量的病理图片输入到当前模型,模型经过计算得到第二损失函数值,损失函数对每个变量求偏导数,得到变量的第二梯度值;Obtaining a pathological picture with a preset amount of data in the second training data stream and inputting it to the current model, the model obtains a second loss function value through calculation, and the loss function calculates a partial derivative for each variable to obtain the second gradient value of the variable;

CPU等待第一GPU(GPU1)和第二GPU(GPU2)计算梯度值完成,对两梯度值求和,然后用得到的梯度值更新相应的变量,得到变量的新值,CPU把更新后的变量值传递给第一GPU(GPU1)和第二GPU(GPU2),覆盖第一GPU(GPU1)和第二GPU(GPU2)中原有的模型(例如图3中所示的VGG16模型)变量值,直至训练完成。The CPU waits for the first GPU (GPU1) and the second GPU (GPU2) to complete the calculation of the gradient values, sums the two gradient values, and then updates the corresponding variables with the obtained gradient values to obtain the new value of the variable, and the CPU stores the updated variable. The value is passed to the first GPU (GPU1) and the second GPU (GPU2), covering the original model (such as the VGG16 model shown in Figure 3) variable values in the first GPU (GPU1) and the second GPU (GPU2), until Training is complete.

具体实施时,由于每一个模型在训练时的计算相互独立,这里以VGG16模型在2个GPU上训练的过程为例,流程如图3所示:In the specific implementation, since the calculation of each model during training is independent of each other, the process of training the VGG16 model on two GPUs is taken as an example. The process is shown in Figure 3:

首先把训练数据平均分为互不重叠的两个数据流,分别为训练数据流1(第一训练数据流)和训练数据流2(第二训练数据流)。在GPU1上取数据流1中固定数量的patch输入到模型中,本例中此数量为64张patch。模型经过计算得到损失函数值第一损失函数值,损失函数对每个变量求偏导数从而得到变量的梯度值1(第一梯度值)。在GPU2上进行类似操作,得到变量梯度值2(第二梯度值)。此后控制权交给了CPU,CPU等待GPU1和GPU2计算梯度值完成,对两梯度值求和,然后用得到的梯度值更新相应的变量,得到变量的新值。CPU每次会将GPU1和GPU2上的模型变量同步:CPU把更新后的变量值传递给GPU1和GPU2,覆盖GPU1和GPU2中原有的VGG16模型变量值,使得GPU1和GPU2中的模型变量值保持一致。然后模型重新从数据流中读取数据,计算损失函数,计算变量梯度值,如此往复。以上机制保证了数据流1和2中的数据会同时用完,这时用训练数据再次扩充数据流,同样的,数据流1和数据流2互不重叠且数据量相同。First, the training data is equally divided into two non-overlapping data streams, namely training data stream 1 (first training data stream) and training data stream 2 (second training data stream). On GPU1, take a fixed number of patches in data stream 1 and input them into the model. In this example, this number is 64 patches. The model obtains the first loss function value by calculating the loss function value, and the loss function calculates the partial derivative of each variable to obtain the gradient value 1 (first gradient value) of the variable. A similar operation is performed on GPU2 to obtain a variable gradient value of 2 (the second gradient value). After that, the control is handed over to the CPU, and the CPU waits for GPU1 and GPU2 to complete the calculation of the gradient value, sums the two gradient values, and then updates the corresponding variable with the obtained gradient value to obtain the new value of the variable. The CPU synchronizes the model variables on GPU1 and GPU2 each time: the CPU transfers the updated variable values to GPU1 and GPU2, overwriting the original VGG16 model variable values in GPU1 and GPU2, so that the model variable values in GPU1 and GPU2 are consistent. . Then the model re-reads the data from the data stream, calculates the loss function, calculates the variable gradient value, and so on. The above mechanism ensures that the data in data streams 1 and 2 will be used up at the same time. At this time, the data stream is expanded again with training data. Similarly, data stream 1 and data stream 2 do not overlap each other and have the same amount of data.

由于CPU会等待GPU1和GPU2计算梯度值均已完成后,才会做下一步梯度值求和操作,等待的过程造成了时间的浪费,所以使用2个GPU不能使训练速度提升100%。在本发明中,使用2个GPU令训练速度提升了80%。Since the CPU will wait for GPU1 and GPU2 to complete the calculation of the gradient values before performing the next gradient value summation operation, the waiting process causes a waste of time, so using two GPUs cannot increase the training speed by 100%. In the present invention, using 2 GPUs increases the training speed by 80%.

(4)下面再介绍训练多模型后的融合选定的3个模型在验证集上进行预测过程。(4) The following describes the prediction process of the three selected models after training multi-model fusion on the validation set.

在一个实例中,所述第二集合中的多个不同类型的深度神经网络模型包括:resnet34模型、VGG16模型和VGG19模型In one example, the plurality of different types of deep neural network models in the second set include: resnet34 model, VGG16 model and VGG19 model

具体实施时,对比了6个模型的性能,排除了实验效果较差的resnet18模型,resnet50模型和inceptionv3模型,本发明选用了假阴性率较低的resnet34模型,假阳性率较低的VGG16模型和VGG19模型。这3个模型结果融合方法为:对于3个模型都预测patch为阴性的情况,此patch最终预测结果为阴性;对于3个模型都预测patch为阳性的情况,此patch最终预测结果为阳性;对于3个模型对同一patch预测结果不一致的情况,此patch最终预测结果为阴性。In the specific implementation, the performance of 6 models is compared, and the resnet18 model, resnet50 model and inceptionv3 model with poor experimental effect are excluded. The present invention selects the resnet34 model with low false negative rate, VGG16 model with low false positive rate and VGG19 model. The fusion method of the results of these three models is: for the case where all three models predict the patch to be negative, the final prediction result of this patch is negative; for the case that all three models predict the patch to be positive, the final prediction result of this patch is positive; for When the prediction results of the three models for the same patch are inconsistent, the final prediction result of this patch is negative.

采用上述方法对验证集的数据进行预测,并把patch预测结果对应到数字病理图片上,在病理图片上标出模型预测阳性patch的位置,进行可视化呈现,为下一模块的结果分析做好准备。Use the above method to predict the data of the validation set, and map the patch prediction results to the digital pathological pictures, mark the position of the positive patches predicted by the model on the pathological pictures, and visualize them, so as to prepare for the analysis of the results of the next module. .

第二,介绍在得到预先训练的多个不同类型的深度神经网络模型后,利用该模型进行预测的过程。Second, after obtaining a number of different types of deep neural network models that have been pre-trained, the process of using the model to make predictions is introduced.

在获取待识别病理图片的步骤后,也可以进行例如上述对样本数据的预处理的过程,在对待识别病理图片预处理之后,进一步提高识别的效率和准确率。After the step of acquiring the pathological picture to be recognized, for example, the above process of preprocessing the sample data can also be performed, and after the preprocessing of the pathological image to be recognized, the efficiency and accuracy of the recognition can be further improved.

第三,介绍对多个不同类型的深度神经网络模型得到的初步识别结果进行融合的过程,该融合的过程,请参见上述训练多模型后,融合选定的3个模型在验证集上进行的预测过程。Third, it introduces the process of fusing the preliminary recognition results obtained by multiple different types of deep neural network models. For the process of fusing, please refer to the above-mentioned multi-model training and fusion of the selected three models on the validation set. forecasting process.

具体实施时,根据大量实验结果得到的有益技术效果为:根据实际情况迭代3-5次后,本发明实施例在把patch级别假阳性控制在0.06%的同时,保证假阴性率在0.3%以下,patch级别总体准确率在99.8%以上。During specific implementation, the beneficial technical effects obtained according to a large number of experimental results are: after 3-5 iterations according to the actual situation, the embodiment of the present invention controls the patch level false positives to 0.06% while ensuring that the false negative rate is below 0.3% , the overall patch level accuracy rate is above 99.8%.

第四,介绍模型优化的步骤,在后续模型的使用过程中,还可以包括对模型优化的过程,进一步提高识别病理图片的准确率在一个实施例中,该模型优化的过程可以包括:Fourth, the steps of model optimization are introduced. In the subsequent use of the model, the process of model optimization may also be included to further improve the accuracy of recognizing pathological pictures. In one embodiment, the process of model optimization may include:

在根据识别结果判断待识别病理图片的假阳性偏高时,补充该类型病理图片的阴性样本至病理图片样本数据库中;When it is judged that the false positives of the pathological pictures to be identified are high according to the recognition results, the negative samples of the pathological pictures of this type are added to the pathological picture sample database;

在根据识别结果判断待识别病理图片的假阴性偏高时,补充该类型病理图片的阳性样本至病理图片样本数据库中;When it is judged that the false negative of the pathological image to be recognized is high according to the recognition result, the positive samples of the pathological image of this type are added to the pathological image sample database;

根据补充后的病理图片样本数据库,对所述预先训练生成的多个不同类型的深度神经网络模型进行优化训练,得到更新后的多个不同类型的深度神经网络模型;According to the supplemented pathological picture sample database, performing optimization training on multiple different types of deep neural network models generated by the pre-training, to obtain updated multiple different types of deep neural network models;

将待识别病理图片输入预先训练生成的多个不同类型的深度神经网络模型,对待识别病理图片进行识别,可以包括:Input the pathological pictures to be identified into multiple different types of deep neural network models generated by pre-training, and identify the pathological pictures to be identified, including:

将待识别病理图片输入更新后的多个不同类型的深度神经网络模型,对待识别病理图片进行识别。The pathological pictures to be identified are input into the updated multiple different types of deep neural network models, and the pathological pictures to be identified are identified.

具体实施时,数据特性对模型效果有不可忽视的影响。对于上述模型预测错误,可分为假阳性和假阴性。从数据的角度分析,找到错误预测数据的共性,即错误发生在某几类patch上。如果在某一类patch上假阳性偏高,则相应的这一类patch在阴性样本中出现较少,需要补充这一类带有特殊阴性标注的病理图片;如果假阴性偏高,则说明模型对这一类阳性patch没有很好的学习,需要补充这一类的阳性病理图片的勾画。对模型预测错误的patch进行归类,需要结合病理科医生和算法工程师的专业知识,共同分析确定需要补充什么样的数据。另外,由于癌细胞的形态多样,补充更多的多样化的病理图片对模型效果有显著提升。In the specific implementation, the data characteristics have a non-negligible impact on the model effect. For the above model prediction errors, it can be divided into false positives and false negatives. From the perspective of data analysis, find the commonality of the wrongly predicted data, that is, the error occurs on certain types of patches. If the false positives are high on a certain type of patch, the corresponding type of patch appears less in the negative samples, and this type of pathological pictures with special negative labels needs to be supplemented; if the false negatives are high, it means that the model There is no good study of this type of positive patches, and it is necessary to supplement the delineation of this type of positive pathological pictures. To classify the patches that the model predicts incorrectly, it is necessary to combine the expertise of pathologists and algorithm engineers to jointly analyze and determine what kind of data needs to be supplemented. In addition, due to the diverse morphology of cancer cells, supplementing more diverse pathological pictures can significantly improve the model effect.

基于同一发明构思,本发明实施例中还提供了一种病理图片的识别装置,如下面的实施例所述。由于该装置解决问题的原理与病理图片的识别方法相似,因此该装置的实施可以参见病理图片的识别方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present invention also provides an apparatus for identifying a pathological picture, as described in the following embodiments. Since the principle of the device for solving the problem is similar to the method for recognizing pathological pictures, the implementation of the device can refer to the implementation of the method for recognizing pathological pictures, and the repetition will not be repeated.

图4为本发明实施例中病理图片的识别装置的示意图,如图4所示,该装置可以包括:FIG. 4 is a schematic diagram of an apparatus for identifying a pathological picture in an embodiment of the present invention. As shown in FIG. 4 , the apparatus may include:

获取单元02,用于获取待识别病理图片;Obtaining unit 02, for obtaining pathological pictures to be identified;

识别单元04,用于将待识别病理图片输入预先训练生成的多个不同类型的深度神经网络模型,对待识别病理图片进行识别,每一类型的深度神经网络模型得到一初步识别结果;所述多个不同类型的深度神经网络模型根据多个病理图片样本预先训练生成;The identification unit 04 is used to input the pathological pictures to be identified into multiple different types of deep neural network models generated by pre-training, identify the pathological pictures to be identified, and obtain a preliminary identification result for each type of deep neural network models; Different types of deep neural network models are pre-trained and generated based on multiple pathological image samples;

融合单元06,用于对多个不同类型的深度神经网络模型得到的初步识别结果进行融合,得到所述待识别病理图片的最终识别结果。The fusion unit 06 is configured to fuse the preliminary recognition results obtained by a plurality of different types of deep neural network models to obtain the final recognition result of the pathological picture to be recognized.

在一个实施例中,上述病理图片的识别装置还可以包括:训练单元,用于按照如下方法预先训练生成所述多个不同类型的深度神经网络模型:In one embodiment, the apparatus for identifying a pathological picture may further include: a training unit, configured to pre-train and generate the multiple different types of deep neural network models according to the following method:

获得样本数据,所述样本数据包括正样本和负样本,所述正样本为恶性病变病理图片,所述负样本为正常或良性病变病理图片,所述恶性病变病理图片上标记出病变区域;Obtaining sample data, the sample data includes positive samples and negative samples, the positive samples are pathological pictures of malignant lesions, the negative samples are pathological pictures of normal or benign lesions, and the lesion area is marked on the pathological pictures of malignant lesions;

将所述样本数据划分为训练集、测试集和验证集;dividing the sample data into a training set, a test set and a validation set;

利用所述训练集对第一集合中的多个不同类型的深度神经网络模型进行训练;Using the training set to train a plurality of different types of deep neural network models in the first set;

利用所述测试集对训练好的第一集合中的多个不同类型的深度神经网络模型进行测试;Use the test set to test multiple different types of deep neural network models in the trained first set;

根据测试结果,从所述第一集合中的多个不同类型的深度神经网络模型中筛选出多个深度神经网络模型作为第二集合;According to the test result, a plurality of deep neural network models are selected from the plurality of different types of deep neural network models in the first set as the second set;

利用所述验证集对第二集合中的多个不同类型的深度神经网络模型进行融合验证,得到所述预先训练生成的多个不同类型的深度神经网络模型。The verification set is used to perform fusion verification on a plurality of different types of deep neural network models in the second set, to obtain a plurality of different types of deep neural network models generated by the pre-training.

在一个实施例中,上述病理图片的识别装置还包括预处理单元,所述预处理单元用于:In one embodiment, the above-mentioned pathological image identification device further includes a preprocessing unit, and the preprocessing unit is used for:

对于每一负样本,进行如下预处理:For each negative sample, the following preprocessing is performed:

将正常或良性病变病理图片从RGB颜色格式转化为HSV颜色格式;Convert normal or benign lesions pathological pictures from RGB color format to HSV color format;

将HSV颜色格式的正常或良性病变病理图片的饱和度调整到预设阈值;Adjust the saturation of normal or benign lesions pathological pictures in HSV color format to a preset threshold;

在饱和度调整到预设阈值后的正常或良性病变病理图片的前景细胞区域,提取多个预设像素大小的块patch图片;In the foreground cell area of the normal or benign pathological image after the saturation is adjusted to the preset threshold, extract a plurality of block patch images of preset pixel size;

判断预设像素大小的patch图片中包含的前景所占整张patch图片的第一比例,在所述第一比例小于第一预设比例值时,删除所述预设像素大小的patch图片;Determine the first proportion of the foreground contained in the patch picture with the preset pixel size to the entire patch picture, and delete the patch picture with the preset pixel size when the first proportion is less than the first preset proportion value;

对于每一正样本,进行如下预处理:For each positive sample, the following preprocessing is performed:

在恶性病变病理图片上标记的病变区域中提取多个预设步长的patch图片;Extracting patch images with multiple preset steps in the lesion area marked on the pathological image of the malignant lesion;

判断预设步长的patch图片中包含的前景所占整张patch图片的第二比例,在所述第二比例小于第二预设比例值时,删除所述预设步长的patch图片;预设步长的patch图片中包含的前景为病变区域。Judging the second proportion of the foreground contained in the patch picture of the preset step size to the entire patch picture, when the second proportion is less than the second preset proportion value, delete the patch picture of the preset step size; Let the foreground contained in the patch image of the stride size be the lesion area.

在一个实施例中,所述第一集合中的多个不同类型的深度神经网络模型包括:inceptionv3模型、resnet18模型、resnet34模型、resnet50模型、VGG16模型和VGG19模型;In one embodiment, the multiple different types of deep neural network models in the first set include: inceptionv3 model, resnet18 model, resnet34 model, resnet50 model, VGG16 model and VGG19 model;

所述第二集合中的多个不同类型的深度神经网络模型包括:resnet34模型、VGG16模型和VGG19模型。The multiple different types of deep neural network models in the second set include: resnet34 model, VGG16 model and VGG19 model.

在一个实施例中,利用所述训练集对第一集合中的多个不同类型的深度神经网络模型进行训练,包括:对第一集合中的多个不同类型的深度神经网络模型进行并行训练,其中,使用2个图形处理器GPU对每一个模型进行训练。In one embodiment, using the training set to train multiple different types of deep neural network models in the first set includes: performing parallel training on multiple different types of deep neural network models in the first set, Among them, each model is trained using 2 graphics processing unit GPUs.

在一个实施例中,使用2个图形处理器GPU对每一个模型进行训练,可以包括:In one embodiment, using 2 graphics processing units (GPUs) to train each model may include:

将训练集数据平均分为互不重叠的第一训练数据流和第二训练数据流;Divide the training set data into equally non-overlapping first training data streams and second training data streams;

在第一训练数据流中获取预设数据量的病理图片输入到当前模型,模型经过计算得到第一损失函数值,损失函数对每个变量求偏导数,得到变量的第一梯度值;Obtaining a pathological picture with a preset amount of data in the first training data stream and inputting it to the current model, the model obtains a first loss function value through calculation, and the loss function calculates a partial derivative for each variable to obtain the first gradient value of the variable;

在第二训练数据流中获取预设数据量的病理图片输入到当前模型,模型经过计算得到第二损失函数值,损失函数对每个变量求偏导数,得到变量的第二梯度值;Obtaining a pathological picture with a preset amount of data in the second training data stream and inputting it to the current model, the model obtains a second loss function value through calculation, and the loss function calculates a partial derivative for each variable to obtain the second gradient value of the variable;

CPU等待第一GPU和第二GPU计算梯度值完成,对两梯度值求和,然后用得到的梯度值更新相应的变量,得到变量的新值,CPU把更新后的变量值传递给第一GPU和第二GPU,覆盖第一GPU和第二GPU中原有的模型变量值,直至训练完成。The CPU waits for the first GPU and the second GPU to complete the calculation of the gradient values, sums the two gradient values, and then updates the corresponding variables with the obtained gradient values to obtain the new value of the variable, and the CPU passes the updated variable value to the first GPU. and the second GPU, overwriting the original model variable values in the first GPU and the second GPU until the training is completed.

在一个实施例中,上述病理图片的识别装置还可以包括优化单元,所述优化单元用于:In one embodiment, the above-mentioned pathological picture identification device may further include an optimization unit, and the optimization unit is used for:

在根据识别结果判断待识别病理图片的假阳性偏高时,补充该类型病理图片的阴性样本至病理图片样本数据库中;When it is judged that the false positives of the pathological pictures to be identified are high according to the recognition results, the negative samples of the pathological pictures of this type are added to the pathological picture sample database;

在根据识别结果判断待识别病理图片的假阴性偏高时,补充该类型病理图片的阳性样本至病理图片样本数据库中;When it is judged that the false negative of the pathological image to be recognized is high according to the recognition result, the positive samples of the pathological image of this type are added to the pathological image sample database;

根据补充后的病理图片样本数据库,对所述预先训练生成的多个不同类型的深度神经网络模型进行优化训练,得到更新后的多个不同类型的深度神经网络模型;According to the supplemented pathological picture sample database, performing optimization training on multiple different types of deep neural network models generated by the pre-training, to obtain updated multiple different types of deep neural network models;

将待识别病理图片输入预先训练生成的多个不同类型的深度神经网络模型,对待识别病理图片进行识别,包括:Input the pathological pictures to be identified into multiple different types of deep neural network models generated by pre-training, and identify the pathological pictures to be identified, including:

将待识别病理图片输入更新后的多个不同类型的深度神经网络模型,对待识别病理图片进行识别。The pathological pictures to be identified are input into the updated multiple different types of deep neural network models, and the pathological pictures to be identified are identified.

本发明实施例还提供一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述病理图片的识别方法。An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the above pathological picture recognition method when the processor executes the computer program.

本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有执行上述病理图片的识别方法的计算机程序。An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for executing the above method for identifying a pathological picture.

综上所述,如今,人工智能技术又一次兴起,伴随着大数据,新算法,云计算的发展,训练深度神经网络模型已经成为了可能,人工智能将会给各个行业带来深远的影响,人工智能+医疗当然也在其中。本发明实施例利用了人工智能在图片分类上的优点,结合传统医疗,使其可以对病理图片做出正确分类。To sum up, today, artificial intelligence technology is on the rise again. With the development of big data, new algorithms, and cloud computing, it has become possible to train deep neural network models. Artificial intelligence will have a profound impact on various industries. Artificial intelligence + medical care is of course also among them. The embodiment of the present invention utilizes the advantages of artificial intelligence in picture classification, and combines with traditional medical treatment, so that it can correctly classify pathological pictures.

本发明实施例提供的技术方案不仅可以应用于胃淋巴结癌转移病理图片的识别,还可以应用于其它癌症病理图片的识别。The technical solutions provided by the embodiments of the present invention can be applied not only to the identification of pathological pictures of gastric lymph node cancer metastasis, but also to the identification of pathological pictures of other cancers.

本发明实施例提供的技术方案达到的有益技术效果为:The beneficial technical effects achieved by the technical solutions provided in the embodiments of the present invention are:

①训练阶段选取6个模型,并优选出3个模型,融合其结果。选取6个模型进行训练,充分考虑每个模型的特点,根据假阳性率和假阴性率优选出3个模型。对3个模型的阳性预测结果求交集得到最终结果。多模型的融合有效的发挥了每个模型的优势,从而提升总体性能。①In the training phase, 6 models are selected, 3 models are selected, and the results are fused. Select 6 models for training, fully consider the characteristics of each model, and select 3 models according to the false positive rate and false negative rate. The final result is obtained by intersecting the positive prediction results of the three models. The fusion of multiple models effectively exploits the advantages of each model, thereby improving the overall performance.

②在训练时,采用了多GPU加速的实现方案。用多GPU在并行时,把梯度数据分配给不同的GPU计算,然后进行多GPU结果的同步,本发明中同步方法采用加和的方式。采用多GPU计算,提升了训练速度,从而整体减少了迭代模型的时间。② During training, a multi-GPU acceleration implementation is adopted. When using multiple GPUs in parallel, the gradient data is allocated to different GPUs for calculation, and then the results of the multiple GPUs are synchronized. The synchronization method in the present invention adopts the summation method. The use of multi-GPU computing improves the training speed, thereby reducing the time to iterate the model as a whole.

③分析模型结果阶段着重结合了医生的专业知识,贴合实际。在实际应用中,不仅仅需要提升模型的准确率,而且需要从医学的角度补充新的数据对模型进行迭代,让模型泛化能力更强,更实用。本发明中充分结合了医生专业知识和算法知识,模型迭代的方向更贴近实际。③ The analysis model results stage focuses on combining the professional knowledge of doctors and is in line with the reality. In practical applications, it is not only necessary to improve the accuracy of the model, but also to iterate the model by supplementing new data from a medical point of view, making the model more generalizable and more practical. In the present invention, the professional knowledge of doctors and algorithm knowledge are fully combined, and the direction of model iteration is closer to reality.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above-mentioned specific embodiments are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims (7)

1. A pathological picture recognition device, comprising:
the acquiring unit is used for acquiring a pathological picture to be identified;
the recognition unit is used for inputting the pathological pictures to be recognized into a plurality of different types of deep neural network models generated by pre-training, recognizing the pathological pictures to be recognized, and obtaining a primary recognition result by each type of deep neural network model; the deep neural network models of different types are generated by pre-training according to a plurality of pathological image samples;
the fusion unit is used for fusing the primary recognition results obtained by the deep neural network models of different types to obtain the final recognition result of the pathological picture to be recognized;
the identification device of the pathological picture further comprises: the training unit is used for generating the plurality of deep neural network models of different types through pre-training according to the following method:
obtaining sample data, wherein the sample data comprises a positive sample and a negative sample, the positive sample is a malignant lesion pathological picture, the negative sample is a normal or benign lesion pathological picture, and a lesion area is marked on the malignant lesion pathological picture;
dividing the sample data into a training set, a test set and a verification set;
training a plurality of different types of deep neural network models in a first set by using the training set;
testing a plurality of different types of deep neural network models in the trained first set by using the test set;
according to the test result, screening out a plurality of deep neural network models from a plurality of different types of deep neural network models in the first set to serve as a second set;
carrying out fusion verification on a plurality of different types of deep neural network models in a second set by using the verification set to obtain a plurality of different types of deep neural network models generated by pre-training;
performing fusion verification on a plurality of different types of deep neural network models in the second set by using the verification set, wherein the fusion verification comprises the following steps: for the condition that the predictions of a plurality of different types of deep neural network models are negative, the final prediction result is negative; for the condition that the predictions of a plurality of different types of deep neural network models are positive, the final prediction result is positive; for the condition that the prediction results of a plurality of different types of deep neural network models are inconsistent, the final prediction result is negative;
training a plurality of different types of deep neural network models in a first set using the training set, including: training a plurality of different types of deep neural network models in the first set in parallel, wherein each model is trained using 2 Graphics Processing Units (GPUs);
training each model using 2 Graphics Processing Units (GPUs) includes:
averagely dividing training set data into a first training data stream and a second training data stream which are not overlapped with each other;
acquiring pathological pictures with preset data volume from a first training data stream, inputting the pathological pictures into a current model, calculating the model to obtain a first loss function value, and calculating a partial derivative of each variable by the loss function to obtain a first gradient value of the variable;
acquiring pathological pictures with preset data volume from a second training data stream, inputting the pathological pictures into a current model, calculating the model to obtain a second loss function value, and calculating a partial derivative of each variable by the loss function to obtain a second gradient value of the variable;
the CPU waits for the first GPU and the second GPU to finish calculating the gradient values, sums the gradient values, updates corresponding variables by using the obtained gradient values to obtain new values of the variables, transmits the updated variable values to the first GPU and the second GPU, covers original model variable values in the first GPU and the second GPU until training is finished;
the identification method of the pathological picture is applied to identification of the gastric lymph node cancer metastasis pathological picture;
the identification device of the pathological picture further comprises a preprocessing unit, wherein the preprocessing unit is used for:
for each negative sample, the following pre-treatments were performed:
converting the normal or benign pathological picture from an RGB color format into an HSV color format;
adjusting the saturation of the normal or benign pathological picture with the HSV color format to a preset threshold;
extracting a plurality of patch pictures with preset pixel sizes from the foreground cell area of the normal or benign pathological picture after the saturation is adjusted to a preset threshold value;
judging a first proportion of a foreground contained in a patch picture with a preset pixel size to the whole patch picture, and deleting the patch picture with the preset pixel size when the first proportion is smaller than a first preset proportion value;
for each positive sample, the following pre-treatments were performed:
extracting a plurality of patch pictures with preset step lengths from a lesion area marked on a pathological picture of a malignant lesion;
judging a second proportion of the foreground contained in the patch picture with the preset step length to the whole patch picture, and deleting the patch picture with the preset step length when the second proportion is smaller than a second preset proportion value; the foreground contained in the patch picture with the preset step length is a lesion area.
2. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements a method for identifying a pathological picture comprising:
acquiring a pathological picture to be identified;
inputting the pathological picture to be recognized into a plurality of different types of deep neural network models generated by pre-training, recognizing the pathological picture to be recognized, and obtaining a preliminary recognition result by each type of deep neural network model; the deep neural network models of different types are generated by pre-training according to a plurality of pathological image samples;
fusing the primary recognition results obtained by a plurality of different types of deep neural network models to obtain a final recognition result of the pathological picture to be recognized;
pre-training and generating the plurality of different types of deep neural network models according to the following method:
obtaining sample data, wherein the sample data comprises a positive sample and a negative sample, the positive sample is a malignant lesion pathological picture, the negative sample is a normal or benign lesion pathological picture, and a lesion area is marked on the malignant lesion pathological picture;
dividing the sample data into a training set, a test set and a verification set;
training a plurality of different types of deep neural network models in a first set by using the training set;
testing a plurality of different types of deep neural network models in the trained first set by using the test set;
according to the test result, screening out a plurality of deep neural network models from a plurality of different types of deep neural network models in the first set to serve as a second set;
carrying out fusion verification on a plurality of different types of deep neural network models in a second set by using the verification set to obtain a plurality of different types of deep neural network models generated by pre-training;
performing fusion verification on a plurality of different types of deep neural network models in the second set by using the verification set, wherein the fusion verification comprises the following steps: for the condition that the predictions of a plurality of different types of deep neural network models are negative, the final prediction result is negative; for the condition that the predictions of a plurality of different types of deep neural network models are positive, the final prediction result is positive; for the condition that the prediction results of a plurality of different types of deep neural network models are inconsistent, the final prediction result is negative;
training a plurality of different types of deep neural network models in a first set using the training set, including: training a plurality of different types of deep neural network models in the first set in parallel, wherein each model is trained using 2 Graphics Processing Units (GPUs);
training each model using 2 Graphics Processing Units (GPUs) includes:
averagely dividing training set data into a first training data stream and a second training data stream which are not overlapped with each other;
acquiring pathological pictures with preset data volume from a first training data stream, inputting the pathological pictures into a current model, calculating the model to obtain a first loss function value, and calculating a partial derivative of each variable by the loss function to obtain a first gradient value of the variable;
acquiring pathological pictures with preset data volume from a second training data stream, inputting the pathological pictures into a current model, calculating the model to obtain a second loss function value, and calculating a partial derivative of each variable by the loss function to obtain a second gradient value of the variable;
the CPU waits for the first GPU and the second GPU to finish calculating the gradient values, sums the gradient values, updates corresponding variables by using the obtained gradient values to obtain new values of the variables, transmits the updated variable values to the first GPU and the second GPU, covers original model variable values in the first GPU and the second GPU until training is finished;
the identification method of the pathological picture is applied to identification of the gastric lymph node cancer metastasis pathological picture;
after obtaining the sample data, the sample data is further preprocessed according to the following mode:
for each negative sample, the following pre-treatments were performed:
converting the normal or benign pathological picture from an RGB color format into an HSV color format;
adjusting the saturation of the normal or benign pathological picture with the HSV color format to a preset threshold;
extracting a plurality of patch pictures with preset pixel sizes from the foreground cell area of the normal or benign pathological picture after the saturation is adjusted to a preset threshold value;
judging a first proportion of a foreground contained in a patch picture with a preset pixel size to the whole patch picture, and deleting the patch picture with the preset pixel size when the first proportion is smaller than a first preset proportion value;
for each positive sample, the following pre-treatments were performed:
extracting a plurality of patch pictures with preset step lengths from a lesion area marked on a pathological picture of a malignant lesion;
judging a second proportion of the foreground contained in the patch picture with the preset step length to the whole patch picture, and deleting the patch picture with the preset step length when the second proportion is smaller than a second preset proportion value; the foreground contained in the patch picture with the preset step length is a lesion area.
3. The computer device of claim 2, wherein the plurality of different types of deep neural network models in the first set comprises: inception v3 model, resnet18 model, resnet34 model, resnet50 model, VGG16 model, and VGG19 model;
the plurality of different types of deep neural network models in the second set includes: the resnet34 model, the VGG16 model, and the VGG19 model.
4. The computer device of claim 2, wherein the identification method of the pathology picture further comprises:
when the false positive of the pathological picture to be identified is judged to be higher according to the identification result, the negative sample of the pathological picture of the type is supplemented to a pathological picture sample database;
when the false negative of the pathological picture to be identified is judged to be higher according to the identification result, supplementing the positive sample of the pathological picture of the type into a pathological picture sample database;
performing optimization training on a plurality of different types of deep neural network models generated by the pre-training according to the supplemented pathological picture sample database to obtain a plurality of updated different types of deep neural network models;
inputting the pathological pictures to be recognized into a plurality of different types of deep neural network models generated by pre-training, and recognizing the pathological pictures to be recognized, wherein the method comprises the following steps:
and inputting the pathological picture to be recognized into the updated deep neural network models of different types, and recognizing the pathological picture to be recognized.
5. A computer-readable storage medium characterized by storing a computer program that executes an identification method of a pathology image:
acquiring a pathological picture to be identified;
inputting the pathological picture to be recognized into a plurality of different types of deep neural network models generated by pre-training, recognizing the pathological picture to be recognized, and obtaining a preliminary recognition result by each type of deep neural network model; the deep neural network models of different types are generated by pre-training according to a plurality of pathological image samples;
fusing the primary recognition results obtained by a plurality of different types of deep neural network models to obtain a final recognition result of the pathological picture to be recognized;
pre-training and generating the plurality of different types of deep neural network models according to the following method:
obtaining sample data, wherein the sample data comprises a positive sample and a negative sample, the positive sample is a malignant lesion pathological picture, the negative sample is a normal or benign lesion pathological picture, and a lesion area is marked on the malignant lesion pathological picture;
dividing the sample data into a training set, a test set and a verification set;
training a plurality of different types of deep neural network models in a first set by using the training set;
testing a plurality of different types of deep neural network models in the trained first set by using the test set;
according to the test result, screening out a plurality of deep neural network models from a plurality of different types of deep neural network models in the first set to serve as a second set;
carrying out fusion verification on a plurality of different types of deep neural network models in a second set by using the verification set to obtain a plurality of different types of deep neural network models generated by pre-training;
performing fusion verification on a plurality of different types of deep neural network models in the second set by using the verification set, wherein the fusion verification comprises the following steps: for the condition that the predictions of a plurality of different types of deep neural network models are negative, the final prediction result is negative; for the condition that the predictions of a plurality of different types of deep neural network models are positive, the final prediction result is positive; for the condition that the prediction results of a plurality of different types of deep neural network models are inconsistent, the final prediction result is negative;
training a plurality of different types of deep neural network models in a first set using the training set, including: training a plurality of different types of deep neural network models in the first set in parallel, wherein each model is trained using 2 Graphics Processing Units (GPUs);
training each model using 2 Graphics Processing Units (GPUs) includes:
averagely dividing training set data into a first training data stream and a second training data stream which are not overlapped with each other;
acquiring pathological pictures with preset data volume from a first training data stream, inputting the pathological pictures into a current model, calculating the model to obtain a first loss function value, and calculating a partial derivative of each variable by the loss function to obtain a first gradient value of the variable;
acquiring pathological pictures with preset data volume from a second training data stream, inputting the pathological pictures into a current model, calculating the model to obtain a second loss function value, and calculating a partial derivative of each variable by the loss function to obtain a second gradient value of the variable;
the CPU waits for the first GPU and the second GPU to finish calculating the gradient values, sums the gradient values, updates corresponding variables by using the obtained gradient values to obtain new values of the variables, transmits the updated variable values to the first GPU and the second GPU, covers original model variable values in the first GPU and the second GPU until training is finished;
the identification method of the pathological picture is applied to identification of the gastric lymph node cancer metastasis pathological picture;
after obtaining the sample data, the sample data is further preprocessed according to the following mode:
for each negative sample, the following pre-treatments were performed:
converting the normal or benign pathological picture from an RGB color format into an HSV color format;
adjusting the saturation of the normal or benign pathological picture with the HSV color format to a preset threshold;
extracting a plurality of patch pictures with preset pixel sizes from the foreground cell area of the normal or benign pathological picture after the saturation is adjusted to a preset threshold value;
judging a first proportion of a foreground contained in a patch picture with a preset pixel size to the whole patch picture, and deleting the patch picture with the preset pixel size when the first proportion is smaller than a first preset proportion value;
for each positive sample, the following pre-treatments were performed:
extracting a plurality of patch pictures with preset step lengths from a lesion area marked on a pathological picture of a malignant lesion;
judging a second proportion of the foreground contained in the patch picture with the preset step length to the whole patch picture, and deleting the patch picture with the preset step length when the second proportion is smaller than a second preset proportion value; the foreground contained in the patch picture with the preset step length is a lesion area.
6. The computer-readable storage medium of claim 5, wherein the plurality of different types of deep neural network models in the first set comprises: inception v3 model, resnet18 model, resnet34 model, resnet50 model, VGG16 model, and VGG19 model;
the plurality of different types of deep neural network models in the second set includes: the resnet34 model, the VGG16 model, and the VGG19 model.
7. The computer-readable storage medium of claim 5, wherein the identification method of the pathology picture further comprises:
when the false positive of the pathological picture to be identified is judged to be higher according to the identification result, the negative sample of the pathological picture of the type is supplemented to a pathological picture sample database;
when the false negative of the pathological picture to be identified is judged to be higher according to the identification result, supplementing the positive sample of the pathological picture of the type into a pathological picture sample database;
performing optimization training on a plurality of different types of deep neural network models generated by the pre-training according to the supplemented pathological picture sample database to obtain a plurality of updated different types of deep neural network models;
inputting the pathological pictures to be recognized into a plurality of different types of deep neural network models generated by pre-training, and recognizing the pathological pictures to be recognized, wherein the method comprises the following steps:
and inputting the pathological picture to be recognized into the updated deep neural network models of different types, and recognizing the pathological picture to be recognized.
CN201810896157.5A 2018-08-08 2018-08-08 Pathological picture recognition method and device Active CN109300530B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810896157.5A CN109300530B (en) 2018-08-08 2018-08-08 Pathological picture recognition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810896157.5A CN109300530B (en) 2018-08-08 2018-08-08 Pathological picture recognition method and device

Publications (2)

Publication Number Publication Date
CN109300530A CN109300530A (en) 2019-02-01
CN109300530B true CN109300530B (en) 2020-02-21

Family

ID=65168188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810896157.5A Active CN109300530B (en) 2018-08-08 2018-08-08 Pathological picture recognition method and device

Country Status (1)

Country Link
CN (1) CN109300530B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109961423B (en) * 2019-02-15 2024-05-31 平安科技(深圳)有限公司 Lung nodule detection method based on classification model, server and storage medium
CN110097564B (en) * 2019-04-04 2023-06-16 平安科技(深圳)有限公司 Image labeling method and device based on multi-model fusion, computer equipment and storage medium
CN110335668A (en) * 2019-05-22 2019-10-15 台州市中心医院(台州学院附属医院) Thyroid cancer cell pathological map auxiliary analysis method and system based on deep learning
CN110706812A (en) * 2019-09-29 2020-01-17 医渡云(北京)技术有限公司 Medical index time sequence prediction method, device, medium and electronic equipment
CN111276254A (en) * 2020-01-13 2020-06-12 印迹信息科技(北京)有限公司 Medical open platform system and diagnosis and treatment data processing method
CN111325103B (en) * 2020-01-21 2020-11-03 华南师范大学 Cell labeling system and method
CN111710394A (en) * 2020-06-05 2020-09-25 沈阳智朗科技有限公司 AI-assisted early gastric cancer screening system
CN111815609B (en) * 2020-07-13 2024-03-01 北京小白世纪网络科技有限公司 Pathological image classification method and system based on context awareness and multi-model fusion
CN111899252B (en) * 2020-08-06 2023-10-27 腾讯科技(深圳)有限公司 Pathological image processing method and device based on artificial intelligence
CN112348059A (en) * 2020-10-23 2021-02-09 北京航空航天大学 Deep learning-based method and system for classifying multiple dyeing pathological images
CN112507801A (en) * 2020-11-14 2021-03-16 武汉中海庭数据技术有限公司 Lane road surface digital color recognition method, speed limit information recognition method and system
CN112734707B (en) * 2020-12-31 2023-03-24 重庆西山科技股份有限公司 Auxiliary detection method, system and device for 3D endoscope and storage medium
CN113222928B (en) * 2021-05-07 2023-09-19 北京大学第一医院 Urine cytology artificial intelligence urothelial cancer identification system
CN114693628A (en) * 2022-03-24 2022-07-01 生仝智能科技(北京)有限公司 Pathological index determination method, pathological index determination device, pathological index determination equipment and storage medium
CN118378726B (en) * 2024-06-25 2024-09-20 之江实验室 Model training system, method, storage medium and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1815399A2 (en) * 2004-11-19 2007-08-08 Koninklijke Philips Electronics N.V. A stratification method for overcoming unbalanced case numbers in computer-aided lung nodule false positive reduction
WO2008035276A2 (en) * 2006-09-22 2008-03-27 Koninklijke Philips Electronics N.V. Methods for feature selection using classifier ensemble based genetic algorithms

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205015889U (en) * 2015-09-23 2016-02-03 北京科技大学 Definite system of traditional chinese medical science lingual diagnosis model based on convolution neuroid
CN107564580B (en) * 2017-09-11 2019-02-12 合肥工业大学 System and method of gastroscopic image auxiliary processing based on ensemble learning
CN107909566A (en) * 2017-10-28 2018-04-13 杭州电子科技大学 A kind of image-recognizing method of the cutaneum carcinoma melanoma based on deep learning
CN108288506A (en) * 2018-01-23 2018-07-17 雨声智能科技(上海)有限公司 A kind of cancer pathology aided diagnosis method based on artificial intelligence technology
CN108364293A (en) * 2018-04-10 2018-08-03 复旦大学附属肿瘤医院 A kind of on-line training thyroid tumors Ultrasound Image Recognition Method and its device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1815399A2 (en) * 2004-11-19 2007-08-08 Koninklijke Philips Electronics N.V. A stratification method for overcoming unbalanced case numbers in computer-aided lung nodule false positive reduction
WO2008035276A2 (en) * 2006-09-22 2008-03-27 Koninklijke Philips Electronics N.V. Methods for feature selection using classifier ensemble based genetic algorithms

Also Published As

Publication number Publication date
CN109300530A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN109300530B (en) Pathological picture recognition method and device
US11901077B2 (en) Multiple instance learner for prognostic tissue pattern identification
CN108596882B (en) The recognition methods of pathological picture and device
Ding et al. Multi-scale fully convolutional network for gland segmentation using three-class classification
Zheng et al. Application of transfer learning and ensemble learning in image-level classification for breast histopathology
Gertych et al. Machine learning approaches to analyze histological images of tissues from radical prostatectomies
Van Eycke et al. Segmentation of glandular epithelium in colorectal tumours to automatically compartmentalise IHC biomarker quantification: A deep learning approach
US20220058839A1 (en) Translation of images of stained biological material
CN108537168B (en) Facial expression recognition method based on transfer learning technology
CN117015796A (en) Method for processing tissue images and system for processing tissue images
CN111598875A (en) Method, system and device for building thyroid nodule automatic detection model
Sikder et al. Supervised learning-based cancer detection
CN116884597A (en) Pathological image breast cancer molecular typing method and system based on self-supervision pre-training and multi-example learning
Kabir et al. The utility of a deep learning-based approach in Her-2/neu assessment in breast cancer
CN111899259A (en) Prostate cancer tissue microarray classification method based on convolutional neural network
CN115641317B (en) Pathological image-oriented dynamic knowledge backtracking multi-example learning and image classification method
CN110930369B (en) Pathological section identification method based on group et-variable neural network and conditional probability field
Oh et al. Scribble-supervised cell segmentation using multiscale contrastive regularization
CN117038004A (en) Method for predicting HER2 state of breast cancer and method for predicting therapeutic response of targeted drug
Bruch et al. Evaluation of semi-supervised learning using sparse labeling to segment cell nuclei
Zheng et al. WPNet: Wide Pyramid Network for Recognition of HER2 Expression Levels in Breast Cancer Evaluation
Subramanya Deep learning models to characterize smooth muscle fibers in hematoxylin and eosin stained histopathological images of the urinary bladder
Parvaiz et al. An Attention-Driven Hybrid Network for Survival Analysis of Tumorigenesis Patients Using Whole Slide Images
CN118736579B (en) Cell segmentation model training method, cell segmentation method and system
KR102727081B1 (en) Method and apparatus for bottom-up segmentation of instance

Legal Events

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