Pathological label self-adaptive enhancement recognition method and device and storage medium thereof

By adaptively enhancing the images of pathology labels and performing targeted preprocessing based on staining type, the interference problem in pathology label recognition is solved, and the recognition accuracy and data compatibility are improved.

CN122243840APending Publication Date: 2026-06-19CHINESE MEDICINE GUANGDONG LABORATORY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINESE MEDICINE GUANGDONG LABORATORY
Filing Date
2026-05-25
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing pathology label recognition technologies suffer from low recognition rates and limited versatility when faced with industry-specific characteristics such as dye contamination, chromogenic interference, and extreme differences in lighting. They are unable to adapt to various interference issues, leading to a sharp decline in recognition rates in scenarios such as primary hospitals.

Method used

By acquiring macroscopic tissue images and label layer images of pathological labels, the staining type is determined based on optical features, and corresponding preprocessing strategies are matched for enhancement processing, including red noise suppression, background separation, and contrast enhancement. Finally, the data is input into a text recognition model to obtain text information.

Benefits of technology

It improves the data compatibility and recognition accuracy of pathology labels, clearly identifies text images of standard slides and hand-stained materials, and solves noise problems such as staining splashes, water stains, and uneven lighting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243840A_ABST
    Figure CN122243840A_ABST
Patent Text Reader

Abstract

This application discloses an adaptive enhancement recognition method, apparatus, and storage medium for pathological labels. The method includes: acquiring a macroscopic tissue image and a label layer image of a pathological label; determining the staining type of the pathological label based on the optical characteristics of the macroscopic tissue image; matching a corresponding preprocessing strategy to enhance the label layer image according to the staining type to obtain an enhanced image; and inputting the enhanced image into a preset text recognition model to obtain the text information of the pathological label. By enhancing the pathological label, the processed image conforms to the input distribution of a general model, and solves the noise problems unique to pathological labels, such as staining splashes, water stains, and uneven lighting, from an optical principle perspective. Clear text images are obtained from standard slides and inferior manually stained slides, improving the data compatibility and recognition accuracy of pathological labels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical image processing technology, and in particular to a method, apparatus and storage medium for adaptive enhancement recognition of pathological labels. Background Technology

[0002] Whole Slide Image (WSI) technology is a key technology in modern medical, pathological, and histological research. It uses automated equipment to convert traditional glass slides into high-resolution digital images, improving the efficiency and accuracy of sample analysis. During WSI scanning, the scanner simultaneously captures the label information and tissue sample information on the slide. To achieve digital management of pathology records, it is necessary to accurately identify key information such as the pathology number and paraffin block number on the label and rename the files to a standardized format. However, existing automatic naming technologies suffer from low recognition rates and limited versatility. Specifically, unlike ordinary Optical Character Recognition (OCR) scenarios, pathology slide labels face highly specific physical and chemical interferences characteristic of the industry. Existing recognition methods lack the ability to perceive the types of interference on the labels, and the uniform preprocessing methods cannot simultaneously address these interference problems, leading to a sharp drop in recognition rates in practical applications. Summary of the Invention

[0003] This application provides a method, apparatus, and storage medium for adaptive enhancement recognition of pathological labels, which can perform corresponding enhancement processing on pathological labels according to their staining type, effectively improving the recognition accuracy of pathological labels.

[0004] In a first aspect, embodiments of this application provide an adaptive enhancement recognition method for pathological labels, the method comprising the following steps: Obtain a macroscopic tissue image and a label layer image of a pathological label, wherein the macroscopic tissue image is used to characterize the overall morphology of the pathological label, and the label layer image is used to mark the category of each pixel in the pathological label; The staining type of the pathological label is determined based on the optical characteristics of the macroscopic tissue image; According to the staining type, a corresponding preprocessing strategy is matched to enhance the label layer image to obtain an enhanced image. The preprocessing strategy includes at least a red noise suppression strategy for HE staining labels, a background separation strategy for immunohistochemical staining labels, and a contrast enhancement strategy for dark field labels. The enhanced image is input into a preset text recognition model to obtain the text information of the pathology label.

[0005] In some embodiments, acquiring the macroscopic tissue image and label layer image of the pathological label includes: The whole-section image of the pathology label is read by a scanner; Read the full slice image to obtain the macroscopic tissue image and the label layer image.

[0006] In some embodiments, determining the staining type of the pathological label based on the optical characteristics of the macroscopic tissue image includes: Extract the regions containing biological tissue samples from the macroscopic tissue image to form a region image; Color statistics are performed on the image of the region to determine the staining type of the pathological label; Based on the staining type, the pathological labels are classified into HE staining labels, immunohistochemical staining labels, and dark field labels.

[0007] In some embodiments, matching the corresponding preprocessing strategy according to the staining type and enhancing the label layer image includes: When the pathological label is the HE staining label, the label layer image is converted into HSV color space information; Extract the red noise mask based on preset hue and saturation thresholds; The luminance component of the label layer image is nonlinearly stretched based on the mask to obtain the enhanced image that eliminates traces of red dye.

[0008] In some embodiments, the step of matching a corresponding preprocessing strategy according to the staining type and enhancing the label layer image further includes: When the pathological label is the immunohistochemical staining label, the label layer image is converted into optical density spatial data; The hematoxylin channel component and DAB color developer channel component of the label layer image are calculated using a color deconvolution algorithm; The DAB developer channel component is removed, the hematoxylin channel component is retained, and the label layer image is subjected to Laplacian edge sharpening to obtain the enhanced image with background separation.

[0009] In some embodiments, the step of matching a corresponding preprocessing strategy according to the staining type and enhancing the label layer image further includes: When the pathological label is the dark field label, perform a pixel-level inversion operation on the label layer image to obtain a flipped image; Perform a contrast adaptive equalization operation on the flipped image to stretch the local contrast of the flipped image, thereby obtaining the enhanced image with enhanced contrast.

[0010] In some embodiments, after inputting the enhanced image into a preset text recognition model to obtain the text information of the pathology label, the method further includes: Semantic analysis is performed on the discrete text information, and a specific text box is locked as a spatial anchor point by a preset regular expression. The specific text box is the text information containing year features or the text information containing a specific pathological prefix. Establish a local coordinate system centered on the spatial anchor point, and calculate the geometric positional relationship of the remaining text boxes in the text information relative to the spatial anchor point; Based on the geometric positional relationship and the preset pathology label topology rules, a standard pathology number is generated.

[0011] In some embodiments, after generating the standard pathology number, the method further includes: When the confidence level of the text recognition model is lower than the preset confidence level threshold, or when the standard pathology number does not conform to the preset pathology numbering rules, the pathology label corresponding to the standard pathology number is marked as pending review.

[0012] Secondly, embodiments of this application provide a pathology label adaptive enhancement recognition device for implementing the pathology label adaptive enhancement recognition method of the first aspect, comprising: The acquisition module is used to acquire macroscopic tissue images and label layer images of pathological labels, wherein the macroscopic tissue images are used to characterize the overall morphology of the pathological labels, and the label layer images are used to mark the category of each pixel in the pathological labels. The differentiation module is used to determine the staining type of the pathological label based on the optical characteristics of the macroscopic tissue image; An enhancement module is used to match a corresponding preprocessing strategy according to the staining type to enhance the label layer image and obtain an enhanced image. The preprocessing strategy includes at least a red noise suppression strategy for HE staining labels, a background separation strategy for immunohistochemical staining labels, and a contrast enhancement strategy for dark field labels. The recognition module is used to input the enhanced image into a preset text recognition model to obtain the text information of the pathology label.

[0013] Thirdly, embodiments of this application provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the pathological label adaptive enhancement recognition method of the first aspect.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the pathological label adaptive enhancement recognition method of the first aspect.

[0015] The adaptive enhancement recognition method, apparatus, and storage medium for pathological labels in this application have at least the following beneficial effects: By acquiring macroscopic tissue images and label layer images of pathological labels, the staining type of the pathological label is determined based on the optical characteristics of the macroscopic tissue images; according to the staining type, a corresponding preprocessing strategy is matched to enhance the label layer image, resulting in an enhanced image; the enhanced image is then input into a preset text recognition model to obtain the text information of the pathological label. Through the enhancement processing of the pathological label, the processed image conforms to the input distribution of a general model, and the noise problems unique to pathological labels, such as staining splashes, water stains, and uneven lighting, are solved from an optical principle perspective. Clear text images are obtained from standard slides and inferior manually stained slides, improving the data compatibility and recognition accuracy of pathological labels.

[0016] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description

[0017] Figure 1 This is a flowchart of a pathological label adaptive enhancement recognition method according to an embodiment of the present invention; Figure 2 for Figure 1 Flowchart of step S1000; Figure 3 for Figure 1 Flowchart of step S2000; Figure 4 for Figure 1 The flowchart of step S3000 when the pathology label is an HE staining label; Figure 5 for Figure 1 The flowchart of step S3000 when the pathological label is an immunohistochemical staining label; Figure 6 for Figure 1 The flowchart of step S3000 when the pathology label is a dark field label; Figure 7 for Figure 1 Flowchart of step S4000; Figure 8 This is a rendering of an adaptive enhancement recognition method for pathological labels according to an embodiment of the present invention; Figure 9 This is a structural diagram of a pathological label adaptive enhancement recognition device according to an embodiment of the present invention; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various implementations. Simultaneously, the steps or actions described in the method description can be rearranged or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various orders in the specification and drawings are merely for the clear description of a particular embodiment and do not imply a mandatory order, unless otherwise stated that a particular order must be followed.

[0019] In the description of this application, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0020] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).

[0021] This invention relates to an adaptive enhanced identification method, device, and storage medium for pathological labels. The pathological label refers to a physical label affixed to a pathological specimen during processing, containing a unique pathological number and other information to ensure accurate correspondence between the specimen and the report, preventing confusion. Specifically, medical image labeling is a technique for marking or annotating key areas such as diseases and lesions in medical images. Through image labels, doctors and researchers can more intuitively identify the location, size, and morphology of different structures, lesions, or lesions in images. Medical image labeling is mainly used in medical diagnosis, medical research, and medical education. In medical diagnosis, doctors can use the information in image labels to help identify lesions such as tumors, inflammation, and injuries, accurately assess the condition, and formulate treatment plans. In medical research, labeling technology can help researchers gain a more comprehensive understanding of the mechanisms and processes of diseases, providing more effective solutions for disease prevention and treatment.

[0022] In the digital transformation of pathology, the automatic archiving of whole-slide images relies on the accurate identification of slide labels. However, unlike ordinary document OCR applications, pathology slide labels face unique physical and chemical interferences specific to the industry, including staining contamination, developer interference, and extreme lighting differences. Staining contamination, specifically HE staining, occurs when red eosin easily splashes or penetrates the label paper during routine HE staining, forming reddish hazy noise or patches that OCR models may misinterpret as strokes. Secondly, developer interference, such as IHC staining, occurs when immunohistochemical slides are typically developed with diaminobenzidine (DAB), often leaving yellowish-brown oxidation marks or water stains on the label edges, blurring text edges and making segmentation and accurate identification difficult. Finally, extreme lighting differences, such as fluorescence staining, occur when immunofluorescence slides are typically photographed in dark fields, resulting in a black background with high reflectivity in the label area. Conventional OCR models cannot handle such images with black backgrounds, white text, and extremely low contrast.

[0023] In existing technologies, general OCR models or simple binarization methods are usually used to recognize text on pathology labels. These methods lack the ability to perceive the different staining types in the slide labels. In the recognition process, a uniform preprocessing method is usually used, which cannot adapt to the different interference problems mentioned above according to the actual situation. As a result, the recognition rate of pathology labels drops sharply in scenarios such as primary hospitals where slide preparation is not standardized.

[0024] Based on the above, embodiments of the present invention provide an adaptive enhancement recognition method, apparatus, and storage medium for pathological labels. The method involves acquiring macroscopic tissue images and label layer images of pathological labels, determining the staining type of the pathological label based on the optical characteristics of the macroscopic tissue images, and then matching a corresponding preprocessing strategy to enhance the label layer image according to the staining type. This results in an enhanced image, which is then input into a preset text recognition model to obtain the text information of the pathological label. By enhancing the pathological label, the processed image conforms to the input distribution of a general model, and the method addresses noise problems unique to pathological labels, such as staining splashes, water stains, and uneven lighting, from an optical principle perspective. It obtains clear text images from standard slides and inferior manually stained slides, improving the data compatibility and recognition accuracy of pathological labels.

[0025] Please see Figure 1 , Figure 1 The flowchart of an adaptive enhancement recognition method for pathological labels provided by an embodiment of the present invention is shown. Figure 1 As shown, the adaptive enhancement recognition method for pathological labels in this embodiment of the invention includes the following steps: Step S1000: Obtain the macroscopic tissue image and label layer image of the pathology label, wherein the macroscopic tissue image is used to characterize the overall morphology of the pathology label, and the label layer image is used to mark the category of each pixel in the pathology label.

[0026] Understandably, to accurately identify the text information corresponding to the pathology label, it is necessary to obtain macroscopic tissue images and label layer images of the full-scan pathology slide file. Specifically, the text information of the pathology label includes: specimen number, location, staining, slide number, etc., derived from the slide barcode or sticker of the pathology label. In some embodiments, the pathology label also includes pathological diagnosis text, such as a doctor's handwritten diagnosis conclusion, including: benign / malignant / type / grade / invasive, etc.

[0027] Please see Figure 2 , Figure 2 A schematic diagram illustrating the specific implementation process of step S1000 above is shown. For example... Figure 2 As shown, step S1000 includes at least the following steps: Step S1100: Read the full-section image of the pathology label using a scanner.

[0028] Understandably, whole-slice images of pathology labels can be directly read by a scanner. In practical applications, after the scanner takes a full photograph of the pathology label, it needs to determine the location of the document to be identified. Through automatic localization, the Region of Interest (ROI) is determined. In practice, the scanning software automatically circles the area containing all document locations to ensure that the scanner only scans the areas where documents are located, avoiding blank areas and improving scanning efficiency. Next, the scanner performs high-magnification line-by-line scanning; for example, the scanner uses a 20x or 40x objective lens to capture images field-by-field, which are then stitched together to form a large image. Finally, the different resolution levels are combined to generate an image pyramid for subsequent analysis and identification. Specifically, reading whole-slice images of pathology labels using a scanner is existing technology and will not be elaborated upon here.

[0029] Step S1200: Read the full slice image to obtain macroscopic tissue images and label layer images.

[0030] It is understood that a macroscopic tissue image is a large-field image that displays the overall structure, global morphology, and spatial layout of a tissue; a label layer image is a semantically labeled image superimposed on the original image, using different colors or numerical values ​​to mark the category of regions. Macroscopic tissue images and label layer images are often paired for medical artificial intelligence training. Specifically, a macroscopic tissue image presents the entire tissue or slice at low magnification with a large field of view, focusing on the overall structure, boundaries, partitions, and spatial relationships, without pursuing cellular-level details. A label layer image is a single-channel or multi-channel image aligned with the pixels of the original image, where each pixel value represents a category label (such as normal, tumor, stroma, or blood vessel), and regions are distinguished by color. In this embodiment, macroscopic tissue images and label layer images are obtained by reading a whole-slice image to ensure that the macroscopic tissue image accurately represents the overall morphology of the pathological label, while the label layer image completely marks the category of each pixel in the pathological label. Specifically, obtaining macroscopic tissue images and label layer images by reading a whole-slice image is prior art and will not be elaborated here.

[0031] Step S2000: Determine the staining type of the pathological label based on the optical characteristics of the macroscopic tissue image.

[0032] Understandably, as the above steps demonstrate, pathology labels face highly industry-specific physical and chemical interferences, including staining solution contamination, developer interference, and extreme differences in light exposure. Correspondingly, pathology label staining types include HE staining labels, immunohistochemical staining labels, and dark-field labels. To quickly and accurately determine the staining type of pathology labels, it is necessary to analyze the contamination status and type of the labels based on the optical characteristics of the macroscopic tissue image for further enhancement processing.

[0033] Please see Figure 3 , Figure 3 A schematic diagram illustrating the specific implementation process of step S2000 above is shown. For example... Figure 3 As shown, step S2000 includes at least the following steps: Step S2100: Extract the region containing biological tissue samples from the macroscopic tissue image to form a region image.

[0034] Understandably, biological tissue samples are aggregates of cells with specific structures and functions isolated from humans, animals, or plants, such as organ fragments, biopsy tissues, and surgical specimens. After standardized processing, they are used for morphological observation, molecular detection, AI model training, clinical diagnosis, or basic research. Their difference from cell suspensions and body fluid samples lies in the preservation of the tissue's three-dimensional or two-dimensional spatial structure. By detecting regions containing biological tissue samples in macroscopic tissue images, the staining type of pathological labels can be accurately obtained. Specifically, pathological slide staining is the most crucial step in pathological diagnosis, directly determining whether cells can be clearly seen and whether benign or malignant cells can be identified. In HE staining, hematoxylin (H) stains the cell nucleus blue-purple, while eosin (E) stains the cytoplasm and collagen pink; in immunohistochemical staining, DAB staining produces a brownish-yellow color. Therefore, by extracting regions containing biological tissue samples from macroscopic tissue images, the staining status of these regions can be quickly and accurately obtained.

[0035] Step S2200: Perform color statistics on the regional image to determine the staining type of the pathological label.

[0036] Understandably, when a region image exhibits typical purple-blue (nucleus) and pink (cytoplasm) characteristics, the staining type of the pathological label is determined to be HE type. When a region image has a blue background of hematoxylin and yellowish-brown positive characteristics of DAB staining, the staining type of the pathological label is determined to be IHC type. When the average gray level of the background pixels in a region image is extremely low, and the region image exhibits a specific fluorescent color (green / red), the staining type of the pathological label is determined to be dark-field type.

[0037] It should be noted that lightweight convolutional neural networks (CNNs) or color histograms can be used to perform color feature statistics on regional images. Specifically, the MobileNetV2 network architecture is chosen as the base network. This network architecture is lightweight and features few parameters and high speed. By removing the fully connected classification layer and retaining only convolutional and pooling layers for feature extraction, the speed of color statistics for regional images is improved. Specifically, CNNs are used to extract deep features of the image (including color and texture information). Then, statistical analysis is performed on the extracted features, such as generating the mean, standard deviation, and histograms, to quantify the color features.

[0038] In other embodiments, color histograms can also be used to statistically analyze the color features of a region image. Specifically, a color histogram statistically analyzes the distribution of the number of pixels of different colors in an image. For pathological labels, when the pathological label is stained with hematoxylin and eosin (HE), the distribution of blue-purple (nucleus) and pink (cytoplasm) pixels is observed; when the pathological label is stained with IHC (DAB), the distribution of brownish-yellow (positive area) and background color pixels is observed. In practical applications, the horizontal axis of the histogram represents the color value, and the vertical axis represents the number of pixels of the corresponding color. This directly shows the proportion and concentration of a certain type of color, thereby determining whether the staining is too dark or too light.

[0039] Step S2300: Based on the staining type, the pathological labels are divided into HE staining labels, immunohistochemical staining labels, and dark field labels.

[0040] Understandably, after determining the staining type of the pathological label, it is categorized into HE staining labels, immunohistochemical staining labels, and dark-field labels based on the staining type. As described above, when the regional image exhibits typical purple-blue (nucleus) and pink (cytoplasm) characteristics, the staining type of the pathological label is determined to be HE, and the pathological label is classified as an HE staining label. When the regional image has a blue background of hematoxylin and a yellowish-brown positive characteristic of DAB staining, the staining type of the pathological label is determined to be IHC, and the pathological label is classified as an immunohistochemical staining label. When the average gray level of the background pixels in the regional image is extremely low, and the regional image exhibits a specific fluorescent color (green / red), the staining type of the pathological label is determined to be dark-field, and the pathological label is classified as a dark-field label. By classifying pathological labels into HE staining labels, immunohistochemical staining labels, and dark-field labels, adaptive enhancement processing of the label layer image can be performed according to the staining type, improving the data compatibility and recognition accuracy of the pathological labels.

[0041] Step S3000: According to the staining type, match the corresponding preprocessing strategy to enhance the label layer image to obtain an enhanced image. The preprocessing strategy includes at least a red noise suppression strategy for HE staining labels, a background separation strategy for immunohistochemical staining labels, and a contrast enhancement strategy for dark field labels.

[0042] Understandably, due to the different staining types of pathological labels, corresponding preprocessing strategies are needed to enhance the label layer image based on the different staining and interference conditions of the pathological labels. As shown in the above steps, pathological labels are mainly divided into HE staining labels, immunohistochemical staining labels, and dark field labels. Therefore, adaptive enhancement processing is required for different staining types of pathological labels, including: applying a red noise suppression strategy to HE staining labels, a background separation strategy to immunohistochemical staining labels, and a contrast enhancement strategy to dark field labels.

[0043] Please see Figure 4 , Figure 4 This diagram illustrates the specific implementation process of step S3000 above when the pathology label is an HE staining label. Figure 4 As shown, step S3000 includes at least the following steps: Step S3100: When the pathological label is an HE staining label, convert the label layer image into HSV color space information.

[0044] Understandably, when pathological labels are HE-stained labels, meaning the area image of the pathological label has typical purple-blue (nucleus) and pink (cytoplasm) characteristics, it is necessary to convert the label layer image to the Hue-Saturation-Value (HSV) color space. Specifically, HSV is oriented towards the cylindrical or hexagonal pyramidal color model of human visual perception. Compared with the device-dependent RGB space, its parameters are more intuitive and easier to adjust and segment colors. In practical applications, the acquired RGB format pathological label image information is first... Convert to HSV color space information, pixels color tone saturation and brightness The calculation formula is as follows:

[0045]

[0046]

[0047] in, To normalize to size The red, green, and blue component values ​​within the interval.

[0048] Step S3200: Extract the red noise mask based on the preset hue threshold and saturation threshold.

[0049] It is understandable that when the HSV color space information corresponding to the label layer image is obtained, the label layer image is judged pixel by pixel to determine whether it belongs to the red range based on preset hue and saturation thresholds. Specifically, the mask is a black and white image of the same size as the label layer image, preserving white and masking black, and is the core tool for image segmentation. In the embodiments of this application, the hue threshold range for red is first set. pixel Hue value pixel saturation saturation threshold Next, a binarized mask is constructed. The calculation formula is as follows:

[0050] Step S3300: Perform nonlinear stretching on the brightness component of the label layer image based on the mask to obtain an enhanced image that eliminates red dye traces.

[0051] It is understandable that the brightness component of the label layer image is non-linearly stretched based on the mask to eliminate red dye traces and obtain the corresponding enhanced image. In this embodiment, the brightness of only the pixels within the mask area is enhanced, i.e., whitened, to physically erase the dye traces, resulting in a corrected brightness. The calculation is as follows:

[0052] in, For pixels Brightness; To enhance the coefficient, the value range is [0.8, 1.0], to ensure that the text region of the label layer image is not affected. The black areas have lower values; meanwhile, the red background areas are stretched to almost pure white, i.e. Areas with higher values.

[0053] Please see Figure 5 , Figure 5 This diagram illustrates the specific implementation process of step S3000 above when the pathological label is an immunohistochemical staining label. For example... Figure 5 As shown, step S3000 further includes at least the following steps: Step S3400: When the pathological label is an immunohistochemical staining label, convert the label layer image into optical density spatial data.

[0054] Understandably, when pathological labels are immunohistochemical staining labels, meaning they have a blue background of hematoxylin and a yellowish-brown positive characteristic of DAB development, it is necessary to convert the label layer image into optical density spatial data. Specifically, to address the yellowish-brown background caused by DAB chromogenic agent, a color deconvolution algorithm is used to separate Hematoxylin (blue channel), DAB (brown channel), and Residual (residual channel). Then, the DAB channel is discarded, i.e., the yellowish-brown background is removed, retaining only the blue channel or grayscale image, and the Laplacian operator is applied for edge sharpening to resolve the blurring of text caused by water stains. For the yellowish-brown background interference caused by DAB chromogenic agent in IHC sections, this application embodiment uses a color deconvolution algorithm based on the Beer-Lambert theorem.

[0055] Specifically, the label layer image is first transformed using optical density (OD) conversion. This converts the luminance intensity of the RGB image of the pathology label into optical density space to eliminate the effects of illumination nonlinearity. The optical density space data... The calculation formula is as follows:

[0056] in, , For pixel intensity, This represents the incident light intensity, typically set to 255.

[0057] Step S3500: Calculate the hematoxylin channel component and DAB chromogenic agent channel component of the label layer image using the color deconvolution algorithm.

[0058] Understandably, after acquiring the optical density spatial data, a staining component separation matrix operation is performed to calculate the hematoxylin channel component and the DAB chromogenic agent channel component of the label layer image. Specifically, a color deconvolution matrix is ​​constructed. This matrix consists of hematoxylin channel components. DAB chromogenic agent channel components and residual components The normalized vector OD is composed of [variable name]. Hematoxylin is primarily used as a biological staining agent, applied in histology to achieve permanent staining of cell nuclei and chromatin, and forms an HE staining system in combination with eosin. Specifically, the staining concentration vector of each pixel in the label layer image [is described]. Obtained through the following matrix operations:

[0059] Specifically, it can be expanded as follows:

[0060] Step S3600: Remove the DAB developer channel component, retain the hematoxylin channel component, and perform Laplacian edge sharpening on the label layer image to obtain an enhanced image with background separation.

[0061] It is understandable that after obtaining the hematoxylin channel components and DAB chromogenic agent channel components of the label layer image, extraction is performed... The component corresponding to the blue / black text information is discarded directly from the DAB developer channel component. This corresponds to a yellowish-brown background, thus achieving background stripping.

[0062] Next, the hematoxylin channel components are preserved for edge sharpening enhancement. Specifically, the separated hematoxylin channel components... The grayscale image is sharpened using the Laplacian operator to enhance the blurred water stain edges of the text, resulting in an enhanced image with background separation. The calculation process is shown in the following formula:

[0063] in, For the label layer image, To enhance the image, The discrete Laplace operator template is defined by the preset coefficients as follows:

[0064] Please see Figure 6 , Figure 6 This diagram illustrates the specific implementation process of step S3000 above when the pathology label is a dark field label. Figure 6 As shown, step S3000 further includes at least the following steps: Step S3700: When the pathology label is a dark field label, perform a pixel-level inversion operation on the label layer image to obtain a flipped image.

[0065] Understandably, when pathology labels are dark-field labels, meaning the average grayscale of the background pixels is extremely low, pixel-level inversion of the label layer image is necessary to improve brightness. Specifically, for dark-field pathology labels, a pixel-level bitwise NOT operation is first performed. For example, black text on a white background in the pathology label is converted to white text on a black background, familiar to OCR models, making the originally blurry text in the dark clearly visible. In practical applications, for pathology labels with a black background, bright text, and extremely low contrast, a pixel-level bit-inversion operation is performed to improve the brightness of the dark-field image. Convert to a flipped image suitable for OCR model recognition The calculation process is shown in the following formula:

[0066] in, For pixels Dark-field images, For pixels A flipped image.

[0067] Step S3800: Perform contrast adaptive equalization on the flipped image to stretch the local contrast of the flipped image and obtain an enhanced image with enhanced contrast.

[0068] It is understandable that this is achieved by limiting Contrast Adaptive Histogram Equalization (CLAHE). CLAHE is a core algorithm in digital image processing used to enhance image contrast, particularly well-suited for addressing problems such as uneven lighting and blurred details. CLAHE is a localized, controllable contrast enhancement algorithm that balances detail and noise reduction, making it especially suitable for processing images with uneven lighting, such as red objects under backlight or red text in low light. Specifically, the image is divided into... For each sub-block, the cumulative distribution function (CDF) is calculated as shown in the following formula:

[0069] in, The CDF value of the nth sub-block. For the first grayscale, grayscale The number of pixels that appear.

[0070] In some embodiments, the histogram of the flipped image is also cropped, i.e., a contrast limit threshold (ClipLimit) is set, and images exceeding the contrast limit threshold are clipped. The frequency of the pixel is evenly distributed across other gray levels, and the pixel values ​​are remapped to avoid excessive amplification of background noise in the contrast-enhanced image. Specifically, for extracting red objects in backlight or low light, a Clip Limit value of 2.0 is the optimal default value, achieving a balance between detail and noise reduction. In practical applications, by stretching and flipping the local contrast of the image, excessive enhancement of contrast within a single sub-block is prevented, thus avoiding unlimited amplification of noise, such as red noise in dark areas and interference from background noise, resulting in a contrast-enhanced image.

[0071] Step S4000: Input the enhanced image into the preset text recognition model to obtain the text information of the pathology label.

[0072] Understandably, the enhanced image, processed through step S3000, is input into a preset text recognition model. In practical applications, OCR models, such as CRNN or DBNet, are used to extract text and obtain the text information of the pathology label. OCR refers to computer vision technology that uses electronic devices to detect characters in paper documents and converts the text into editable text using image processing and pattern recognition techniques. Its process includes core modules such as image preprocessing, text detection, and character recognition.

[0073] Please see Figure 7 , Figure 7 A schematic diagram illustrating the specific implementation process of step S4000 above is shown. For example... Figure 7 As shown, step S4000 includes at least the following steps: Step S4100: Perform semantic analysis on discrete text information, and lock specific text boxes as spatial anchors using preset regular expressions. The specific text boxes are text information containing year features or text information containing specific pathological prefixes.

[0074] Understandably, semantic analysis can transform the text information recognized by the OCR model in the above steps into valuable structured information. For example, it can extract names, types, dates, etc., from OCR-recognized tag text, and parse key instructions from documents with red annotations. By performing semantic analysis on discrete text information and using pre-defined regular expressions to lock specific text boxes as spatial anchors, the text recognized by OCR is associated with its spatial anchors in the image. Then, semantic analysis extracts structured information, effectively avoiding the limitation of OCR models that only recognize text but not its location, thus improving the completeness of the text information.

[0075] Step S4200: Establish a local coordinate system centered on the spatial anchor point, and calculate the geometric positional relationship of the remaining text boxes in the text information relative to the spatial anchor point.

[0076] It is understandable that a local coordinate system is established with the center point of the spatial anchor point as the origin, and relative offsets are used to... Determine the positional relationship of the text boxes. Specifically, position determination uses an adaptive threshold, such as 10% of the anchor point size, to accommodate red-marked areas of different sizes. Finally, visual verification is a crucial step, visually confirming the accuracy of the positional relationship and resolving issues of mismatched text and position. In practical applications, geometric positional relationships include at least relative azimuth and Euclidean distance.

[0077] Step S4300: Generate standard pathology numbers based on geometric positional relationships and preset pathology label topology rules.

[0078] Understandably, pathology label topology rules are used to describe the geometric relationship of all text boxes relative to anchor points and the layout relationship between text boxes. Spatial anchor points are keyword positions, such as "total," "amount," or "name." Then, the text boxes directly below or to the right are selected, and semantic regular expressions are used, such as "date," "amount," or "number," to output structured fields corresponding to the keywords. Specifically, the geometric positional relationships obtained through the above steps are used to obtain a spatial logical order according to preset pathology label topology rules, concatenating discrete text information to generate a unique standard pathology number.

[0079] Step S4400: When the confidence level of the text recognition model is lower than the preset confidence level threshold, or the standard pathology number does not conform to the preset pathology numbering rules, mark the pathology label corresponding to the standard pathology number as pending review.

[0080] Understandably, the confidence level of a text recognition model represents the probability that the model correctly predicts the current character. When the confidence level of the text recognition model is lower than a preset confidence threshold, for example, a confidence threshold of 85%, the accuracy of judging the standard pathology number is low, requiring manual review. Similarly, if the standard pathology number does not conform to the preset pathology numbering rules—for example, if the pathology numbering rule is a combination of letters and numbers, but the standard pathology number is a combination of only numbers or only letters—then the standard pathology number is considered abnormal and also requires manual review.

[0081] It should be noted that after obtaining key text information such as the standard pathology number, the identification results are also logically verified in conjunction with the staining type. For example, if the pathology label is an immunohistochemical staining label, but the text information of the pathology label contains the words "HE", a confidence warning is triggered, and the user is reminded to perform manual verification.

[0082] Please see Figure 8 , Figure 8 The diagram illustrates the effect of an adaptive enhancement recognition method for pathological labels according to an embodiment of this application. Figure 8As shown, compared to existing technologies, the adaptive enhancement recognition method for pathological labels in this application can clearly and accurately identify pathological labels affected by HE staining and dark-field interference. Therefore, the recognition method of this application has the advantage of strong anti-interference capability, solving the noise problems unique to pathology, such as staining splashes, water stains, and uneven lighting, from an optical principle perspective—something that general OCR technology cannot achieve. Secondly, the recognition method of this application also has the advantage of good compatibility; whether it is a standard slide or a poorly stained slide, clear text images can be obtained through adaptive enhancement. Finally, this application embodiment does not require retraining the OCR. Through front-end enhancement processing, the enhanced image conforms to the input distribution of a general OCR model, eliminating the need to spend a lot of cost collecting dirty data to fine-tune the recognition model, thus reducing the training time and usage cost of the OCR model.

[0083] like Figure 9 As shown, Figure 9 This is a schematic diagram of the structure of the pathology label adaptive enhancement recognition device 500 provided in the embodiments of this application. The entire process of the pathology label adaptive enhancement recognition method provided in the embodiments of this application involves the following modules in the pathology label adaptive enhancement recognition device 500: acquisition module 510, differentiation module 520, enhancement module 530 and recognition module 540.

[0084] The acquisition module 510 is used to acquire macroscopic tissue images and label layer images of pathological labels. The macroscopic tissue images are used to characterize the overall morphology of the pathological labels, and the label layer images are used to mark the category of each pixel in the pathological labels. The differentiation module 520 is used to determine the staining type of pathological labels based on the optical characteristics of macroscopic tissue images; The enhancement module 530 is used to match the corresponding preprocessing strategy according to the staining type to enhance the label layer image and obtain an enhanced image. The preprocessing strategy includes at least a red noise suppression strategy for HE staining labels, a background separation strategy for immunohistochemical staining labels, and a contrast enhancement strategy for dark field labels. The recognition module 540 is used to input the enhanced image into a preset text recognition model to obtain the text information of the pathology label.

[0085] It should be noted that the information interaction and execution process between the modules of the above-mentioned device are based on the same concept as the method embodiment of this application. For details on their specific functions and technical effects, please refer to the method embodiment section, and they will not be repeated here.

[0086] like Figure 10 As shown, Figure 10 This is a schematic diagram of a controller 600 provided in one embodiment of this application.

[0087] The controller 600 in this embodiment includes one or more processors 610 and a memory 620. Figure 10 The example uses a processor 610 and a memory 620.

[0088] The processor 610 and the memory 620 can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.

[0089] Memory 620, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 620 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 620 may optionally include memory 620 remotely located relative to processor 610, and these remote memories can be connected to controller 600 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0090] Those skilled in the art will understand that Figure 10 The device structure shown does not constitute a limitation on the controller 600 and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0091] This application embodiment also provides a storage medium storing computer-executable instructions for executing the above-described adaptive enhancement recognition method for pathological labels.

[0092] In one embodiment, the storage medium stores computer-executable instructions that are executed by one or more processors 610, such as one of the processors 610 in the controller 600, to enable the one or more processors 610 to perform the pathological label adaptive enhancement recognition method provided in any embodiment of this application.

[0093] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network nodes. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0094] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0095] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0096] In the several embodiments provided in this application, it should be understood that the disclosed systems, instruments, and methods can be implemented in other ways. For example, the instrument embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between instruments or units may be electrical, mechanical, or other forms. Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0097] It should also be understood that the various implementation methods provided in this application can be combined arbitrarily to achieve different technical effects.

[0098] The above is a detailed description of the preferred embodiments of this application. However, this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A method for adaptive enhancement recognition of pathological labels, characterized in that, The method includes the following steps: Obtain a macroscopic tissue image and a label layer image of a pathological label, wherein the macroscopic tissue image is used to characterize the overall morphology of the pathological label, and the label layer image is used to mark the category of each pixel in the pathological label; The staining type of the pathological label is determined based on the optical characteristics of the macroscopic tissue image; According to the staining type, a corresponding preprocessing strategy is matched to enhance the label layer image to obtain an enhanced image. The preprocessing strategy includes at least a red noise suppression strategy for HE staining labels, a background separation strategy for immunohistochemical staining labels, and a contrast enhancement strategy for dark field labels. The enhanced image is input into a preset text recognition model to obtain the text information of the pathology label.

2. The adaptive enhancement recognition method for pathological labels according to claim 1, characterized in that, The acquisition of macroscopic tissue images and label layer images of pathological labels includes: The whole-section image of the pathology label is read by a scanner; Read the full slice image to obtain the macroscopic tissue image and the label layer image.

3. The adaptive enhancement recognition method for pathological labels according to claim 1, characterized in that, Determining the staining type of the pathological label based on the optical characteristics of the macroscopic tissue image includes: Extract the regions containing biological tissue samples from the macroscopic tissue image to form a region image; Color statistics are performed on the image of the region to determine the staining type of the pathological label; Based on the staining type, the pathological labels are classified into HE staining labels, immunohistochemical staining labels, and dark field labels.

4. The adaptive enhancement recognition method for pathological labels according to claim 3, characterized in that, The step of matching the corresponding preprocessing strategy according to the staining type and enhancing the label layer image includes: When the pathological label is the HE staining label, the label layer image is converted into HSV color space information; Extract the red noise mask based on preset hue and saturation thresholds; The luminance component of the label layer image is nonlinearly stretched based on the mask to obtain the enhanced image that eliminates traces of red dye.

5. The adaptive enhancement recognition method for pathological labels according to claim 3, characterized in that, The step of matching the corresponding preprocessing strategy according to the staining type and enhancing the label layer image further includes: When the pathological label is the immunohistochemical staining label, the label layer image is converted into optical density spatial data; The hematoxylin channel component and DAB color developer channel component of the label layer image are calculated using a color deconvolution algorithm; The DAB developer channel component is removed, the hematoxylin channel component is retained, and the label layer image is subjected to Laplacian edge sharpening to obtain the enhanced image with background separation.

6. The adaptive enhancement recognition method for pathological labels according to claim 3, characterized in that, The step of matching the corresponding preprocessing strategy according to the staining type and enhancing the label layer image further includes: When the pathological label is the dark field label, perform a pixel-level inversion operation on the label layer image to obtain a flipped image; Perform a contrast adaptive equalization operation on the flipped image to stretch the local contrast of the flipped image, thereby obtaining the enhanced image with enhanced contrast.

7. The adaptive enhancement recognition method for pathological labels according to claim 1, characterized in that, After inputting the enhanced image into a preset text recognition model to obtain the text information of the pathology label, the method further includes: Semantic analysis is performed on the discrete text information, and a specific text box is locked as a spatial anchor point by a preset regular expression. The specific text box is the text information containing year features or the text information containing a specific pathological prefix. Establish a local coordinate system centered on the spatial anchor point, and calculate the geometric positional relationship of the remaining text boxes in the text information relative to the spatial anchor point; Based on the geometric positional relationship and the preset pathology label topology rules, a standard pathology number is generated.

8. The adaptive enhancement recognition method for pathological labels according to claim 7, characterized in that, After generating the standard pathology number, the process also includes: When the confidence level of the text recognition model is lower than the preset confidence level threshold, or when the standard pathology number does not conform to the preset pathology numbering rules, the pathology label corresponding to the standard pathology number is marked as pending review.

9. A pathological label adaptive enhancement recognition device, used to implement the pathological label adaptive enhancement recognition method according to any one of claims 1 to 8, characterized in that, include: The acquisition module is used to acquire macroscopic tissue images and label layer images of pathological labels, wherein the macroscopic tissue images are used to characterize the overall morphology of the pathological labels, and the label layer images are used to mark the category of each pixel in the pathological labels. The differentiation module is used to determine the staining type of the pathological label based on the optical characteristics of the macroscopic tissue image; An enhancement module is used to match a corresponding preprocessing strategy according to the staining type to enhance the label layer image and obtain an enhanced image. The preprocessing strategy includes at least a red noise suppression strategy for HE staining labels, a background separation strategy for immunohistochemical staining labels, and a contrast enhancement strategy for dark field labels. The recognition module is used to input the enhanced image into a preset text recognition model to obtain the text information of the pathology label.

10. A computer-readable storage medium, characterized in that, The system contains a computer program that, when executed by a processor, implements the adaptive enhancement recognition method for pathological labels as described in any one of claims 1 to 8.