Training method of pathological image recognition model, pathological image recognition method and device

By converting pathological image samples into H&E space and using B-spline curve functions for staining, the problem of insufficient generalization ability of pathological image recognition models is solved, and the recognition accuracy and stability of the models are improved.

CN122156844APending Publication Date: 2026-06-05HYBRIBIO MEDTECH DEVICE CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HYBRIBIO MEDTECH DEVICE CO LTD
Filing Date
2025-12-19
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Traditional pathological image recognition models have weak generalization ability due to staining differences, making it difficult to accurately identify and analyze pathological images on datasets from different sources.

Method used

By converting the color space of histopathological image samples to H&E space, and using B-spline curve functions to enhance or weaken the staining of hematoxylin and eosin color channels, and randomly adding staining perturbations, sample enhancement training was performed.

Benefits of technology

It improves the generalization ability and robustness of the pathological image recognition model, enhances the accuracy and stability of recognition, strengthens the boundary features of the tumor region, and reduces false alarm noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156844A_ABST
    Figure CN122156844A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of medical data processing, and discloses a training method of a pathological image recognition model, a pathological image recognition method and device, the training method of the pathological image recognition model comprising the following steps: obtaining a plurality of histopathological image samples; for part or all of the histopathological image samples, converting a color space into an H&E space to obtain an initial H&E space image, the H&E space comprising two color channels, namely a hematoxylin color channel and an eosin color channel; for the initial H&E space image, using a B-spline curve function to perform dyeing enhancement processing or dyeing weakening processing on at least one color channel to obtain a target H&E space image; and using the histopathological image samples and the target H&E space image to train a pre-constructed histopathological image recognition model. The application can improve the generalization ability of the histopathological image recognition model, and further improve the accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical data processing technology, specifically to a training method for a pathological image recognition model, a pathological image recognition method, and an apparatus. Background Technology

[0002] Digital pathology images play a crucial role in medical image analysis, widely used in the early screening and precision diagnosis of diseases such as cervical cancer and breast cancer. They provide doctors with relatively reliable diagnostic evidence. These images typically possess extremely high resolution (hundreds of millions of pixels) and require sophisticated staining techniques. Traditional Hematologic & Escherichia coli (H&E) staining is the most commonly used technique in histopathology; however, differences in staining protocols and dye compositions between laboratories lead to significant color variations in tissue sections. This staining variability greatly limits the generalization ability of AI models for recognizing histopathological images across datasets from different sources. Summary of the Invention

[0003] This invention provides a training method, a pathological image recognition method, and an apparatus for a pathological image recognition model, in order to solve the problem of weak generalization ability of AI models caused by staining differences in tissue pathological images.

[0004] In a first aspect, the present invention provides a method for training a histopathological image recognition model, the method comprising: Acquire multiple tissue pathology image samples; For some or all of the histopathological image samples, the color space is converted to H&E space to obtain an initial H&E space image. The H&E space includes two color channels, namely the hematoxylin color channel and the eosin color channel. For the initial H&E space image, the B-spline curve function is used to perform color enhancement or color reduction processing on at least one of the color channels to obtain the target H&E space image. The pre-constructed histopathological image recognition model is trained using the histopathological image samples and the target H&E spatial image.

[0005] In a second aspect, the present invention provides a method for histopathological image recognition, the method comprising: Acquire the histopathological image of the tissue to be identified; The histopathological image to be identified is identified using a pre-trained histopathological image recognition model, and the identification result is output; wherein the histopathological image recognition model is trained according to the training method of the histopathological image recognition model of the first aspect above or any corresponding embodiment thereof.

[0006] Thirdly, the present invention provides a training device for a histopathological image recognition model, the device comprising: The sample acquisition module is used to acquire multiple tissue pathology image samples; The conversion module is used to convert the color space to H&E space for some or all of the histopathological image samples to obtain an initial H&E space image. The H&E space includes two color channels, namely the hematoxylin color channel and the eosin color channel. The sample enhancement module is used to perform color enhancement or color reduction processing on at least one of the color channels of the initial H&E space image using a B-spline curve function to obtain a target H&E space image. The training module is used to train a pre-built histopathological image recognition model using the histopathological image samples and the target H&E spatial image.

[0007] Fourthly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the training method of the histopathological image recognition model of the first aspect or any corresponding embodiment thereof, or to perform the histopathological image recognition method of the second aspect or any corresponding embodiment thereof.

[0008] Fifthly, the present invention provides a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the training method of the histopathological image recognition model of the first aspect or any corresponding embodiment thereof, or to execute the histopathological image recognition method of the second aspect or any corresponding embodiment thereof.

[0009] Fifthly, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the training method of the histopathological image recognition model of the first aspect or any corresponding embodiment thereof, or to execute the histopathological image recognition method of the second aspect or any corresponding embodiment thereof.

[0010] The training method, pathological image recognition method, and apparatus for the histopathological image recognition model provided in this embodiment enhance or de-enhance the hematoxylin and / or eosin color channels of the histopathological image samples by using B-spline curve functions. In other words, random staining perturbations are added to the histopathological image samples through nonlinear transformation, thereby enhancing the training sample images. This helps the model learn the regions of interest in the histopathological image samples, improves the generalization ability of the histopathological image recognition model, and thus enhances the robustness and accuracy of the histopathological image recognition model. Attached Figure Description

[0011] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating the training method of a histopathological image recognition model according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a tissue pathology image sample enhancement process according to an embodiment of the present invention; Figure 3 This is another schematic diagram of the tissue pathology image sample enhancement processing according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the preprocessing flow of histopathological image samples according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the pseudo-tag generation process according to an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the sources of unsupervised loss according to an embodiment of the present invention; Figure 7 This is a structural block diagram of a training device for a histopathological image recognition model according to an embodiment of the present invention; Figure 8 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0014] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0015] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0016] Histopathological images are the gold standard for cancer diagnosis. Pathologists perform quantitative and qualitative analysis on these images to make a diagnosis. During the diagnostic process, the outline and boundaries of the cancerous area must be manually delineated. This process is not only extremely time-consuming and labor-intensive, but prolonged high-intensity work can also reduce the quality of a pathologist's work.

[0017] With the rapid development of deep learning technology in the field of computer vision, especially its widespread application in medical image analysis, pathological image analysis has gradually shifted from traditional manual feature extraction to deep learning technology.

[0018] However, deep learning-based pathological image analysis techniques face challenges due to the variability of staining techniques. The most commonly used tissue staining method is Hematoxylin and eosin (H&E) staining, but significant differences exist between laboratories in specific staining protocols and dye compositions. This leads to substantial variations in color and visual features in pathological images from different sources. This staining variability significantly impacts the generalization ability of deep learning models in cross-laboratory and cross-dataset applications. The models struggle to accurately identify and analyze images with different staining features, affecting their stability and accuracy in practical applications.

[0019] Hematoxylin and eosin (H&E) staining involves using two dyes, hematoxylin and eosin, to stain tissues and help reveal their structural features. H&E-stained sections typically have two main color channels: the H channel (hematoxylin channel) and the E channel (eosin channel), which reflect the staining of different components within the tissue. Hematoxylin is a basic dye primarily used to stain DNA and RNA in cell nuclei. It binds to acidic components in the cell nucleus (such as DNA), staining them blue-purple or dark purple. The H channel represents the hematoxylin-stained area, primarily reflecting the morphology and structure of the cell nucleus in the tissue section. Nuclei and nucleic acid components (such as chromosomes) are highlighted in this channel, making it suitable for observing cell division, chromatin distribution, and nuclear structure. Eosin is an acidic dye primarily used to stain cytoplasm, extracellular matrix, and other tissue components. Eosin binds to proteins in the tissue (such as collagen fibers and proteins in the cytoplasm), making these structures appear red or pink. The E channel represents the eosin-stained area, primarily reflecting the staining of components such as cytoplasm, extracellular matrix, collagen fibers, and muscle tissue. Eosin staining is very helpful in observing cell morphology, tissue structure, and the intercellular matrix.

[0020] According to an embodiment of the present invention, a training method for a histopathological image recognition model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0021] This embodiment provides a training method for a histopathological image recognition model, which can be used on various electronic devices, including mobile terminals, desktop computers, etc. Figure 1 This is a flowchart of a training method for a histopathological image recognition model according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Obtain multiple histopathological image samples.

[0022] In this embodiment, the histopathological image sample can be an image of a tissue section stained using the H&E staining method. This image can be a full-field image of the tissue section captured using a dedicated microscope scanner and multi-focal plane fusion technology, such as a whole-slide image (WSI).

[0023] Step S102: For some or all of the histopathological image samples, the color space is converted to H&E space to obtain an initial H&E space image. The H&E space includes two color channels, namely the hematoxylin color channel (i.e., the H channel) and the eosin color channel (i.e., the E channel).

[0024] For example, if the histopathological image sample is an RGB format image, then the original color space of the histopathological image sample is the RGB space, which can be represented as: The color deconvolution matrix (also known as the color vector matrix) can be obtained beforehand. This converts the color space of histopathological image samples from RGB space to H&E space. H&E space can be represented as: The formula for converting from RGB color space to H&E color space is: Color deconvolution matrix Specifically, it can be expressed as:

[0025] Color deconvolution matrix The column vectors represent the absorbance ratio of each dye in the red, green, and blue channels. Specifically... This represents the response weight (i.e., absorbance ratio) of the i-th color channel (red, green, or blue) to the j-th dye. Color deconvolution matrix. For example, it could be: .

[0026] Step S103: For the initial H&E space image, use the B-spline curve (Basis Spline Curve) function to perform color enhancement or color reduction processing on at least one of the color channels to obtain the target H&E space image. Specifically, color enhancement or color reduction processing can be performed on only one color channel, or color enhancement processing can be performed on one color channel while color reduction processing is performed on the other color channel.

[0027] In this embodiment, an initial H&E space image can undergo multiple different sample enhancement processes to obtain multiple target H&E space images. The degree of enhancement or reduction in color intensity can vary across these multiple enhancement processes. Sometimes the hematoxylin color channel (H channel) is enhanced, sometimes the hematoxylin color channel (H channel) is reduced, sometimes the eosin color channel (E channel) is enhanced, and sometimes the eosin color channel (E channel) is reduced. Alternatively, one color channel of the same initial H&E space image can be enhanced while another color channel is reduced.

[0028] A B-spline curve is a smooth curve defined by a set of control points and a set of basis functions. It allows for precise control of the curve's shape, influencing its direction and curvature by adjusting the control points. Assume there is a set of control points... , , ,..., B-spline curve The B-spline basis functions are obtained by weighting these control points. It is the weighting function for control points, where It is the order of the curve. These are parameters. The formula for a B-spline curve is:

[0029] in, Is the curve in the parameter The value of the position, It is a control point.

[0030] Color enhancement can increase the intensity of color staining by increasing the brightness or contrast of a specific color channel. A color enhancement function can be designed based on a B-spline curve, with the following expression:

[0031] in, It is the staining enhancement coefficient. This indicates enhancement, controlling the degree of enhancement. The color enhancement function increases... The value expands the range of the curve, thereby increasing the color intensity in the channel.

[0032] Color attenuation reduces color intensity by decreasing the brightness or contrast of color channels. A color attenuation function can be designed based on a B-spline curve, with the following expression:

[0033] in, It is the staining attenuation coefficient. The color reduction function indicates weakening and controls the degree of weakening. It works by decreasing the color reduction function. The value shrinks the range of the curve, thereby reducing the color intensity in the channel.

[0034] For an initial H&E color space image, after performing chromatic enhancement or chromatic de-enhancement on one of its color channels, the processed color channel can be combined with the other unprocessed color channel to obtain the target H&E color space image. If it is necessary to process the two color channels separately, then after processing each channel separately, the two processed color channels can be combined to obtain the target H&E color space image.

[0035] For example, given an initial H&E spatial image, a color enhancement function can be used to color enhance the H channel, resulting in a color-enhanced H channel. The E channel is stained using a staining attenuation function to obtain the stained-attenuated E channel. The enhanced H channel is combined with the weakened E channel to obtain a new image, namely the target H&E space image. ,in, This is a combination function for two color channels, which means combining the two color channels into a new image according to a certain ratio or rule. For example, it can be combined by weighted averaging or direct stitching.

[0036] like Figure 2 and Figure 3 As shown, for the initial H&E spatial image mentioned above, a staining attenuation function can also be used to stain the H channel to obtain a stain-attenuated H channel. The E channel is enhanced by using a staining enhancement function to obtain the staining-enhanced E channel. The weakened H channel is combined with the enhanced E channel to obtain a new image, i.e., another target H&E space image. Thus, two different target H&E space images can be obtained from the same initial H&E space image. .

[0037] Furthermore, to eliminate differences between different image samples and make the brightness and contrast of the images more consistent, this embodiment can perform normalization processing on the initial H&E spatial image and / or the target H&E spatial image. Using the target H&E spatial image... For example, if its pixel value range is Then the normalization formula is: .

[0038] Step S104: Use the histopathological image samples and the target H&E spatial image to train the pre-constructed histopathological image recognition model.

[0039] The training method for the histopathological image recognition model provided in this embodiment utilizes B-spline curve functions to perform staining enhancement or reduction processing on the hematoxylin and / or eosin color channels of histopathological image samples, respectively. In other words, random staining perturbations are added to the histopathological image samples through nonlinear transformation, thereby enhancing the training sample images. This helps the model learn the regions of interest in the histopathological image samples, improves the generalization ability of the histopathological image recognition model, and thus enhances the robustness and accuracy of the histopathological image recognition model.

[0040] In addition, by performing nonlinear transformation processing on histopathological image samples, the boundary features of the tumor region can be enhanced, and false alarm noise can be reduced.

[0041] The following example illustrates the detailed process of training a histopathological image recognition model.

[0042] Regarding step S101 above, namely the step of acquiring multiple histopathological image samples, in some optional specific embodiments, it includes: Step S1011: Obtain multiple original tissue pathology image samples.

[0043] Original histopathological image samples, for example, can be full-view raw images of tissue sections captured using a specialized microscope scanner with multi-focal plane fusion technology.

[0044] Step S1012, as follows Figure 4 As shown, the original tissue pathology image sample is cut into multiple image blocks.

[0045] Specifically, a sliding window technique can be used to segment the original tissue pathology image sample into multiple small patches, i.e., image blocks. The size of an image patch can be, for example, 640x640 pixels. The size of the image patch can be adjusted according to the constraints of training resources (such as GPU memory limitations) to ensure the efficiency of the image processing.

[0046] Step S1013: Use a deep learning model to perform quality assessment on the image patch.

[0047] In this embodiment, each image patch can be used as input to a deep learning model to evaluate the quality of the image patch; that is, a deep learning model can be used to evaluate the quality of each image patch.

[0048] Step S1014: According to the quality assessment results, the image block is classified into a first image block and a second image block, wherein the quality of the first image block is lower than that of the second image block.

[0049] In some optional implementations, a multi-stage screening strategy can be used to classify the quality of the segmented image patches. For example... Figure 4 As shown, for example, a two-step screening approach can be used to classify image patches based on quality, including preliminary screening and in-depth screening. In the preliminary screening stage, a simplified first deep learning model (such as ResNet-18 (a shallower network structure in the ResNet series) or EfficientNet-B0 (an efficient convolutional neural network architecture, a foundational model in the EfficientNet series)) can be used to quickly evaluate all image patches. This first deep learning model quickly filters out obviously low-quality image patches (i.e., the first image patches), reducing computation and improving screening efficiency. For the remaining image patches after preliminary screening, a deeper second deep learning model (such as ResNet-50 (one of the ResNet series models) or EfficientNet-B7 (the largest and most powerful model in the EfficientNet series, which uses a compound scaling method to uniformly adjust depth, width, and resolution, achieving excellent performance in image classification tasks while maintaining high computational efficiency)) is used for fine classification to ensure accurate identification of high-quality image patches and detailed differentiation of potentially low-quality image patches.

[0050] Step S1015, perform at least one of the following processes on the first image block: repair the blurred areas in the first image block using a deblurring algorithm; remove impurities and irrelevant areas in the first image block using image segmentation technology and deep learning technology; and reduce noise in the first image block using a denoising algorithm.

[0051] Specifically, such as Figure 4 As shown, deblurring algorithms can be, for example, denoising autoencoder networks (DAE), generative adversarial networks (GAN), etc., and U-Net can be used to remove irrelevant regions. Denoising algorithms can be, for example, convolutional neural networks, total variation denoising, etc.

[0052] In this embodiment, as Figure 4As shown, after the low-quality image patch (i.e., the first image patch) is screened, several image processing techniques can be used to improve its quality. For example, firstly, a deblurring algorithm is used to repair the blurred areas in the first image patch to restore detail information. Next, image segmentation techniques and deep learning models are applied to remove impurities and irrelevant areas from the first image patch, improving the purity and usability of the pathological image. Finally, a denoising algorithm is used to reduce noise in the first image patch, ensuring that the effective information in the image is as clear as possible without noise interference.

[0053] Step S1016: Based on the second image block and the processed first image block, the final histopathological image sample is obtained. For example, the second image block and the processed first image block can be stitched back together to form a complete histopathological image to obtain the final histopathological image sample. Alternatively, the second image block and the processed first image block can be processed in other ways according to the needs of subsequent model training to obtain the histopathological image sample required for model training.

[0054] In other alternative implementations, the original histopathological image sample may not be cut, and the entire original histopathological image sample may be classified and repaired directly according to the above method.

[0055] Existing deep learning model training methods largely rely on large amounts of labeled data. Histopathological image annotation can generally be categorized into three types: slice-level annotation, image-level annotation, and pixel-level annotation. Slice-level and image-level annotations are relatively easy to implement and are commonly used for pathological image classification tasks. Pixel-level annotation, however, requires annotators to accurately delineate the boundaries of cancer regions. However, histopathological images suffer from significant morphological differences between different tissue regions and overlapping or mixed boundaries, making the workload enormous and challenging. Pixel-level annotation is particularly crucial in cancer segmentation tasks, but due to its extremely tedious and time-consuming process, the amount of pixel-level labeled data is very limited, and the annotation quality is inconsistent. This severely restricts the application of fully supervised learning methods for deep learning models in pathological image analysis.

[0056] To overcome the dependence of fully supervised learning on large amounts of labeled data, various methods have been proposed, including weakly supervised learning, unsupervised learning, and semi-supervised learning. Weakly supervised learning trains the model using features learned from bounding boxes, doodles, or image-level labels, without requiring pixel-level annotation. While this significantly reduces the difficulty and cost of annotation, the lower annotation requirements can lead to significant variations in the quality of labeled data, thus affecting the model's training performance. This is particularly problematic in high-precision tasks like cancer diagnosis, where weakly supervised learning struggles to provide sufficient accuracy. Unsupervised learning relies entirely on unlabeled data for training, and common tasks include mask reconstruction and contrastive learning. Unsupervised learning can discover potential patterns in data by analyzing its inherent structure and patterns; however, the lack of explicit label signals often results in a lack of direction in the training process, making it difficult to converge to useful model parameters. Furthermore, the application of unsupervised learning in histopathological image analysis remains limited, especially in classification and segmentation tasks, where the lack of a clear task objective leads to limited training effectiveness.

[0057] Compared to weakly supervised and unsupervised learning, semi-supervised learning methods combine a small amount of labeled data with a large amount of unlabeled data for training. While maintaining high efficiency, it effectively addresses the problem of scarce labeled data. Semi-supervised learning not only enhances the model's learning ability using limited labeled data but also fully mines the potential information in unlabeled data, thereby improving the model's generalization ability. Therefore, semi-supervised learning has been widely used in medical image analysis, especially in scenarios where data labeling is difficult and expensive, where it demonstrates superior performance.

[0058] In some optional embodiments, the plurality of histopathological image samples include a first histopathological image sample that has been labeled and a second histopathological image sample that has not been labeled; specifically, the first histopathological image sample may be labeled manually.

[0059] The pre-built histopathological image recognition model is a student model; Step S104, namely, training the pre-built histopathological image recognition model using the histopathological image samples and the target H&E spatial image, includes: Step S104a: Using the first histopathological image sample and / or the target H&E spatial image corresponding to the first histopathological image sample, and the corresponding label, train the teacher model to be trained to obtain the first teacher model.

[0060] In this embodiment, the label of the first histopathological image sample is the same as the label of the target H&E spatial image corresponding to the first histopathological image sample. Specifically, the teacher model can be trained using only the first histopathological image sample, or only the target H&E spatial image corresponding to the first histopathological image sample, or both the first histopathological image sample and the target H&E spatial image corresponding to the first histopathological image sample can be used to train the teacher model.

[0061] Step S104b: Use the first teacher model to identify the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample to obtain the corresponding first identification result.

[0062] In this embodiment, if the teacher model is trained using only the first histopathological image sample, then only the first teacher model can be used to identify the second histopathological image sample. If the teacher model is trained using only the target H&E spatial image corresponding to the first histopathological image sample, then only the first teacher model can be used to identify the target H&E spatial image corresponding to the second histopathological image sample. If the teacher model is trained using both the first histopathological image sample and the target H&E spatial image corresponding to the first histopathological image sample, then the first teacher model can be used to identify both the second histopathological image sample and the target H&E spatial image corresponding to the second histopathological image sample. However, this is not a limitation; for example, if the teacher model is trained using only the first histopathological image sample, then the first teacher model can be used to identify both the second histopathological image sample and the target H&E spatial image corresponding to the second histopathological image sample.

[0063] Step S104c: Based on the first recognition result, obtain the pseudo-label of the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample.

[0064] For a second histopathological image sample, its pseudo-label should generally be the same as the pseudo-label of the corresponding target H&E spatial image. If the first recognition result of the first teacher model for the second histopathological image sample differs from the first recognition result of the corresponding target H&E spatial image, then one of the first recognition results is selected as the recognition result for both the second histopathological image sample and the corresponding target H&E spatial image. For example, the first recognition result with higher confidence can be selected as the recognition result for both the second histopathological image sample and the corresponding target H&E spatial image, thereby unifying the pseudo-labels.

[0065] Furthermore, if the confidence level of the first identification result is low, for example, below a certain confidence threshold, then the pseudo-label is uncertain. For instance, if the first teacher model identifies the second histopathological image sample and the target H&E spatial image corresponding to the second histopathological image sample, and the first identification results are both below the confidence threshold, then the pseudo-label is uncertain, which is equivalent to having one less training sample.

[0066] Step S104d: The student model is trained using the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, and the corresponding pseudo-label, to obtain the final histopathological image recognition model.

[0067] In this embodiment, the student model can be trained in multiple rounds. Additionally, after each or multiple rounds of training, the teacher model (first teacher model) can be updated. If the teacher model and student model have identical structures, the parameters of the student model can be copied to the teacher model, or the teacher model's parameters can be updated by weighted summation of the student model's parameters. The teacher model's parameters can also have their own independent update strategy, unrelated to the student model's parameters, but related to the student model's test or validation results. After the teacher model's parameters are updated, steps S104a-S104c and the student model training process in step S104d need to be repeated. The teacher model and student model can also have different structures; when updating the teacher model, the student model's parameters cannot be directly copied to the teacher model.

[0068] This embodiment uses semi-supervised training, which enables the model to fully utilize the potential information in unlabeled histopathological images. This solves the problem of insufficient generalization ability and low accuracy of the trained histopathological image recognition model due to the insufficient number of labeled histopathological images.

[0069] In some alternative embodiments, the plurality of histopathological image samples include labeled first histopathological image samples and unlabeled second histopathological image samples; the pre-constructed histopathological image recognition model is a student model; Step S104, namely, training the pre-built histopathological image recognition model using the histopathological image samples and the target H&E spatial image, includes: Step S1041: Using the first histopathological image sample and the corresponding label, train the teacher model to be trained to obtain the initial teacher model. Step S1042: Using the first histopathological image sample and the target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, train the student model to be trained to obtain the initial student model. Step S1043: Use the initial teacher model to identify the second histopathological image sample to obtain the corresponding second identification result; Step S1044: Based on the second recognition result, obtain the pseudo-label of the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample; In this embodiment, if the confidence level of the second identification result is low, for example, below a certain confidence threshold, then the pseudo-label is uncertain, meaning that the subsequent student model training process will have one less training sample.

[0070] Step S1045: Using the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, and the corresponding pseudo-label, the initial student model is trained to obtain the final histopathological image recognition model. Here, when training the initial student model to obtain the final histopathological image recognition model, some of the first histopathological image samples and / or the target H&E spatial images corresponding to the first histopathological image samples can be added (the first histopathological image samples and their corresponding target H&E spatial images have corresponding labels). Of course, all the first histopathological image samples and / or the target H&E spatial images corresponding to the first histopathological image samples can also be added to the training sample set of the initial student model.

[0071] For example, the initial student model can be trained using the first histopathological image sample and the target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, and the second histopathological image sample and the target H&E spatial image corresponding to the second histopathological image sample, as well as the corresponding pseudo label, to obtain the final histopathological image recognition model.

[0072] Similarly, in this embodiment, the student model (initial student model) can be trained in multiple rounds. Additionally, after each one or more rounds of training, the teacher model (initial teacher model) can be updated. If the teacher model and student model have identical structures, the parameters of the student model can be copied to the teacher model, or the teacher model's parameters can be updated by weighted summation of the student model's parameters. The teacher model's parameters can also have their own independent update strategy, unrelated to the student model's parameters, but related to the student model's test or validation results. After the teacher model's parameters are updated, steps S1041, S1043, S1044, and the training process for the initial student model in step S1045 need to be repeated. The structures of the teacher model and student model can also be different; when updating the teacher model, the parameters of the student model cannot be directly copied to the teacher model.

[0073] This embodiment uses semi-supervised training, which enables the model to fully utilize the potential information in unlabeled histopathological images. This solves the problem of insufficient generalization ability and low accuracy of the trained histopathological image recognition model due to the insufficient number of labeled histopathological images.

[0074] In some optional embodiments, the student model includes a first base model and a second base model; the target H&E space images corresponding to the first histopathological image sample and the second histopathological image sample both include a first target H&E space image and a second target H&E space image; the first target H&E space image and the second target H&E space image are different; Step S1042, namely, using the first histopathological image sample and the target H&E spatial image corresponding to the first histopathological image sample, and the corresponding label, to train the student model to be trained and obtain the initial student model, includes: Step S10421: Using the first histopathological image sample and the first target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, train the first basic model to obtain the first initial basic model. Step S10422: Using the first histopathological image sample and the second target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, train the second basic model to obtain the second initial basic model. Step S1044, namely, obtaining pseudo-labels for the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample based on the second recognition result, includes: Step S10441: Use the first initial basic model to identify the first target H&E spatial image corresponding to the second histopathological image sample, and obtain the corresponding third identification result. Step S10442: Use the second initial basic model to identify the second target H&E spatial image corresponding to the second histopathological image sample, and obtain the corresponding fourth identification result; Step S10443: Based on the second identification result and / or the third identification result, determine the pseudo-label of the second target H&E spatial image corresponding to the second histopathological image sample; based on the second identification result and / or the fourth identification result, determine the pseudo-label of the first target H&E spatial image corresponding to the second histopathological image sample. Step S1045, namely, training the initial student model using the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, and the corresponding pseudo-label, to obtain the final histopathological image recognition model, includes: Based on the pseudo-labels of the second target H&E spatial image, the second initial base model is trained iteratively; based on the pseudo-labels of the first target H&E spatial image, the first initial base model is trained iteratively. When training the second initial base model, if a second histopathological image sample is used, its pseudo-label is the same as the pseudo-label of the second target H&E spatial image; when training the first initial base model, if a second histopathological image sample is used, its pseudo-label is the same as the pseudo-label of the first target H&E spatial image. Here, when iteratively training the first initial base model and / or the second initial base model, some or all of the first histopathological image samples and / or the target H&E spatial images corresponding to the first histopathological image samples can be added (the first histopathological image samples and their corresponding target H&E spatial images have corresponding labels).

[0075] The final histopathological image recognition model is selected from the first initial base model and the second initial base model obtained from the final training. For example, the one with the best performance can be selected as the final histopathological image recognition model.

[0076] Specifically, the first initial base model can be trained using the first histopathological image sample and / or the target H&E spatial image corresponding to the first histopathological image sample (which may include a first target H&E spatial image and a second target H&E spatial image) and its corresponding labels, and the first target H&E spatial image corresponding to the second histopathological image sample and the second histopathological image sample, and its corresponding pseudo-labels. The second initial base model can be trained using the first histopathological image sample and / or the target H&E spatial image corresponding to the first histopathological image sample (which may include a first target H&E spatial image and a second target H&E spatial image) and its corresponding labels, and the second target H&E spatial image corresponding to the second histopathological image sample and the second histopathological image sample, and its corresponding pseudo-labels.

[0077] In this embodiment, the first base model and the second base model are trained collaboratively, constructing pseudo-labels based on each other's recognition results, that is, they guide each other's learning.

[0078] In other embodiments, confidence level can also be considered when constructing pseudo-labels. If the confidence level of the second recognition result output by the teacher model is low, for example, below a certain confidence level threshold, then the pseudo-label is uncertain, which means that the subsequent student model training process will have one less training sample.

[0079] Furthermore, if the confidence level of the second recognition result output by the teacher model is greater than the confidence threshold, the confidence level of the student model's recognition result also needs to be considered when constructing pseudo-labels. Specifically, if the confidence level of the third recognition result obtained by the first initial base model in recognizing the first target H&E spatial image is lower than the confidence level of the second recognition result obtained by the teacher model in recognizing the second histopathological image sample corresponding to the first target H&E spatial image, then the pseudo-labels for training the first initial base model are determined only based on the second recognition result. If the confidence level of the fourth recognition result obtained by the second initial base model in recognizing the second target H&E spatial image is lower than the confidence level of the second recognition result obtained by the teacher model in recognizing the second histopathological image sample corresponding to the second target H&E spatial image, then the pseudo-labels for training the second initial base model are determined only based on the second recognition result.

[0080] In summary, this embodiment trains the student model by generating pseudo-labels using the teacher model. In other optional embodiments, knowledge distillation can also be used to align the feature distributions extracted by the teacher and student models to supervise the training of the student model. That is, when training the student model using the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, the loss function is not calculated based on pseudo-labels, but rather the deviation between the feature distributions extracted by the teacher and student models is calculated to determine the unsupervised loss. For scenarios where the student model includes a first base model and a second base model, multi-teacher distillation can be performed on the second base model based on the feature distributions extracted by the teacher model and the first base model, following the method described above for calculating pseudo-label similarity; similarly, multi-teacher distillation can be performed on the first base model based on the feature distributions extracted by the teacher model and the second base model.

[0081] For example, existing labeled datasets and unlabeled datasets ,in, This is the first histopathological image sample that has been labeled. These are the first target H&E spatial images and the second target H&E spatial images corresponding to the first histopathological image sample, respectively. Labels for first histopathological image samples. This is an unlabeled second histopathological image sample. The first target H&E space image and the second target H&E space image are corresponding to the second histopathological image sample.

[0082] Using labeled data Train the teacher model T by inputting the first histopathological image sample. Output recognition results The teacher model can employ a deep learning segmentation network architecture, such as U-Net, DeepLabV3+, or Swin-Transformer. The loss function used when training the teacher model T can be the cross-entropy loss function. .

[0083] Using labeled data Training the first foundation model The first histopathological image sample The first target H&E spatial image corresponding to the first histopathological image sample. Input the first basic model Output the recognition results respectively and The identification results and labels are used to construct a supervised loss. For example, the Dice function or the cross-entropy loss function can be used.

[0084] Using labeled data Training the second foundation model The first histopathological image sample The second target H&E spatial image corresponding to the first histopathological image sample. Input the second basic model Output the recognition results respectively and The identification results and labels are used to construct a supervised loss. Alternatively, the Dice function or the cross-entropy loss function can be used.

[0085] like Figure 5 As shown, for unlabeled data The teacher model T obtained through the above training was used to analyze the second histopathological image samples. Perform identification and output the second identification result. And obtain the corresponding confidence level. The first base model obtained using the above training... The first target H&E spatial image corresponding to the second histopathological image sample Perform identification and output the third identification result. And obtain the corresponding confidence level. The second base model obtained through the above training... The second target H&E spatial image corresponding to the second histopathological image sample Perform identification and output the fourth identification result. And obtain the corresponding confidence level. .

[0086] If the confidence level of the second recognition result of the teacher model ( If the confidence threshold is set, the second recognition result output by the teacher model can be used to determine the pseudo-label; otherwise, no pseudo-label is constructed. The confidence level of the second recognition result of the teacher model is... In the case of the first basic model Confidence of the third identification result Then based on the first basic model The third recognition result and the second recognition result of the teacher model are used to train the second base model. The pseudo-labels (as pseudo-labels for the second target H&E spatial image) can be, for example, weighted sums or averages. If it is an average, then the pseudo-label is... If the first basic model Confidence of the third identification result Then the second recognition result of the teacher model is directly used as the training result of the second base model. The pseudo-tag, that is, the pseudo-tag is The confidence level of the second identification result in the teacher model. In the case of the second basic model Confidence of the fourth identification result Then based on the second basic model The fourth recognition result and the second recognition result of the teacher model are used to train the first base model. The pseudo-labels (as pseudo-labels for the first target H&E spatial image) can also be obtained by weighted summation or averaging; if the second base model Confidence of the fourth identification result Then the second recognition result of the teacher model is directly used as the training of the first base model. Pseudo-tags.

[0087] In this embodiment, the first basic model Second basic model They learn from each other, using pseudo-labels generated from each other's recognition results for supervised training. First base model. Second basic model The loss functions can be, for example, as follows:

[0088]

[0089] If, during iterative training of the first initial base model and / or the second initial base model, some or all of the first histopathological image samples and / or the target H&E spatial image corresponding to the first histopathological image samples (the first histopathological image samples and their corresponding target H&E spatial images have corresponding labels) are included, then the loss function value corresponding to the first histopathological image samples and / or the target H&E spatial image corresponding to the first histopathological image samples also needs to be included here.

[0090] At the end of each training round, a new first base model is obtained. Second basic model After that, the new first basic model can be used. Second basic model Following the above method, new pseudo-labels are obtained, and a new round of training is performed. Additionally, after one or more rounds of training on the first base model... Second basic model After training, the recognition results of the student model can be fed back to the teacher model for fine-tuning. Specifically, for example, the student model can identify the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample. Recognition results with high confidence (e.g., greater than 0.7) are used as pseudo-labels. The corresponding second histopathological image sample and / or the pseudo-label, along with the pseudo-label, are then used to fine-tune the training of the teacher model. Alternatively, the EMA (Exponential Moving Average) method can be directly applied to update the parameters of the student model to the teacher model.

[0091] In some optional embodiments, the first target H&E spatial image is obtained by processing the histopathological image sample as follows: staining enhancement processing of the hematoxylin color channel and staining reduction processing of the eosin color channel; The second target H&E spatial image is obtained by processing the histopathological image sample as follows: staining reduction processing of the hematoxylin color channel and staining enhancement processing of the eosin color channel.

[0092] In some optional implementations, the loss function used to train the student model to be trained and / or to train the initial student model includes a supervised loss function and an unsupervised loss function. The supervised loss function is obtained based on labels and / or pseudo-labels, while the unsupervised loss function is calculated based on distance-weighted attention of hierarchical feature maps.

[0093] Specifically, such as Figure 6 As shown, the distance of the L1-level spatial attention-weighted feature map can be calculated at different scales and used as an unsupervised loss.

[0094] When the student model includes a first base model and a second base model, the loss function used in training the first base model to obtain the first initial base model, training the second base model to obtain the second initial base model, and training the first initial base model and the second initial base model, can also include the supervised loss function and the unsupervised loss function mentioned above. Taking the training of the first base model to be trained as an example, its unsupervised loss function... The formula can be expressed as:

[0095] in, and These are the first histopathological image sample and its corresponding first target H&E spatial image. and In the first basic model Decoding the first Feature map of the layer It is the height and width of the feature map. It is the first basic model The total number of decoding layers, For the first basic model The Spatial attention weights corresponding to each decoding layer.

[0096] The final overall loss function of the student models (including the student model to be trained, the initial student model, the first base model, the second base model, the first initial base model, the second initial base model, etc.). It can be a supervised loss function. and unsupervised loss function The weighted summation can be expressed by the formula:

[0097] Where λ is the weighting coefficient.

[0098] In this embodiment, multi-scale feature consistency constraints effectively suppress noise and false alarms that may be introduced during the transformation process (stain enhancement or de-enhancement). Guided by spatial attention maps, the model can focus on more reliable regions, improving its ability to learn important features. This is especially beneficial when dealing with complex histopathological images, helping to enhance the robustness of feature consistency and ensuring high-quality prediction results.

[0099] In summary, this embodiment, through attention-guided unsupervised loss, allows the student model to align the output features of the initial H&E space image and the target H&E space image (alignment is performed at different scales). Therefore, regardless of the type of student model or its training stage, as long as it uses both the initial and target H&E space images during training, the aforementioned unsupervised loss can be increased. Of course, the teacher model is no exception.

[0100] In addition, feature-level regularization (i.e., multi-scale feature alignment) alleviates the challenge of insufficient data labeling, enabling more efficient model training and stronger generalization ability.

[0101] This embodiment provides a method for histopathological image recognition, which can be used in various electronic devices, including mobile terminals, desktop computers, etc. The method includes the following steps: Step S201: Obtain the histopathological image to be identified.

[0102] Step S202: Using a pre-trained histopathological image recognition model, the histopathological image to be recognized is identified, and the recognition result is output; wherein, the histopathological image recognition model is trained according to any of the histopathological image recognition model training methods provided in the above embodiments.

[0103] This embodiment also provides a training device for a histopathological image recognition model, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0104] This embodiment provides a training device for a histopathological image recognition model, such as... Figure 7 As shown, it includes: The sample acquisition module 701 is used to acquire multiple tissue pathology image samples; The conversion module 702 is used to convert the color space to H&E space for some or all of the histopathological image samples to obtain an initial H&E space image. The H&E space includes two color channels, namely the hematoxylin color channel and the eosin color channel. The sample enhancement module 703 is used to perform color enhancement or color reduction processing on at least one of the color channels of the initial H&E space image using a B-spline curve function to obtain a target H&E space image. The training module 704 is used to train a pre-built histopathological image recognition model using the histopathological image samples and the target H&E spatial image.

[0105] In some optional implementations, the plurality of histopathological image samples include labeled first histopathological image samples and unlabeled second histopathological image samples; the pre-built histopathological image recognition model is a student model; The training module 704 includes: The first teacher model training unit is used to train the teacher model to be trained using the first histopathological image sample and / or the target H&E spatial image corresponding to the first histopathological image sample, and the corresponding label, to obtain the first teacher model. The first identification result acquisition unit is used to identify the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample using the first teacher model, and obtain the corresponding first identification result; The first pseudo-label acquisition unit is used to obtain pseudo-labels for the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample based on the first recognition result. The first student model training unit is used to train the student model using the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, and the corresponding pseudo-label, to obtain the final histopathological image recognition model.

[0106] In some optional implementations, the plurality of histopathological image samples include labeled first histopathological image samples and unlabeled second histopathological image samples; the pre-built histopathological image recognition model is a student model; The training module 704 includes: The second teacher model training unit is used to train the teacher model to be trained using the first histopathological image sample and the corresponding label to obtain the initial teacher model. The second student model training unit is used to train the student model to be trained using the first histopathological image sample and the target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, to obtain the initial student model. The second identification result acquisition unit is used to identify the second histopathological image sample using the initial teacher model to obtain the corresponding second identification result; The second pseudo-label acquisition unit is used to obtain pseudo-labels for the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample based on the second recognition result. The third student model training unit is used to train the initial student model using the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, and the corresponding pseudo-label, to obtain the final histopathological image recognition model.

[0107] In some optional implementations, the student model includes a first base model and a second base model; the target H&E space images corresponding to the first histopathological image sample and the second histopathological image sample both include a first target H&E space image and a second target H&E space image; the first target H&E space image and the second target H&E space image are different; The second student model training unit is specifically used for: Using the first histopathological image sample and the first target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, the first basic model is trained to obtain the first initial basic model. Using the first histopathological image sample and the second target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, the second basic model is trained to obtain the second initial basic model; The second pseudo-tag acquisition unit is specifically used for: The first initial basic model is used to identify the first target H&E spatial image corresponding to the second histopathological image sample, and the corresponding third identification result is obtained. The second initial basic model is used to identify the second target H&E spatial image corresponding to the second histopathological image sample, and the corresponding fourth identification result is obtained. Based on the second identification result and / or the third identification result, determine the pseudo-label of the second target H&E spatial image corresponding to the second histopathological image sample; based on the second identification result and / or the fourth identification result, determine the pseudo-label of the first target H&E spatial image corresponding to the second histopathological image sample. The third student model training unit is specifically used for: Based on the pseudo-labels of the second target H&E spatial image, the second initial base model is trained iteratively; based on the pseudo-labels of the first target H&E spatial image, the first initial base model is trained iteratively. Choose one of the first initial base model and the second initial base model obtained from the final training as the final histopathological image recognition model.

[0108] In some optional embodiments, the first target H&E spatial image is obtained by processing the histopathological image sample as follows: staining enhancement processing of the hematoxylin color channel and staining reduction processing of the eosin color channel; The second target H&E spatial image is obtained by processing the histopathological image sample as follows: staining reduction processing of the hematoxylin color channel and staining enhancement processing of the eosin color channel.

[0109] In some optional implementations, the sample acquisition module 701 includes: The raw sample image acquisition unit is used to acquire multiple raw tissue pathology image samples. A cutting unit is used to cut the original tissue pathology image sample into multiple image blocks; A quality assessment unit is used to assess the quality of the image patch using a deep learning model; A classification unit is used to classify the image block into a first image block and a second image block according to the quality assessment result, wherein the quality of the first image block is lower than that of the second image block; The processing unit is configured to perform at least one of the following processes on the first image block: repairing blurred regions in the first image block using a deblurring algorithm; removing impurities and irrelevant regions in the first image block using image segmentation techniques and deep learning techniques; and reducing noise in the first image block using a denoising algorithm. The acquisition unit is used to obtain the final histopathological image sample based on the second image block and the processed first image block.

[0110] The training apparatus for the histopathological image recognition model provided in this embodiment of the invention can execute the training method for the histopathological image recognition model provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.

[0111] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0112] The following is a detailed reference. Figure 8 This diagram illustrates a suitable structural schematic for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 801, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 802 or a program loaded from memory 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device. The processor 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0113] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0114] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a memory 808, or installed from a ROM 802. When the computer program is executed by the processor 801, it performs the functions defined in the training method for the histopathological image recognition model or the histopathological image recognition method of the embodiments of the present invention.

[0115] Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0116] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the training method for the histopathological image recognition model or the histopathological image recognition method shown in the above embodiments is implemented.

[0117] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0118] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A training method for a histopathological image recognition model, characterized in that, The method includes: Acquire multiple tissue pathology image samples; For some or all of the histopathological image samples, the color space is converted to H&E space to obtain an initial H&E space image. The H&E space includes two color channels, namely the hematoxylin color channel and the eosin color channel. For the initial H&E space image, the B-spline curve function is used to perform color enhancement or color reduction processing on at least one of the color channels to obtain the target H&E space image. The pre-constructed histopathological image recognition model is trained using the histopathological image samples and the target H&E spatial image.

2. The method according to claim 1, characterized in that, The plurality of histopathological image samples include a labeled first histopathological image sample and an unlabeled second histopathological image sample; the pre-constructed histopathological image recognition model is a student model; The step of training a pre-built histopathological image recognition model using the histopathological image samples and the target H&E spatial image includes: Using the first histopathological image sample and / or the target H&E spatial image corresponding to the first histopathological image sample, and the corresponding label, train the teacher model to be trained to obtain the first teacher model; The first teacher model is used to identify the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, and the corresponding first identification result is obtained; Based on the first recognition result, pseudo-labels are obtained for the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample; The student model is trained using the first histopathological image sample and / or the target H&E spatial image corresponding to the first histopathological image sample and the corresponding label, and the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample and the corresponding pseudo label, to obtain the final histopathological image recognition model.

3. The method according to claim 1 or 2, characterized in that, The plurality of histopathological image samples include a labeled first histopathological image sample and an unlabeled second histopathological image sample; the pre-constructed histopathological image recognition model is a student model; The step of training a pre-built histopathological image recognition model using the histopathological image samples and the target H&E spatial image includes: Using the first histopathological image sample and its corresponding label, the teacher model to be trained is trained to obtain the initial teacher model; Using the first histopathological image sample and the target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, the student model to be trained is trained to obtain the initial student model; The initial teacher model is used to identify the second histopathological image sample to obtain the corresponding second identification result; Based on the second recognition result, pseudo-labels are obtained for the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample; The initial student model is trained using the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, as well as the corresponding pseudo-label, to obtain the final histopathological image recognition model.

4. The method according to claim 3, characterized in that, The student model includes a first base model and a second base model; the target H&E space images corresponding to the first histopathological image sample and the second histopathological image sample both include a first target H&E space image and a second target H&E space image; the first target H&E space image and the second target H&E space image are different; The step of training the student model to be trained using the first histopathological image sample and the corresponding target H&E spatial image, along with the corresponding labels, to obtain the initial student model includes: Using the first histopathological image sample and the first target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, the first basic model is trained to obtain the first initial basic model. Using the first histopathological image sample and the second target H&E spatial image corresponding to the first histopathological image sample, as well as the corresponding label, the second basic model is trained to obtain the second initial basic model; The step of obtaining pseudo-labels for the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample based on the second recognition result includes: The first initial basic model is used to identify the first target H&E spatial image corresponding to the second histopathological image sample, and the corresponding third identification result is obtained. The second initial basic model is used to identify the second target H&E spatial image corresponding to the second histopathological image sample, and the corresponding fourth identification result is obtained. Based on the second identification result and / or the third identification result, determine the pseudo-label of the second target H&E spatial image corresponding to the second histopathological image sample; based on the second identification result and / or the fourth identification result, determine the pseudo-label of the first target H&E spatial image corresponding to the second histopathological image sample. The step of training the initial student model using the second histopathological image sample and / or the target H&E spatial image corresponding to the second histopathological image sample, and the corresponding pseudo-label, to obtain the final histopathological image recognition model includes: Based on the pseudo-labels of the second target H&E spatial image, the second initial base model is trained iteratively; based on the pseudo-labels of the first target H&E spatial image, the first initial base model is trained iteratively. Choose one of the first initial base model and the second initial base model obtained from the final training as the final histopathological image recognition model.

5. The method according to claim 4, characterized in that, The first target H&E spatial image is obtained by processing the histopathological image sample as follows: staining enhancement processing of the hematoxylin color channel and staining reduction processing of the eosin color channel; The second target H&E spatial image is obtained by processing the histopathological image sample as follows: staining reduction processing of the hematoxylin color channel and staining enhancement processing of the eosin color channel.

6. The method according to claim 3, characterized in that, When training the student model to be trained and / or training the initial student model, the loss function used includes a supervised loss function and an unsupervised loss function; The supervised loss function is obtained based on labels and / or pseudo-labels, while the unsupervised loss function is calculated based on distance-weighted attention of hierarchical feature maps.

7. The method according to claim 1, characterized in that, The acquisition of multiple histopathological image samples includes: Acquire multiple raw tissue pathology image samples; The original tissue pathology image sample was cut into multiple image blocks; The quality of the image patch is evaluated using a deep learning model; Based on the quality assessment results, the image blocks are classified into a first image block and a second image block, with the quality of the first image block being lower than that of the second image block; The first image block is processed by at least one of the following methods: repairing blurred areas in the first image block using a deblurring algorithm; removing impurities and irrelevant areas in the first image block using image segmentation and deep learning techniques; and reducing noise in the first image block using a denoising algorithm. Based on the second image block and the processed first image block, the final histopathological image sample is obtained.

8. A method for recognizing histopathological images, characterized in that, The method includes: Acquire the histopathological image of the tissue to be identified; The histopathological image to be identified is identified using a pre-trained histopathological image recognition model, and the identification result is output; wherein the histopathological image recognition model is trained according to the training method of the histopathological image recognition model according to any one of claims 1-7.

9. A training device for a histopathological image recognition model, characterized in that, The device includes: The sample acquisition module is used to acquire multiple tissue pathology image samples; The conversion module is used to convert the color space to H&E space for some or all of the histopathological image samples to obtain an initial H&E space image. The H&E space includes two color channels, namely the hematoxylin color channel and the eosin color channel. The sample enhancement module is used to perform color enhancement or color reduction processing on at least one of the color channels of the initial H&E space image using a B-spline curve function to obtain a target H&E space image. The training module is used to train a pre-built histopathological image recognition model using the histopathological image samples and the target H&E spatial image.

10. An electronic device, characterized in that, include: The system includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the training method of the histopathological image recognition model according to any one of claims 1 to 7, or to perform the histopathological image recognition method according to claim 8.