Targeted cell detection and annotation methods for pathological images
By employing a deep learning algorithm framework with multi-round cross-validation and noise label correction rules, the problem of missed and mislabeled target cells in pathological images is solved, achieving high-accuracy target cell detection and annotation while reducing annotation costs.
Patent Information
- Application Number
- CN202311346748.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-10-17
AI Technical Summary
In existing technologies, the annotation of target cells in pathological images suffers from omissions and mislabeling, resulting in low accuracy of deep learning algorithms in target cell detection and high cost of high-quality annotation.
A method for detecting targeted cells in pathological images is designed. Through multi-round cross-validation training and preset noise label correction rules, the predicted labeling results of targeted cells are corrected, forming a deep learning algorithm framework with self-learning and correction capabilities.
This study achieves high-accuracy targeted cell detection using deep learning algorithms even with noisy labels, reducing reliance on high-quality annotations, lowering annotation costs, and improving detection efficiency and accuracy.
Smart Images

Figure CN117315653B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method for targeted cell detection in pathological images, a labeling method, an electronic device, and a readable storage medium. Background Technology
[0002] Specialized medical books on cell pathology and other related fields can guide doctors in learning the cellular pathological characteristics of various human tissues. However, tissue on a pathological slide is a thin, three-dimensional object. Factors such as compression during slide preparation, tissue folding, cell deformation when passing through different tissues, and apoptosis during the cell life cycle can all cause the same type of cell to exhibit a wide variety of morphologies. Pathologists need to study the pathological cells on various pathological sections over many years to improve the accuracy of identifying the same and different types of cells with diverse morphological characteristics and reduce the error rate of cell identification. This is also where the value of experienced pathologists lies. Because target cells can appear anywhere on a tissue section and in random numbers, the usual observation process requires doctors to observe multiple regions of interest under a microscope to count the approximate number of target cells, and finally give a qualitative order of magnitude of the target cells in the pathological section, such as a small number, a medium number, or a large number. This process is an important and arduous daily task for pathologists, and doctors cannot quantitatively and accurately count the number of target cells in a pathological section.
[0003] Digital pathology images are the product of digitized pathology slides. By using advanced modern computer digital systems and mature traditional optical instrument magnification devices, fully / semi-automatic microscopes or optical magnification scanners can acquire high-precision, high-resolution digital images with multiple / full fields of view.
[0004] Deep learning, which has gained popularity in recent years, has offered one-stop solutions for many object classification, segmentation, and detection tasks that traditional machine learning algorithms cannot effectively address in various fields such as data mining, object recognition, and natural language processing. Moreover, deep learning, provided that the data is accurately labeled, exhibits strong data robustness and high accuracy in target tasks.
[0005] Reinforcement learning refers to the process of rewarding or punishing behavior within a given environment to stimulate the achievement of a desired optimal outcome. It is a dynamic learning process of continuous exploration and trial and error, involving constant interaction between the agent and the environment. Its goal is to enable computers to develop their own rules for solving problems.
[0006] The application of deep learning in digital pathology imaging enables pathologists to perform functions such as identifying suspected disease areas, detecting and counting targeted cells in digital pathology images using computer-aided technology. However, as mentioned earlier, the advantages of deep learning can only be fully realized with accurate data annotation. However, as pathologists continue to learn, they may reach different conclusions regarding the target cells in the same image. Furthermore, because tissue on a pathology slide is a thin three-dimensional object, various factors such as compression during slide preparation, tissue folding, cell deformation when passing through different tissues, and apoptosis during the cell life cycle can all produce cells of the same type with diverse morphologies. The sheer number of these cells with various morphologies and the target cells themselves can lead to cell annotators or doctors becoming fatigued and mislabeling or missing target cells in pathology images. These omissions and mislabelings are collectively referred to as noise labels. Even experienced pathologists find it difficult to completely eliminate the phenomenon of omissions and mislabeling in the gold standard of pathology cell annotation.
[0007] However, current deep learning algorithms rely on supervised methods such as transfer learning from large datasets and reinforcement learning with high-quality annotations to ensure high accuracy for target tasks. But the amount of labeled medical data is often enormous, and the annotation of most medical tasks requires a professional background in medical knowledge, making high-quality annotation extremely costly.
[0008] It should be noted that the information disclosed in the background section of this invention is intended only to enhance the understanding of the general background of this invention, and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0009] The purpose of this invention is to provide a method for detecting and labeling targeted cells in pathological images, an electronic device, and a readable storage medium. By designing a deep learning algorithm framework for automatic correction and detection of targeted cells in pathological images with noisy labels, the deep learning algorithm can still achieve high accuracy in the target cell detection task even when the targeted cell label has noisy labels.
[0010] To achieve the above objectives, the present invention provides a method for targeted cell detection in pathological images, comprising:
[0011] A dataset comprising multiple training samples is obtained, wherein each training sample includes a sample pathological image and a corresponding pre-label, the pre-label being obtained by pre-annotating the sample pathological image with target cells, and at least some of the pre-labels in the training samples have missing labels and / or mislabeled labels;
[0012] The dataset is used to train the pre-built target detection model through multiple rounds of cross-validation until the first preset training termination condition is met. When each round of cross-validation training is completed, the target cell prediction annotation results corresponding to all sample pathological images in the dataset obtained in the current training round are corrected according to the preset noise label correction rule. For each sample pathological image, the corrected target cell prediction annotation result of the sample pathological image in the current training round is used as the label of the sample pathological image in the next training round.
[0013] The trained target detection model is used to detect the acquired pathological images to obtain the corresponding target cell detection results.
[0014] Optionally, the first preset training termination condition is that the precision of the current training round is greater than or equal to the first precision threshold and the recall of the current training round is greater than or equal to the first recall threshold.
[0015] Optionally, the precision of the current training round is calculated using the following formula:
[0016]
[0017] The recall rate for the current training round is calculated using the following formula:
[0018]
[0019] Where, N TP N represents the number of bounding boxes that appear in both the target cell prediction annotation results and the labels in the current training round. FP N represents the number of bounding boxes in the target cell prediction annotation results during the current training epoch. FN This indicates the number of bounding boxes that are marked in the labels in the current training round.
[0020] Optionally, after the first preset termination condition is met, the detection method further includes:
[0021] The system obtains the target cell prediction annotation results corresponding to each of the pathological images of the samples in the dataset obtained in the training round when the first preset training end condition is met, and receives the physician's confirmation or correction operation on the target cell prediction annotation results corresponding to each pathological image of the samples, so as to obtain the corrected dataset.
[0022] The target detection model continues to be trained based on the corrected dataset until the second preset training termination condition is met.
[0023] Optionally, the second preset training termination condition is that the precision of the target detection model is greater than or equal to the second precision threshold and the recall of the target detection model is greater than or equal to the second recall threshold.
[0024] Optionally, the step of using the dataset to perform multiple rounds of cross-validation training on the pre-built object detection model includes:
[0025] The dataset was used to train the pre-built target detection model using multiple rounds of k-fold cross-validation.
[0026] Optionally, the step of using the dataset to train the pre-built target detection model through multiple rounds of k-fold cross-validation includes:
[0027] In each round of k-fold cross-validation training, the dataset is divided into k disjoint sample subsets based on patients. One of these subsets is used as the test set, and the remaining (k-1) subsets are used as the training set. The pre-built target detection model is then trained using k-fold cross-validation. In each fold cross-validation process, the target detection model is first trained using the training set, and then tested using the selected test set to obtain the target cell prediction annotation results corresponding to each pathological image in the test set.
[0028] Optionally, the step of correcting the target cell prediction annotation results corresponding to each of the pathological images in the dataset obtained in the current training round according to a preset noise label correction rule includes:
[0029] For each sample pathological image:
[0030] The confidence scores of all the bounding boxes in the target cell prediction annotation results of the pathological image of the sample in the current training round are sorted in descending order, and the bounding boxes with the highest confidence scores in the first preset percentage are taken as the first corrected bounding boxes.
[0031] The confidence scores of all the bounding boxes in the labels of the pathological image of the sample in the current training round are sorted in descending order, and the bounding boxes with the highest confidence scores in the second preset percentage are used as the second correction bounding boxes.
[0032] Based on the target cell prediction annotation results of the pathological image in the current training round and the annotation boxes, the first corrected annotation box, and the second corrected annotation box in the current training round, the corrected target cell prediction annotation results of the pathological image in the current training round are obtained.
[0033] Optionally, before performing multiple rounds of cross-validation training on the pre-built object detection model using the dataset, the method further includes:
[0034] All sample pathological images in the dataset are preprocessed to normalize the brightness quality of all sample pathological images.
[0035] Optionally, the preprocessing of all sample pathological images in the dataset includes:
[0036] A pre-trained pathological image quality classification model is used to classify the brightness quality of all sample pathological images in the dataset to determine the sample pathological images with acceptable brightness quality and those with unacceptable brightness quality.
[0037] For each pathological image with substandard brightness quality, the brightness characteristic value of the substandard pathological image is adaptively adjusted based on the brightness characteristic values of all pathological images with acceptable brightness quality.
[0038] To achieve the above objectives, the present invention also provides a method for targeted cell annotation in pathological images, comprising:
[0039] A dataset comprising multiple training samples is obtained, wherein each training sample includes a sample pathological image and a corresponding pre-label, the pre-label being obtained by pre-annotating the sample pathological image with target cells, and at least some of the pre-labels in the training samples have missing labels and / or mislabeled labels;
[0040] The dataset is used to train the pre-built target detection model through multiple rounds of cross-validation until the first preset training termination condition is met. When each round of cross-validation training is completed, the target cell prediction annotation results corresponding to all sample pathological images in the dataset obtained in the current training round are corrected according to the preset noise label correction rule. For each sample pathological image, the corrected target cell prediction annotation result of the sample pathological image in the current training round is used as the label of the sample pathological image in the next training round.
[0041] The system obtains the target cell prediction annotation results for each of the pathological images in the dataset obtained in the training round when the first preset training end condition is met, and receives confirmation or correction operations from physicians for the target cell prediction annotation results for each pathological image, so as to obtain the final annotation results for each pathological image.
[0042] To achieve the above objectives, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the pathological image targeted cell detection method or the pathological image targeted cell annotation method described above.
[0043] To achieve the above objectives, the present invention also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the pathological image targeted cell detection method or the pathological image targeted cell annotation method described above.
[0044] Compared with existing technologies, the pathological image targeted cell detection method, annotation method, electronic device, and readable storage medium provided by the present invention have the following beneficial effects:
[0045] The pathological image targeted cell detection method provided by this invention first acquires multiple training samples, each of which includes a sample pathological image and a corresponding pre-label. The pre-label is obtained by pre-annotating the sample pathological image with targeted cells, and at least some of the pre-labels in the training samples have missing labels and / or mislabeled labels. Then, the pre-built target detection model is trained through multiple rounds of cross-validation using the dataset until a first preset training termination condition is met. At the end of each round of cross-validation training, the predicted targeted cell annotation results corresponding to all sample pathological images in the dataset obtained in the current training round are corrected according to a preset noise label correction rule. For each sample pathological image, the corrected predicted targeted cell annotation result of the sample pathological image in the current training round is used as the label of the sample pathological image in the next training round. Finally, the trained target detection model is used to detect the acquired pathological images to be detected to obtain the corresponding targeted cell detection results. Therefore, the pathological image targeted cell detection method provided by this invention can automatically count targeted cells in pathological images using a computer. Doctors only need to confirm the target cell count results returned by the computer, thus enabling computer-assisted completion of the daily, tedious, and cursory task of statistically analyzing the number of targeted cells. Furthermore, the pathological image targeted cell detection method provided by this invention designs a deep learning algorithm framework for automatic correction and detection of targeted cells in pathological images with noise labels. This allows the network to self-learn and correct noise labels, helping the deep learning algorithm achieve high accuracy in targeted cell detection even when the target cells are labeled with noise. Additionally, addressing the phenomenon that the high accuracy of deep learning algorithms relies on high-quality gold standards (i.e., high-quality labels) for the target task, the pathological image targeted cell detection method provided by this invention designs rules for automatic noise label correction during the training process of the target detection model. Labels corrected by the preset noise label correction rules are then used in the next round of training, ultimately achieving the goal of training the deep learning algorithm to withstand noise labels.
[0046] The pathological image targeted cell annotation method provided by this invention designs a deep learning algorithm framework for automatic correction and detection of targeted cells in pathological images under noise labels. This enables the network to have self-learning and correction capabilities for noise labels, allowing annotators (e.g., doctors) to perform secondary confirmation and modification based solely on pre-annotation and the self-correction detection results obtained at the end of target detection model training. This minimizes the time and effort required by annotators (e.g., doctors), thereby improving the overall annotation quality of the dataset and ultimately enhancing the accuracy and stability of subsequent deep learning network training for targeted cell detection tasks.
[0047] Since the electronic device and readable storage medium provided by this invention belong to the same inventive concept as the pathological image targeted cell detection method or the pathological image targeted cell annotation method provided by this invention, the electronic device and readable storage medium provided by this invention at least have the beneficial effects of the pathological image targeted cell detection method or the pathological image targeted cell annotation method provided by this invention. For details, please refer to the relevant descriptions above regarding the beneficial effects of the pathological image targeted cell detection method or the pathological image targeted cell annotation method provided by this invention, which will not be repeated here. Attached Figure Description
[0048] Figure 1 A flowchart of a pathological image targeted cell detection method provided in one embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of a single-round k-fold cross-validation training provided in one embodiment of the present invention;
[0050] Figure 3 A flowchart of preset noise label correction rules provided in one embodiment of the present invention;
[0051] Figure 4 A flowchart of a method for targeted cell annotation in pathological images provided by an embodiment of the present invention.
[0052] Figure 5 This is a block diagram of an electronic device provided according to an embodiment of the present invention. Detailed Implementation
[0053] The following detailed description, in conjunction with the accompanying drawings and specific embodiments, further illustrates the pathological image targeted cell detection method, annotation method, electronic device, and readable storage medium proposed in this invention. The advantages and features of this invention will become clearer from the following description. It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions, used only to facilitate and clarify the purpose provided by this invention. Please refer to the accompanying drawings to make the objectives, features, and advantages of this invention more apparent and understandable. It should be understood that the structures, proportions, sizes, etc., depicted in the accompanying drawings are only for illustrative purposes and to enable those skilled in the art to understand and read them, and are not intended to limit the implementation conditions of this invention. Any modifications to the structure, changes in proportions, or adjustments to the size, provided that the effects and objectives achieved by this invention are the same or similar, should still fall within the scope of the technical content disclosed in this invention.
[0054] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0055] Furthermore, in the description of this specification, the reference to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., means that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0056] The core idea of this invention is to address the phenomenon of noisy labels (missed and mislabeled) caused by the huge amount of targeted cell annotations and the diversity of targeted cell morphology in pathological images. It also addresses the current challenges of using supervised methods such as transfer learning from large datasets and reinforcement learning with high-quality annotations in deep learning algorithms to ensure high accuracy for target tasks. However, medical image data often involves a massive amount of annotations, and most medical tasks require specialized medical knowledge, making high-quality annotation extremely costly. This invention provides a method for detecting and annotating targeted cells in pathological images, an electronic device, and a readable storage medium. By designing a deep learning algorithm framework for automatically correcting and detecting targeted cells in pathological images with noisy labels, this invention helps deep learning algorithms achieve high accuracy in targeted cell detection even when targeted cell annotations are noisy.
[0057] It should be noted that, as those skilled in the art will understand, the pathological image targeted cell detection method, annotation method, and readable storage medium provided by this invention can be applied to the electronic devices provided by this invention. These electronic devices can be personal computers, mobile terminals, etc., and the mobile terminal can be a mobile phone, tablet computer, or other hardware device with various operating systems. Furthermore, it should be noted that, as those skilled in the art will understand, this invention does not limit the specific type of targeted cells. The term "noise tag" in this invention refers to a tag containing unlabeled and / or mislabeled targeted cells.
[0058] To achieve the above-mentioned goals, this invention provides a method for targeted cell detection in pathological images. Please refer to [the relevant documentation]. Figure 1 This is a flowchart of a pathological image targeted cell detection method provided by an embodiment of the present invention. Figure 1 As shown, the pathological image targeted cell detection method provided by the present invention includes the following steps:
[0059] Step S110: Obtain a dataset including multiple training samples, wherein each training sample includes a sample pathological image and a corresponding pre-label. The pre-label is obtained by pre-annotating the sample pathological image with target cells, and at least some of the pre-labels in the training samples have missing labels and / or mislabeled labels.
[0060] Step S120: Use the dataset to perform multiple rounds of cross-validation training on the pre-built target detection model until the first preset training termination condition is met. When each round of cross-validation training is completed, correct the target cell prediction annotation results corresponding to all sample pathological images in the dataset obtained in the current training round according to the preset noise label correction rule. For each sample pathological image, use the corrected target cell prediction annotation result of the sample pathological image in the current training round as the label of the sample pathological image in the next training round.
[0061] Step S130: Use the trained target detection model to detect the acquired pathological image to obtain the corresponding target cell detection results.
[0062] Therefore, the pathological image targeted cell detection method provided by this invention can automatically count targeted cells in pathological images using a computer. Doctors only need to confirm the target cell count results returned by the computer, thus enabling computer-assisted completion of the daily, tedious, and cursory task of statistically analyzing the number of targeted cells. Furthermore, the pathological image targeted cell detection method provided by this invention designs a deep learning algorithm framework for automatic correction and detection of targeted cells in pathological images with noise labels. This allows the network to self-learn and correct noise labels, helping the deep learning algorithm achieve high accuracy in targeted cell detection even when the target cells are labeled with noise. Additionally, addressing the phenomenon that the high accuracy of deep learning algorithms relies on high-quality gold standards (i.e., high-quality labels) for the target task, the pathological image targeted cell detection method provided by this invention designs rules for automatic noise label correction during the training process of the target detection model. Labels corrected by the preset noise label correction rules are then used in the next round of training, ultimately achieving the goal of training the deep learning algorithm to withstand noise labels.
[0063] It should be noted that, as those skilled in the art will understand, in the first round of cross-validation training, the label corresponding to each sample pathological image is its corresponding pre-label (i.e., the label obtained by the annotator through pre-annotation of target cells on the sample pathological image). It should also be noted that, as those skilled in the art will understand, in each round of cross-validation training, the dataset needs to be sequentially divided into disjoint training and test sets (i.e., multiple sample pathological images from the same patient exist only in the training or test set, not simultaneously in both). The target detection model is first trained using the training set, and then tested using the test set to obtain the target cell prediction annotation results corresponding to each sample pathological image in the test set. It should also be noted that, as those skilled in the art will understand, in each round of cross-validation training, each training sample is included in the test set once, thus, upon completion of each round of cross-validation training, the target cell prediction annotation results corresponding to each sample pathological image in the dataset can be obtained.
[0064] Specifically, pathological images are large in size, usually with tens of thousands of pixels. Pathologists first observe the pathological slides under an electron microscope, collect the fields of view containing a large number / a moderate number / a small number of target cells, take electron photographs, and save them as pathological images, thus completing the acquisition. Then, the pathologist annotates each target cell in each acquired pathological image (i.e., sample pathological image) with bounding box = [x, y, w, h, confidence, category, type]. The bounding box is a required input for the deep learning object detection type network (i.e., object detection model). Here, x represents the x-coordinate of the top left corner of the target cell's bounding box, y represents the y-coordinate of the top left corner of the target cell's bounding box, w represents the width of the target cell's bounding box in the x-axis direction, h represents the height of the target cell's bounding box in the y-axis direction, confidence represents the confidence of the bounding box, and a higher confidence means a higher confidence in the detection of the bounding box. Category represents the detection category of the bounding box (i.e., the category of the target cell), and type represents the type of the bounding box. There are three types of type: TP (True Positive), FP (False Positive), and FN (False Negative). TP represents the bounding box detected by the object detection model that corresponds to the label (i.e., the bounding box that is marked in both the target cell prediction annotation and the label). FP represents the bounding box detected by the object detection model that is not marked in the label (i.e., the bounding box that is marked only in the target cell prediction annotation and not in the label). FN represents the bounding box not detected by the object detection model that is marked in the label (i.e., the bounding box that is marked only in the label and not in the target cell prediction annotation). It is important to note that when doctors annotate target cells, they do not record confidence, category, and type. The purpose of designing the three labels confidence, category, and type is to confirm the confidence, detection category, and type of each predicted bounding box during the training of the deep learning object detection type network (i.e., the object detection model).
[0065] Furthermore, the network structure of the object detection model in this invention includes, but is not limited to, common one-stage object detection networks and two-stage object detection networks. The one-stage object detection networks include, but are not limited to, YOLOv4, YOLOv5, YOLOv6, YOLOv7, YOLOv8, YOLOX, YOLOP, etc. Specific network structures can be found in related technologies known to those skilled in the art, and will not be elaborated upon here. The two-stage object detection networks include, but are not limited to, fastR-CNN, faster R-CNN, mask R-CNN, mask scoring R-CNN, etc. Specific network structures can be found in related technologies known to those skilled in the art, and will not be elaborated upon here.
[0066] Furthermore, since the input requirements of different deep learning object detection networks are currently mainly of two types: (x,y,w,h) and (X,Y,W,H), the position information of the bounding boxes needs to be inversely transformed to meet the input requirements of deep learning object detection networks. Therefore, there is an inverse transformation formula for the bounding boxes, as shown below:
[0067]
[0068] Here, ImageWidth represents the width of the input image, and ImageHeight represents the height of the input image. The Round function represents rounding a floating-point number to the nearest integer, using the rounding method of rounding to the nearest even number.
[0069] It should be noted that, as those skilled in the art will understand, when the input requirement of the network structure of the target detection model in this invention is (x,y,w,h), it is not necessary to perform an inverse transformation on the position information of the bounding box; when the input requirement of the network structure of the target detection model in this invention is (X,Y,W,H), it is necessary to convert the position information of the bounding box from (x,y,w,h) to (X,Y,W,H) according to the above formula during input, and convert the output result of the target detection model from (X,Y,W,H) to (x,y,w,h) during output.
[0070] In the training process of the first-stage object detection network, the method for predicting the bounding boxes of target cells is to divide the entire image into A*A equal-sized grids, with each grid containing B bounding boxes of different scales. The detection category of each bounding box is implemented using one-hot encoding (one-hot encoding, one-bit effective encoding), which is commonly used in deep learning. The confidence is achieved by the probability value of detecting the target (target cell) and the IoU (Intersection over Union). The formula for calculating the confidence is as follows:
[0071] confidence=Prob(Obj)*IoU(Pred,GT)
[0072] Where Prob(Obj) represents the probability value of detecting the target (target cell), ranging from [0,1]. IoU (Intersection over Union) represents the intersection-over-union ratio, Pred represents the position of the bounding box predicted by the one-stage target detection network, and GT represents the position of the bounding box in the label.
[0073] In the training process of the two-stage object detection network, the method for predicting the bounding boxes of target cells (target cells) involves sliding windows of different sizes across the image to identify each object individually. By designing windows of different sizes and sliding them with a minimum step size, all images within each window are fed into the classifier for identification. Note that in the two-stage object detection network, the detected category is the classifier's classification category, and the confidence score is the probability value of the classifier's classification category.
[0074] Furthermore, since the object detection network generates many highly similar predicted bounding boxes, a non-maximum suppression algorithm is employed to reduce redundancy in detecting highly similar predicted bounding boxes. First, the bounding boxes are sorted by confidence, and the bounding box with the highest confidence is selected. Then, the Intersection over Union (IoU) is calculated between the remaining bounding boxes and the selected bounding boxes, and bounding boxes with an IoU greater than a preset threshold are eliminated. Next, the above two processes are repeated for the remaining bounding boxes until all bounding boxes have been processed. At this point, the bounding box with the highest confidence selected in each round is the suppressed predicted bounding box result (i.e., the target cell prediction annotation result).
[0075] Furthermore, the category determination of TP (boundaries marked in both the target cell prediction annotation results and the labels), FP (boundaries marked only in the target cell prediction annotation results but not in the labels), and FN (boundaries marked only in the labels but not in the target cell prediction annotation results) is obtained by comparing the bounding boxes marked in the target cell prediction annotation results output by the target detection model with the corresponding bounding boxes in the labels. For ease of distinction, the bounding boxes marked in the target cell prediction annotation results are represented by predicted bounding boxes, and the bounding boxes marked in the labels are represented by label bounding boxes. Specifically, the set of predicted bounding boxes obtained by the non-maximum suppression algorithm (i.e., the set composed of each bounding box in the target cell prediction annotation results) is traversed. For each predicted bounding box (i.e., each bounding box in the target cell prediction annotation results), the labels are searched for that belong to the same category and are above a preset IoU threshold (preset IoU threshold) in the labels. The predicted bounding box with the highest confidence is then selected as the pair. Successfully matched predicted bounding boxes are of type TP, and their matched label bounding boxes are excluded from the next set of unmatched label bounding boxes. If no match is found, meaning no label bounding box has a match higher than the preset IoU threshold (preset IoU threshold), then the type of the predicted bounding box is FP. After iterating through every predicted bounding box, the remaining unmatched label bounding boxes are of type FN.
[0076] In some exemplary implementations, the method further includes, prior to performing multiple rounds of cross-validation training on the pre-built object detection model using the dataset:
[0077] All sample pathological images in the dataset are preprocessed to normalize the brightness quality of all sample pathological images.
[0078] Therefore, by preprocessing all the sample pathological images in the dataset before training the pre-built target detection model with multiple rounds of cross-validation using the dataset, the brightness quality of all sample pathological images can be normalized. This can adjust the brightness quality of all sample pathological images to be consistent, thereby improving the accuracy of deep learning algorithms in identifying, segmenting and locating target cells, and reducing the model instability caused by image differences.
[0079] In some exemplary embodiments, the preprocessing of all sample pathological images in the dataset includes:
[0080] A pre-trained pathological image quality classification model is used to classify the brightness quality of all sample pathological images in the dataset to determine the sample pathological images with acceptable brightness quality and those with unacceptable brightness quality.
[0081] For each pathological image with substandard brightness quality, the brightness characteristic value of the substandard pathological image is adaptively adjusted based on the brightness characteristic values of all pathological images with acceptable brightness quality.
[0082] Therefore, by first identifying pathological images with acceptable brightness quality and those with unacceptable brightness quality, and then adjusting the brightness characteristic values of pathological images with unacceptable brightness quality based on the brightness characteristic values of the pathological images with acceptable brightness quality, lightweight and rapid pathological image normalization can be achieved.
[0083] Specifically, the details on how to obtain a well-trained pathological image quality classification model can be found in existing technologies and will not be elaborated upon here. Furthermore, the details on how to adaptively adjust the brightness feature values of pathological images with unacceptable brightness quality based on the brightness feature values of all pathological images with acceptable brightness quality can also be found in existing technologies and will not be elaborated upon here.
[0084] In some exemplary implementations, the step of using the dataset to perform multiple rounds of cross-validation training on the pre-built object detection model includes:
[0085] The dataset was used to train the pre-built target detection model using multiple rounds of k-fold cross-validation.
[0086] Because medical images constitute a niche dataset among naturally generated digital images, and the number of patients testing positive for medical diseases represents an even smaller proportion of medical image datasets, the acquisition cost of pathological images is high. Furthermore, pathological images contain a massive number of cells; when annotating a single pathological slide at the cell level, the number of target cells can reach tens of thousands, and the morphology of these target cells varies greatly, resulting in extremely high annotation costs in medical images. Based on these two points of consensus, to avoid wasting valuable data and to utilize as much data as possible to train the deep learning network, this invention aims to fully utilize all target cell annotations and enhance model training, enabling the trained deep learning network to achieve optimal target cell detection levels. This is achieved by adopting a single-round training mode based on k-fold cross-validation, iteratively training the entire pathological image dataset. In addition, by using the aforementioned dataset to perform multiple rounds of k-fold cross-validation training on the pre-built target detection model, overfitting and underfitting can be effectively avoided, contributing to improved model stability.
[0087] It should be noted that, as those skilled in the art will understand, the value of k in each round of k-fold cross-validation training can be the same or different. Preferably, the value of k in each round of k-fold cross-validation training remains consistent to simplify the training process. It should also be noted that, as those skilled in the art will understand, this invention does not limit the specific value of k in each round of k-fold cross-validation training; it can be set according to actual circumstances, for example, the value of k can be 5.
[0088] In some exemplary implementations, the step of using the dataset to train a pre-built object detection model through multiple rounds of k-fold cross-validation includes:
[0089] In each round of k-fold cross-validation training, the dataset is divided into k disjoint sample subsets based on patients. One of these subsets is used as the test set, and the remaining (k-1) subsets are used as the training set. The pre-built target detection model is then trained using k-fold cross-validation. In each fold cross-validation process, the target detection model is first trained using the training set, and then tested using the selected test set to obtain the target cell prediction annotation results corresponding to each pathological image in the test set.
[0090] For details, please refer to Figure 2 This is a schematic diagram of a single-round k-fold cross-validation training provided by an embodiment of the present invention. Figure 2As shown, in the single-round k-fold cross-validation training process, all sample pathological images and their corresponding labels are first statistically analyzed by patient. Then, the statistically analyzed sample pathological images and their corresponding labels are divided into k sample subsets by patient to form the training set and the test set. The ratio of the sample subsets in the i-th fold training set i to the test set i is k-1:1, where i = 1, 2, ..., k. When the i-th sample subset is selected as the test set i, the remaining k-1 sample subsets are used as the training set i. The target detection model is first trained using the training set i, and then tested on the test set i. The prediction labeling structure of the entire dataset is composed of the target cell prediction labeling results obtained by the target detection models trained on the corresponding training sets i in the k test sets i, where i = 1, 2, ..., k.
[0091] In some exemplary embodiments, the step of correcting the target cell prediction annotation results corresponding to each sample pathological image in the dataset obtained in the current training round according to a preset noise label correction rule includes:
[0092] For each sample pathological image:
[0093] The confidence scores of all the bounding boxes in the target cell prediction annotation results of the pathological image of the sample in the current training round are sorted in descending order, and the bounding boxes with the highest confidence scores in the first preset percentage are taken as the first corrected bounding boxes.
[0094] The confidence scores of all the bounding boxes in the labels of the pathological image of the sample in the current training round are sorted in descending order, and the bounding boxes with the highest confidence scores in the second preset percentage are used as the second correction bounding boxes.
[0095] Based on the target cell prediction annotation results of the pathological image in the current training round and the annotation boxes, the first corrected annotation box, and the second corrected annotation box in the current training round, the corrected target cell prediction annotation results of the pathological image in the current training round are obtained.
[0096] For details, please refer to Figure 3 This is a flowchart of a preset noise label correction rule provided in one embodiment of the present invention. Figure 3As shown, the overall prediction annotation results of the previous round of cross-validation training (i.e., the corrected target cell prediction annotation results of the entire dataset) are used as the gold standard (i.e., labels) to determine the type of each bounding box in the prediction annotation results of the entire dataset in the current training round (i.e., the target cell prediction annotation results of the entire dataset output by the target detection model in the current training round). These can be categorized into: TP (labeled boxes that were detected in both the current and previous training rounds), FP (labeled boxes that were detected in the current training round but not in the previous training round), and FN (labeled boxes that were not detected in the current training round but were detected in the previous training round). The overall prediction annotation results of the previous round of training are the target cell annotation results annotated (pre-annotated) by the doctor in the first round (i.e., the labels in the first round of training are pre-labels).
[0097] Furthermore, such as Figure 3 As shown, the specific method is as follows: Calculate the confidence scores for all FP type bounding boxes and arrange them in descending order of confidence. Use a first preset percentage P1 as a boundary, and select the FP type bounding boxes with the highest confidence scores (ranked first preset percentage) as the first corrected bounding boxes. It should be noted that, as those skilled in the art will understand, the present invention does not limit the specific value of the first preset percentage P1; it can be set according to actual needs. For example, the first preset percentage P1 can be set to 0.05 (i.e., 5%).
[0098] Similarly, the confidence scores of all FN type bounding boxes are calculated and arranged in descending order of confidence. Using the second preset percentage P2 as a boundary, the FN type bounding boxes with the highest confidence scores (ranked at the second preset percentage) are designated as the second correction bounding boxes. It should be noted that, as those skilled in the art will understand, the specific value of the second preset percentage P2 is not limited in this invention; it can be set according to actual needs. For example, the second preset percentage P2 can be set to 0.05 (i.e., 5%).
[0099] Finally, the FP type bounding boxes (i.e., the first corrected bounding boxes) with higher confidence based on the first preset percentage P1, the FN type bounding boxes (i.e., the second corrected bounding boxes) with higher confidence based on the second preset percentage P2, and the TP type bounding boxes from the target cell prediction annotation results of the current training round are collectively used as the AI-adjusted "gold standard" predicted cell annotation results of the current training round (i.e., the corrected target cell prediction annotation results).
[0100] In some exemplary embodiments, the first preset training termination condition is that the precision of the current training round is greater than or equal to a first precision threshold and the recall of the current training round is greater than or equal to a first recall threshold. Therefore, by determining when to stop training the target detection model based on whether the precision and recall of the current training round are greater than or equal to the first precision threshold and the first recall threshold, the detection accuracy and precision of the trained target detection model can be guaranteed, effectively preventing false detections and false negatives of target cells. It should be noted that, as those skilled in the art will understand, the specific values of the first precision threshold and the first recall threshold can be set according to actual conditions, and this invention does not limit them. For example, the first precision threshold can be set to 0.95, and the first recall threshold can also be set to 0.95.
[0101] In some exemplary implementations, the precision of the current training round is calculated using the following formula:
[0102]
[0103] The recall rate for the current training round is calculated using the following formula:
[0104]
[0105] Where, N TP N represents the number of bounding boxes that appear in both the target cell prediction annotation results and the labels in the current training round. FP N represents the number of bounding boxes in the target cell prediction annotation results during the current training epoch. FN This indicates the number of bounding boxes that are marked in the labels in the current training round.
[0106] Specifically, in each round of k-fold cross-validation training, the target cell prediction annotations of the entire dataset are compared with the corrected target cell prediction annotations of the entire dataset from the previous round of training to calculate the precision and recall values for the current training round compared to the previous training round. During the first round of training, the target cell prediction annotations of the entire dataset are compared with the annotations in the pre-labeled data provided by the doctor, which may contain noisy labels, to calculate the precision and recall values. When the precision and recall values of the k-fold cross-validation training in this round reach the first precision threshold and the first recall threshold, the object detection model stops k-fold cross-validation training.
[0107] In some exemplary embodiments, after a first preset termination condition is met, the detection method further includes:
[0108] The system obtains the target cell prediction annotation results corresponding to each of the pathological images of the samples in the dataset obtained in the training round when the first preset training end condition is met, and receives the physician's confirmation or correction operation on the target cell prediction annotation results corresponding to each pathological image of the samples, so as to obtain the corrected dataset.
[0109] The target detection model continues to be trained based on the corrected dataset until the second preset training termination condition is met.
[0110] Therefore, by receiving confirmation or correction from physicians regarding the target cell prediction annotation results for each pathological image sample in the dataset obtained at the training round that meets the first preset training termination condition, a more accurate corrected dataset can be obtained (i.e., the label corresponding to each pathological image sample in the corrected dataset is the final annotation result obtained after physicians confirm or correct the target cell prediction annotation results for the corresponding training round that meets the first preset training termination condition). Using this corrected dataset to continue training the target detection model ensures that the final trained model has higher detection accuracy and precision. It should be noted that, as those skilled in the art will understand, the target detection model can be further trained using traditional training methods based on the corrected dataset. Specific training processes can be referenced from relevant techniques known to those skilled in the art, and will not be elaborated upon here.
[0111] Furthermore, the second preset training termination condition is that the precision of the target detection model is greater than or equal to the second precision threshold and the recall of the target detection model is greater than or equal to the second recall threshold.
[0112] It should be noted that, as those skilled in the art will understand, the specific values of the second precision threshold and the second recall threshold can be set according to actual needs, and the present invention does not limit them. Furthermore, as those skilled in the art will understand, the second precision threshold and the first precision threshold can be the same value or different values, and the second recall threshold and the first recall threshold can be the same value or different values.
[0113] Based on the same inventive concept, this invention also provides a method for targeted cell annotation in pathological images. Please refer to [link / reference needed]. Figure 4 This is a flowchart of a pathological image targeted cell annotation method provided by an embodiment of the present invention. For example... Figure 4 As shown, the pathological image targeted cell annotation method provided by the present invention includes the following steps:
[0114] Step S210: Obtain a dataset including multiple training samples, wherein each training sample includes a sample pathological image and a corresponding pre-label. The pre-label is obtained by pre-annotating the sample pathological image with target cells, and at least some of the pre-labels in the training samples have missing labels and / or mislabeled labels.
[0115] Step S220: Use the dataset to perform multiple rounds of cross-validation training on the pre-built target detection model until the first preset training termination condition is met. When each round of cross-validation training is completed, the target cell prediction annotation results corresponding to all sample pathological images in the dataset obtained in the current training round are corrected according to the preset noise label correction rules. For each sample pathological image, the corrected target cell prediction annotation result of the sample pathological image in the current training round is used as the label of the sample pathological image in the next training round.
[0116] Step S230: Obtain the target cell prediction annotation results corresponding to each of the pathological images of the samples in the dataset obtained in the training round when the first preset training end condition is met, and receive the physician's confirmation or correction operation on the target cell prediction annotation results corresponding to each pathological image of the samples, so as to obtain the final annotation results of each pathological image of the samples.
[0117] Because the pathological image targeted cell annotation method provided by this invention designs a deep learning algorithm framework for automatic correction and detection of targeted cells in pathological images under noise labels, the network has the ability to learn and correct noise labels. This allows annotators (e.g., doctors) to perform secondary confirmation and modification only through pre-annotation and based on the self-correction detection results obtained at the end of the target detection model training. This minimizes the time and effort required by annotators (e.g., doctors), thereby improving the overall annotation quality of the dataset and ultimately enhancing the accuracy and stability of subsequent deep learning network training for targeted cell detection tasks.
[0118] Specifically, doctors compare the initial target cell annotation results (i.e., pre-labels) with the target cell prediction annotation results obtained after multiple rounds of cross-validation training of the target detection model. They then remove the annotation boxes that the target detection model believes to be mislabeled or add the annotation boxes that the target detection model has missed labeling, thus completing the target cell annotation cleaning work to obtain the final annotation results.
[0119] It should be noted that, as those skilled in the art will understand, the specific details regarding how to use the aforementioned dataset to perform multiple rounds of cross-validation training on the pre-built target detection model until the first preset training termination condition is met can be found in the relevant description above, and will not be repeated here. Furthermore, the specific details regarding how to correct the target cell prediction annotation results corresponding to each sample pathological image in the dataset obtained in the current training round according to preset noise label correction rules can also be found in the relevant description above, and will not be repeated here. It should also be noted that, as those skilled in the art will understand, the target detection model after multiple rounds of cross-validation training can be further trained based on the final annotation results of the entire dataset after physician confirmation or modification, to further improve the recall and precision of the target detection model. Alternatively, the performance of the target detection model after multiple rounds of cross-validation training can be evaluated based on the final annotation results of the entire dataset after physician confirmation or modification.
[0120] Specifically, a single k-fold cross-validation can be performed to obtain the precision and recall values of the predicted targeted cell annotations for each fold of the test set's pathological images, compared to the cleaned, noise-reduced gold standard targeted cell annotations (i.e., the final annotation results after physician confirmation or correction). The control group uses the annotation results from physician-pre-annotated, noisy gold standard cell annotations (i.e., pre-labels) to perform k-fold cross-validation, obtaining the same precision and recall values for each fold of the test set's pathological images. By comparing the mean and variance of the k-fold precision and recall values between the two groups, the stability contribution of deep learning's autonomous correction of targeted cell annotations can be observed. As shown in Table 1, before and after deep learning-based self-correction of target cell annotation, the mean precision of k-fold cross-validation increased by 3.3%, and the standard deviation decreased from 0.06 to 0.029. The mean recall of k-fold cross-validation increased by 4.7%, and the standard deviation decreased from 0.043 to 0.026. Since a smaller standard deviation indicates stronger data convergence, the stability of k-fold cross-validation is higher. Therefore, the deep learning-based self-correction strategy for target cell detection adopted in this invention can reduce the instability in the training model of deep learning target detection networks caused by the subjective annotation judgment of annotators due to external uncertainties such as differences between images and visual fatigue during annotation of large amounts of target cells.
[0121] Table 1. Experimental contribution of deep learning to autonomously correct the stability of targeted cell annotations.
[0122]
[0123]
[0124] Based on the same inventive concept, the present invention also provides an electronic device, please refer to [reference needed]. Figure 5 This is a block diagram of an electronic device provided in one embodiment of the present invention. Figure 5 As shown, the electronic device provided by this invention includes a processor 101 and a memory 103. The memory 103 stores a computer program. When the computer program is executed by the processor 101, it implements the pathological image targeted cell detection method or the pathological image targeted cell annotation method described above. Since the electronic device provided by this invention and the pathological image targeted cell detection method provided by this invention belong to the same inventive concept, the electronic device provided by this invention possesses at least all the beneficial effects of the pathological image targeted cell detection method provided by this invention. For details, please refer to the relevant descriptions of the beneficial effects of the pathological image targeted cell detection method provided by this invention above, which will not be repeated here. Furthermore, since the electronic device provided by this invention also belongs to the same inventive concept as the pathological image targeted cell annotation method provided by this invention, the electronic device provided by this invention also possesses all the beneficial effects of the pathological image targeted cell annotation method provided by this invention. For details, please refer to the relevant descriptions of the beneficial effects of the pathological image targeted cell annotation method provided by this invention above, which will not be repeated here.
[0125] like Figure 5 As shown, the electronic device also includes a communication interface 102 and a communication bus 104, wherein the processor 101, the communication interface 102, and the memory 103 communicate with each other via the communication bus 104. The communication bus 104 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 104 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface 102 is used for communication between the aforementioned electronic device and other devices.
[0126] The processor 101 referred to in this invention can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 101 is the control center of the electronic device, connecting various parts of the electronic device through various interfaces and lines.
[0127] The memory 103 can be used to store the computer program. The processor 101 implements various functions of the electronic device by running or executing the computer program stored in the memory 103 and calling the data stored in the memory 103.
[0128] The memory 103 may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0129] This invention also provides a readable storage medium storing a computer program. When executed by a processor, the computer program can implement the pathological image targeted cell detection method or the pathological image targeted cell annotation method described above. Since the readable storage medium provided by this invention and the pathological image targeted cell detection method provided by this invention belong to the same inventive concept, the readable storage medium provided by this invention possesses at least all the beneficial effects of the pathological image targeted cell detection method provided by this invention. For details, please refer to the relevant descriptions of the beneficial effects of the pathological image targeted cell detection method provided by this invention above, which will not be repeated here. Furthermore, since the readable storage medium provided by this invention also belongs to the same inventive concept as the pathological image targeted cell annotation method provided by this invention, the readable storage medium provided by this invention also possesses all the beneficial effects of the pathological image targeted cell annotation method provided by this invention. For details, please refer to the relevant descriptions of the beneficial effects of the pathological image targeted cell annotation method provided by this invention above, which will not be repeated here.
[0130] The readable storage medium provided by this invention can take the form of any combination of one or more computer-readable media. The readable medium can be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires, portable computer hard disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device.
[0131] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.
[0132] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0133] In summary, compared with the prior art, the pathological image targeted cell detection method, annotation method, electronic device, and readable storage medium provided by the present invention have the following beneficial effects:
[0134] The pathological image targeted cell detection method provided by this invention can automatically count targeted cells in pathological images using a computer. Doctors only need to confirm the target cell count results returned by the computer, thus enabling computer-assisted completion of the arduous and cursory task of statistically analyzing the number of targeted cells. Furthermore, this method employs a deep learning algorithm framework for automatically correcting and detecting targeted cells in pathological images with noise labels. This allows the network to learn and correct noise labels, helping the deep learning algorithm achieve high accuracy in targeted cell detection even when the target cells are labeled with noise. Additionally, addressing the issue that high accuracy in deep learning algorithms relies on high-quality gold standards (i.e., high-quality labels) for the target task, this method incorporates rules for automatic noise label correction during the training process of the target detection model. Labels corrected by these rules are then used in the next round of training, ultimately achieving the goal of training the deep learning algorithm to withstand noise labels.
[0135] The pathological image targeted cell annotation method provided by this invention designs a deep learning algorithm framework for automatic correction and detection of targeted cells in pathological images under noise labels. This enables the network to have self-learning and correction capabilities for noise labels, allowing annotators (e.g., doctors) to perform secondary confirmation and modification based solely on pre-annotation and the self-correction detection results obtained at the end of target detection model training. This minimizes the time and effort required by annotators (e.g., doctors), thereby improving the overall annotation quality of the dataset and ultimately enhancing the accuracy and stability of subsequent deep learning network training for targeted cell detection tasks.
[0136] Since the electronic device and readable storage medium provided by this invention belong to the same inventive concept as the pathological image targeted cell detection method or the pathological image targeted cell annotation method provided by this invention, the electronic device and readable storage medium provided by this invention at least have the beneficial effects of the pathological image targeted cell detection method or the pathological image targeted cell annotation method provided by this invention. For details, please refer to the relevant descriptions above regarding the beneficial effects of the pathological image targeted cell detection method or the pathological image targeted cell annotation method provided by this invention, which will not be repeated here.
[0137] It should be noted that the apparatus and methods disclosed in the embodiments herein can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments herein. In this regard, each block in a flowchart or block diagram may represent a module, program, or part of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system to perform the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions. In addition, the functional modules in the various embodiments of this article can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0138] It should also be noted that the above description is merely a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure are within the protection scope of the present invention. Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the present invention and its equivalents, the present invention also intends to include these modifications and variations.
Claims
1. A method for detecting targeted cells in pathological images, characterized in that, include: A dataset comprising multiple training samples is obtained, wherein each training sample includes a sample pathological image and a corresponding pre-label, the pre-label being obtained by pre-annotating the sample pathological image with target cells, and at least some of the pre-labels in the training samples have missing labels and / or mislabeled labels; The dataset is used to train the pre-built target detection model through multiple rounds of cross-validation until the first preset training termination condition is met. When each round of cross-validation training is completed, the target cell prediction annotation results corresponding to all sample pathological images in the dataset obtained in the current training round are corrected according to the preset noise label correction rule. For each sample pathological image, the corrected target cell prediction annotation result of the sample pathological image in the current training round is used as the label of the sample pathological image in the next training round. The trained target detection model is used to detect the acquired pathological images to obtain the corresponding target cell detection results. The step of correcting the target cell prediction annotation results corresponding to each sample pathological image in the dataset obtained in the current training round according to the preset noise label correction rule includes: For each sample pathological image: The confidence scores of all the bounding boxes in the target cell prediction annotation results of the pathological image of the sample in the current training round are sorted in descending order, and the bounding boxes with the highest confidence scores in the first preset percentage are taken as the first corrected bounding boxes. The confidence scores of all the bounding boxes in the labels of the pathological image of the sample in the current training round are sorted in descending order, and the bounding boxes with the highest confidence scores in the second preset percentage are used as the second correction bounding boxes. Based on the target cell prediction annotation results of the pathological image in the current training round and the annotation boxes, the first corrected annotation box, and the second corrected annotation box in the current training round, the corrected target cell prediction annotation results of the pathological image in the current training round are obtained.
2. The method for targeted cell detection in pathological images according to claim 1, characterized in that, The first preset training termination condition is that the precision of the current training round is greater than or equal to the first precision threshold and the recall of the current training round is greater than or equal to the first recall threshold.
3. The method for targeted cell detection in pathological images according to claim 2, characterized in that, The precision of the current training round is calculated using the following formula: ; The recall rate for the current training round is calculated using the following formula: ; Where, N TP N represents the number of bounding boxes that appear in both the target cell prediction annotation results and the labels in the current training round. FP N represents the number of bounding boxes in the target cell prediction annotation results during the current training epoch. FN This indicates the number of bounding boxes that are marked only in the labels in the current training round.
4. The method for targeted cell detection in pathological images according to claim 1, characterized in that, After the first preset termination condition is met, the detection method further includes: The system obtains the target cell prediction annotation results corresponding to each of the pathological images of the samples in the dataset obtained in the training round when the first preset training end condition is met, and receives the physician's confirmation or correction operation on the target cell prediction annotation results corresponding to each pathological image of the samples, so as to obtain the corrected dataset. The target detection model continues to be trained based on the corrected dataset until the second preset training termination condition is met.
5. The method for targeted cell detection in pathological images according to claim 4, characterized in that, The second preset training termination condition is that the precision of the target detection model is greater than or equal to the second precision threshold and the recall of the target detection model is greater than or equal to the second recall threshold.
6. The method for targeted cell detection in pathological images according to claim 1, characterized in that, The step of using the dataset to perform multi-round cross-validation training on the pre-built object detection model includes: The dataset was used to train the pre-built target detection model using multiple rounds of k-fold cross-validation.
7. The method for targeted cell detection in pathological images according to claim 6, characterized in that, The step of using the dataset to train the pre-built object detection model through multiple rounds of k-fold cross-validation includes: In each round of k-fold cross-validation training, the dataset is divided into k disjoint sample subsets based on patients. One of these subsets is used as the test set, and the remaining (k-1) subsets are used as the training set. The pre-built target detection model is then trained using k-fold cross-validation. In each fold cross-validation process, the target detection model is first trained using the training set, and then tested using the selected test set to obtain the target cell prediction annotation results corresponding to each pathological image in the test set.
8. The method for targeted cell detection in pathological images according to claim 1, characterized in that, Before using the dataset to perform multiple rounds of cross-validation training on the pre-built object detection model, the method further includes: All sample pathological images in the dataset are preprocessed to normalize the brightness quality of all sample pathological images.
9. The method for targeted cell detection in pathological images according to claim 8, characterized in that, The preprocessing of all pathological images in the dataset includes: A pre-trained pathological image quality classification model is used to classify the brightness quality of all sample pathological images in the dataset to determine the sample pathological images with acceptable brightness quality and those with unacceptable brightness quality. For each pathological image with substandard brightness quality, the brightness characteristic value of the substandard pathological image is adaptively adjusted based on the brightness characteristic values of all pathological images with acceptable brightness quality.
10. A method for targeted cell annotation in pathological images, characterized in that, include: A dataset comprising multiple training samples is obtained, wherein each training sample includes a sample pathological image and a corresponding pre-label, the pre-label being obtained by pre-annotating the sample pathological image with target cells, and at least some of the pre-labels in the training samples have missing labels and / or mislabeled labels; The dataset is used to train the pre-built target detection model through multiple rounds of cross-validation until the first preset training termination condition is met. When each round of cross-validation training is completed, the target cell prediction annotation results corresponding to all sample pathological images in the dataset obtained in the current training round are corrected according to the preset noise label correction rule. For each sample pathological image, the corrected target cell prediction annotation result of the sample pathological image in the current training round is used as the label of the sample pathological image in the next training round. The system obtains the target cell prediction annotation results corresponding to each of the pathological images of the samples in the dataset obtained in the training round when the first preset training end condition is met, and receives the physician's confirmation or correction operation on the target cell prediction annotation results corresponding to each pathological image of the samples, so as to obtain the final annotation results of each pathological image of the samples. The step of correcting the target cell prediction annotation results corresponding to each sample pathological image in the dataset obtained in the current training round according to the preset noise label correction rule includes: For each sample pathological image: The confidence scores of all the bounding boxes in the target cell prediction annotation results of the pathological image of the sample in the current training round are sorted in descending order, and the bounding boxes with the highest confidence scores in the first preset percentage are taken as the first corrected bounding boxes. The confidence scores of all the bounding boxes in the labels of the pathological image of the sample in the current training round are sorted in descending order, and the bounding boxes with the highest confidence scores in the second preset percentage are used as the second correction bounding boxes. Based on the target cell prediction annotation results of the pathological image in the current training round and the annotation boxes, the first corrected annotation box, and the second corrected annotation box in the current training round, the corrected target cell prediction annotation results of the pathological image in the current training round are obtained.
11. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the pathological image targeted cell detection method according to any one of claims 1 to 9 or the pathological image targeted cell annotation method according to claim 10.
12. A readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, implements the pathological image targeted cell detection method according to any one of claims 1 to 9 or the pathological image targeted cell annotation method according to claim 10.
Citation Information
Patent Citations
Data labeling method based on cross validation and related equipment
CN112686301A
Pathological image quality evaluation method and system, pathological image quality adjustment method and system, electronic equipment and medium
CN115797246A