Cell detection method, device, equipment and storage medium based on pathological images

Through semantic segmentation model, cell detection of pathological images is performed, and cell localization and counting is automated, which solves the problem of low manual recognition efficiency in the prior art, improves cell localization and counting efficiency, and reduces human resource burden.

CN113781457BActive Publication Date: 2024-12-24ZHINUO WEISI (BEIJING) GENE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111085582.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-16
Publication Date
2024-12-24
Estimated Expiration
2041-09-16

AI Technical Summary

Technical Problem

In the prior art, the localization and counting of different types of cells in pathological images need to rely on artificial naked eye recognition, which is inefficient and time-consuming, and requires professional participation, resulting in a large human resources burden.

Method used

The cell detection method based on the semantic segmentation model is used to train the model by obtaining the annotated pathological images to generate a qualified cell detection model. The central point expansion image is processed on the pathological images to be processed, and the number of cells is counted through spot detection.

Benefits of technology

It realizes automated cell positioning and counting, reduces human burden, improves the localization efficiency and counting efficiency of different types of cells, and assists pathologists in clinical diagnosis and treatment and scientific research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113781457B_ABST
    Figure CN113781457B_ABST
Patent Text Reader

Abstract

The present application provides a cell detection method, device, equipment and storage medium based on pathological images, wherein the method comprises: obtaining a number of annotated pathological images; using each pathological image to train and evaluate a pre-built cell detection model to obtain a qualified cell detection model; using the qualified cell detection model to obtain a center point expansion image of the pathological image to be processed; performing spot detection processing on the center point expansion image to obtain the center point pixel position of each center point expansion area in the center point expansion image; counting the number of center point pixel positions in each center point expansion area group to obtain the number of cells under each cell category in the pathological image to be processed; the above method is conducive to reducing the manpower burden while improving the positioning efficiency and counting efficiency of different types of cells.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a cell detection method, device, equipment and storage medium based on pathological images. Background Art

[0002] Immunohistochemistry (IHC) is a method widely used in pathological diagnosis and guiding tumor treatment. It stains specific antigens in tissue cells through a chemical reaction method of antigen-antibody enzyme-labeled color development. The stained tissue sections are digitally scanned to obtain pathological images. The pathological images reflect the cell morphology in the tissue and the expression of specific protein molecular markers, providing important information for doctors in clinical diagnosis and guiding the formulation of treatment strategies and plans for clinical tumor targeting and immunotherapy. In addition, in order to facilitate doctors to accurately and quickly understand pathological images, it is necessary to first identify the different types of cells in the pathological images and the number of cells of each type.

[0003] In the existing method, in order to obtain the number of cells of different categories in the pathological image, it is necessary to accurately locate each cell in the pathological image and distinguish the cell category based on the recognition method of artificial naked eye distinction. This method not only requires the identifier to be a professional with rich relevant experience, but the entire recognition process will also take up a lot of the identifier's time. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a cell detection method, device, equipment and storage medium based on pathological images, which is conducive to improving the positioning efficiency and counting efficiency of different types of cells while reducing the manpower burden.

[0005] It mainly includes the following aspects:

[0006] In a first aspect, an embodiment of the present application provides a cell detection method based on a pathological image, the method comprising the following steps:

[0007] Step S1: acquiring a plurality of annotated pathological images, wherein the annotations include annotations of a cell center position and a cell category of at least one cell in the pathological image;

[0008] Step S2: using each of the pathological images to train and evaluate a pre-constructed cell detection model to obtain a qualified cell detection model, wherein the pre-constructed cell detection model is a semantic segmentation model;

[0009] Step S3: using the qualified cell detection model to obtain a center point expansion image of the pathological image to be processed, wherein the center point expansion image includes at least one center point expansion area group, different center point expansion area groups are used to represent different cell types, and for each center point expansion area group, the center point expansion area group includes at least one center point expansion area, and the center point expansion area is used to represent the location of the cell in the pathological image to be processed;

[0010] Step S4: performing spot detection processing on the center point expansion image to obtain the center point pixel position of each center point expansion area in the center point expansion image, wherein the center point pixel position is used to represent the cell center position of the cell in the pathological image to be processed;

[0011] Step S5: Counting the number of center point pixel positions in each center point expansion region group to obtain the number of cells in each cell category in the pathological image to be processed.

[0012] Optionally, the pathological image in step S1 includes a first full-slice pathological image or a first designated area in the first full-slice pathological image; and the pathological image to be processed in step S3 includes a second full-slice pathological image or a second designated area in the second full-slice pathological image.

[0013] Optionally, before training the pre-built cell detection model in step S2, the method further includes:

[0014] For each of the pathological images, a label image corresponding to the pathological image is obtained, wherein the label image includes at least one target pixel point set, different target pixel point sets are used to represent different cell categories, target pixels in different target pixel point sets have different pixel values ​​on the label image, the target pixel points are used to represent the cell center position of the cells in the pathological image, and in the label image: the pixel values ​​of other pixels except the target pixel points are different from the pixel values ​​of the target pixel points;

[0015] Each target pixel in the label image is expanded into a target area of ​​a first preset size to obtain a target label image.

[0016] Optionally, step S2 specifically includes the following steps:

[0017] Step S201: dividing each of the pathological images into a training set and a test set;

[0018] Step S202: segmenting each pathological image included in the training set and the target label image corresponding to each pathological image to obtain a plurality of first pathological sub-images of a second preset size and a first target label sub-image of a second preset size corresponding to each first pathological sub-image; and segmenting each pathological image included in the test set and the target label image corresponding to each pathological image to obtain a plurality of second pathological sub-images of a second preset size and a second target label sub-image of a second preset size corresponding to each second pathological sub-image;

[0019] Step S203: using each of the first pathological sub-images and the first target label sub-image corresponding to each of the first pathological sub-images to train the pre-constructed cell detection model;

[0020] Step S204: using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images, evaluating the trained cell detection model to obtain the sensitivity and accuracy of the trained cell detection model;

[0021] Step S205: Determine whether the accuracy and the sensitivity are both greater than a preset threshold. If both are greater than the preset threshold, use the trained cell detection model as the qualified cell detection model; otherwise, repeat step S203, step S204 and step S205 until the qualified cell detection model is obtained.

[0022] Optionally, step S3 specifically includes the following steps:

[0023] Step S301: segmenting the pathological image to be processed to obtain at least one pathological sub-image to be processed of a second preset size;

[0024] Step S302: for each of the pathological sub-images to be processed, input the pathological sub-images to be processed into the qualified cell detection model to obtain a center point expansion sub-image corresponding to the pathological sub-image to be processed, wherein the center point expansion sub-image includes at least one center point expansion region group for representing cell categories, center point expansion regions included in different center point expansion region groups have different pixel values ​​in the center point expansion sub-image, and the center point expansion region is used to represent the location of cells in the pathological sub-image to be processed;

[0025] Step S303: splicing the center point expansion sub-images corresponding to the pathological sub-images to be processed according to the position information of the pathological sub-images to be processed in the pathological image to be processed to obtain the center point expansion image.

[0026] In a second aspect, an embodiment of the present application provides a cell detection device based on a pathological image, the device comprising:

[0027] An acquisition module, used for acquiring a plurality of annotated pathological images, wherein the annotations include annotations of a cell center position and a cell category of at least one cell in the pathological image;

[0028] An execution module, used to train and evaluate a pre-built cell detection model using each of the pathological images to obtain a qualified cell detection model, wherein the pre-built cell detection model is a semantic segmentation model;

[0029] A detection module, used for acquiring a center point expansion image of the pathological image to be processed using the qualified cell detection model, wherein the center point expansion image includes at least one center point expansion area group, different center point expansion area groups are used to represent different cell types, and for each center point expansion area group, the center point expansion area group includes at least one center point expansion area, and the center point expansion area is used to represent the location of the cell in the pathological image to be processed;

[0030] a processing module, configured to perform spot detection processing on the center point expansion image to obtain the center point pixel position of each center point expansion area in the center point expansion image, wherein the center point pixel position is used to represent the cell center position of the cell in the pathological image to be processed;

[0031] The statistical module is used to count the number of center point pixel positions in each center point expansion area group to obtain the number of cells in each cell category in the pathological image to be processed.

[0032] Optionally, the pathological image includes a first full-slice pathological image or a first designated area in the first full-slice pathological image; and the pathological image to be processed includes a second full-slice pathological image or a second designated area in the second full-slice pathological image.

[0033] Optionally, before being used to train the pre-built cell detection model, the execution module is further used to:

[0034] For each of the pathological images, a label image corresponding to the pathological image is obtained, wherein the label image includes at least one target pixel point set, different target pixel point sets are used to represent different cell categories, target pixels in different target pixel point sets have different pixel values ​​on the label image, the target pixel points are used to represent the cell center position of the cells in the pathological image, and in the label image: the pixel values ​​of other pixels except the target pixel points are different from the pixel values ​​of the target pixel points;

[0035] Each target pixel in the label image is expanded into a target area of ​​a first preset size to obtain a target label image.

[0036] Optionally, the execution module specifically includes:

[0037] A division unit, used for dividing each of the pathological images into a training set and a test set;

[0038] A first segmentation unit is used to segment each pathological image included in the training set and the target label image corresponding to each pathological image to obtain a plurality of first pathological sub-images of a second preset size and a first target label sub-image of a second preset size corresponding to each first pathological sub-image; and segment each pathological image included in the test set and the target label image corresponding to each pathological image to obtain a plurality of second pathological sub-images of a second preset size and a second target label sub-image of a second preset size corresponding to each second pathological sub-image;

[0039] A training unit, configured to train the pre-constructed cell detection model using each of the first pathological sub-images and a first target label sub-image corresponding to each of the first pathological sub-images;

[0040] An evaluation unit, configured to evaluate the trained cell detection model using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images, to obtain the sensitivity and accuracy of the trained cell detection model;

[0041] A judging unit is used to judge whether the accuracy and the sensitivity are both greater than a preset threshold value. If both are greater than the preset threshold value, the trained cell detection model is used as the qualified cell detection model; otherwise, step S203, step S204 and step S205 are repeated until the qualified cell detection model is obtained, wherein step S203 is: using each of the first pathological sub-images and the first target label sub-images corresponding to each of the first pathological sub-images to train the pre-constructed cell detection model; step S204 is: using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images to evaluate the trained cell detection model to obtain the sensitivity and accuracy of the trained cell detection model; step S205 is: judging whether the accuracy and the sensitivity are both greater than a preset threshold value. If both are greater than the preset threshold value, the trained cell detection model is used as the qualified cell detection model; otherwise, step S203, step S204 and step S205 are repeated until the qualified cell detection model is obtained.

[0042] Optionally, the detection module specifically includes:

[0043] A second segmentation unit, configured to segment the pathological image to be processed to obtain at least one pathological sub-image to be processed of a second preset size;

[0044] a detection unit, configured to input each of the pathological sub-images to be processed into the qualified cell detection model to obtain a center point expansion sub-image corresponding to the pathological sub-image to be processed, wherein the center point expansion sub-image includes at least one center point expansion region group for representing cell categories, center point expansion regions included in different center point expansion region groups have different pixel values ​​in the center point expansion sub-image, and the center point expansion region is used to represent the location of cells in the pathological sub-image to be processed;

[0045] The splicing unit is used to splice the center point expansion sub-images corresponding to each of the pathological sub-images to be processed according to the position information of each of the pathological sub-images to be processed in the pathological image to be processed, so as to obtain the center point expansion image.

[0046] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the cell detection method based on pathological images described in any one of the first aspects above are implemented.

[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the cell detection method based on pathological images described in any one of the first aspects above are executed.

[0048] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0049] The cell detection method based on pathological images provided in the embodiment of the present application first uses a plurality of acquired annotated pathological images to train and evaluate a preset cell detection model to obtain a qualified cell detection model. Since the above annotations include annotations of the cell categories and the cell center positions of the cells in the pathological images, after obtaining the qualified cell detection model, the qualified cell detection model can be used to locate cells of different categories in the pathological images to be processed, and a center point expansion image of the pathological images to be processed is obtained. In the center point expansion image, a center point expansion area represents the location of a cell, and the center point expansion areas corresponding to different types of cells are located in different center point expansion area groups. After obtaining the center point expansion image, a spot detection method is used to detect the center point expansion image. Spot detection processing is performed to obtain the center point pixel position of each center point expansion area in the center point expansion image; because different center point expansion area groups in the center point expansion image represent different cell types, in order to determine the number of cells in each cell category, the present application determines the number of cells in the cell category represented by each center point expansion area group by counting the number of center point pixel positions in each center point expansion area group detected, thereby obtaining the number of cells in each cell category in the pathological image to be processed, so as to assist pathologists in clinical diagnosis and treatment and scientific research; compared with the recognition method of artificial naked eye distinction in the prior art, the present application realizes the positioning and counting of different types of cells through the server throughout the process, which is conducive to reducing the manpower burden while improving the positioning efficiency and counting efficiency of different types of cells.

[0050] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0052] Figure 1 A flow chart of a cell detection method based on pathological images provided in the first embodiment of the present application is shown;

[0053] Figure 2 An example diagram of a pathological image provided by the first embodiment of the present application is shown;

[0054] Figure 3 An example diagram of a label image of a pathological image provided in the first embodiment of the present application is shown;

[0055] Figure 4 An example diagram of a target label image of a pathological image provided by the first embodiment of the present application is shown;

[0056] Figure 5 An example diagram of a pathological image to be processed provided by the first embodiment of the present application is shown;

[0057] Figure 6 An example diagram of a pathological sub-image to be processed provided by the first embodiment of the present application is shown;

[0058] Figure 7 An example diagram of a center point expansion sub-image of a pathological sub-image to be processed provided in the first embodiment of the present application is shown;

[0059] Figure 8 An example diagram of a center point expansion image of a pathological image to be processed provided by the first embodiment of the present application is shown;

[0060] Fig. 9 A schematic structural diagram of a cell detection device based on pathological images provided in the second embodiment of the present application is shown;

[0061] Fig.10 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present application is shown. DETAILED DESCRIPTION

[0062] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0063] The embodiments of the present application provide a cell detection method, device, equipment and storage medium based on pathological images, which are described below through embodiments.

[0064] Embodiment 1

[0065] Figure 1 FIG. 1 shows a flow chart of a cell detection method based on pathological images provided in the first embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0066] Step S101: Acquire a number of annotated pathological images, wherein the annotations include annotations of the cell center position and the cell category of at least one cell in the pathological image.

[0067] Specifically, each pathological image includes at least one cell (i.e., there is at least one cell category). In order to train and evaluate the pre-built cell detection model, it is necessary to obtain several annotated pathological images (i.e., annotated pathological images). For each pathological image, the annotations on the pathological image include annotations of the cell center position of each cell in the pathological image and annotations of the cell category of each cell. The cell center position refers to the position of the center point of the cell. The cell category can be set according to actual conditions. For example, the cell category includes negative cells and positive cells. The specific cell category is not specifically limited here. Therefore, the position and category of each cell in the pathological image can be determined by the annotations on the pathological image.

[0068] It should be noted that the above-mentioned pathological images are stained pathological images. In the stained pathological images, it is easier to determine the type and central position of the cells based on the staining characteristics of different types of cells. The above-mentioned staining characteristics include the cell morphology and staining intensity after staining. The above-mentioned pathological images can be images stained with any immunohistochemical molecular markers with different expression patterns, such as: cell membrane expression (PD-L1, HER2, CD3, CD20, CD79a, etc.), cell membrane expression (AE1 / AE3, CK5 / 6, CK19, etc.), cell nuclear expression (ER, PR, Ki-67, TdT, CyclinD1, etc.).

[0069] It should be noted again that the pathological image obtained above may be an RGB three-channel image, in which each channel represents the three colors of red, green and blue.

[0070] It should be noted again that the above-mentioned annotation method can be set according to actual conditions. For example, pathological image annotation software can be used to import the pathological image into the annotation software, and different colors or different shapes of boxes are used in the annotation software to select the center points of cells of different categories in the pathological image, where different colors represent different cell categories, or different shapes represent different cell categories. The position of the center point of the box is used to indicate the position of the center point of the cell (i.e., the center position of the cell). The annotation software will automatically record the center position of each cell and the category to which the cell belongs, and save them in the file. The annotation method is not specifically limited here.

[0071] For example, Figure 2An example diagram of a pathological image provided by the first embodiment of the present application is shown. Figure 2 As shown, the pathological image is a pathological image stained with PD-L1. PD-L1 (Programmed Death Ligand-1) is a protein marker in immunohistochemical detection, and its staining characteristic is cell membrane staining. It is a membrane-positive molecular marker. After the tissue section is stained with immunohistochemical PD-L1, the cell nucleus in the tissue will appear blue and the cell membrane will appear brown. Example 1 of the present application divides the cells in the pathological image into negative cells and positive cells according to the cell staining characteristics, wherein the negative cells have no cell membrane staining, and the positive cells have cell membrane staining (brown).

[0072] Step S102: using each of the pathological images to train and evaluate a pre-constructed cell detection model to obtain a qualified cell detection model, wherein the pre-constructed cell detection model is a semantic segmentation model.

[0073] Specifically, after obtaining several annotated pathological images, it is necessary to use each pathological image to train a pre-constructed cell detection model (semantic segmentation model), and evaluate the trained cell detection model. Through the above training and evaluation method, a qualified cell detection model can be obtained.

[0074] It should be noted that, for the structure of the pre-built cell detection model, the structure can be an existing semantic segmentation model structure, such as FCN (Fully Convolution Network), U-Net, DeepLab, etc., or it can be a model structure improved on the basis of the existing semantic segmentation model structure, such as: an improved U-Net model structure, and the improved U-Net model structure adds a residual block to the original U-Net.

[0075] Step S103: using the qualified cell detection model to obtain a center point expansion image of the pathological image to be processed, wherein the center point expansion image includes at least one center point expansion area group, different center point expansion area groups are used to represent different cell types, and for each of the center point expansion area groups, the center point expansion area group includes at least one center point expansion area, and the center point expansion area is used to represent the location of the cells in the pathological image to be processed.

[0076] Specifically, after obtaining a qualified cell detection model, the qualified cell detection model can be used to process the pathological image to be processed, that is, using the qualified cell detection model to obtain a center point expansion image of the pathological image to be processed, wherein the pathological image to be processed is an unlabeled image and the pathological image to be processed includes at least one cell (i.e., at least one cell type).

[0077] It should be noted that, the pixel values ​​of the center point dilated regions included in different center point dilated region groups in the center point dilated image are different. For example, the center point dilated image includes two center point dilated region groups, namely a first center point dilated region group and a second center point dilated region group. The first center point dilated region group includes two center point dilated regions, namely a center point dilated region A and a center point dilated region B. The pixel values ​​of the center point dilated region A and the center point dilated region B in the center point dilated image are both 1. The second center point dilated region group includes one center point dilated region, namely a center point dilated region C. The pixel value of the center point dilated region C in the center point dilated image is 2. The pixel values ​​of the regions other than the center point dilated region group are 0.

[0078] It should be noted again that the central point expansion area may be expressed as a solid circle or a solid square in the central point expansion image, and the specific expression form of the central point expansion area is not specifically limited herein.

[0079] For example: the pathological image to be processed includes cells A, cells B, cells C, cells D and cells E, wherein cells A, cells B and cells C are all negative cells, and cells D and cells E are positive cells. Then, in the center point expansion image of the image to be processed, two center point expansion area groups are included, namely a first center point expansion area group and a second center point expansion area group. The first center point expansion area group represents negative cells, and the first center point expansion area group includes three center point expansion areas, and the three center point expansion areas respectively indicate the locations of cells A, cells B and cells C. The second center point expansion area group represents positive cells, and the second center point expansion area group includes two center point expansion areas, and the two center point expansion areas respectively indicate the locations of cells D and cells E.

[0080] It should be noted again that when the pathological image to be processed includes cells of only one cell type, the center point dilation image of the pathological image to be processed includes only one group of center point dilation regions.

[0081] Step S104: performing spot detection processing on the center point expansion image to obtain the center point pixel position of each center point expansion area in the center point expansion image, wherein the center point pixel position is used to represent the cell center position of the cell in the pathological image to be processed.

[0082] Specifically, for each obtained center point pixel position of the center point expansion area, the center point pixel position refers to the position of the pixel point corresponding to the center point of the center point expansion area in the center point expansion image, and one center point pixel position is used to represent the cell center position of a cell in the image to be processed.

[0083] It should be noted that the blob detection method can detect areas in an image that have different pixel values ​​from the surrounding pixels. The algorithm used in the blob detection method can be set according to actual conditions, for example, it can be a Gaussian Laplace algorithm based on a derivative differential method, which performs convolution operations on the image through Gaussian filters and Laplace filters to perform blob detection, or it can be a watershed algorithm based on local extreme values. The specific algorithm used in the blob detection method is not specifically limited here.

[0084] Step S105: Counting the number of center point pixel positions in each center point expansion region group to obtain the number of cells in each cell category in the pathological image to be processed.

[0085] Specifically, after obtaining the center point pixel position of each center point dilated area in the center point dilated image, for each center point dilated area group, the number of center point pixel positions of the center point dilated areas included in the center point dilated area group is counted, and the number is used as the number of cells in the cell category represented by the center point dilated area group.

[0086] For example, the cell categories of cells in the pathological image to be processed include: positive cells and negative cells. The center point expansion image of the pathological image to be processed includes two center point expansion area groups, namely, center point expansion area group A and center point expansion area group B. Center point expansion area group A is used to represent positive cells, and center point expansion area group B is used to represent negative cells. Center point expansion area group A includes 2 center point expansion areas, that is, the number of center point pixel positions in center point expansion area group A is 2, so the number of positive cells is 2; center point expansion area group B includes 3 center point expansion areas, that is, the number of center point pixel positions in center point expansion area group B is 3, so the number of negative cells is 3.

[0087] Figure 1The provided cell detection method based on pathological images first uses a number of acquired annotated pathological images to train and evaluate a preset cell detection model to obtain a qualified cell detection model. Since the above annotations include annotations of the cell categories and the cell center positions of the cells in the pathological images, after obtaining the qualified cell detection model, the qualified cell detection model can be used to locate cells of different categories in the pathological images to be processed, and a center point expansion image of the pathological images to be processed is obtained. In the center point expansion image, a center point expansion area represents the location of a cell, and the center point expansion areas corresponding to different types of cells are located in different center point expansion area groups. After obtaining the center point expansion image, a spot detection method is used to spot the center point expansion image. Point detection processing is performed to obtain the center point pixel position of each center point expansion area in the center point expansion image; because different center point expansion area groups in the center point expansion image represent different cell types, in order to determine the number of cells under each cell category, the present application determines the number of cells under the cell category represented by each center point expansion area group by counting the number of center point pixel positions in each center point expansion area group detected, thereby obtaining the number of cells under each cell category in the pathological image to be processed, so as to assist pathologists in clinical diagnosis and treatment and scientific research; compared with the recognition method of artificial naked eye distinction in the prior art, the present application realizes the positioning and counting of different types of cells through the server throughout the process, which is conducive to reducing the manpower burden while improving the positioning efficiency and counting efficiency of different types of cells.

[0088] In another feasible implementation, after executing the above step S105, the method further includes: determining the ratio of the number of cells in each cell category to the total number of all cells in the pathological image to be processed.

[0089] In a feasible implementation, the pathological image in the above step S101 includes a first full-slice pathological image or a first designated area in the first full-slice pathological image; the pathological image to be processed in the above step S103 includes a second full-slice pathological image or a second designated area in the second full-slice pathological image.

[0090] Specifically, the annotated pathological image obtained in the above step S101 can be a full-film pathological image (i.e., the first full-film pathological image) or a designated area in the full-film pathological image (i.e., the first designated area); similarly, the pathological image to be processed in the above step S103 can be a full-film pathological image (i.e., the second full-film pathological image) or a designated area in the full-film pathological image (i.e., the second designated area).

[0091] It should be noted that the whole-slice pathology image refers to a whole-field digital slice image (Whole Slide Image, WSI). The acquisition process of the whole-slice pathology image is: the pathological tissue slices are continuously scanned and imaged block by block by a scanning device such as a digital scanner, and they are spliced ​​into a whole full-field digital slice image through image compression and storage software. The designated area in the whole-slice pathology image is the area framed in the whole-slice pathology image. It should be noted that the designated area can be framed according to the aggregation trend of cells in the whole-slice pathology image, and can also be framed according to the interests of relevant personnel, and no specific limitation is made here.

[0092] In a feasible implementation manner, before executing the training of the pre-built cell detection model in the above step S102, the following operations need to be performed:

[0093] For each of the pathological images, a label image corresponding to the pathological image is obtained, wherein the label image includes at least one target pixel point set, different target pixel point sets are used to represent different cell categories, target pixels in different target pixel point sets have different pixel values ​​on the label image, and the target pixel points are used to represent the cell center position of the cells in the pathological image. In the label image, pixel values ​​of other pixels except the target pixel points are different from the pixel values ​​of the target pixel points.

[0094] Specifically, after obtaining several annotated pathological images, in order to train and evaluate the pre-built cell detection model, it is necessary to obtain the target label image corresponding to each pathological image. The target label image is obtained by dilating the target pixel points in the label image. Therefore, it is necessary to first obtain the label image of each pathological image. For each pathological image, the characteristics of the label image of the pathological image are:

[0095] First, the height value of the label image is the same as the height value of the pathological image, and the width value of the label image is the same as the width value of the pathological image, for example: if the height value of the pathological image is H and the width value is W, then the height value of the label image of the pathological image is H and the width value is W; second, the positions of the pixels in the label image correspond one-to-one to the positions of the pixels in the pathological image; third, the label image is a single-channel image; fourth, the label image contains at least one target pixel set, a target pixel set is used to represent a cell category, and the target pixels in different target pixel sets have different pixel values ​​in the label image, and in the label image: the other pixels except the target pixels are used to represent the image background, so the pixel values ​​of the other pixels except the target pixels are different from the pixel values ​​of the target pixels, for example: in the pathological image There are two types of cells, namely negative cells and positive cells, then the label image of the pathological image contains two target pixel sets, one target pixel set is used to represent negative cells, and the other target pixel set is used to represent positive cells, wherein the pixel value of each target pixel in the target pixel set representing positive cells in the label image is 2, and the pixel value of each target pixel in the target pixel set representing negative cells in the label image is 1, and in the label image, the pixel values ​​of other pixels except the target pixels are 0 (pixels used to represent background pixels); fifth, for each target pixel set of the label image, the target pixel set includes at least one target pixel, wherein one target pixel is used to represent the cell center position of a cell, that is, the target pixel is the pixel corresponding to the cell center position of the cell in the label image.

[0096] Each target pixel in the label image is expanded into a target area of ​​a first preset size to obtain a target label image.

[0097] After obtaining the label image of each pathological image, the target pixel points in the label image of each pathological image can be expanded to obtain the target label image of each pathological image. For each label image of the pathological image, the expansion process is specifically: each target pixel point in the label image is expanded into a target area of ​​a first preset size, wherein the target pixel points include the target pixel points in the target pixel point concentration in the label image, and the first preset size cannot exceed the average size of the cell, for example: the first preset size can be half the size of the cell, and the average size of the cell can be set according to human experience; the shape of the target area can be set according to actual conditions, for example, it can be a solid circle or a solid square, and the specific shape of the target area is not specifically limited here.

[0098] For example, Figure 3An example diagram of a label image of a pathological image provided in the first embodiment of the present application is shown. Figure 3 As shown, Figure 3 The label image shown is Figure 2 The label image corresponding to the pathological image shown, wherein in the label image, the pixel value of each target pixel representing a negative cell is 1, the pixel value of each target pixel representing a positive cell is 2, and the pixel value of other pixels except the target pixel is 0; Figure 4 An example diagram of a target label image of a pathological image provided by the first embodiment of the present application is shown. Figure 4 As shown, Figure 4 The target label image shown is obtained by Figure 3 Each target pixel in the label image shown is expanded into a solid circle of a first preset size. In the target label image, the pixel value of the expanded area of ​​each target pixel representing a negative cell is 1, the pixel value of the expanded area of ​​each target pixel representing a positive cell is 2, and the pixel values ​​of other pixels are 0.

[0099] In a feasible implementation manner, when executing the above step S102, it is specifically implemented by the following steps:

[0100] Step S201: Divide each of the pathological images into a training set and a test set.

[0101] It should be noted that the division ratio of the training set and the test set can be set according to the actual situation. For example, it can be divided according to the ratio of training set: test set = 8:2, or it can be divided according to the ratio of training set: test set = 6:4. The specific division ratio is not limited here.

[0102] Step S202: segmenting each pathological image included in the training set and the target label image corresponding to each pathological image to obtain a plurality of first pathological sub-images of a second preset size and a first target label sub-image of a second preset size corresponding to each first pathological sub-image; and segmenting each pathological image included in the test set and the target label image corresponding to each pathological image to obtain a plurality of second pathological sub-images of a second preset size and a second target label sub-image of a second preset size corresponding to each second pathological sub-image.

[0103] Specifically, for each pathological image included in the training set, the pathological image and its corresponding target label image are segmented to obtain a number of first pathological sub-images of a second preset size, and for each first pathological sub-image, there is a unique first target label sub-image of a second preset size corresponding to it; similarly, for each pathological image included in the test set, the pathological image and its corresponding target label image are segmented to obtain a number of second pathological sub-images of a second preset size, and for each second pathological sub-image, there is a unique second target label sub-image of a second preset size corresponding to it.

[0104] Taking any pathological image in the above training set or test set as an example, a pathological image 1 with a pixel size of 768*256, the target label image corresponding to the pathological image 1 is also 768*256 pixels in size, and the preset second preset size is 256*256 pixels in size. The pathological image 1 is cut according to the second preset size to obtain three pathological sub-images, which are pathological sub-image 1, pathological sub-image 2 and pathological sub-image 3 from left to right. The target label image corresponding to the pathological image 1 is cut according to the above second preset size to obtain three target label sub-images, which are target label sub-image 1, target label sub-image 2 and target label sub-image 3 from left to right, among which the target label sub-image uniquely corresponding to pathological sub-image 1 is target label sub-image 1, the target label sub-image uniquely corresponding to pathological sub-image 2 is target label sub-image 2, and the target label sub-image uniquely corresponding to pathological sub-image 3 is target label sub-image 3.

[0105] It should be noted that the second preset size can be set according to actual conditions. For example, the second preset size in the first embodiment of the present application is 256*256 pixels, and no specific limitation is made on the second preset size.

[0106] It should be noted again that the target label sub-image corresponding to each first pathological sub-image should be converted into a one-hot encoding form before training the pre-built cell detection model.

[0107] Step S203: using each of the first pathological sub-images and the first target label sub-image corresponding to each of the first pathological sub-images to train the pre-constructed cell detection model.

[0108] Specifically, each first pathological sub-image is used as an input image of a pre-constructed cell detection model, and the input image is processed by the cell detection model to obtain a predicted image, so that the loss between the first target label sub-image corresponding to each first pathological sub-image and the predicted image corresponding to each first pathological sub-image is gradually reduced, so as to realize the training of the pre-constructed cell detection model.

[0109] In a feasible implementation scheme, the hyperparameters, loss function and optimization algorithm used in the training process of the pre-built cell detection model can be set, for example: the batch size is set to 32, the learning rate is set to 0.001, the maximum number of iterations is set to 200 epochs (iteration rounds), the loss function is set to categorical_crossentropy, and the optimization algorithm is set to the Adam algorithm.

[0110] Step S204: using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images, the trained cell detection model is evaluated to obtain the sensitivity and accuracy of the trained cell detection model.

[0111] Step S205: Determine whether the accuracy and the sensitivity are both greater than a preset threshold. If both are greater than the preset threshold, use the trained cell detection model as the qualified cell detection model; otherwise, repeat the above steps S203, S204 and S205 until the qualified cell detection model is obtained.

[0112] Specifically, each second pathological sub-image is input into the trained cell detection model to obtain a center point expansion sub-image corresponding to each second pathological sub-image. For each center point expansion sub-image corresponding to the second pathological sub-image, the center point expansion sub-image includes at least one center point expansion area for representing the position information and category information of the cells in the second pathological sub-image. Therefore, the first position information and the first number of cells in the second pathological sub-image can be determined through the center point expansion sub-image. Then, the second position information and the second number of cells in the second pathological sub-image are determined through the second target label sub-image corresponding to the second pathological sub-image. The cells represented by the first position information are taken as the first cells, and the cells represented by the second position information are taken as the second cells. According to the first position information of each first cell and the second position information of each second cell, information, determining a target cell in each first cell, wherein in each second cell there is a second cell whose distance from the target cell is less than a preset distance; calculating the ratio of the target number of the target cells to the first number of the first cells to obtain the accuracy of the trained cell detection model; and calculating the ratio of the target number of the target cells to the second number of the second cells to obtain the sensitivity of the trained cell model; judging whether both the accuracy and the sensitivity are greater than the preset threshold, that is, the accuracy is greater than the preset threshold and the sensitivity is greater than the preset threshold, if both are greater than the preset threshold, taking the trained cell model as a qualified cell detection model; otherwise, repeating the above steps S203, S204 and S205 in sequence until the qualified cell detection model is obtained.

[0113] It should be noted that the numerical value of the preset threshold can be set according to actual conditions. For example, the sensitivity and accuracy of the qualified cell detection model in Example 1 of the present application are both greater than 85%. The numerical value of the preset threshold is not specifically limited here.

[0114] In a feasible implementation manner, when executing the above step S103, it is specifically implemented by the following steps:

[0115] Step S301: segmenting the pathological image to be processed to obtain at least one pathological sub-image to be processed of a second preset size.

[0116] It should be noted that the resolution value of the pathological image to be processed is the same as the resolution value of the pathological image included in the training set, and the value of the second preset size in step S301 is the same as the value of the second preset size in the above step S202.

[0117] Step S302: for each of the pathological sub-images to be processed, input the pathological sub-image to be processed into the qualified cell detection model to obtain a center point expansion sub-image corresponding to the pathological sub-image to be processed, wherein the center point expansion sub-image includes at least one center point expansion area group for representing cell categories, center point expansion areas included in different center point expansion area groups have different pixel values ​​in the center point expansion sub-image, and the center point expansion area is used to represent the location of cells in the pathological sub-image to be processed.

[0118] Specifically, for each pathological sub-image to be processed, the pathological sub-image to be processed is input into a qualified cell detection model to obtain a pixel probability map corresponding to the pathological sub-image to be processed output by the qualified cell detection model, wherein the length and width of the pixel probability map are the same as the length and width of the pathological sub-image to be processed, and the pixel probability map includes at least two image channels, and different image channels are used to represent different pixel point categories. The pixel point categories include: pixel point categories for representing cell categories and pixel point categories for representing backgrounds. For pixel point categories for representing cell categories: one cell category corresponds to one pixel point category. For each pixel point in the pixel probability map: the pixel point corresponds to at least two probability values, and the number of probability values ​​is The same as the number of image channels, one probability value corresponds to one image channel, and the sum of the probability values ​​is 1; wherein, the pixel value corresponding to the pixel point under each image channel of the pixel probability map represents the probability that the corresponding pixel point on the pathological sub-image to be processed belongs to the pixel point category represented by the image channel; for each pixel point in the above pixel probability map, among the probability values ​​corresponding to the pixel point, the image channel number corresponding to the probability value with the largest numerical value is used as the pixel value of the pixel point on the center point expansion sub-image corresponding to the pixel probability map, and the center point expansion sub-image corresponding to the pathological sub-image to be processed is obtained, wherein the above center point expansion sub-image is a single-channel image, and the pixel points under different pixel point categories have different pixel values ​​in the above center point expansion sub-image.

[0119] For each pathological sub-image to be processed, the center point expansion sub-image corresponding to the image is given as an example. Figure 5 An example diagram of a pathological image to be processed provided in the first embodiment of the present application is shown. Figure 5 As shown, the pathological image to be processed is a pathological image stained with PD-L1, and there are two types of cells, namely negative cells and positive cells; Figure 6 An example diagram of a pathological sub-image to be processed provided in the first embodiment of the present application is shown. Figure 6 As shown, Figure 6 The pathological sub-image to be processed in Figure 5 The pathological image to be processed is segmented; Figure 7 An example diagram of a central point expansion sub-image of a pathological sub-image to be processed provided in the first embodiment of the present application is shown. Figure 7As shown, the center point expansion sub-image includes two center point expansion area groups, which are a first center point expansion area group composed of gray dots and a second center point expansion area group composed of white dots. The first center point expansion area group is used to represent positive cells, and the second center point expansion area group is used to represent negative cells. Each gray dot in the first center point expansion area group represents the location of a positive cell in the pathological sub-image to be processed, and the pixel value of each gray dot in the center point expansion sub-image is 2. Each white dot in the second center point expansion area group represents the location of a negative cell in the pathological sub-image to be processed, and the pixel value of each white dot in the center point expansion sub-image is 1. The pixel value of each pixel point representing the background except the dots is 0.

[0120] Step S303: splicing the center point expansion sub-images corresponding to the pathological sub-images to be processed according to the position information of the pathological sub-images to be processed in the pathological image to be processed to obtain the center point expansion image.

[0121] For example, there are three pathological sub-images to be processed corresponding to the pathological image to be processed, namely, pathological sub-image 1 to be processed, pathological sub-image 2 to be processed, and pathological sub-image 3 to be processed, wherein pathological sub-image 1 to be processed is located on the left side of the pathological image to be processed, pathological sub-image 2 to be processed is located in the middle of the pathological image to be processed, and pathological sub-image 3 to be processed is located on the right side of the pathological image to be processed. When splicing the center point expansion sub-images corresponding to the pathological sub-images to be processed, the center point expansion sub-image corresponding to the pathological sub-image to be processed 1 is placed on the left, the center point expansion sub-image corresponding to the pathological sub-image to be processed 2 is placed in the middle, and the center point expansion sub-image corresponding to the pathological sub-image to be processed 3 is placed on the right. The center point expansion image corresponding to the pathological image to be processed is obtained by this splicing method. Figure 8 An example diagram of a center point expansion image of a pathological image to be processed provided by the first embodiment of the present application is shown. Figure 8 As shown, Figure 8 The center point dilation image shown is Figure 5 The center point dilation image of the pathological image to be processed is shown.

[0122] Embodiment 2

[0123] Fig. 9 FIG. 1 shows a schematic diagram of the structure of a cell detection device based on pathological images provided in the second embodiment of the present application. Fig. 9 As shown, the cell detection device based on pathological images includes:

[0124] An acquisition module 501 is used to acquire a number of annotated pathological images, wherein the annotations include annotations of a cell center position and a cell category of at least one cell in the pathological image;

[0125] An execution module 502 is used to train and evaluate a pre-built cell detection model using each of the pathological images to obtain a qualified cell detection model, wherein the pre-built cell detection model is a semantic segmentation model;

[0126] A detection module 503 is used to obtain a center point expansion image of the pathological image to be processed using the qualified cell detection model, wherein the center point expansion image includes at least one center point expansion area group, different center point expansion area groups are used to represent different cell types, and for each center point expansion area group, the center point expansion area group includes at least one center point expansion area, and the center point expansion area is used to represent the location of the cell in the pathological image to be processed;

[0127] A processing module 504 is used to perform spot detection processing on the center point expansion image to obtain the center point pixel position of each center point expansion area in the center point expansion image, wherein the center point pixel position is used to represent the cell center position of the cell in the pathological image to be processed;

[0128] The statistical module 505 is used to count the number of center point pixel positions in each center point expansion area group to obtain the number of cells in each cell category in the pathological image to be processed.

[0129] In a feasible implementation manner, the pathological image includes a first full-slice pathological image or a first designated area in the first full-slice pathological image; the pathological image to be processed includes a second full-slice pathological image or a second designated area in the second full-slice pathological image.

[0130] In a feasible implementation, before being used to train the pre-built cell detection model, the execution module 502 is further used to:

[0131] For each of the pathological images, a label image corresponding to the pathological image is obtained, wherein the label image includes at least one target pixel point set, different target pixel point sets are used to represent different cell categories, target pixels in different target pixel point sets have different pixel values ​​on the label image, the target pixel points are used to represent the cell center position of the cells in the pathological image, and in the label image: the pixel values ​​of other pixels except the target pixel points are different from the pixel values ​​of the target pixel points;

[0132] Each target pixel in the label image is expanded into a target area of ​​a first preset size to obtain a target label image.

[0133] In a feasible implementation scheme, the execution module 502 specifically includes:

[0134] A division unit, used for dividing each of the pathological images into a training set and a test set;

[0135] A first segmentation unit is used to segment each pathological image included in the training set and the target label image corresponding to each pathological image to obtain a plurality of first pathological sub-images of a second preset size and a first target label sub-image of a second preset size corresponding to each first pathological sub-image; and segment each pathological image included in the test set and the target label image corresponding to each pathological image to obtain a plurality of second pathological sub-images of a second preset size and a second target label sub-image of a second preset size corresponding to each second pathological sub-image;

[0136] A training unit, configured to train the pre-constructed cell detection model using each of the first pathological sub-images and a first target label sub-image corresponding to each of the first pathological sub-images;

[0137] An evaluation unit, configured to evaluate the trained cell detection model using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images, to obtain the sensitivity and accuracy of the trained cell detection model;

[0138] A judging unit is used to judge whether the accuracy and the sensitivity are both greater than a preset threshold value. If both are greater than the preset threshold value, the trained cell detection model is used as the qualified cell detection model; otherwise, step S203, step S204 and step S205 are repeated until the qualified cell detection model is obtained, wherein step S203 is: using each of the first pathological sub-images and the first target label sub-images corresponding to each of the first pathological sub-images to train the pre-constructed cell detection model; step S204 is: using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images to evaluate the trained cell detection model to obtain the sensitivity and accuracy of the trained cell detection model; step S205 is: judging whether the accuracy and the sensitivity are both greater than a preset threshold value. If both are greater than the preset threshold value, the trained cell detection model is used as the qualified cell detection model; otherwise, step S203, step S204 and step S205 are repeated until the qualified cell detection model is obtained.

[0139] In a feasible implementation scheme, the detection module 503 specifically includes:

[0140] A second segmentation unit, configured to segment the pathological image to be processed to obtain at least one pathological sub-image to be processed of a second preset size;

[0141] a detection unit, configured to input each of the pathological sub-images to be processed into the qualified cell detection model to obtain a center point expansion sub-image corresponding to the pathological sub-image to be processed, wherein the center point expansion sub-image includes at least one center point expansion region group for representing cell categories, center point expansion regions included in different center point expansion region groups have different pixel values ​​in the center point expansion sub-image, and the center point expansion region is used to represent the location of cells in the pathological sub-image to be processed;

[0142] The splicing unit is used to splice the center point expansion sub-images corresponding to each of the pathological sub-images to be processed according to the position information of each of the pathological sub-images to be processed in the pathological image to be processed, so as to obtain the center point expansion image.

[0143] The device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present application, its implementation principle and the technical effect produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0144] The cell detection method based on pathological images provided in the embodiment of the present application first uses a plurality of acquired annotated pathological images to train and evaluate a preset cell detection model to obtain a qualified cell detection model. Since the above annotations include annotations of the cell categories and the cell center positions of the cells in the pathological images, after obtaining the qualified cell detection model, the qualified cell detection model can be used to locate cells of different categories in the pathological images to be processed, and a center point expansion image of the pathological images to be processed is obtained. In the center point expansion image, a center point expansion area represents the location of a cell, and the center point expansion areas corresponding to different types of cells are located in different center point expansion area groups. After obtaining the center point expansion image, a spot detection method is used to detect the center point expansion image. Spot detection processing is performed to obtain the center point pixel position of each center point expansion area in the center point expansion image; because different center point expansion area groups in the center point expansion image represent different cell types, in order to determine the number of cells in each cell category, the present application determines the number of cells in the cell category represented by each center point expansion area group by counting the number of center point pixel positions in each center point expansion area group detected, thereby obtaining the number of cells in each cell category in the pathological image to be processed, so as to assist pathologists in clinical diagnosis and treatment and scientific research; compared with the recognition method of artificial naked eye distinction in the prior art, the present application realizes the positioning and counting of different types of cells through the server throughout the process, which is conducive to reducing the manpower burden while improving the positioning efficiency and counting efficiency of different types of cells.

[0145] Embodiment 3

[0146] The embodiment of the present application further provides a computer device 600, Fig.10 A schematic diagram of the structure of a computer device provided in the third embodiment of the present application is shown. Fig.10 As shown, the device includes a memory 601, a processor 602, and a computer program stored in the memory 601 and executable on the processor 602, wherein the processor 602 implements the cell detection method based on pathological images when executing the computer program.

[0147] Specifically, the above-mentioned memory 601 and processor 602 can be general-purpose memories and processors, which are not specifically limited here. When the processor 602 runs the computer program stored in the memory 601, it can execute the above-mentioned cell detection method based on pathological images, which is beneficial to improve the positioning efficiency and counting efficiency of different types of cells while reducing the manpower burden.

[0148] Embodiment 4

[0149] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned cell detection method based on pathological images are executed.

[0150] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned cell detection method based on pathological images, which is beneficial to improve the positioning efficiency and counting efficiency of different types of cells while reducing the manpower burden.

[0151] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0152] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0154] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0155] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0156] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A cell detection method based on pathological images, characterized in that: The method comprises the following steps: Step S1: acquiring a plurality of annotated pathological images, wherein the annotations include annotations of a cell center position and a cell category of at least one cell in the pathological image; Step S2: using each of the pathological images to train and evaluate a pre-constructed cell detection model to obtain a qualified cell detection model, wherein the pre-constructed cell detection model is a semantic segmentation model; Step S3: using the qualified cell detection model to obtain a center point expansion image of the pathological image to be processed, wherein the center point expansion image includes at least one center point expansion area group, different center point expansion area groups are used to represent different cell types, and for each center point expansion area group, the center point expansion area group includes at least one center point expansion area, and the center point expansion area is used to represent the location of the cell in the pathological image to be processed; Step S4: performing spot detection processing on the center point expansion image to obtain the center point pixel position of each center point expansion area in the center point expansion image, wherein the center point pixel position is used to represent the cell center position of the cell in the pathological image to be processed; Step S5: Counting the number of center point pixel positions in each center point expansion region group to obtain the number of cells in each cell category in the pathological image to be processed.

2. The method according to claim 1, characterized in that The pathological image in step S1 includes a first full-slice pathological image or a first designated area in the first full-slice pathological image; the pathological image to be processed in step S3 includes a second full-slice pathological image or a second designated area in the second full-slice pathological image.

3. The method according to claim 1, characterized in that Before training the pre-built cell detection model in step S2, the method further includes: For each of the pathological images, a label image corresponding to the pathological image is obtained, wherein the label image includes at least one target pixel point set, different target pixel point sets are used to represent different cell categories, target pixels in different target pixel point sets have different pixel values ​​on the label image, the target pixel points are used to represent the cell center position of the cells in the pathological image, and in the label image: the pixel values ​​of other pixels except the target pixel points are different from the pixel values ​​of the target pixel points; Each target pixel in the label image is expanded into a target area of ​​a first preset size to obtain a target label image.

4. The method according to claim 3, characterized in that The step S2 specifically includes the following steps: Step S201: dividing each of the pathological images into a training set and a test set; Step S202: segmenting each pathological image included in the training set and the target label image corresponding to each pathological image to obtain a plurality of first pathological sub-images of a second preset size and a first target label sub-image of a second preset size corresponding to each first pathological sub-image; and segmenting each pathological image included in the test set and the target label image corresponding to each pathological image to obtain a plurality of second pathological sub-images of a second preset size and a second target label sub-image of a second preset size corresponding to each second pathological sub-image; Step S203: using each of the first pathological sub-images and the first target label sub-image corresponding to each of the first pathological sub-images to train the pre-constructed cell detection model; Step S204: using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images, evaluating the trained cell detection model to obtain the sensitivity and accuracy of the trained cell detection model; Step S205: Determine whether the accuracy and the sensitivity are both greater than a preset threshold. If both are greater than the preset threshold, use the trained cell detection model as the qualified cell detection model; otherwise, repeat step S203, step S204 and step S205 until the qualified cell detection model is obtained.

5. The method according to claim 1, characterized in that The step S3 specifically comprises the following steps: Step S301: segmenting the pathological image to be processed to obtain at least one pathological sub-image to be processed of a second preset size; Step S302: for each of the pathological sub-images to be processed, input the pathological sub-images to be processed into the qualified cell detection model to obtain a center point expansion sub-image corresponding to the pathological sub-image to be processed, wherein the center point expansion sub-image includes at least one center point expansion region group for representing cell categories, center point expansion regions included in different center point expansion region groups have different pixel values ​​in the center point expansion sub-image, and the center point expansion region is used to represent the location of cells in the pathological sub-image to be processed; Step S303: splicing the center point expansion sub-images corresponding to the pathological sub-images to be processed according to the position information of the pathological sub-images to be processed in the pathological image to be processed to obtain the center point expansion image.

6. A cell detection device based on pathological images, characterized in that: include: An acquisition module, used for acquiring a plurality of annotated pathological images, wherein the annotations include annotations of a cell center position and a cell category of at least one cell in the pathological image; An execution module, used to train and evaluate a pre-built cell detection model using each of the pathological images to obtain a qualified cell detection model, wherein the pre-built cell detection model is a semantic segmentation model; A detection module, used for acquiring a center point expansion image of the pathological image to be processed using the qualified cell detection model, wherein the center point expansion image includes at least one center point expansion area group, different center point expansion area groups are used to represent different cell types, and for each center point expansion area group, the center point expansion area group includes at least one center point expansion area, and the center point expansion area is used to represent the location of the cell in the pathological image to be processed; a processing module, configured to perform spot detection processing on the center point expansion image to obtain the center point pixel position of each center point expansion area in the center point expansion image, wherein the center point pixel position is used to represent the cell center position of the cell in the pathological image to be processed; The statistical module is used to count the number of center point pixel positions in each center point expansion area group to obtain the number of cells in each cell category in the pathological image to be processed.

7. The device according to claim 6, characterized in that Before being used to train the pre-built cell detection model, the execution module is further used to: For each of the pathological images, a label image corresponding to the pathological image is obtained, wherein the label image includes at least one target pixel point set, different target pixel point sets are used to represent different cell categories, target pixels in different target pixel point sets have different pixel values ​​on the label image, the target pixel points are used to represent the cell center position of the cells in the pathological image, and in the label image: the pixel values ​​of other pixels except the target pixel points are different from the pixel values ​​of the target pixel points; Each target pixel in the label image is expanded into a target area of ​​a first preset size to obtain a target label image.

8. The device according to claim 6, characterized in that The execution module specifically includes: A division unit, used for dividing each of the pathological images into a training set and a test set; A first segmentation unit is used to segment each pathological image included in the training set and the target label image corresponding to each pathological image to obtain a plurality of first pathological sub-images of a second preset size and a first target label sub-image of a second preset size corresponding to each first pathological sub-image; and segment each pathological image included in the test set and the target label image corresponding to each pathological image to obtain a plurality of second pathological sub-images of a second preset size and a second target label sub-image of a second preset size corresponding to each second pathological sub-image; A training unit, configured to train the pre-constructed cell detection model using each of the first pathological sub-images and a first target label sub-image corresponding to each of the first pathological sub-images; An evaluation unit, configured to evaluate the trained cell detection model using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images, to obtain the sensitivity and accuracy of the trained cell detection model; A judging unit is used to judge whether the accuracy and the sensitivity are both greater than a preset threshold value. If both are greater than the preset threshold value, the trained cell detection model is used as the qualified cell detection model; otherwise, step S203, step S204 and step S205 are repeated until the qualified cell detection model is obtained, wherein step S203 is: using each of the first pathological sub-images and the first target label sub-images corresponding to each of the first pathological sub-images to train the pre-constructed cell detection model; step S204 is: using each of the second pathological sub-images and the second target label sub-images corresponding to each of the second pathological sub-images to evaluate the trained cell detection model to obtain the sensitivity and accuracy of the trained cell detection model; step S205 is: judging whether the accuracy and the sensitivity are both greater than a preset threshold value. If both are greater than the preset threshold value, the trained cell detection model is used as the qualified cell detection model; otherwise, step S203, step S204 and step S205 are repeated until the qualified cell detection model is obtained.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are executed.