CN114550169A - Training method, device, equipment and medium for cell classification model - Google Patents

Training method, device, equipment and medium for cell classification model Download PDF

Info

Publication number
CN114550169A
CN114550169A CN202210167143.6A CN202210167143A CN114550169A CN 114550169 A CN114550169 A CN 114550169A CN 202210167143 A CN202210167143 A CN 202210167143A CN 114550169 A CN114550169 A CN 114550169A
Authority
CN
China
Prior art keywords
cell
sample
image
classification
cells
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210167143.6A
Other languages
Chinese (zh)
Inventor
董培
韩骁
刘月平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Fourth Hospital of Hebei Medical University Hebei Cancer Hospital
Original Assignee
Tencent Technology Shenzhen Co Ltd
Fourth Hospital of Hebei Medical University Hebei Cancer 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 Tencent Technology Shenzhen Co Ltd, Fourth Hospital of Hebei Medical University Hebei Cancer Hospital filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210167143.6A priority Critical patent/CN114550169A/en
Publication of CN114550169A publication Critical patent/CN114550169A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24137Distances to cluster centroïds
    • G06F18/2414Smoothing the distance, e.g. radial basis function networks [RBFN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Investigating Or Analysing Biological Materials (AREA)

Abstract

The application discloses a training method, a device, equipment and a medium of a cell classification model, and relates to the field of machine learning. The method comprises the following steps: acquiring a sample image and a cell label of the sample image, wherein the sample image comprises at least two cells, and the cell label is used for indicating the type of the cells in the sample image; performing data processing on the sample image through a cell classification model, and outputting a sample prediction hot spot diagram which is used for predicting the type of cells in the sample image; restoring the contour of each cell in the sample image through the contour of each cell nucleus in the sample image to obtain a cell segmentation image; generating a sample classification heat point diagram according to the cell marking and the cell segmentation diagram, wherein the sample classification heat point diagram is used for representing the types of the cells in the cell segmentation diagram; and training the cell classification model according to the loss between the sample prediction hotspot graph and the sample classification hotspot graph. The method and the device can realize weak supervised learning and improve the accuracy of the model.

Description

细胞分类模型的训练方法、装置、设备及介质Training method, device, equipment and medium for cell classification model

技术领域technical field

本申请涉及机器学习领域,特别涉及一种细胞分类模型的训练方法、装置、设备及介质。The present application relates to the field of machine learning, and in particular, to a training method, apparatus, device and medium for a cell classification model.

背景技术Background technique

现代医学对肿瘤的研究与理解推陈出新,治疗恶性肿瘤的手段不断进步,其中,免疫治疗是一项重要的对抗癌症方式,免疫治疗的实施要求用户的肿瘤细胞、单核炎症细胞的计数符合要求。Modern medicine's research and understanding of tumors have brought forth new ones, and the means of treating malignant tumors are constantly improving. Among them, immunotherapy is an important way to fight cancer. The implementation of immunotherapy requires the user's tumor cells and mononuclear inflammatory cells to meet the requirements.

相关技术需要技术人员预先标注出细胞类型,在对细胞分类模型进行训练时,需要先将样本图像切分为若干子区域,将子区域对应的图像依次输入到细胞分类模型中。计算细胞分类模型输出的预测结果同细胞的形态和类型之间的差值,根据差值对细胞分类模型进行分阶段的训练,以得到训练完成的细胞分类模型。The related art requires technicians to pre-mark the cell types. When training the cell classification model, the sample image needs to be divided into several sub-regions, and the images corresponding to the sub-regions are sequentially input into the cell classification model. Calculate the difference between the prediction result output by the cell classification model and the shape and type of the cell, and train the cell classification model in stages according to the difference to obtain the trained cell classification model.

但是样本图像的细胞标注提供的信息量有限,使得相关技术的精确度较低。However, the limited amount of information provided by cell annotations in sample images makes the related techniques less accurate.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种细胞分类模型的训练方法、装置、设备及介质,该方法可以还原出细胞的轮廓,从样本图像中提取出更多的信息,使分类结果更加准确,所述技术方案如下:The embodiments of the present application provide a training method, device, equipment and medium for a cell classification model, the method can restore the outline of cells, extract more information from sample images, and make the classification results more accurate. The plan is as follows:

根据本申请的一个方面,提供了一种细胞分类模型的训练方法,该方法包括:According to one aspect of the present application, there is provided a method for training a cell classification model, the method comprising:

获取样本图像和所述样本图像的细胞标注,所述样本图像包括至少两种细胞,所述细胞标注用于表示所述样本图像中细胞的类型;acquiring a sample image and a cell annotation of the sample image, the sample image includes at least two types of cells, and the cell annotation is used to represent the type of cells in the sample image;

通过所述细胞分类模型对所述样本图像进行数据处理,输出样本预测热点图,所述样本预测热点图用于预测所述样本图像中细胞的类型;Data processing is performed on the sample image by the cell classification model, and a sample prediction heat map is output, where the sample prediction heat map is used to predict the type of cells in the sample image;

通过所述样本图像中各个细胞核的轮廓,还原所述样本图像中各个细胞的轮廓,得到细胞分割图;Through the contour of each cell nucleus in the sample image, the contour of each cell in the sample image is restored to obtain a cell segmentation map;

根据所述细胞标注和所述细胞分割图生成样本分类热点图,所述样本分类热点图用于表示所述细胞分割图中细胞的类型;generating a sample classification heat map according to the cell labeling and the cell segmentation map, where the sample classification heat map is used to represent the types of cells in the cell segmentation map;

根据所述样本预测热点图与所述样本分类热点图之间的损失,对所述细胞分类模型进行训练。The cell classification model is trained according to the loss between the sample prediction heat map and the sample classification heat map.

根据本申请的一个方面,提供了一种细胞分类模型的训练装置,该装置包括:According to one aspect of the present application, there is provided a training device for a cell classification model, the device comprising:

样本获取模块,用于获取样本图像和所述样本图像的细胞标注,所述样本图像包括至少两种细胞,所述细胞标注用于表示所述样本图像中细胞的类型;a sample acquisition module, configured to acquire a sample image and a cell label of the sample image, the sample image includes at least two types of cells, and the cell label is used to indicate the type of cells in the sample image;

数据处理模块,用于通过所述细胞分类模型对所述样本图像进行数据处理,输出样本预测热点图,所述样本预测热点图用于预测所述样本图像中细胞的类型;a data processing module, configured to perform data processing on the sample image through the cell classification model, and output a sample prediction heat map, where the sample prediction heat map is used to predict the type of cells in the sample image;

所述数据处理模块,还用于通过所述样本图像中各个细胞核的轮廓,还原所述样本图像中各个细胞的轮廓,得到细胞分割图;The data processing module is further configured to restore the contour of each cell in the sample image by using the contour of each cell nucleus in the sample image to obtain a cell segmentation map;

所述数据处理模块,还用于根据所述细胞标注和所述细胞分割图生成样本分类热点图,所述样本分类热点图用于表示所述细胞分割图中细胞的类型;The data processing module is further configured to generate a sample classification heat map according to the cell labeling and the cell segmentation map, where the sample classification heat map is used to represent the type of cells in the cell segmentation map;

训练模块,用于根据所述样本预测热点图与所述样本分类热点图之间的损失,对所述细胞分类模型进行训练。A training module, configured to train the cell classification model according to the loss between the sample prediction heat map and the sample classification heat map.

根据本申请的一个方面,提供了一种细胞分类方法,所述方法由计算机设备执行,所述计算机设备运行有如上述的细胞分类模型,该方法包括:According to an aspect of the present application, there is provided a cell classification method, the method is performed by a computer device, and the computer device runs the above-mentioned cell classification model, the method comprising:

获取输入图像,所述输入图像包括至少两种类型的细胞;acquiring an input image, the input image including at least two types of cells;

通过所述细胞分类模型对所述输入图像进行数据处理,输出预测热点图,所述预测热点图用于表示细胞属于目标细胞类型的概率;Data processing is performed on the input image by the cell classification model, and a predicted heat map is output, where the predicted heat map is used to represent the probability that the cell belongs to the target cell type;

根据所述预测热点图,确定所述输入图像中各个细胞的类型。Based on the predicted heat map, the type of each cell in the input image is determined.

根据本申请的一个方面,提供了一种细胞分类装置,所述装置运行有如上述的细胞分类模型,该装置包括:According to one aspect of the present application, there is provided a cell sorting device, the device running the cell sorting model as described above, the device comprising:

图像获取模块,用于获取输入图像,所述输入图像包括至少两种类型的细胞;an image acquisition module for acquiring an input image, the input image including at least two types of cells;

模型调用模块,用于通过所述细胞分类模型对所述输入图像进行数据处理,输出预测热点图,所述预测热点图用于表示细胞属于目标细胞类型的概率;a model calling module, configured to perform data processing on the input image through the cell classification model, and output a predicted heat map, where the predicted heat map is used to represent the probability that a cell belongs to a target cell type;

预测模块,用于根据所述预测热点图,确定所述输入图像中各个细胞的类型。A prediction module, configured to determine the type of each cell in the input image according to the predicted heat map.

根据本申请的另一方面,提供了一种计算机设备,该计算机设备包括:处理器和存储器,存储器中存储有至少一条指令、至少一段程序、代码集或指令集,至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行以实现如上方面所述的细胞分类模型的分类方法,或,细胞分类方法。According to another aspect of the present application, a computer device is provided, the computer device comprising: a processor and a memory, and the memory stores at least one instruction, at least one program, code set or instruction set, at least one instruction, at least one program , a code set or an instruction set is loaded and executed by the processor to implement the classification method of the cell classification model as described in the above aspect, or, the cell classification method.

根据本申请的另一方面,提供了一种计算机存储介质,计算机可读存储介质中存储有至少一条程序代码,程序代码由处理器加载并执行以实现如上方面所述的细胞分类模型的分类方法,或,细胞分类方法。According to another aspect of the present application, a computer storage medium is provided, in which at least one program code is stored, the program code is loaded and executed by a processor to implement the classification method of the cell classification model as described in the above aspect , or, cell sorting methods.

根据本申请的另一方面,提供了一种计算机程序产品或计算机程序,上述计算机程序产品或计算机程序包括计算机指令,上述计算机指令存储在计算机可读存储介质中。计算机设备的处理器从上述计算机可读存储介质读取上述计算机指令,上述处理器执行上述计算机指令,使得上述计算机设备执行如上方面所述的细胞分类模型的分类方法,或,细胞分类方法。According to another aspect of the present application, a computer program product or computer program is provided, and the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the classification method of the cell classification model, or the cell classification method.

本申请实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided in the embodiments of the present application include at least:

在对细胞分类模型进行训练时,将样本图像的细胞标注转化为更加复杂的细胞分割图,细胞分割图包括与细胞形态相关的信息,通过细胞分割图得到样本分类热点图,并根据样本分类热点图和样本图像的样本预测热点图对细胞分类模型。由于本申请实施例在对细胞分类模型进行训练时,通过简单的细胞标注还原出样本图像中各个细胞的轮廓,进而从样本图像中提取出更多的信息用于对细胞分类模型的训练,不仅可以有效提高细胞分类模型的分类结果的准确度,而且,由于训练细胞分类模型只需要用到细胞类型的标注,不需要提供细胞形态的标注,因此可以实现弱监督学习,提高训练效率。When training the cell classification model, the cell labeling of the sample image is converted into a more complex cell segmentation map. The cell segmentation map includes information related to cell morphology. The sample classification heat map is obtained through the cell segmentation map, and the hot spots are classified according to the sample. A sample prediction heatmap of the graph and sample images for the cell classification model. When the cell classification model is trained in the embodiment of the present application, the outline of each cell in the sample image is restored through simple cell labeling, and more information is extracted from the sample image for training the cell classification model, not only It can effectively improve the accuracy of the classification results of the cell classification model. Moreover, since the training of the cell classification model only needs to use the labeling of cell types and does not need to provide the labeling of cell morphology, weakly supervised learning can be implemented and training efficiency can be improved.

附图说明Description of drawings

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

图1是本申请一个示例性实施例提供的计算机系统的结构示意图;1 is a schematic structural diagram of a computer system provided by an exemplary embodiment of the present application;

图2是本申请一个示例性实施例提供的细胞分类模型的训练方法的示意图;2 is a schematic diagram of a training method of a cell classification model provided by an exemplary embodiment of the present application;

图3是本申请一个示例性实施例提供的细胞分类模型的训练方法的流程示意图;3 is a schematic flowchart of a training method for a cell classification model provided by an exemplary embodiment of the present application;

图4是本申请一个示例性实施例提供的样本图像的示意图;FIG. 4 is a schematic diagram of a sample image provided by an exemplary embodiment of the present application;

图5是本申请一个示例性实施例提供的细胞标注的示意图;5 is a schematic diagram of cell labeling provided by an exemplary embodiment of the present application;

图6是本申请一个示例性实施例提供的细胞分类模型的训练方法的流程示意图;6 is a schematic flowchart of a training method for a cell classification model provided by an exemplary embodiment of the present application;

图7是本申请一个示例性实施例提供的膨胀算子的示意图;7 is a schematic diagram of a dilation operator provided by an exemplary embodiment of the present application;

图8是本申请一个示例性实施例提供的膨胀算子的示意图;8 is a schematic diagram of a dilation operator provided by an exemplary embodiment of the present application;

图9是本申请一个示例性实施例提供的生成图像领域的示意图;FIG. 9 is a schematic diagram of an image generation field provided by an exemplary embodiment of the present application;

图10是本申请一个示例性实施例提供的生成图像领域的示意图;FIG. 10 is a schematic diagram of the field of generating images provided by an exemplary embodiment of the present application;

图11是本申请一个示例性实施例提供的细胞分类方法的示意图;11 is a schematic diagram of a cell classification method provided by an exemplary embodiment of the present application;

图12是本申请一个示例性实施例提供的细胞分类方法的流程示意图;12 is a schematic flowchart of a cell classification method provided by an exemplary embodiment of the present application;

图13是本申请一个示例性实施例提供的分类结果对比示意图;13 is a schematic diagram of a comparison of classification results provided by an exemplary embodiment of the present application;

图14是本申请一个示例性实施例提供的分类结果对比示意图;14 is a schematic diagram of a comparison of classification results provided by an exemplary embodiment of the present application;

图15是本申请一个示例性实施例提供的细胞分类模型的训练装置的框图;FIG. 15 is a block diagram of a training device for a cell classification model provided by an exemplary embodiment of the present application;

图16是本申请一个示例性实施例提供的细胞分类装置的框图;16 is a block diagram of a cell sorting device provided by an exemplary embodiment of the present application;

图17是本申请一个示例性实施例提供的计算机设备的结构示意图。FIG. 17 is a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

首先,对本申请实施例中涉及的名词进行介绍:First, the terms involved in the embodiments of the present application are introduced:

人工智能(Artificial Intelligence,AI):是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。Artificial Intelligence (AI): It is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.

人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, including both hardware-level technology and software-level technology. The basic technologies of artificial intelligence generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning/deep learning.

计算机视觉技术(Computer Vision,CV):计算机视觉是一门研究如何使机器“看”的科学,更进一步的说,就是指用摄影机和电脑代替人眼对目标进行识别和测量等机器视觉,并进一步做图形处理,使电脑处理成为更适合人眼观察或传送给仪器检测的图像。作为一个科学学科,计算机视觉研究相关的理论和技术,试图建立能够从图像或者多维数据中获取信息的人工智能系统。计算机视觉技术通常包括图像处理、图像识别、图像语义理解、图像检索、OCR(Optical Character Recognition,光学字符识别)、视频处理、视频语义理解、视频内容/行为识别、三维物体重建、3D技术、虚拟现实、增强现实、同步定位与地图构建等技术,还包括常见的人脸识别、指纹识别等生物特征识别技术。Computer Vision (CV): Computer vision is a science that studies how to make machines "see". Further, it refers to the use of cameras and computers instead of human eyes to identify and measure objects and other machine vision, and Further graphics processing makes computer processing become images more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, trying to build artificial intelligence systems that can obtain information from images or multidimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition, Optical Character Recognition), video processing, video semantic understanding, video content/behavior recognition, 3D object reconstruction, 3D technology, virtual Reality, augmented reality, simultaneous positioning and map construction and other technologies, as well as common biometric identification technologies such as face recognition and fingerprint recognition.

机器学习(Machine Learning,ML):是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、示教学习等技术。Machine Learning (ML): It is a multi-field interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other subjects. It specializes in how computers simulate or realize human learning behaviors to acquire new knowledge or skills, and to reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications are in all fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, teaching learning and other techniques.

IHC(immunohistochemistry,免疫组织化学):是病理学上使用特异性一抗对组织样品中的细胞蛋白进行标记,并使用检测试剂可视化靶标。可以使用IHC并通过显色法检测或荧光检测评估蛋白质表达。IHC (immunohistochemistry, immunohistochemistry): Pathologically, specific primary antibodies are used to label cellular proteins in tissue samples, and detection reagents are used to visualize the targets. Protein expression can be assessed using IHC and by chromogenic detection or fluorescence detection.

PD-L1(Programmed Death-Ligand 1,细胞程序死亡-配体1):是人类体内的一种蛋白质。它是一种跨膜蛋白,与免疫系统的抑制有关。PD-L1 (Programmed Death-Ligand 1, programmed death-ligand 1): is a protein in the human body. It is a transmembrane protein and has been implicated in the suppression of the immune system.

Pembrolizumab(帕博利珠单抗):是用于癌症免疫疗法的人源化PD-1(ProgrammedDeath-1,细胞程序死亡-1)单克隆抗体。用于治疗非小细胞肺癌、尿路上皮癌、食管鳞状细胞癌、三阴性乳腺癌等多种适应症。Pembrolizumab (Pembrolizumab): is a humanized PD-1 (Programmed Death-1, programmed death-1) monoclonal antibody for cancer immunotherapy. For the treatment of non-small cell lung cancer, urothelial carcinoma, esophageal squamous cell carcinoma, triple negative breast cancer and other indications.

CPS(Combined Positive Score,综合阳性评分):是判断适应症用户是否采用Pembrolizumab进行免疫治疗的PD-L1检测的判读指标。CPS (Combined Positive Score): It is an interpretive indicator for PD-L1 detection for judging whether the indication user uses Pembrolizumab for immunotherapy.

Figure BDA0003516775150000061
Figure BDA0003516775150000061

若依照该公式计算的CPS值大于100则认为CPS等于100。CPS用于头颈鳞癌、胃或胃食管交界处腺癌、宫颈癌、尿路上皮癌、食管鳞癌和三阴性乳腺癌等适应症的PD-L1检测与患者分类。If the CPS value calculated according to this formula is greater than 100, the CPS is considered to be equal to 100. CPS is used for PD-L1 detection and patient classification in indications such as head and neck squamous cell carcinoma, gastric or gastroesophageal junction adenocarcinoma, cervical cancer, urothelial carcinoma, esophageal squamous cell carcinoma, and triple-negative breast cancer.

随着人工智能技术研究和进步,人工智能技术在多个领域展开研究和应用,例如常见的智能医疗、智能家居、智能穿戴设备、虚拟助理、智能音箱、智能营销、无人驾驶、自动驾驶、无人机、机器人、智能医疗、智能客服等,相信随着技术的发展,人工智能技术将在更多的领域得到应用,并发挥越来越重要的价值。With the research and progress of artificial intelligence technology, artificial intelligence technology has been researched and applied in many fields, such as common smart medical care, smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important value.

需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请中涉及到的图像以及用户信息都是在充分授权的情况下获取的。It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in this application, All are authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the images and user information involved in this application are obtained with full authorization.

图1示出了本申请一个示例性实施例提供的计算机系统的结构示意图。计算机系统100包括:终端120和服务器140。FIG. 1 shows a schematic structural diagram of a computer system provided by an exemplary embodiment of the present application. The computer system 100 includes: a terminal 120 and a server 140 .

终端120上安装有与细胞分类相关的应用程序。该应用程序可以是app(application,应用程序)中的小程序,也可以是专门的应用程序,也可以是网页客户端。示例性的,在用户是医生的情况下,用户从终端120上获取到患者的细胞分类的结果,通过该结果确定患者的病情。终端120是智能手机、平板电脑、电子书阅读器、MP3播放器、MP4播放器、膝上型便携计算机和台式计算机中的至少一种。Application programs related to cell classification are installed on the terminal 120 . The application may be a small program in an app (application, application), a special application, or a web client. Exemplarily, when the user is a doctor, the user obtains the result of cell classification of the patient from the terminal 120, and determines the condition of the patient through the result. The terminal 120 is at least one of a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.

终端120通过无线网络或有线网络与服务器140相连。The terminal 120 is connected to the server 140 through a wireless network or a wired network.

服务器140可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content Delivery Network,内容分发网络)、以及大数据和人工智能平台等基础云计算服务的云服务器。服务器140用于为细胞分类的应用程序提供后台服务,并将视频与细胞分类相关的信息发送到终端120上。可选地,服务器140承担主要计算工作,终端120承担次要计算工作;或者,服务器140承担次要计算工作,终端120承担主要计算工作;或者,服务器140和终端120两者采用分布式计算架构进行协同计算。The server 140 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, Cloud servers for basic cloud computing services such as middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server 140 is used for providing background services for the application program of cell classification, and sending information related to the video and cell classification to the terminal 120 . Optionally, the server 140 undertakes the main computing work, and the terminal 120 undertakes the secondary computing work; or, the server 140 undertakes the secondary computing work, and the terminal 120 undertakes the main computing work; or, both the server 140 and the terminal 120 adopt a distributed computing architecture perform collaborative computing.

图2示出了本申请一个示例性实施例提供的细胞分类模型的训练方法的示意图。FIG. 2 shows a schematic diagram of a training method of a cell classification model provided by an exemplary embodiment of the present application.

对样本图像201进行颜色反卷积得到样本通道图像202,其中,颜色反卷积用于分离样本图像201中的目标颜色,示例性的,目标颜色是棕黄色、蓝色、粉红色中的至少一种,具体的,目标颜色可由技术人员根据实际需求进行调整。将样本图像201和样本通道图像202输入到细胞分类模型200中,由细胞分类模型200对样本图像201中的细胞进行分类,得到样本预测热点图203,样本预测热点图203用于预测样本图像201中细胞的类型的热点图。示例性的,细胞分类模型200是U-Net(U形网络),细胞分类模型200包括第一特征编码模块和第一上采样解码模块。细胞分类模型200对样本图像201进行上采样和下采样,得到样本预测热点图203。其中,细胞分类模型200还可以是其它类型的分类模型。The sample channel image 202 is obtained by performing color deconvolution on the sample image 201, wherein the color deconvolution is used to separate the target color in the sample image 201. Exemplarily, the target color is at least one of brownish yellow, blue, and pink. One, specifically, the target color can be adjusted by technicians according to actual needs. The sample image 201 and the sample channel image 202 are input into the cell classification model 200, the cells in the sample image 201 are classified by the cell classification model 200, and the sample prediction heat map 203 is obtained, and the sample prediction heat map 203 is used to predict the sample image 201. A heat map of the types of cells in the . Exemplarily, the cell classification model 200 is a U-Net (U-shaped network), and the cell classification model 200 includes a first feature encoding module and a first upsampling decoding module. The cell classification model 200 upsamples and downsamples the sample image 201 to obtain a sample prediction heat map 203 . The cell classification model 200 may also be other types of classification models.

对样本图像201进行细胞核分割,确定样本图像201中各个细胞的细胞核轮廓,从而生成细胞核示意图204。在接下来的步骤中,对细胞核示意图204进行图像后处理,生成细胞分割图205。图像后处理用于根据细胞核的轮廓还原细胞的轮廓。以细胞标注206为参考,对细胞分割图205进行分类,得到样本分类热点图207,样本分类热点图207用于表示样本图像201中细胞的类型的热点图。The cell nucleus is segmented on the sample image 201 , and the outline of the cell nucleus of each cell in the sample image 201 is determined, thereby generating a schematic diagram of the cell nucleus 204 . In the next step, image post-processing is performed on the cell nucleus schematic 204 to generate a cell segmentation map 205 . Image postprocessing is used to restore the contours of the cells from the contours of the nuclei. Taking the cell labeling 206 as a reference, the cell segmentation map 205 is classified to obtain a sample classification heat map 207 . The sample classification heat map 207 is used to represent a heat map of the types of cells in the sample image 201 .

计算样本预测热点图203和样本分类热点图207之间的第一损失208,以及计算样本预测热点图203、细胞标注206和样本分类热点图207之间的第二损失209,第一损失208用于表示样本预测热点图与样本分类热点图之间的差值,第二损失209用于在对细胞分类模型200的训练过程,根据细胞核(或染色体)呈现出的位置和纹理特征对细胞分类模型200进行优化和学习。根据第一损失208和第二损失209对细胞分类模型200进行训练。Calculate the first loss 208 between the sample prediction heat map 203 and the sample classification heat map 207, and calculate the second loss 209 between the sample prediction heat map 203, cell annotation 206 and the sample classification heat map 207, the first loss 208 is used In order to represent the difference between the sample prediction heat map and the sample classification heat map, the second loss 209 is used in the training process of the cell classification model 200 to classify the cell classification model according to the position and texture features presented by the nucleus (or chromosome). 200 for optimization and learning. The cell classification model 200 is trained according to the first loss 208 and the second loss 209 .

图3示出了本申请一个示例性实施例提供的细胞分类模型的训练方法的流程示意图。该方法可由图1所示的计算机系统100执行,该方法包括:FIG. 3 shows a schematic flowchart of a training method for a cell classification model provided by an exemplary embodiment of the present application. The method can be performed by the computer system 100 shown in FIG. 1, and the method includes:

步骤302:获取样本图像和样本图像的细胞标注,样本图像包括至少两种细胞,细胞标注用于表示样本图像中细胞的类型。Step 302: Obtain a sample image and a cell label of the sample image, the sample image includes at least two types of cells, and the cell label is used to indicate the type of cells in the sample image.

可选地,样本图像是染色后的病理切片的电子化图像。示例性的,如图4所示,样本图像401显示有染色后的细胞。需要说明的是,由于细胞核拥有细胞中的大部分染色体,因此对细胞染色后,细胞中被染色的部分是细胞核。Optionally, the sample image is an electronic image of a stained pathological section. Illustratively, as shown in FIG. 4, a sample image 401 shows stained cells. It should be noted that since the nucleus contains most of the chromosomes in the cell, after staining the cell, the stained part of the cell is the nucleus.

可选地,样本图像属于RGB彩色数字图像。在一种可选的设计中,样本图像的像素物理尺寸不大于0.5μm/pixel(微米/像素),像素物理尺寸用于表示单个像素的实际物理尺寸。Optionally, the sample image is an RGB color digital image. In an optional design, the pixel physical size of the sample image is not greater than 0.5 μm/pixel (micrometer/pixel), and the pixel physical size is used to represent the actual physical size of a single pixel.

不同类型的细胞会表现出不同的形态,由于病理切片本身是透明的,需要对病理切片进行染色才能观察到细胞的形态,而染色剂同时又能和特定类型的细胞或特定类型的物质产生反映,进而呈现出不同的颜色。以DAB作为染色剂为例,DAB能使阳性反映的细胞或物质呈现出棕黄色,具体的,DAB能使病变细胞呈现出棕黄色。Different types of cells will show different shapes. Since the pathological section itself is transparent, it is necessary to stain the pathological section to observe the shape of the cells, and the dye can also reflect specific types of cells or specific types of substances. , and show different colors. Taking DAB as a dyeing agent as an example, DAB can make positive cells or substances appear brownish-yellow. Specifically, DAB can make diseased cells appear brownish-yellow.

可选地,细胞的类型包括但不限于阳性肿瘤细胞、阴性肿瘤细胞、阳性单核炎细胞和阴性单核炎细胞中的至少一种。Optionally, the type of cells includes, but is not limited to, at least one of positive tumor cells, negative tumor cells, positive mononuclear inflammatory cells, and negative mononuclear inflammatory cells.

可选地,细胞标注属于点标注,即,在样本图像中采用一个点来表示细胞或细胞核。可选地,细胞标注是位于细胞核中心点的标注。示例性的,如图4和图5所示,在细胞标注501中,采用点来替代样本图像401中的染色后的细胞核。Optionally, the cell annotation belongs to point annotation, that is, a point is used to represent a cell or nucleus in the sample image. Optionally, the cell annotation is an annotation located at the center of the nucleus. Exemplarily, as shown in FIGS. 4 and 5 , in the cell annotation 501 , dots are used to replace the stained cell nuclei in the sample image 401 .

可选地,对样本图像中的所有细胞做标注,采用不同的颜色标注不同类型的细胞。示例性的,对细胞上的所有像素点做标注。示例性的,对细胞核上的所有像素点做标注。示例性的,取细胞的中心点,对该中心点做标注。Optionally, label all cells in the sample image, and use different colors to label different types of cells. Exemplarily, label all pixels on the cell. Exemplarily, all pixels on the nucleus are marked. Exemplarily, the center point of the cell is taken, and the center point is marked.

可选地,细胞标注包括每个点的横坐标值、纵坐标值和类别标签值。Optionally, the cell label includes the abscissa value, ordinate value and class label value of each point.

可选地,使用不同颜色来代表不同类型的细胞。示例性的,使用红色表示阳性肿瘤细胞,使用绿色表示阴性肿瘤细胞,使用黄色表示阳性单核炎细胞,使用蓝色表示阴性单核炎细胞。可选地,使用不同形状来表示不同类型的细胞。示例性的,使用矩形表示阳性肿瘤细胞,使用圆形表示阴性肿瘤细胞。Optionally, different colors are used to represent different types of cells. Exemplarily, red is used for positive tumor cells, green is used for negative tumor cells, yellow is used for positive mononuclear inflammatory cells, and blue is used for negative mononuclear inflammatory cells. Optionally, different shapes are used to represent different types of cells. Exemplarily, rectangles are used to represent positive tumor cells and circles are used to represent negative tumor cells.

步骤304:通过细胞分类模型对样本图像进行数据处理,输出样本预测热点图,样本预测热点图用于预测样本图像中细胞的类型。Step 304 : perform data processing on the sample image through the cell classification model, output a sample prediction heat map, and the sample prediction heat map is used to predict the type of cells in the sample image.

细胞分类模型是用于预测细胞类型的模型。可选地,细胞分类模型属于U-Net(U形网络),细胞分类模型包括第一特征编码模块和第一上采样解码模块。其中,第一特征编码模块用于对样本图像进行图像下采样,从样本图像中提取图像特征,该图像特征与细胞类型的分类相关。第一上采样解码模块用于将图像下采样结果的尺寸还原为样本图像的尺寸。示例性的,样本图像为32×32大小的图像,通过第一特征编码模块,对样本图像进行图像下采样,得到4张4×4的图像特征。调用第一上采样解码模块,对这4张4×4的图像特征进行图像上采样,得到4张32×32的图像预测结果,其中,图像预测结果用于表示一种细胞类型的预测结果。Cell classification models are models used to predict cell types. Optionally, the cell classification model belongs to U-Net (U-shaped network), and the cell classification model includes a first feature encoding module and a first upsampling decoding module. Wherein, the first feature encoding module is used to perform image downsampling on the sample image, and extract image features from the sample image, and the image features are related to the classification of cell types. The first up-sampling decoding module is used to restore the size of the image down-sampling result to the size of the sample image. Exemplarily, the sample image is an image with a size of 32×32, and the first feature encoding module performs image downsampling on the sample image to obtain four 4×4 image features. The first upsampling decoding module is called to perform image upsampling on the four 4×4 image features to obtain four 32×32 image prediction results, wherein the image prediction results are used to represent the prediction results of one cell type.

可选地,细胞分类模型是用于目标检测的模型,或者是用于图像分割的模型。示例性的,细胞分类模型还可以是Transformer模型。本申请实施例对细胞分类模型的模型类型不做具体限定。Optionally, the cell classification model is a model for object detection, or a model for image segmentation. Exemplarily, the cell classification model can also be a Transformer model. The embodiment of the present application does not specifically limit the model type of the cell classification model.

可选地,样本预测热点图是用于预测样本图像中a个细胞类型的热点图,其中,第b个热点图用于显示第b种细胞,a表示细胞类型的数量,b是小于a的正整数。例如,在热点图1中只显示细胞类型A的细胞,在热点图2中只显示细胞类型B的细胞。Optionally, the sample prediction heat map is a heat map used to predict a cell type in the sample image, wherein the bth heat map is used to display the bth type of cells, a represents the number of cell types, and b is less than a. positive integer. For example, only cells of cell type A are shown in heat map 1 and only cells of cell type B are shown in heat map 2.

可选地,分离样本图像的目标颜色,得到样本通道图像,样本通道图像是样本图像通过目标颜色的表达通道得到的图像;调用细胞分类模型对样本图像和样本通道图像进行数据处理,输出样本预测热点图。目标颜色是样本图像中目标细胞类型对应的颜色,比如,目标细胞类型是阳性肿瘤细胞时,阳性肿瘤细胞经染色后,会显示为棕黄色,则目标颜色指棕黄色。Optionally, the target color of the sample image is separated to obtain a sample channel image, and the sample channel image is an image obtained by the sample image through the expression channel of the target color; the cell classification model is called to perform data processing on the sample image and the sample channel image, and the sample prediction is output. Heat map. The target color is the color corresponding to the target cell type in the sample image. For example, when the target cell type is positive tumor cells, the positive tumor cells will appear brown after staining, and the target color is brown.

在一种可能的实现方式中,在Hematoxylin-Eosin-DAB染色空间上进行颜色分解,可以得到:表示DAB(棕黄色)的阳性表达通道、表示苏木素Hematoxylin(蓝色)复染的阴性表达通道和表示伊红Eosin(粉红色)的通道(在PD-L1染色中不出现),取DAB的阳性表达通道的输出结果作为样本通道图像,将RGB通道的样本图像和DAB通道的样本通道图像作为细胞分类模型的输入。可选地,将RGB通道的样本图像和色相通道的样本图像作为细胞分类模型的输入。或者,将RGB通道的样本图像和灰度通道的样本图像作为细胞分类模型的输入。In a possible implementation, color decomposition is performed on the Hematoxylin-Eosin-DAB staining space to obtain: a positive expression channel representing DAB (brown), a negative expression channel representing hematoxylin Hematoxylin (blue) counterstaining, and The channel representing Eosin (pink) (which does not appear in PD-L1 staining), the output of the positive expression channel of DAB is taken as the sample channel image, and the sample image of the RGB channel and the sample channel image of the DAB channel are taken as the cells Input to the classification model. Optionally, the sample image of RGB channel and the sample image of hue channel are used as the input of the cell classification model. Alternatively, a sample image of RGB channel and a sample image of gray channel are used as input to the cell classification model.

预测热点图的数量与颜色通道的数量相同。例如,采用RGB通道和DAB通道对输入图像进行数据处理后,得到4组预测热点图。The number of predicted heatmaps is the same as the number of color channels. For example, after data processing of the input image using RGB channels and DAB channels, 4 sets of predicted heat maps are obtained.

步骤306:通过样本图像中各个细胞核的轮廓,还原样本图像中各个细胞的轮廓,得到细胞分割图。Step 306: Restore the contour of each cell in the sample image by using the contour of each cell nucleus in the sample image to obtain a cell segmentation map.

可选地,通过细胞核分割模型对样本图像进行数据处理,输出样本图像中各个细胞核的轮廓。示例性的,细胞核分割模型属于U-Net神经网络。细胞核分割模型包括第二特征编码模块和第二上采样解码模块。Optionally, data processing is performed on the sample image through a cell nucleus segmentation model, and the outline of each cell nucleus in the sample image is output. Exemplarily, the cell nucleus segmentation model belongs to the U-Net neural network. The nucleus segmentation model includes a second feature encoding module and a second upsampling decoding module.

可选地,采用形态学的膨胀算子,通过样本图像中各个细胞核的轮廓,还原样本图像中各个细胞的轮廓。Optionally, a morphological dilation operator is used to restore the contour of each cell in the sample image through the contour of each cell nucleus in the sample image.

细胞分割图指与样本图像对应的包括细胞轮廓的图像。示例性的,如图所示,比较图和图,可以得到细胞分割图是对样本图像中各个细胞的轮廓的预测。A cell segmentation map refers to an image corresponding to a sample image including cell outlines. Exemplarily, as shown in the figure, by comparing the graph and the graph, it can be obtained that the cell segmentation graph is a prediction of the contour of each cell in the sample image.

步骤308:根据细胞标注和细胞分割图生成样本分类热点图,样本分类热点图用于表示细胞分割图中细胞的类型。Step 308: Generate a sample classification heat map according to the cell labeling and the cell segmentation map, where the sample classification heat map is used to represent the types of cells in the cell segmentation map.

可选地,样本分类热点图是用于表示样本图像中a个细胞类型的热点图,第c个热点图用于显示第c种细胞。例如,在热点图3中只显示细胞类型A的细胞,在热点图4中只显示细胞类型B的细胞。Optionally, the sample classification heat map is a heat map used to represent a cell type in the sample image, and the c th heat map is used to display the c th cell type. For example, only cells of cell type A are shown in heat map 3 and only cells of cell type B are shown in heat map 4.

步骤310:根据样本预测热点图与样本分类热点图之间的损失,对细胞分类模型进行训练。Step 310: Train the cell classification model according to the loss between the sample prediction heat map and the sample classification heat map.

可选地,样本预测热点图与样本分类热点图之间的损失包括第一损失和第二损失,第一损失用于表示样本预测热点图与样本分类热点图之间的差值,第二损失用于在对细胞分类模型的训练过程,根据细胞核(或染色体)呈现出的位置和纹理特征对细胞分类模型进行优化和学习。示例性的,根据样本预测热点图与样本分类热点图之间的第一损失,对细胞分类模型进行训练;或者,根据样本预测热点图与样本分类热点图之间的第二损失,对细胞分类模型进行训练;或者根据样本预测热点图与样本分类热点图之间的第一损失和第二损失,对细胞分类模型进行训练。Optionally, the loss between the sample prediction heat map and the sample classification heat map includes a first loss and a second loss, the first loss is used to represent the difference between the sample prediction heat map and the sample classification heat map, and the second loss is used to represent the difference between the sample prediction heat map and the sample classification heat map. It is used to optimize and learn the cell classification model according to the position and texture features presented by the nucleus (or chromosome) during the training process of the cell classification model. Exemplarily, the cell classification model is trained according to the first loss between the sample prediction heat map and the sample classification heat map; or, the cell classification model is trained according to the second loss between the sample prediction heat map and the sample classification heat map. The model is trained; or the cell classification model is trained according to the first loss and the second loss between the sample prediction heat map and the sample classification heat map.

可选地,计算样本预测热点图与样本分类热点图之间的均方误差,得到第一损失。Optionally, the mean square error between the sample prediction heat map and the sample classification heat map is calculated to obtain the first loss.

可选地,按照细胞标注提供的细胞类型,由样本预测热点图与样本分类热点图计算第二损失。第二损失用于表示稠密条件随机场的损失项。条件随机场(ConditionalRandom Field,CRF)是给定一组输入随机变量条件下,输出随机变量的条件概率分布模型,其特点是输出的随机变量构成马尔可夫随机场,可以用于标注或分析图像。稠密条件随机场是条件随机场的一种,若采用稠密条件随机场对图像中的像素点进行分类,则稠密条件随机场会将目标像素点与其他像素点进行关联,以得到目标像素点的类型,其他像素点指图像中与目标像素点存在关联的像素点。在本申请实施例中,将稠密条件随机场的损失项作为细胞分类模型的损失函数之一,对细胞分类模型进行训练。Optionally, according to the cell type provided by the cell label, the second loss is calculated from the sample prediction heat map and the sample classification heat map. The second loss is used to represent the loss term of the dense conditional random field. Conditional Random Field (CRF) is a conditional probability distribution model of output random variables given a set of input random variables. Its characteristic is that the output random variables constitute a Markov random field, which can be used to label or analyze images. . The dense conditional random field is a kind of conditional random field. If the dense conditional random field is used to classify the pixels in the image, the dense conditional random field will associate the target pixel point with other pixels to obtain the target pixel point. Type, other pixels refer to the pixels in the image that are associated with the target pixel. In the embodiment of the present application, the loss term of the dense conditional random field is used as one of the loss functions of the cell classification model to train the cell classification model.

示例性的,将稠密条件随机场的损失项(即第二损失)记为

Figure BDA0003516775150000111
则有:Exemplarily, the loss term (ie the second loss) of the dense conditional random field is denoted as
Figure BDA0003516775150000111
Then there are:

Figure BDA0003516775150000112
Figure BDA0003516775150000112

其中,M是每个通道图像的总像素数,

Figure BDA0003516775150000113
为细胞类别c对应的预测热点图,Wc为该类别的相似性度量矩阵。Wc在稠密条件随机场中是全连接的高斯,在相应的损失优化中计算其梯度会成为一个双边滤波问题。TCN表示阳性肿瘤细胞,TCP表示阴性肿瘤细胞,MICN表示阳性单核炎细胞,MICP表示阴性单核炎细胞。where M is the total number of pixels in the image per channel,
Figure BDA0003516775150000113
is the predicted heat map corresponding to cell category c, and W c is the similarity measure matrix of this category. W c is a fully connected Gaussian in a dense conditional random field, and computing its gradient in the corresponding loss optimization becomes a bilateral filtering problem. TCN indicates positive tumor cells, TCP indicates negative tumor cells, MIC N indicates positive mononuclear inflammatory cells, and MIC P indicates negative mononuclear inflammatory cells .

可选地,根据样本预测热点图与样本分类热点图之间的损失,通过误差反向传播算法,对细胞分类模型进行训练。Optionally, according to the loss between the sample prediction heat map and the sample classification heat map, the cell classification model is trained through an error back propagation algorithm.

综上所述,本实施例在对细胞分类模型进行训练时,将样本图像的细胞标注转化为更加复杂的细胞分割图,细胞分割图包括与细胞形态相关的信息,通过细胞分割图得到样本分类热点图,并根据样本分类热点图和样本图像的样本预测热点图对细胞分类模型。由于本申请实施例在对细胞分类模型进行训练时,通过简单的细胞标注还原出样本图像中各个细胞的轮廓,进而从样本图像中提取出更多的信息用于对细胞分类模型的训练,不仅可以有效提高细胞分类模型的分类结果的准确度,而且,由于训练细胞分类模型只需要用到细胞类型的标注,不需要提供细胞形态的标注,因此可以实现弱监督学习,提高训练效率。To sum up, when the cell classification model is trained in this embodiment, the cell labeling of the sample image is converted into a more complex cell segmentation map. The cell segmentation map includes information related to cell morphology, and the sample classification is obtained through the cell segmentation map. Heat map, and model cell classification based on sample classification heat map and sample prediction heat map of sample images. When the cell classification model is trained in the embodiment of the present application, the outline of each cell in the sample image is restored through simple cell labeling, and more information is extracted from the sample image for training the cell classification model, not only It can effectively improve the accuracy of the classification results of the cell classification model. Moreover, since the training of the cell classification model only needs to use the labeling of cell types and does not need to provide the labeling of cell morphology, weakly supervised learning can be implemented and training efficiency can be improved.

在接下来的实施例,将介绍根据细胞核的轮廓还原出细胞的轮廓的流程,该实施例可以将样本图像的细胞标注转化为细胞分割的更强的伪标签,使得在细胞分类模型的训练中,可以从样本图像中获取更多的信息,有利于细胞分类模型的训练,使得训练完成的细胞分类模型能够较为准确地对细胞进行分类。In the following embodiment, the process of restoring the contour of the cell according to the contour of the nucleus will be introduced. This embodiment can convert the cell label of the sample image into a stronger pseudo label for cell segmentation, so that in the training of the cell classification model , more information can be obtained from the sample images, which is beneficial to the training of the cell classification model, so that the trained cell classification model can classify cells more accurately.

图6示出了本申请一个示例性实施例提供的细胞分类模型的训练方法的流程示意图。该方法可由图1所示的计算机系统100执行,该方法包括:FIG. 6 shows a schematic flowchart of a training method for a cell classification model provided by an exemplary embodiment of the present application. The method can be performed by the computer system 100 shown in FIG. 1, and the method includes:

步骤601:使用膨胀算子遍历第i个细胞核的轮廓。Step 601: Use the dilation operator to traverse the contour of the ith cell nucleus.

膨胀算子用于膨胀第i个细胞核的占据区域,i为正整数。The dilation operator is used to dilate the occupied area of the i-th nucleus, where i is a positive integer.

膨胀算子的形状包括但不限于圆形、矩形、三角形、正六边形、正八边形中的至少一种。其中,膨胀算子的具体形状可以由技术人员根据实际需求进行修改。例如,在对样本图像A进行处理时,使用圆形的膨胀算子,在对样本图像B进行处理时,使用矩形的膨胀算子。The shape of the expansion operator includes, but is not limited to, at least one of a circle, a rectangle, a triangle, a regular hexagon, and a regular octagon. Wherein, the specific shape of the expansion operator can be modified by technicians according to actual needs. For example, when the sample image A is processed, a circular dilation operator is used, and when the sample image B is processed, a rectangular dilation operator is used.

可选地,膨胀算子的形态与膨胀算子的遍历距离有关,遍历距离用于表示在膨胀算子在遍历第i个细胞核的轮廓的过程中膨胀算子移动的距离。示例性的,膨胀算子在移动0.1微米后,膨胀算子是一个半径为5微米的圆,而膨胀算子在移动0.2微米后,膨胀算子是一个半径为5.1微米的圆。示例性的,膨胀算子的尺寸y=f(x),x表示膨胀算子的遍历距离,f(x)为自定义函数。Optionally, the shape of the dilation operator is related to the traversal distance of the dilation operator, and the traversal distance is used to represent the distance that the dilation operator moves during the process of traversing the contour of the i-th cell nucleus. Exemplarily, after the dilation operator is moved by 0.1 microns, the dilation operator is a circle with a radius of 5 microns, and after the dilation operator is moved by 0.2 microns, the dilation operator is a circle with a radius of 5.1 microns. Exemplarily, the size of the dilation operator y=f(x), x represents the traversal distance of the dilation operator, and f(x) is a self-defined function.

可选地,膨胀算子的形态与膨胀算子的中心点的曲率半径相关,该曲率半径指膨胀算子在遍历第i个细胞核的轮廓的过程中膨胀算子的中心点在第i个细胞核的轮廓上的曲率半径。示例性的,膨胀算子的中心点对应的曲率半径是4微米时,膨胀算子是一个半径为5微米的圆,而膨胀算子的中心点对应的曲率半径是3微米时,膨胀算子是一个边长为4微米的正方形。需要说明的是,上述的膨胀算子的形态可以指膨胀算子的半径、直径、边长、面积、形状中的至少一种。Optionally, the shape of the dilation operator is related to the radius of curvature of the center point of the dilation operator. The radius of curvature on the contour. Exemplarily, when the radius of curvature corresponding to the center point of the dilation operator is 4 microns, the dilation operator is a circle with a radius of 5 microns, and when the radius of curvature corresponding to the center point of the dilation operator is 3 microns, the dilation operator is a square with a side length of 4 microns. It should be noted that, the above-mentioned form of the expansion operator may refer to at least one of the radius, diameter, side length, area, and shape of the expansion operator.

示例性的,如图7所示,以膨胀算子702是圆为例进行说明,将膨胀算子702的圆心放到细胞核701的轮廓上,控制圆心在细胞核701的轮廓上移动,使膨胀算子702遍历细胞核701的轮廓。Exemplarily, as shown in FIG. 7 , taking the expansion operator 702 as a circle as an example, the center of the expansion operator 702 is placed on the outline of the cell nucleus 701, and the center of the circle is controlled to move on the outline of the cell nucleus 701, so that the expansion operator 702 is moved. Sub 702 traverses the outline of nucleus 701 .

步骤602:根据膨胀算子的覆盖区域确定第i个细胞核对应的图像领域。Step 602: Determine the image area corresponding to the ith cell nucleus according to the coverage area of the dilation operator.

第i个细胞核的图像领域用于预测第i个细胞在所述样本图像中占据的区域。第i个细胞是指含有第i个细胞核的细胞,在本申请实施例中,仅考虑一个细胞有且只有一个细胞核的情况。The image field of the ith cell nucleus is used to predict the area occupied by the ith cell in the sample image. The i-th cell refers to a cell containing the i-th cell nucleus. In the examples of the present application, only the case where one cell has and only one cell nucleus is considered.

膨胀算子的覆盖区域用于表示在膨胀算子历遍的过程中膨胀算子的占据区域的并集。示例性的,如图8所示,在膨胀算子702遍历细胞核701的过程中,当膨胀算子702在位置A处时,膨胀算子702会占据第一区域。当膨胀算子702在位置B处时,膨胀算子702会占据第二区域,取第一区域和第二区域的并集作为膨胀算子的覆盖区域。需要说明的是,膨胀算子的移动是一个连续的过程,这里是为了清楚地表达膨胀算子的遍历过程,才使用离散的两点用以说明。The coverage area of the dilation operator is used to represent the union of the occupied areas of the dilation operator during the traversal of the dilation operator. Exemplarily, as shown in FIG. 8 , in the process of traversing the cell nucleus 701 by the dilation operator 702 , when the dilation operator 702 is at the position A, the dilation operator 702 will occupy the first area. When the dilation operator 702 is at the position B, the dilation operator 702 will occupy the second area, and the union of the first area and the second area is taken as the coverage area of the dilation operator. It should be noted that the movement of the dilation operator is a continuous process. Here, in order to clearly express the traversal process of the dilation operator, two discrete points are used for illustration.

步骤603:根据第i个细胞核的图像领域确定第i个细胞的轮廓。Step 603: Determine the contour of the ith cell according to the image field of the ith cell nucleus.

在实际操作中,由于部分样本图像中的细胞会呈现聚集分布的特点,比如,样本图像用于显示肿瘤细胞巢团内、免疫细胞巢团内的细胞时。因此,这里需要将可能重叠的细胞邻域划分开。In practice, the cells in some sample images will exhibit the characteristics of aggregated distribution, for example, when the sample images are used to display cells in tumor cell nests and immune cell nests. Therefore, it is necessary to divide possible overlapping cell neighborhoods.

可选地,采用分水岭算法,根据第i个细胞核的图像领域确定第i个细胞的轮廓。示例性的,该方法包括以下子步骤:Optionally, a watershed algorithm is used to determine the contour of the ith cell according to the image field of the ith cell nucleus. Exemplarily, the method includes the following sub-steps:

1、扩展第i个细胞的图像领域,得到目标区域。1. Expand the image field of the i-th cell to obtain the target area.

其中,目标区域大于第i个细胞的图像领域。即,第i个细胞的图像领域位于目标区域内。Among them, the target area is larger than the image area of the ith cell. That is, the image field of the ith cell is located within the target area.

可选地,扩展第i个细胞的图像领域的方法可以是以第i个细胞的图像领域设置判定框,该判定框所占的区域记为目标区域。判定框的大小可由技术人员根据实际需求自行设置。扩展第i个细胞的图像领域的方法可以是采用上述形态学的膨胀算子来实现。Optionally, the method for expanding the image area of the ith cell may be to set a decision frame in the image area of the ith cell, and the area occupied by the decision frame is marked as the target area. The size of the decision box can be set by technicians according to actual needs. The method of expanding the image field of the ith cell can be realized by using the above-mentioned morphological dilation operator.

2、确定目标区域内属于灰度值区间的像素点。2. Determine the pixels in the target area that belong to the gray value range.

可选地,确定目标区域内属于目标灰度值的像素点。目标灰度值是一个常数。Optionally, determine the pixels in the target area that belong to the target gray value. The target gray value is a constant.

可选地,灰度值区间是动态生成的。例如,根据位于图像领域的边缘的像素点的灰度值生成灰度值区间。位于图像领域的边缘的像素点的灰度值在区间[2,8],则取该区间的子集作为灰度值区间,或者,取该区间内的目标灰度值作为灰度值区间。Optionally, the gray value interval is dynamically generated. For example, the gray value interval is generated according to the gray value of the pixel points located at the edge of the image area. If the gray value of the pixel at the edge of the image field is in the interval [2, 8], a subset of this interval is taken as the gray value interval, or the target gray value in this interval is taken as the gray value interval.

可选地,灰度值区间可由技术人员自行设置。例如,将灰度值区间直接设置为[1,10]。Optionally, the gray value interval can be set by a technician. For example, set the gray value interval directly to [1, 10].

3、连接属于灰度值区间的像素点,形成封闭区域。3. Connect the pixels belonging to the gray value range to form a closed area.

示例性的,如图9所示,对于第i个细胞的图像领域901,确定目标区域内属于目标灰度值的像素点902(为了描述方便,这里只显示了部分属于目标灰度值的像素点),使用光滑的曲线连接像素点902,得到封闭区域903。Exemplarily, as shown in FIG. 9, for the image field 901 of the i-th cell, determine the pixel points 902 belonging to the target gray value in the target area (for the convenience of description, only some of the pixels belonging to the target gray value are shown here. point), use a smooth curve to connect the pixel points 902 to obtain a closed area 903.

4、将封闭区域确定为第i个细胞的图像领域。4. Determine the closed area as the image area of the ith cell.

步骤604:重复上述三个步骤,直至确定各个细胞的轮廓,得到细胞分割图。Step 604: Repeat the above three steps until the contour of each cell is determined, and a cell segmentation map is obtained.

由于上述三个步骤只提供了一个细胞的轮廓,而样本图像是包括多个细胞的,因此,需要重复上述三个步骤以得到各个细胞的轮廓,进而生成细胞分割图。Since the above three steps only provide the outline of one cell, and the sample image includes multiple cells, it is necessary to repeat the above three steps to obtain the outline of each cell, and then generate a cell segmentation map.

步骤605:根据细胞标注,从细胞分割图中分离出n种细胞类型的细胞,生成n个细胞类型图。Step 605: According to the cell labeling, cells of n cell types are separated from the cell segmentation map to generate n cell type maps.

n个细胞类型图与n种细胞类型一一对应。The n cell type maps correspond one-to-one with n cell types.

示例性的,细胞分割图包括A、B、C、D种细胞类型的细胞,从细胞分割图中分离出这4种细胞类型的细胞,得到只包括细胞类型A的细胞类型图、只包括细胞类型B的细胞类型图、只包括细胞类型C的细胞类型图和只包括细胞类型D的细胞类型图。Exemplarily, the cell segmentation map includes cells of cell types A, B, C, and D, and the cells of these 4 cell types are separated from the cell segmentation map to obtain a cell type map including only cell type A, including only cells A cell type map of type B, a cell type map that includes only cell type C, and a cell type map that includes only cell type D.

步骤606:对于n个细胞类型图中的第j个细胞类型图,为第j个细胞类型图中位于细胞外的像素点赋予第一灰度值。Step 606: For the jth cell type map in the n cell type map, assign a first gray value to the pixel points located outside the cells in the jth cell type map.

第一灰度值为一常数,可选地,第一灰度值为0。The first grayscale value is a constant, optionally, the first grayscale value is 0.

示例性的,如图10所示,像素点1002是位于细胞1001外的像素点,则将像素点1002的灰度值设为0。Exemplarily, as shown in FIG. 10 , if the pixel point 1002 is a pixel point located outside the cell 1001 , the gray value of the pixel point 1002 is set to 0.

步骤607:为第j个细胞类型图中位于细胞内的像素点赋予动态灰度值。Step 607: Assign dynamic gray values to the pixels located in the cells in the jth cell type map.

动态灰度值与位于细胞内的像素点到细胞边缘的距离呈正相关。可选地,像素点到细胞边缘的距离指像素点到细胞边缘的最短距离。或者,像素点到细胞边缘的距离指像素点到细胞边缘的平均距离。The dynamic gray value is positively correlated with the distance from the pixel in the cell to the edge of the cell. Optionally, the distance from the pixel point to the cell edge refers to the shortest distance from the pixel point to the cell edge. Alternatively, the distance from the pixel to the cell edge refers to the average distance from the pixel to the cell edge.

示例性的,像素点1003和像素点1004是位于细胞1001内的像素点,则像素点1003到细胞边缘的距离大于像素点1004到细胞边缘的距离,则像素点1003的灰度值为255,像素点1004的灰度值为250。Exemplarily, pixel 1003 and pixel 1004 are pixels located in cell 1001, then the distance from pixel 1003 to the edge of the cell is greater than the distance from pixel 1004 to the edge of the cell, then the grayscale value of pixel 1003 is 255, The grayscale value of pixel 1004 is 250.

步骤608:根据第j个细胞类型图中各个像素点的灰度值,生成第j个样本分类热点图。Step 608: Generate the jth sample classification heat map according to the gray value of each pixel in the jth cell type map.

在第j个样本分类热点图中,满足细胞外的像素点热度为0,细胞内离细胞边缘越远热度越高。In the jth sample classification heat map, the pixel temperature outside the cell is 0, and the further away from the cell edge, the higher the temperature.

步骤609:重复上述三个步骤,直至得到样本分类热点图。Step 609: Repeat the above three steps until a sample classification heat map is obtained.

由于上述三个步骤只提供了一种细胞类型的样本分类热点,而细胞包括至少两种,因此,需要重复上述三个步骤以得到各个细胞类型的样本分类热点图。Since the above three steps only provide sample classification hotspots for one cell type, and cells include at least two types, the above three steps need to be repeated to obtain sample classification hotspots for each cell type.

综上所述,本实施例在对细胞分类模型进行训练时,将样本图像的细胞标注转化为更加复杂的细胞分割图,细胞分割图包括与细胞形态相关的信息,通过细胞分割图得到样本分类热点图,并根据样本分类热点图和样本图像的样本预测热点图对细胞分类模型。由于本申请实施例在对细胞分类模型进行训练时,通过简单的细胞标注还原出样本图像中各个细胞的轮廓,进而从样本图像中提取出更多的信息用于对细胞分类模型的训练,不仅可以有效提高细胞分类模型的分类结果的准确度,而且可以实现弱监督学习,提高训练效率。To sum up, when the cell classification model is trained in this embodiment, the cell labeling of the sample image is converted into a more complex cell segmentation map. The cell segmentation map includes information related to cell morphology, and the sample classification is obtained through the cell segmentation map. Heat map, and model cell classification based on sample classification heat map and sample prediction heat map of sample images. When the cell classification model is trained in the embodiment of the present application, the outline of each cell in the sample image is restored through simple cell labeling, and more information is extracted from the sample image for training the cell classification model, not only The accuracy of the classification result of the cell classification model can be effectively improved, and weakly supervised learning can be realized to improve the training efficiency.

图11示出了本申请一个示例性实施例提供的细胞分类方法的示意图。FIG. 11 shows a schematic diagram of a cell sorting method provided by an exemplary embodiment of the present application.

对输入图像1101进行颜色反卷积得到通道图像1102,其中,颜色反卷积用于分离输入图像1101中的目标颜色。将输入图像1101和通道图像1102输入到细胞分类模型1100中,由细胞分类模型1100对输入图像1101中的细胞进行分类,得到预测热点图1103。对预测热点图1103进行图像处理后,得到输入图像1101中细胞的位置及数量。其中,这里的图像处理用于统计不同类型的细胞的位置及数量。The channel image 1102 is obtained by performing color deconvolution on the input image 1101 , wherein the color deconvolution is used to separate the target colors in the input image 1101 . The input image 1101 and the channel image 1102 are input into the cell classification model 1100 , and the cells in the input image 1101 are classified by the cell classification model 1100 to obtain a predicted heat map 1103 . After image processing of the predicted heat map 1103, the position and number of cells in the input image 1101 are obtained. Among them, the image processing here is used to count the location and number of different types of cells.

示例性的,细胞的位置及数量包括阴性肿瘤细胞的位置及数量、阳性肿瘤细胞的位置及数量、阴性单核炎细胞的位置及数量、阳性单核炎细胞的位置及数量。需要说明的是,技术人员可根据实际需求确定更多或更少的细胞的位置及数量。具体的,对预测热点图1103进行图像处理后,得到结果图像1104。Exemplarily, the location and number of cells include the location and number of negative tumor cells, the location and number of positive tumor cells, the location and number of negative mononuclear inflammatory cells, and the location and number of positive mononuclear inflammatory cells. It should be noted that, the skilled person can determine the location and number of more or less cells according to actual needs. Specifically, after image processing is performed on the predicted heat map 1103, a result image 1104 is obtained.

图12示出了本申请一个示例性实施例提供的细胞分类方法的流程示意图。该方法由上述实施例提供的细胞分类执行,该方法可由图1所示的终端120或服务器140执行,终端120或服务器140运行有如上述实施例提供的细胞分类模型,该方法包括:FIG. 12 shows a schematic flowchart of a cell sorting method provided by an exemplary embodiment of the present application. The method is performed by the cell classification provided in the above embodiment, and the method can be performed by the terminal 120 or the server 140 shown in FIG. 1 . The terminal 120 or the server 140 runs the cell classification model provided in the above embodiment, and the method includes:

步骤1202:获取输入图像,输入图像包括至少两种类型的细胞。Step 1202: Acquire an input image, where the input image includes at least two types of cells.

可选地,输入图像是染色后的病理切片的电子化图像。Optionally, the input image is an electronic image of a stained pathological section.

可选地,输入图像属于RGB彩色数字图像。在一种可选的设计中,输入图像的像素物理尺寸不大于0.5μm/pixel(微米/像素)。Optionally, the input image is an RGB color digital image. In an optional design, the pixel physical size of the input image is not greater than 0.5 μm/pixel (microns/pixel).

步骤1204:通过细胞分类模型对输入图像进行数据处理,输出预测热点图,预测热点图用于表示细胞属于目标细胞类型的概率。Step 1204: Perform data processing on the input image through the cell classification model, output a predicted heat map, and the predicted heat map is used to represent the probability that the cells belong to the target cell type.

细胞分类模型是用于预测细胞类型的模型。可选地,细胞分类模型属于U-Net,细胞分类模型包括第一特征编码模块和第一上采样解码模块。其中,第一特征编码模块用于对输入图像进行图像下采样,从输入图像中提取图像特征,该图像特征与细胞类型的分类相关。Cell classification models are models used to predict cell types. Optionally, the cell classification model belongs to U-Net, and the cell classification model includes a first feature encoding module and a first upsampling decoding module. Wherein, the first feature encoding module is used to perform image downsampling on the input image, and extract image features from the input image, and the image features are related to the classification of cell types.

可选地,分离输入图像的目标颜色,得到通道图像,通道图像是图像通过目标颜色的表达通道得到的图像;调用细胞分类模型对输入图像和通道图像进行数据处理,输出预测热点图。在一种可能的实现方式中,在Hematoxylin-Eosin-DAB染色空间上进行颜色分解,可以得到:表示DAB(棕黄色)的阳性表达通道、表示苏木素Hematoxylin(蓝色)复染的阴性表达通道和表示伊红Eosin(粉红色)的通道(在PD-L1染色中不出现),取DAB的阳性表达通道的输出结果作为通道图像。Optionally, the target color of the input image is separated to obtain a channel image, and the channel image is an image obtained through the expression channel of the target color; the cell classification model is called to perform data processing on the input image and the channel image, and a predicted heat map is output. In a possible implementation, color decomposition is performed on the Hematoxylin-Eosin-DAB staining space to obtain: a positive expression channel representing DAB (brown), a negative expression channel representing hematoxylin Hematoxylin (blue) counterstaining, and The channel representing eosin Eosin (pink) (not present in PD-L1 staining), the output of the positive expression channel of DAB was taken as the channel image.

预测热点图的数量与颜色通道的数量相同。例如,采用RGB通道和DAB通道对输入图像进行数据处理后,得到4组预测热点图。The number of predicted heatmaps is the same as the number of color channels. For example, after data processing of the input image using RGB channels and DAB channels, 4 sets of predicted heat maps are obtained.

示例性的,预测热点图包括一组热点图。每个热点图分别给出每一像素点属于与前述热点图对应的细胞类型的概率。示例性的,第1个预测热点图用于表示阳性肿瘤细胞的热点图,第2个预测热点图用于表示阴性肿瘤细胞的热点图。Exemplarily, the predicted heatmap includes a set of heatmaps. Each heat map gives the probability that each pixel belongs to the cell type corresponding to the aforementioned heat map. Exemplarily, the first predicted heat map is used to represent the heat map of positive tumor cells, and the second predicted heat map is used to represent the heat map of negative tumor cells.

步骤1206:根据预测热点图,确定输入图像中各个细胞的类型。Step 1206: Determine the type of each cell in the input image according to the predicted heat map.

可选地,预测热点图是用于表示输入图像中a个细胞类型的热点图,第c个热点图用于显示第c种细胞。例如,在热点图3中只显示细胞类型A的细胞,在热点图4中只显示细胞类型B的细胞。Optionally, the predicted heatmap is a heatmap representing a cell type in the input image, and the cth heatmap is used to display the cth cell. For example, only cells of cell type A are shown in heat map 3 and only cells of cell type B are shown in heat map 4.

在本申请实施例中,在确定输入图像中各个细胞的类型和数量后,可以统计预测热点图中n种细胞类型的细胞数量,n为大于2的正整数;根据n种细胞类型中至少一种细胞类型的细胞数量,计算综合阳性评分。将综合阳性评分记为CPS,则有:In the embodiment of the present application, after determining the type and number of each cell in the input image, the number of cells of n cell types in the heat map can be predicted statistically, where n is a positive integer greater than 2; according to at least one of the n cell types The number of cells of each cell type, and the composite positivity score was calculated. Recording the composite positive score as CPS, there are:

Figure BDA0003516775150000161
Figure BDA0003516775150000161

其中,N0表示阴性肿瘤细胞的数量,N1表示阳性肿瘤细胞的数量,N3表示阳性单核炎细胞的数量。Among them, N 0 represents the number of negative tumor cells, N 1 represents the number of positive tumor cells, and N 3 represents the number of positive mononuclear inflammatory cells.

可选地,本申请实施例适用于其它PD-L1克隆号的染色方法,例如,PD-L1的检测方法还可以是Ventana SP263、Ventana SP142、Dako 28-8、Cell Signaling TechnologyE1L3N、WuXiDiagnostics WD160中的至少一种。Optionally, the embodiments of the present application are applicable to the staining methods of other PD-L1 clone numbers, for example, the detection method of PD-L1 can also be the methods in Ventana SP263, Ventana SP142, Dako 28-8, Cell Signaling TechnologyE1L3N, WuXiDiagnostics WD160. at least one.

可选地,通过不同分类热点图中的局部极值点来确定不同细胞类型的细胞数量。示例性的,统计细胞数量的方法可包括以下步骤:Optionally, the number of cells of different cell types is determined by local extreme points in different classification heat maps. Exemplarily, the method for counting the number of cells may include the following steps:

1、确定第k个预测热点图中的局部极值点。1. Determine the local extreme point in the k-th predicted heat map.

在本申请实施例中,由于预测热点图用于表示细胞属于目标细胞类型的概率,因此,预测热点图中的局部极值点位于细胞边缘。In the embodiment of the present application, since the predicted heat map is used to represent the probability that the cell belongs to the target cell type, the local extreme point in the predicted heat map is located at the edge of the cell.

2、获取局部极值点构成的连通区域的中心坐标。2. Obtain the center coordinates of the connected region formed by the local extreme points.

可选地,该连通区域的中心坐标代表细胞中心的坐标。Optionally, the coordinates of the center of the connected region represent the coordinates of the center of the cell.

可选地,根据连通区域的边缘的坐标平均值,确定该连通区域的中心坐标。Optionally, the center coordinate of the connected area is determined according to the average value of the coordinates of the edges of the connected area.

3、根据中心坐标的数量确定第k个热点图的细胞数量。3. Determine the number of cells in the kth heat map according to the number of center coordinates.

可选地,将第k个热点图对应的细胞类型赋予给中心坐标的中心点。Optionally, assign the cell type corresponding to the kth heat map to the center point of the center coordinate.

4、重复上述三个步骤,直至得到n种细胞类型的细胞数量。4. Repeat the above three steps until the number of cells of n cell types is obtained.

综上所述,本实施例通过简单的细胞标注还原出样本图像中各个细胞的轮廓,进而从样本图像中提取出更多的信息用于对细胞分类模型的训练,不仅可以有效提高细胞分类模型的分类结果的准确度,而且,由于训练细胞分类模型只需要用到细胞类型的标注,不需要提供细胞形态的标注,因此可以实现弱监督学习,提高训练效率。To sum up, this embodiment restores the outline of each cell in the sample image through simple cell labeling, and then extracts more information from the sample image for the training of the cell classification model, which can not only effectively improve the cell classification model. Moreover, since the training cell classification model only needs to use the labeling of cell types and does not need to provide the labeling of cell morphology, weakly supervised learning can be realized and the training efficiency can be improved.

可选地,本申请的细胞分类模型应用在AI病理云平台上:在配备有数字病理阅片系统的病理科或医学中心,可以将本申请实施例的细胞分类模型作为AI算法插件集成于阅片界面中。医生打开数字病理切片后,本方法的细胞分类模型的分类结果可以叠加在数字病理切片上呈现出来。Optionally, the cell classification model of the present application is applied on the AI pathology cloud platform: in a pathology department or medical center equipped with a digital pathology reading system, the cell classification model of the embodiment of the present application can be integrated into the reading system as an AI algorithm plug-in. in the slice interface. After the doctor opens the digital pathological slice, the classification results of the cell classification model of this method can be superimposed on the digital pathological slice and presented.

可选地,本申请的细胞分类模型应用在AI显微镜:在配有数字图像采集模块的显微镜上,可将本申请的细胞分类模型植入病理医生在镜下看片的判读流程。医生按下“开始计算”按钮或踩下脚踏板,细胞分类模型即对当前采集到的(同时也是医生正在看到的)视野进行细胞分类,实时返回叠加了分类结果的图像到显微镜目镜光路中,医生即在目镜中看到细胞分类结果。Optionally, the cell classification model of the present application is applied to an AI microscope: on a microscope equipped with a digital image acquisition module, the cell classification model of the present application can be implanted in the interpretation process of a pathologist viewing films under a microscope. When the doctor presses the "Start Calculation" button or steps on the foot pedal, the cell classification model will classify the cells in the field of view currently collected (which is also what the doctor is seeing), and return the image superimposed with the classification result to the optical path of the microscope eyepiece in real time. The doctor sees the cell sorting results in the eyepiece.

图13和图14示出了本申请一个示例性实施例提供的分类结果对比示意图。FIG. 13 and FIG. 14 are schematic diagrams showing the comparison of classification results provided by an exemplary embodiment of the present application.

在图13中,判读图像1302是采用上述实施例提供的细胞分类方法对原始图像1301进行细胞分类的分类结果。在图14中,判读图像1402是对原始图像1401进行细胞分类的分类结果。判读图像1302和判读图像1402中分别标出阳性TC(红色点)、阴性TC(绿色点)、阳性MIC(黄色点)和阴性MIC(蓝色点)。其中,判读图像1302和判读图像1402对应的分类结果准确,因此,本申请实施例提供的细胞分类模型可以很好地完成细胞分类任务,且分类效果较好。In FIG. 13 , the interpretation image 1302 is the classification result of performing cell classification on the original image 1301 by using the cell classification method provided in the above embodiment. In FIG. 14 , the interpretation image 1402 is the classification result of the cell classification of the original image 1401 . Positive TCs (red dots), negative TCs (green dots), positive MICs (yellow dots), and negative MICs (blue dots) are marked in interpretation image 1302 and interpretation image 1402, respectively. Among them, the classification results corresponding to the interpretation image 1302 and the interpretation image 1402 are accurate. Therefore, the cell classification model provided in the embodiment of the present application can well complete the cell classification task, and the classification effect is good.

下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are apparatus embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

请参考图15,其示出了本申请一个实施例提供的细胞分类模型的训练装置的框图。上述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置1500包括:Please refer to FIG. 15 , which shows a block diagram of an apparatus for training a cell classification model provided by an embodiment of the present application. The above functions can be implemented by hardware, or can be implemented by hardware executing corresponding software. The apparatus 1500 includes:

样本获取模块1501,用于获取样本图像和所述样本图像的细胞标注,所述样本图像包括至少两种细胞,所述细胞标注用于表示所述样本图像中细胞的类型;a sample acquisition module 1501, configured to acquire a sample image and a cell label of the sample image, the sample image includes at least two types of cells, and the cell label is used to indicate the type of cells in the sample image;

数据处理模块1502,用于通过所述细胞分类模型对所述样本图像进行数据处理,输出样本预测热点图,所述样本预测热点图用于预测所述样本图像中细胞的类型;A data processing module 1502, configured to perform data processing on the sample image through the cell classification model, and output a sample prediction heat map, where the sample prediction heat map is used to predict the type of cells in the sample image;

所述数据处理模块1502,还用于通过所述样本图像中各个细胞核的轮廓,还原所述样本图像中各个细胞的轮廓,得到细胞分割图;The data processing module 1502 is further configured to restore the contour of each cell in the sample image through the contour of each cell nucleus in the sample image to obtain a cell segmentation map;

所述数据处理模块1502,还用于根据所述细胞标注和所述细胞分割图生成样本分类热点图,所述样本分类热点图用于表示所述细胞分割图中细胞的类型;The data processing module 1502 is further configured to generate a sample classification heat map according to the cell labeling and the cell segmentation map, where the sample classification heat map is used to represent the type of cells in the cell segmentation map;

训练模块1503,用于根据所述样本预测热点图与所述样本分类热点图之间的损失,对所述细胞分类模型进行训练。The training module 1503 is configured to train the cell classification model according to the loss between the sample prediction heat map and the sample classification heat map.

在本申请的一个可选设计中,所述数据处理模块1502,还用于使用膨胀算子遍历第i个细胞核的轮廓,所述膨胀算子用于膨胀所述第i个细胞核的占据区域,i为正整数;根据所述膨胀算子的覆盖区域确定所述第i个细胞核对应的图像领域,所述第i个细胞核的图像领域用于预测所述第i个细胞在所述样本图像中占据的区域;根据所述第i个细胞核的图像领域确定所述第i个细胞的轮廓;重复上述三个步骤,直至确定所述各个细胞的轮廓,得到所述细胞分割图。In an optional design of the present application, the data processing module 1502 is further configured to use a dilation operator to traverse the contour of the ith cell nucleus, where the dilation operator is used to dilate the occupied area of the ith cell nucleus, i is a positive integer; the image area corresponding to the i-th cell nucleus is determined according to the coverage area of the dilation operator, and the image area of the i-th cell nucleus is used to predict that the i-th cell is in the sample image The area occupied; the contour of the i-th cell is determined according to the image area of the i-th cell nucleus; the above three steps are repeated until the contour of each cell is determined, and the cell segmentation map is obtained.

在本申请的一个可选设计中,所述数据处理模块1502,还用于扩展所述第i个细胞的图像领域,得到目标区域;确定所述目标区域内属于灰度值区间的像素点;连接所述属于灰度值区间的像素点,形成封闭区域;将所述封闭区域确定为所述第i个细胞的图像领域。In an optional design of the present application, the data processing module 1502 is further configured to expand the image field of the i-th cell to obtain a target area; determine the pixels belonging to the gray value range in the target area; Connecting the pixels belonging to the gray value interval to form a closed area; and determining the closed area as the image area of the i-th cell.

在本申请的一个可选设计中,所述数据处理模块1502,还用于根据所述细胞标注,从所述细胞分割图中分离出n种细胞类型的细胞,生成n个细胞类型图,所述n个细胞类型图与所述n种细胞类型一一对应,n为正整数;In an optional design of the present application, the data processing module 1502 is further configured to separate cells of n cell types from the cell segmentation map according to the cell label, and generate n cell type maps, so that The n cell type maps are in one-to-one correspondence with the n cell types, and n is a positive integer;

在本申请的一个可选设计中,所述数据处理模块1502,还用于对于所述n个细胞类型图中的第j个细胞类型图,为所述第j个细胞类型图中位于细胞外的像素点赋予第一灰度值,j为小于n+1的正整数;为所述第j个细胞类型图中位于细胞内的像素点赋予动态灰度值,所述动态灰度值与所述位于细胞内的像素点到细胞边缘的距离呈正相关;根据所述第j个细胞类型图中各个像素点的灰度值,生成第j个样本分类热点图;重复上述三个步骤,直至得到所述样本分类热点图。In an optional design of the present application, the data processing module 1502 is further configured to, for the jth cell type map in the n cell type map, indicate that the jth cell type map is located outside the cell The first gray value is assigned to the pixel point of , j is a positive integer less than n+1; the pixel point located in the cell in the jth cell type map is assigned a dynamic gray value, and the dynamic gray value is the same as all The distance from the pixel located in the cell to the edge of the cell is positively correlated; according to the gray value of each pixel in the jth cell type map, generate the jth sample classification heat map; Repeat the above three steps until the obtained The sample classification heat map.

在本申请的一个可选设计中,所述数据处理模块1502,还用于分离所述样本图像的目标颜色,得到样本通道图像,所述样本通道图像是所述样本图像通过所述目标颜色的表达通道得到的图像;调用所述细胞分类模型对所述样本图像和所述样本通道图像进行数据处理,输出所述样本预测热点图。In an optional design of the present application, the data processing module 1502 is further configured to separate the target color of the sample image to obtain a sample channel image, where the sample channel image is the result of the sample image passing through the target color. The image obtained by the expression channel; invoking the cell classification model to perform data processing on the sample image and the sample channel image, and outputting the sample prediction heat map.

在本申请的一个可选设计中,所述训练模块1503,还用于计算所述样本预测热点图与所述样本分类热点图之间的第一损失;计算所述细胞标注、所述样本预测热点图与所述样本分类热点图之间的第二损失;根据所述第一损失和所述第二损失对所述细胞分类模型进行训练。In an optional design of the present application, the training module 1503 is further configured to calculate the first loss between the sample prediction heat map and the sample classification heat map; calculate the cell labeling, the sample prediction a second loss between the heat map and the sample classification heat map; the cell classification model is trained according to the first loss and the second loss.

在本申请的一个可选设计中,所述训练模块1503,还用于计算所述样本预测热点图与所述样本分类热点图之间的均方误差,得到所述第一损失。In an optional design of the present application, the training module 1503 is further configured to calculate the mean square error between the sample prediction heat map and the sample classification heat map to obtain the first loss.

在本申请的一个可选设计中,所述训练模块1503,还用于按照所述细胞标注提供的细胞类型,由所述样本预测热点图与所述样本分类热点图计算所述第二损失,所述第二损失用于表示稠密条件随机场的损失项。In an optional design of the present application, the training module 1503 is further configured to calculate the second loss from the sample prediction heat map and the sample classification heat map according to the cell type provided by the cell label, The second loss is used to represent the loss term of the dense conditional random field.

综上所述,本实施例在对细胞分类模型进行训练时,将样本图像的细胞标注转化为更加复杂的细胞分割图,细胞分割图包括与细胞形态相关的信息,通过细胞分割图得到样本分类热点图,并根据样本分类热点图和样本图像的样本预测热点图对细胞分类模型。由于本申请实施例在对细胞分类模型进行训练时,通过简单的细胞标注还原出样本图像中各个细胞的轮廓,进而从样本图像中提取出更多的信息用于对细胞分类模型的训练,不仅可以有效提高细胞分类模型的分类结果的准确度,而且,由于训练细胞分类模型只需要用到细胞类型的标注,不需要提供细胞形态的标注,因此可以实现弱监督学习,提高训练效率。To sum up, when the cell classification model is trained in this embodiment, the cell labeling of the sample image is converted into a more complex cell segmentation map. The cell segmentation map includes information related to cell morphology, and the sample classification is obtained through the cell segmentation map. Heat map, and model cell classification based on sample classification heat map and sample prediction heat map of sample images. When the cell classification model is trained in the embodiment of the present application, the outline of each cell in the sample image is restored through simple cell labeling, and more information is extracted from the sample image for training the cell classification model, not only It can effectively improve the accuracy of the classification results of the cell classification model. Moreover, since the training of the cell classification model only needs to use the labeling of cell types and does not need to provide the labeling of cell morphology, weakly supervised learning can be implemented and training efficiency can be improved.

请参考图16,其示出了本申请一个实施例提供的细胞分类装置的框图。上述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置1600运行有如上述实施例提供的细胞分类模型,该装置1600包括:Please refer to FIG. 16 , which shows a block diagram of a cell sorting apparatus provided by an embodiment of the present application. The above functions can be implemented by hardware, or can be implemented by hardware executing corresponding software. The apparatus 1600 runs the cell classification model provided in the above-mentioned embodiment, and the apparatus 1600 includes:

图像获取模块1601,用于获取输入图像,所述输入图像包括至少两种类型的细胞;an image acquisition module 1601, configured to acquire an input image, where the input image includes at least two types of cells;

模型调用模块1602,用于通过所述细胞分类模型对所述输入图像进行数据处理,输出预测热点图,所述预测热点图用于表示细胞属于目标细胞类型的概率;A model calling module 1602, configured to perform data processing on the input image through the cell classification model, and output a predicted heat map, where the predicted heat map is used to represent the probability that a cell belongs to a target cell type;

预测模块1603,用于根据所述预测热点图,确定所述输入图像中各个细胞的类型。The prediction module 1603 is configured to determine the type of each cell in the input image according to the predicted heat map.

在本申请的一个可选设计中,所述模型调用模块1602,还用于分离所述输入图像的颜色,得到通道图像,所述通道图像是所述输入图像通过所述目标颜色的表达通道得到的图像;通过所述细胞分类模型对所述输入图像和所述图像进行数据处理,输出所述预测热点图。In an optional design of the present application, the model calling module 1602 is further configured to separate the color of the input image to obtain a channel image, where the channel image is obtained by the input image through the expression channel of the target color The input image and the image are processed by the cell classification model, and the predicted heat map is output.

在本申请的一个可选设计中,所述预测模块1603,还用于统计所述预测热点图中n种细胞类型的细胞数量,n为大于2的正整数;根据所述n种细胞类型中至少一种细胞类型的细胞数量,计算综合阳性评分。In an optional design of the present application, the prediction module 1603 is further configured to count the number of cells of n cell types in the prediction heat map, where n is a positive integer greater than 2; A composite positivity score was calculated for the number of cells of at least one cell type.

在本申请的一个可选设计中,所述预测模块1603,还用于确定第k个预测热点图中的局部极值点;获取所述局部极值点构成的连通区域的中心坐标;根据所述中心坐标的数量确定所述第k个热点图的细胞数量;重复上述三个步骤,直至得到所述n种细胞类型的细胞数量。In an optional design of the present application, the prediction module 1603 is further configured to determine the local extreme point in the kth prediction heat map; obtain the center coordinates of the connected region formed by the local extreme point; The number of the center coordinates determines the number of cells in the kth heat map; the above three steps are repeated until the number of cells of the n cell types is obtained.

综上所述,本实施例通过简单的细胞标注还原出样本图像中各个细胞的轮廓,进而从样本图像中提取出更多的信息用于对细胞分类模型的训练,不仅可以有效提高细胞分类模型的分类结果的准确度,而且,由于训练细胞分类模型只需要用到细胞类型的标注,不需要提供细胞形态的标注,因此可以实现弱监督学习,提高训练效率。To sum up, this embodiment restores the outline of each cell in the sample image through simple cell labeling, and then extracts more information from the sample image for the training of the cell classification model, which can not only effectively improve the cell classification model. Moreover, since the training cell classification model only needs to use the labeling of cell types and does not need to provide the labeling of cell morphology, weakly supervised learning can be realized and the training efficiency can be improved.

图17是根据一示例性实施例示出的一种计算机设备的结构示意图。所述计算机设备1700包括中央处理单元(Central Processing Unit,CPU)1701、包括随机存取存储器(Random Access Memory,RAM)1702和只读存储器(Read-Only Memory,ROM)1703的系统存储器1704,以及连接系统存储器1704和中央处理单元1701的系统总线1705。所述计算机设备1700还包括帮助计算机设备内的各个器件之间传输信息的基本输入/输出系统(Input/Output,I/O系统)1706,和用于存储操作系统1713、应用程序1714和其他程序模块1715的大容量存储设备1707。Fig. 17 is a schematic structural diagram of a computer device according to an exemplary embodiment. The computer device 1700 includes a Central Processing Unit (CPU) 1701, a system memory 1704 including a Random Access Memory (RAM) 1702 and a Read-Only Memory (ROM) 1703, and A system bus 1705 that connects the system memory 1704 and the central processing unit 1701 . The computer device 1700 also includes a basic input/output system (Input/Output, I/O system) 1706 that facilitates the transfer of information between various devices within the computer device, and is used to store an operating system 1713, application programs 1714, and other programs Mass storage device 1707 for module 1715.

所述基本输入/输出系统1706包括有用于显示信息的显示器1708和用于用户输入信息的诸如鼠标、键盘之类的输入设备1709。其中所述显示器1708和输入设备1709都通过连接到系统总线1705的输入输出控制器1710连接到中央处理单元1701。所述基本输入/输出系统1706还可以包括输入输出控制器1710以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器1710还提供输出到显示屏、打印机或其他类型的输出设备。The basic input/output system 1706 includes a display 1708 for displaying information and input devices 1709 such as a mouse, keyboard, etc., for user input of information. The display 1708 and the input device 1709 are both connected to the central processing unit 1701 through the input and output controller 1710 connected to the system bus 1705. The basic input/output system 1706 may also include an input output controller 1710 for receiving and processing input from a number of other devices such as a keyboard, mouse, or electronic stylus. Similarly, input output controller 1710 also provides output to a display screen, printer, or other type of output device.

所述大容量存储设备1707通过连接到系统总线1705的大容量存储控制器(未示出)连接到中央处理单元1701。所述大容量存储设备1707及其相关联的计算机设备可读介质为计算机设备1700提供非易失性存储。也就是说,所述大容量存储设备1707可以包括诸如硬盘或者只读光盘(Compact Disc Read-Only Memory,CD-ROM)驱动器之类的计算机设备可读介质(未示出)。The mass storage device 1707 is connected to the central processing unit 1701 through a mass storage controller (not shown) connected to the system bus 1705 . The mass storage device 1707 and its associated computer device-readable media provide non-volatile storage for the computer device 1700 . That is, the mass storage device 1707 may include a computer device readable medium (not shown) such as a hard disk or a Compact Disc Read-Only Memory (CD-ROM) drive.

不失一般性,所述计算机设备可读介质可以包括计算机设备存储介质和通信介质。计算机设备存储介质包括以用于存储诸如计算机设备可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机设备存储介质包括RAM、ROM、可擦除可编程只读存储器(Erasable Programmable ReadOnly Memory,EPROM)、带电可擦可编程只读存储器(Electrically ErasableProgrammable Read-Only Memory,EEPROM),CD-ROM、数字视频光盘(Digital Video Disc,DVD)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知所述计算机设备存储介质不局限于上述几种。上述的系统存储器1704和大容量存储设备1707可以统称为存储器。Without loss of generality, the computer device readable medium may include computer device storage media and communication media. Computer device storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer device readable instructions, data structures, program modules or other data. The storage media of computer equipment include RAM, ROM, Erasable Programmable ReadOnly Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), CD-ROM, digital Digital Video Disc (DVD) or other optical storage, cassette, magnetic tape, magnetic disk storage or other magnetic storage device. Of course, those skilled in the art know that the storage medium of the computer device is not limited to the above-mentioned ones. The system memory 1704 and the mass storage device 1707 described above may be collectively referred to as memory.

根据本公开的各种实施例,所述计算机设备1700还可以通过诸如因特网等网络连接到网络上的远程计算机设备运行。也即计算机设备1700可以通过连接在所述系统总线1705上的网络接口单元1712连接到网络1711,或者说,也可以使用网络接口单元1712来连接到其他类型的网络或远程计算机设备系统(未示出)。According to various embodiments of the present disclosure, the computer device 1700 may also operate via a network connection to a remote computer device on a network, such as the Internet. That is, the computer device 1700 can be connected to the network 1711 through the network interface unit 1712 connected to the system bus 1705, or can also use the network interface unit 1712 to connect to other types of networks or remote computer equipment systems (not shown). out).

所述存储器还包括一个或者一个以上的程序,所述一个或者一个以上程序存储于存储器中,中央处理器1701通过执行该一个或一个以上程序来实现上述细胞分类模型的训练方法,或,细胞分类方法的全部或者部分步骤。The memory also includes one or more programs, the one or more programs are stored in the memory, and the central processing unit 1701 implements the above-mentioned training method of the cell classification model by executing the one or more programs, or, cell classification all or part of the steps of the method.

在示例性实施例中,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现上述各个方法实施例提供的细胞分类模型的训练方法,或,细胞分类方法。In an exemplary embodiment, a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the At least one piece of program, the code set or the instruction set is loaded and executed by the processor to implement the training method of the cell classification model provided by each of the above method embodiments, or the cell classification method.

本申请还提供一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现上述方法实施例提供的细胞分类模型的训练方法,或,细胞分类方法。The present application further provides a computer-readable storage medium, where at least one instruction, at least one piece of program, code set or instruction set is stored in the storage medium, the at least one instruction, the at least one piece of program, the code set or The instruction set is loaded and executed by the processor to implement the training method of the cell classification model provided by the above method embodiments, or the cell classification method.

本申请还提供一种计算机程序产品或计算机程序,上述计算机程序产品或计算机程序包括计算机指令,上述计算机指令存储在计算机可读存储介质中。计算机设备的处理器从上述计算机可读存储介质读取上述计算机指令,上述处理器执行上述计算机指令,使得上述计算机设备执行如上方面实施例提供的细胞分类模型的训练方法,或,细胞分类方法。The present application also provides a computer program product or computer program, wherein the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the cell classification model training method provided by the embodiment of the above aspect, or, the cell classification method.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.

以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.

Claims (17)

1. A method for training a cell classification model, the method comprising:
acquiring a sample image and a cell label of the sample image, wherein the sample image comprises at least two cells, and the cell label is used for representing the type of the cells in the sample image;
performing data processing on the sample image through the cell classification model, and outputting a sample prediction hot spot diagram, wherein the sample prediction hot spot diagram is used for predicting the type of cells in the sample image;
restoring the contour of each cell in the sample image through the contour of each cell nucleus in the sample image to obtain a cell segmentation map;
generating a sample classification heat point diagram according to the cell labeling and the cell segmentation diagram, wherein the sample classification heat point diagram is used for representing the types of the cells in the cell segmentation diagram;
and training the cell classification model according to the loss between the sample prediction hotspot graph and the sample classification hotspot graph.
2. The method of claim 1, wherein the obtaining the cell segmentation map by restoring the contour of each cell in the sample image through the contour of each cell nucleus in the sample image comprises:
traversing the outline of the ith cell nucleus by using a dilation operator, wherein the dilation operator is used for dilating the occupied area of the ith cell nucleus, and i is a positive integer;
determining an image field corresponding to the ith cell nucleus according to the coverage area of the expansion operator, wherein the image field of the ith cell nucleus is used for predicting the area occupied by the ith cell in the sample image;
determining the outline of the ith cell according to the image field of the ith cell nucleus;
and repeating the three steps until the contour of each cell is determined to obtain the cell segmentation graph.
3. The method of claim 2, wherein said determining the contour of the ith cell from the image field of the ith cell comprises:
expanding the image field of the ith cell to obtain a target area;
determining pixel points belonging to a gray value interval in the target area;
connecting the pixel points belonging to the gray value interval to form a closed area;
determining the closed region as an image field of the ith cell.
4. The method according to any one of claims 1 to 3, wherein the generating a sample classification hotspot map from the cell labels and the cell segmentation map comprises:
according to the cell labels, separating the cells of n cell types from the cell segmentation graph to generate n cell type graphs, wherein the n cell type graphs correspond to the n cell types one by one, and n is a positive integer;
for a jth cell type graph in the n cell type graphs, giving a first gray value to a pixel point outside a cell in the jth cell type graph, wherein j is a positive integer smaller than n + 1;
giving a dynamic gray value to a pixel point positioned in a cell in the jth cell type graph, wherein the dynamic gray value is positively correlated with the distance from the pixel point positioned in the cell to the edge of the cell;
generating a jth sample classification hot spot diagram according to the gray value of each pixel point in the jth cell type diagram;
and repeating the three steps until the sample classification heat point diagram is obtained.
5. The method according to any one of claims 1 to 3, wherein the invoking the cell classification model to perform data processing on the sample image and output a sample prediction hotspot graph comprises:
separating the target color of the sample image to obtain a sample channel image, wherein the sample channel image is an image obtained by the sample image through an expression channel of the target color;
and calling the cell classification model to perform data processing on the sample image and the sample channel image, and outputting the sample prediction hotspot graph.
6. The method of any one of claims 1 to 3, wherein the training of the cell classification model based on the loss between the sample prediction hotspot graph and the sample classification hotspot graph comprises:
calculating a first loss between the sample prediction hotspot graph and the sample classification hotspot graph;
calculating a second loss between the cell labeling, the sample prediction hotspot graph, and the sample classification hotspot graph;
training the cell classification model based on the first loss and the second loss.
7. The method of claim 6, wherein the calculating a first penalty between the sample prediction hotspot graph and the sample classification hotspot graph comprises:
and calculating the mean square error between the sample prediction hotspot graph and the sample classification hotspot graph to obtain the first loss.
8. The method of claim 6, wherein said calculating a second loss between said cell labeling, said sample prediction hotspot graph, and said sample classification hotspot graph comprises:
and according to the cell types provided by the cell labels, calculating the second loss by the sample prediction hotspot graph and the sample classification hotspot graph, wherein the second loss is used for representing a loss term of the dense conditional random field.
9. A method of cell sorting, the method being performed by a computer device running a cell sorting model according to any one of claims 1 to 8, the method comprising:
acquiring an input image, the input image comprising at least two types of cells;
performing data processing on the input image through the cell classification model, and outputting a predicted hotspot graph, wherein the predicted hotspot graph is used for representing the probability that the cell belongs to the target cell type;
and determining the type of each cell in the input image according to the predicted hotspot graph.
10. The method according to claim 9, wherein the data processing of the input image by the cell classification model to output a predicted hotspot graph comprises:
separating the colors of the input image to obtain a channel image, wherein the channel image is an image obtained by the input image through an expression channel of the target color;
and performing data processing on the input image and the image through the cell classification model, and outputting the predicted hotspot graph.
11. The method of claim 9, further comprising:
counting the number of the cells of n cell types in the predicted hotspot graph, wherein n is a positive integer greater than 2;
calculating a composite positive score based on the number of cells of at least one of the n cell types.
12. The method of claim 11, wherein said counting the number of cells of n cell types in said predictive heat map comprises:
determining a local extreme point in a kth prediction hotspot graph, wherein k is a positive integer smaller than n + 1;
acquiring the center coordinates of a connected region formed by the local extreme points;
determining the number of cells of the kth hot spot map according to the number of the central coordinates;
repeating the above three steps until the cell number of the n cell types is obtained.
13. An apparatus for training a cell classification model, the apparatus comprising:
the system comprises a sample acquisition module, a cell identification module and a cell identification module, wherein the sample acquisition module is used for acquiring a sample image and a cell identification of the sample image, the sample image comprises at least two cells, and the cell identification is used for indicating the type of the cells in the sample image;
the data processing module is used for carrying out data processing on the sample image through the cell classification model and outputting a sample prediction hot spot diagram, and the sample prediction hot spot diagram is used for predicting the type of the cells in the sample image;
the data processing module is further configured to restore the contour of each cell in the sample image through the contour of each cell nucleus in the sample image to obtain a cell segmentation map;
the data processing module is further used for generating a sample classification heat point diagram according to the cell labels and the cell segmentation diagram, wherein the sample classification heat point diagram is used for representing the types of the cells in the cell segmentation diagram;
and the training module is used for training the cell classification model according to the loss between the sample prediction heat point diagram and the sample classification heat point diagram.
14. A cell sorter apparatus, which runs the cell sorting model according to any one of claims 1 to 8, the apparatus comprising:
an image acquisition module for acquiring an input image, the input image comprising at least two types of cells;
the model calling module is used for carrying out data processing on the input image through the cell classification model and outputting a prediction heat point diagram, and the prediction heat point diagram is used for representing the probability that the cell belongs to the target cell type;
and the prediction module is used for determining the type of each cell in the input image according to the predicted hotspot graph.
15. A computer device, characterized in that the computer device comprises: a processor and a memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement a method of training a cell classification model according to any one of claims 1 to 8, or a method of cell classification according to any one of claims 9 to 12.
16. A computer-readable storage medium having stored therein at least one program code, the program code being loaded into and executed by a processor to implement a method of training a cell classification model according to any one of claims 1 to 8, or a method of cell classification according to any one of claims 9 to 12.
17. A computer program product comprising a computer program or instructions which, when executed by a processor, implement a method of training a cell classification model according to any one of claims 1 to 8, or a method of cell classification according to any one of claims 9 to 12.
CN202210167143.6A 2022-02-23 2022-02-23 Training method, device, equipment and medium for cell classification model Pending CN114550169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210167143.6A CN114550169A (en) 2022-02-23 2022-02-23 Training method, device, equipment and medium for cell classification model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210167143.6A CN114550169A (en) 2022-02-23 2022-02-23 Training method, device, equipment and medium for cell classification model

Publications (1)

Publication Number Publication Date
CN114550169A true CN114550169A (en) 2022-05-27

Family

ID=81677015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210167143.6A Pending CN114550169A (en) 2022-02-23 2022-02-23 Training method, device, equipment and medium for cell classification model

Country Status (1)

Country Link
CN (1) CN114550169A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063796A (en) * 2022-08-18 2022-09-16 珠海横琴圣澳云智科技有限公司 Cell classification method and device based on signal point content constraint
CN115564776A (en) * 2022-12-05 2023-01-03 珠海圣美生物诊断技术有限公司 Abnormal cell sample detection method and device based on machine learning
CN115861604A (en) * 2023-02-16 2023-03-28 赛维森(广州)医疗科技服务有限公司 Cervical tissue image processing method, cervical tissue image processing apparatus, computer device, and storage medium
CN116486403A (en) * 2023-06-20 2023-07-25 珠海横琴圣澳云智科技有限公司 Cell discrimination model construction method, device, electronic equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063796A (en) * 2022-08-18 2022-09-16 珠海横琴圣澳云智科技有限公司 Cell classification method and device based on signal point content constraint
CN115063796B (en) * 2022-08-18 2022-11-15 珠海横琴圣澳云智科技有限公司 Cell classification method and device based on signal point content constraint
CN115564776A (en) * 2022-12-05 2023-01-03 珠海圣美生物诊断技术有限公司 Abnormal cell sample detection method and device based on machine learning
CN115861604A (en) * 2023-02-16 2023-03-28 赛维森(广州)医疗科技服务有限公司 Cervical tissue image processing method, cervical tissue image processing apparatus, computer device, and storage medium
CN115861604B (en) * 2023-02-16 2023-06-02 赛维森(广州)医疗科技服务有限公司 Cervical tissue image processing method, cervical tissue image processing device, computer equipment and storage medium
CN116486403A (en) * 2023-06-20 2023-07-25 珠海横琴圣澳云智科技有限公司 Cell discrimination model construction method, device, electronic equipment and storage medium
CN116486403B (en) * 2023-06-20 2023-09-08 珠海横琴圣澳云智科技有限公司 Cell discrimination model construction method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113454733B (en) Multi-instance learner for prognostic tissue pattern recognition
US11756318B2 (en) Convolutional neural networks for locating objects of interest in images of biological samples
US11967069B2 (en) Pathological section image processing method and apparatus, system, and storage medium
Gecer et al. Detection and classification of cancer in whole slide breast histopathology images using deep convolutional networks
CN110472616B (en) Image recognition method and device, computer equipment and storage medium
EP3961484A1 (en) Medical image segmentation method and device, electronic device and storage medium
CN114550169A (en) Training method, device, equipment and medium for cell classification model
CN111260677B (en) Cell analysis method, device, equipment and storage medium based on microscopic image
CN109389129A (en) A kind of image processing method, electronic equipment and storage medium
CN114445670B (en) Training method, device and equipment of image processing model and storage medium
Öztürk et al. Cell‐type based semantic segmentation of histopathological images using deep convolutional neural networks
US11176412B2 (en) Systems and methods for encoding image features of high-resolution digital images of biological specimens
CN110379020A (en) A kind of laser point cloud painting methods and device based on generation confrontation network
CN110490882B (en) Cell membrane staining image analysis method, device and system
CN112330690A (en) Cell segmentation method, device and equipment based on microscopic image and storage medium
CN117036343B (en) FFOCT image analysis method and device for identifying axillary lymph node metastasis
Dabass et al. A hybrid U-Net model with attention and advanced convolutional learning modules for simultaneous gland segmentation and cancer grade prediction in colorectal histopathological images
CN113781387A (en) Model training method, image processing method, device, equipment and storage medium
Barrera et al. Automatic normalized digital color staining in the recognition of abnormal blood cells using generative adversarial networks
CN112215217B (en) Digital image recognition method and device for simulating doctor to read film
CN113822846A (en) Method, apparatus, device and medium for determining region of interest in medical image
Mohapatra et al. Unsupervised leukocyte image segmentation using rough fuzzy clustering
CN113096080A (en) Image analysis method and system
Al-Qudah et al. Synthetic blood smears generation using locality sensitive hashing and deep neural networks
Santos et al. A new approach for fundus lesions instance segmentation based on mask r-cnn x101-fpn pre-trained architecture

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