Pathological image processing method and system
By performing color space decoupling and adversarial network correction on pathological images and combining them with a multi-task deep learning network, the problem of inconsistent color distribution in pathological images is solved, and the robustness of computer-aided diagnosis and the accuracy of cell segmentation are improved.
Patent Information
- Application Number
- CN202510485029.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-09-05
AI Technical Summary
In existing pathology image processing methods, the inconsistent color distribution of pathology images leads to poor robustness and low prediction performance of computer-aided diagnosis systems.
By decoupling the color space of the original pathological image, separating the optical absorption characteristics of the dye, and using an adversarial network to correct the color distribution, standardized red, green and blue primary color images are generated, and cell segmentation is performed in combination with a multi-task deep learning network, including a multi-branch convolutional structure and a cross-channel attention mechanism.
It effectively avoids image structural deformation, maintains image structural information, and improves the accuracy of cell segmentation and the robustness of the prediction system.
Smart Images

Figure CN120598844A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical pathology image processing, and particularly relates to a pathology image processing method and system. Background Art
[0002] Currently, the pathological diagnosis of renal cancer relies primarily on hematoxylin and eosin (H&E) and immunohistochemistry (IHC) staining, which observes cell morphology and the expression of specific biomarkers (such as CD10 and CA IX). With the rapid development of digital pathology, intelligent analysis of whole-slice scan images (WSI) has become a key technology in cancer diagnosis.
[0003] However, existing pathology image processing methods still face several technical bottlenecks. The imaging process of pathology images is affected by a variety of factors, resulting in varying image colors, known as inconsistent color distribution. Computer-aided diagnosis systems rely heavily on the quality of the original image data, and inconsistent color distribution can lead to poor robustness and low prediction performance. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides a pathology image processing method and system for solving the technical problems in the prior art.
[0005] In a first aspect, the invention provides the following technical solution: a pathology image processing method, the method comprising:
[0006] Performing color space decoupling on the original pathological image to separate multiple staining components corresponding to the optical absorption characteristics of the stain, and then spatially aligning and channel-superimposing the staining components to generate a multi-channel structure map containing cell structural features;
[0007] Inputting the multi-channel structure image into the adversarial network to perform color distribution correction to obtain a standardized red, green and blue primary color image;
[0008] morphologically optimizing the standardized red, green, and blue primary color image using an optimization process to obtain a mask, and performing a Euclidean distance transform on the mask to generate a distance map;
[0009] Perform channel stitching on the mask, the distance map, and the standardized red, green, and blue primary color image, and input them into a multi-task deep learning network to output a probability heat map of the cell centroid and a boundary probability map;
[0010] Cell segmentation is achieved based on the probability heat map and the boundary probability map using a segmentation process.
[0011] Compared to the prior art, the present invention has the following advantages: by inputting the multi-channel structure graph into an adversarial network for color distribution correction, a standardized red, green, and blue primary color image is obtained. The adversarial network uses self-supervision to fit the color distribution of the target dataset, outputs a color transfer matrix, and then performs a linear weighted combination with the structure graph to complete image reconstruction, essentially recoloring the image. This fully utilizes the original image's biometric information structure for color standardization, retaining and maintaining image structural information to the greatest extent possible, effectively avoiding the problem of structural deformation of the image, and thus preventing the inconsistency of color distribution from leading to poor robustness of the prediction system and low prediction performance.
[0012] Furthermore, the multi-task deep learning network includes a global semantic enhancement module, which includes: a multi-branch convolutional structure and a cross-channel attention mechanism;
[0013] The multi-branch convolution structure includes:
[0014] First branch: 1×1 convolutional layer extracts local detail features;
[0015] Second branch: 3×3 dilated convolutional layer with dilation rate 3 to capture mid-scale context;
[0016] The third branch: a 5×5 dilated convolutional layer with a dilation rate of 5 extracts global semantic features;
[0017] Fourth branch: global average pooling layer generates channel attention weights;
[0018] The cross-channel attention mechanism performs channel splicing on the multi-branch output features, generates a channel attention vector through a learnable weight matrix, and performs weighted fusion on the features according to the channel dimension.
[0019] Furthermore, the expression of weighted fusion is:
[0020] F out =σ(W c [F1, F2, F3, F4])⊙(F1+F2+F3)
[0021] F out It represents the feature map after fusing multi-scale information and enhancing key channels. F1, F2, F3, and F4 are the output features of the first branch, the second branch, the third branch, and the fourth branch. W c is a learnable parameter and σ is the Sigmoid function.
[0022] Furthermore, the step of inputting the multi-channel structure graph into the adversarial network for color distribution correction includes:
[0023] Inputting the multi-channel structure graph into the adversarial network and generating a color transfer matrix through a generator;
[0024] Performing linear weighted fusion of the color transfer matrix and the multi-channel structure map to generate a preliminary red, green and blue primary color image;
[0025] Performing local block discrimination on the preliminary red, green and blue primary color image and the target domain image through a discriminator to generate a probability map;
[0026] The generator and the discriminator parameters are iteratively optimized based on the probability map and the composite loss function, and a standardized red, green and blue primary color image is output.
[0027] Furthermore, the composite loss function includes:
[0028]
[0029] Among them, L total Expressed as a composite loss function, α(t) represents the dynamically attenuated adversarial loss weight coefficient, L adv represents the adversarial loss term, using the cross entropy form of the standard GAN, D represents the discriminator, G(I) represents the normalized image output by the generator, β represents the fixed weight coefficient of the perceptual loss, and L perc represents the perceptual loss term, φ represents the feature extraction operation, γ represents the fixed weight coefficient of color consistency loss, L color represents the color space alignment loss to calculate the mean square error of the a and b channels in the Lab color space, η represents the fixed weight coefficient of the gradient difference loss, L grad represents the image gradient consistency loss, I represents the original multi-channel structure diagram of the input generator, and I target represents the standard stained pathological image of the target domain, represents the mathematical expectation operator, and Discrete differential operators represent the gradients of the image in the horizontal and vertical directions respectively.
[0030] Furthermore, the optimization process includes:
[0031] Performing H&E staining separation on the standardized red, green, and blue primary color image, extracting the hematoxylin staining channel and performing adaptive threshold segmentation to generate an initial binary mask;
[0032] Performing a closing operation, an opening operation, and connected domain filtering on the initial binary mask in sequence to obtain an optimized binary mask;
[0033] Performing Euclidean distance transformation on the optimized binary mask to generate a distance map.
[0034] Furthermore, the steps of the segmentation process include:
[0035] Performing non-maximum suppression on the probability heat map, and screening peak points with probability values greater than a first threshold as initial cell center markers;
[0036] Linearly fusing the boundary probability map and the distance map according to a preset weight ratio to generate a mixed gradient map;
[0037] Segmentation is performed based on the initial cell center marker and the mixed gradient map, and a cell instance segmentation label is output.
[0038] In a second aspect, the invention provides the following technical solution: a pathology image processing system, the system comprising:
[0039] A generation module is used to perform color space decoupling on the original pathological image, separate multiple staining components corresponding to the optical absorption characteristics of the stain, and spatially align and channel-superimpose the staining components to generate a multi-channel structure map containing cell structure features;
[0040] A correction module, configured to input the multi-channel structure image into an adversarial network to perform color distribution correction to obtain a standardized red, green, and blue primary color image;
[0041] an optimization module, configured to perform morphological optimization on the standardized red, green, and blue primary color image using an optimization process to obtain a mask, and perform Euclidean distance transformation on the mask to generate a distance map;
[0042] An output module is used to perform channel splicing on the mask, the distance map, and the standardized red, green, and blue primary color image, and input them into a multi-task deep learning network to output a probability heat map of the cell centroid and a boundary probability map;
[0043] A segmentation module is used to implement cell segmentation based on the probability heat map and the boundary probability map using a segmentation process.
[0044] In a third aspect, the invention provides the following technical solution: a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the pathological image processing method as described above when executing the computer program.
[0045] In a fourth aspect, the invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program implements the pathological image processing method as described above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 A flowchart of a pathological image processing method provided by the first embodiment of the present invention;
[0048] Figure 2 A structural block diagram of a pathological image processing system provided by a second embodiment of the present invention;
[0049] Figure 3 A schematic diagram of the hardware structure of a computer provided in the third embodiment of the present invention.
[0050] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION
[0051] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the embodiments of the present invention, and should not be construed as limiting the present invention.
[0052] In the description of the embodiments of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention.
[0053] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0054] Example 1
[0055] In the first embodiment of the present invention, see Figure 1A pathological image processing method includes the following steps S01 to S07:
[0056] S01, performing color space decoupling on the original pathological image to separate multiple staining components corresponding to the optical absorption characteristics of the stain, and spatially aligning and channel-superimposing the staining components to generate a multi-channel structure map containing cell structure features;
[0057] In this embodiment, the original pathological image is converted from the RGB color space to the Lab color space, and color deconvolution is performed on the original pathological image based on the H&E staining matrix to separate the hematoxylin (H) staining component and the eosin (E) staining component; and multiple structure images (multi-channel structure images) are generated by combining the H staining component and the E staining component, including an H channel image, an E channel image, an H×H interaction image, an E×E interaction image, and an H×E interaction image.
[0058] S02, inputting the multi-channel structure image into an adversarial network to perform color distribution correction to obtain a standardized red, green and blue primary color image;
[0059] Specifically, the step of inputting the multi-channel structure graph into the adversarial network for color distribution correction includes:
[0060] S21, inputting the multi-channel structure graph into the adversarial network, and generating a color transfer matrix through a generator;
[0061] S22, performing linear weighted fusion of the color transfer matrix and the multi-channel structure map to generate a preliminary red, green and blue primary color image;
[0062] S23, performing local block discrimination on the preliminary red, green and blue primary color image and the target domain image through a discriminator to generate a probability map;
[0063] S24, iteratively optimizing the parameters of the generator and the discriminator based on the probability map and the composite loss function, and outputting a standardized red, green, and blue primary color image.
[0064] More specifically, the composite loss function includes:
[0065]
[0066] Among them, L total Expressed as a composite loss function, α(t) represents the dynamically attenuated adversarial loss weight coefficient, L adv represents the adversarial loss term, using the cross entropy form of the standard GAN, D represents the discriminator, G(I) represents the normalized image output by the generator, β represents the fixed weight coefficient of the perceptual loss, and L perc represents the perceptual loss term, φ represents the feature extraction operation, γ represents the fixed weight coefficient of color consistency loss, Lcolor represents the color space alignment loss to calculate the mean square error of the a and b channels in the Lab color space, η represents the fixed weight coefficient of the gradient difference loss, L grad represents the image gradient consistency loss, I represents the original multi-channel structure diagram of the input generator, and I target represents the standard stained pathological image of the target domain, represents the mathematical expectation operator, and Discrete differential operators represent the gradients of the image in the horizontal and vertical directions respectively.
[0067] In this embodiment, the brightness channel (L channel) of the Lab color space is input into the generator, and a color transfer matrix is output;
[0068] Performing linear weighted fusion of the color transfer matrix and the multiple structure images to generate a preliminary RGB image;
[0069] Performing local block discrimination on the preliminary RGB image and the target domain image by a discriminator to generate a probability map;
[0070] The adversarial loss is calculated based on the probability map, and combined with the L1 reconstruction loss and the structural similarity (SSIM) loss, the generator and discriminator parameters are optimized by backpropagation to iteratively generate the final standardized RGB image.
[0071] In this embodiment, the adversarial network design;
[0072] Generator: uses the improved ResNet18 network as the backbone, is responsible for learning the color distribution characteristics of the target dataset, and outputs the Color Transformation Matrix (CTM).
[0073] Discriminator: Based on the PatchGAN structure, it discriminates the authenticity of the input image (original pathological image and reconstructed image) through the local receptive field and outputs a block-by-block probability map.
[0074] Color space conversion: The input pathology image is converted from RGB color space to Lab color space, and only the L channel (brightness component) is extracted as the input data of the generator.
[0075] Staining separation and structural image generation: Based on the color deconvolution algorithm, the H channel (hematoxylin staining component) and E channel (eosin staining component) of the H&E stained pathology image are separated;
[0076] Five structural maps were generated by interactive combination of channels (H×H, E×E, H×E and other operations) to characterize the morphological distribution of the nucleus, cytoplasm and interstitium.
[0077] Linear weighted fusion: The color transfer matrix (CTM) output by the generator is weightedly combined with the five structure maps obtained by color separation.
[0078] L1 reconstruction loss: constrains the pixel-level consistency between the reconstructed image and the original image;
[0079] SSIM structural similarity loss: maintains the similarity of local structure and texture of the image;
[0080] GAN adversarial loss: The probability map output by the discriminator forces the generator to fit the real data distribution.
[0081] Self-supervised training mechanism: Jointly optimize the generator and discriminator parameters in an unsupervised manner without relying on paired labeled data.
[0082] S03, performing morphological optimization on the standardized red, green, and blue primary color image using an optimization process to obtain a mask, performing Euclidean distance transformation on the mask to generate a distance map;
[0083] Specifically, the optimization process includes:
[0084] S31, performing H&E staining separation on the standardized red, green and blue primary color image, extracting the hematoxylin staining channel and performing adaptive threshold segmentation to generate an initial binary mask;
[0085] S32, performing a closing operation, an opening operation, and connected domain filtering on the initial binary mask in sequence to obtain an optimized binary mask;
[0086] S33, performing Euclidean distance transformation on the optimized binary mask to generate a distance map.
[0087] In this embodiment, the closing operation uses a circular structural element, and the radius r is calculated according to the formula Dynamic adjustment, where Ai is the area of the connected domain; the opening operation uses a 3×3 cross-shaped structure element; the connected domain filtering threshold is an area greater than 20 pixels and an aspect ratio less than 3; the calculation formula of the Euclidean distance transform is: Where M is the optimized binary mask area.
[0088] S04, performing channel stitching on the mask, the distance map, and the standardized red, green, and blue primary color image, and inputting the result into a multi-task deep learning network to output a probability heat map of the cell centroid and a boundary probability map;
[0089] Furthermore, the multi-task deep learning network includes a global semantic enhancement module, which includes: a multi-branch convolutional structure and a cross-channel attention mechanism;
[0090] The multi-branch convolution structure includes:
[0091] First branch: 1×1 convolutional layer extracts local detail features;
[0092] Second branch: 3×3 dilated convolutional layer with dilation rate 3 to capture mid-scale context;
[0093] The third branch: a 5×5 dilated convolutional layer with a dilation rate of 5 extracts global semantic features;
[0094] Fourth branch: global average pooling layer generates channel attention weights;
[0095] The cross-channel attention mechanism performs channel splicing on the multi-branch output features, generates a channel attention vector through a learnable weight matrix, and performs weighted fusion on the features according to the channel dimension.
[0096] Furthermore, the expression of weighted fusion is:
[0097] F out =σ(W c [F1, F2, F3, F4])⊙(F1+F2+F3)
[0098] F out It represents the feature map after fusing multi-scale information and enhancing key channels. F1, F2, F3, and F4 are the output features of the first branch, the second branch, the third branch, and the fourth branch. W c is a learnable parameter and σ is the Sigmoid function.
[0099] Optionally, the multi-task deep learning network can be a CRM (Cellular Regions based on Morphology), and the global semantic enhancement module can be an EGSI (Extraction of Global Semantic Information) module.
[0100] In this embodiment, the optimized binary mask, distance map and normalized RGB image are spliced into a multimodal input according to the channel dimension; the multimodal input is input into an encoder-decoder network (multi-task deep learning network), and the probability heat map of the cell centroid and the boundary probability map are output through cascaded convolution and upsampling operations.
[0101] S05, utilizing a segmentation process to implement cell segmentation based on the probability heat map and the boundary probability map.
[0102] Furthermore, the steps of the segmentation process include:
[0103] Performing non-maximum suppression on the probability heat map, and screening peak points with probability values greater than a first threshold as initial cell center markers;
[0104] Linearly fusing the boundary probability map and the distance map according to a preset weight ratio to generate a mixed gradient map;
[0105] Segmentation is performed based on the initial cell center marker and the mixed gradient map, and a cell instance segmentation label is output.
[0106] In this embodiment, the segmentation process includes the following steps:
[0107] Marker generation: non-maximum suppression (NMS) is performed on the probability heat map, and peak points with probability values greater than 0.8 are selected as initial cell center markers;
[0108] Gradient map construction: linearly fuse the boundary probability map and the distance map with a weight ratio of 0.7:0.3 to generate a mixed gradient map;
[0109] Watershed segmentation: performing a watershed algorithm based on the initial label and the mixed gradient map, and outputting a cell instance segmentation label;
[0110] Post-processing: remove segmentation fragments with an area smaller than 10 pixels and perform morphological closing operation (2×2 rectangular kernel) on the edges to smooth the boundaries.
[0111] In summary, the multi-channel structure map is fed into an adversarial network for color distribution correction, resulting in a standardized red, green, and blue primary color image. The adversarial network uses self-supervision to fit the target dataset's color distribution, outputting a color transfer matrix that is then linearly weighted with the structure map to reconstruct the image, essentially recoloring the image. This fully utilizes the original image's biometric structure for color normalization, preserving and maintaining image structural information to the greatest extent possible, effectively avoiding structural image deformation and preventing inconsistent color distributions from leading to poor prediction system robustness and performance.
[0112] By jointly decoupling Lab space conversion and H&E spectral unmixing, staining differences are eliminated while preserving nuclear texture details, improving the structural similarity (SSIM) metric. An iterative correction mechanism using an adversarial network achieves color standardization of pathology images across institutions. Cell centroid localization is improved by channel-wise splicing of the mask, distance map, and standardized red, green, and blue primary color images. Segmentation accuracy is enhanced by combining probabilistic heatmaps with boundary constraints in the segmentation process.
[0113] Example 2
[0114] like Figure 2 As shown, a second embodiment of the present invention provides a pathological image processing system, the system comprising:
[0115] A generation module 10 is configured to perform color space decoupling on the original pathological image, separate multiple staining components corresponding to the optical absorption characteristics of the stain, and spatially align and channel-superimpose the staining components to generate a multi-channel structure map containing cell structure features;
[0116] A correction module 20 is used to input the multi-channel structure image into an adversarial network to perform color distribution correction to obtain a standardized red, green and blue primary color image;
[0117] an optimization module 30 for performing morphological optimization on the standardized red, green, and blue primary color image using an optimization process to obtain a mask, and performing a Euclidean distance transformation on the mask to generate a distance map;
[0118] An output module 40 is configured to perform channel stitching on the mask, the distance map, and the standardized red, green, and blue primary color image, and input the result into a multi-task deep learning network to output a probability heat map of the cell centroid and a boundary probability map;
[0119] The segmentation module 50 is configured to implement cell segmentation based on the probability heat map and the boundary probability map using a segmentation process.
[0120] The pathological image processing system provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding content in the aforementioned method embodiment.
[0121] Example 3
[0122] like Figure 3 As shown, in the third embodiment of the present invention, the embodiment of the present invention provides the following technical solution: a computer, including a memory 202, a processor 201, and a computer program stored in the memory 202 and executable on the processor 201, wherein the processor 201 implements the pathological image processing method as described above when executing the computer program.
[0123] Specifically, the processor 201 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0124] Among them, the memory 202 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 202 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 202 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 202 may be inside or outside the data processing device. In a specific embodiment, the memory 202 is a non-volatile memory. In a specific embodiment, the memory 202 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, abbreviated as PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated as EPROM), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), an electrically alterable ROM (Electrically Alterable Read-Only Memory, abbreviated as EAROM) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0125] The memory 202 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 201 .
[0126] The processor 201 implements the above-mentioned pathological image processing method by reading and executing computer program instructions stored in the memory 202 .
[0127] In some embodiments, the computer may further include a communication interface 203 and a bus 200. Figure 3 As shown, the processor 201 , the memory 202 , and the communication interface 203 are connected via a bus 200 and communicate with each other.
[0128] The communication interface 203 is used to implement communication between the various modules, devices, units, and / or devices in the embodiments of the present application. The communication interface 203 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.
[0129] The bus 200 includes hardware, software, or both, and couples the components of the computer to each other. The bus 200 includes, but is not limited to, at least one of the following: a data bus (DataBus), an address bus (AddressBus), a control bus (ControlBus), an expansion bus (ExpansionBus), and a local bus (LocalBus). By way of example and not limitation, the bus 200 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, or a 10,000 Pin Count bus. Bus, memory bus, Micro Channel Architecture (MCA) bus, Peripheral Component Interconnect (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local Bus (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, bus 200 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application considers any suitable bus or interconnect.
[0130] Example 4
[0131] In a fourth embodiment of the present invention, in combination with the above-mentioned pathological image processing method, the embodiment of the present invention provides the following technical solution: a storage medium having a computer program stored thereon, and the computer program implements the above-mentioned pathological image processing method when executed by a processor.
[0132] Those skilled in the art will appreciate that the logic and / or steps represented by data in the flowcharts or otherwise described herein, for example, can be considered as a sequenced data table of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device), or in conjunction with such instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device.
[0133] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0134] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement the hardware: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0135] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0136] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A pathological image processing method, characterized in that: The method comprises: Performing color space decoupling on the original pathological image to separate multiple staining components corresponding to the optical absorption characteristics of the stain, and then spatially aligning and channel-superimposing the staining components to generate a multi-channel structure map containing cell structural features; Inputting the multi-channel structure image into the adversarial network to perform color distribution correction to obtain a standardized red, green and blue primary color image; morphologically optimizing the standardized red, green, and blue primary color image using an optimization process to obtain a mask, and performing a Euclidean distance transform on the mask to generate a distance map; Perform channel stitching on the mask, the distance map, and the standardized red, green, and blue primary color image, and input them into a multi-task deep learning network to output a probability heat map of the cell centroid and a boundary probability map; Cell segmentation is achieved based on the probability heat map and the boundary probability map using a segmentation process.
2. The pathological image processing method according to claim 1, characterized in that: The multi-task deep learning network includes a global semantic enhancement module, which includes: a multi-branch convolutional structure and a cross-channel attention mechanism; The multi-branch convolution structure includes: First branch: 1×1 convolutional layer extracts local detail features; Second branch: 3×3 dilated convolutional layer with dilation rate 3 to capture mid-scale context; The third branch: a 5×5 dilated convolutional layer with a dilation rate of 5 extracts global semantic features; Fourth branch: global average pooling layer generates channel attention weights; The cross-channel attention mechanism performs channel splicing on the multi-branch output features, generates a channel attention vector through a learnable weight matrix, and performs weighted fusion on the features according to the channel dimension.
3. The pathological image processing method according to claim 2, characterized in that: The expression of weighted fusion is: <h2 style=";text-align:left;direction:ltr">F<h2 style=";text-align:left;direction:ltr"> out <h2 style=";text-align:left;direction:ltr"> =σ(W<h2 style=";text-align:left;direction:ltr"> c <h2 style=";text-align:left;direction:ltr"> ([F1,F2,F3,F4])⊙(F1+F2+F3) F out It represents the feature map after fusing multi-scale information and enhancing key channels. F1, F2, F3, and F4 are the output features of the first branch, the second branch, the third branch, and the fourth branch. W c is a learnable parameter and σ is the Sigmoid function.
4. The pathological image processing method according to claim 1, characterized in that: The step of inputting the multi-channel structure graph into the adversarial network for color distribution correction includes: Inputting the multi-channel structure graph into the adversarial network and generating a color transfer matrix through a generator; Performing linear weighted fusion of the color transfer matrix and the multi-channel structure map to generate a preliminary red, green and blue primary color image; Performing local block discrimination on the preliminary red, green and blue primary color image and the target domain image through a discriminator to generate a probability map; The generator and the discriminator parameters are iteratively optimized based on the probability map and the composite loss function, and a standardized red, green and blue primary color image is output.
5. The pathological image processing method according to claim 4, characterized in that: The composite loss function includes: Among them, L total Expressed as a composite loss function, α(t) represents the dynamically attenuated adversarial loss weight coefficient, L adv represents the adversarial loss term, using the cross entropy form of the standard GAN, D represents the discriminator, G(I) represents the normalized image output by the generator, β represents the fixed weight coefficient of the perceptual loss, and L perc represents the perceptual loss term, φ represents the feature extraction operation, γ represents the fixed weight coefficient of color consistency loss, L color represents the color space alignment loss to calculate the mean square error of the a and b channels in the Lab color space, η represents the fixed weight coefficient of the gradient difference loss, L grad represents the image gradient consistency loss, i represents the original multi-channel structure diagram of the input generator, i target represents the standard stained pathological image of the target domain, represents the mathematical expectation operator, and Discrete differential operators represent the gradients of the image in the horizontal and vertical directions respectively.
6. The pathological image processing method according to claim 1, characterized in that: The optimization process includes: Performing H&E staining separation on the standardized red, green, and blue primary color image, extracting the hematoxylin staining channel and performing adaptive threshold segmentation to generate an initial binary mask; Performing a closing operation, an opening operation, and connected domain filtering on the initial binary mask in sequence to obtain an optimized binary mask; Performing Euclidean distance transformation on the optimized binary mask to generate a distance map.
7. The pathological image processing method according to claim 1, characterized in that: The steps of the segmentation process include: Performing non-maximum suppression on the probability heat map, and screening peak points with probability values greater than a first threshold as initial cell center markers; Linearly fusing the boundary probability map and the distance map according to a preset weight ratio to generate a mixed gradient map; Segmentation is performed based on the initial cell center marker and the mixed gradient map, and a cell instance segmentation label is output.
8. A pathological image processing system, characterized in that: The system comprises: A generation module is used to perform color space decoupling on the original pathological image, separate multiple staining components corresponding to the optical absorption characteristics of the stain, and spatially align and channel-superimpose the staining components to generate a multi-channel structure map containing cell structure features; A correction module, configured to input the multi-channel structure image into an adversarial network to perform color distribution correction to obtain a standardized red, green, and blue primary color image; an optimization module, configured to perform morphological optimization on the standardized red, green, and blue primary color image using an optimization process to obtain a mask, and perform Euclidean distance transformation on the mask to generate a distance map; An output module is used to perform channel splicing on the mask, the distance map, and the standardized red, green, and blue primary color image, and input them into a multi-task deep learning network to output a probability heat map of the cell centroid and a boundary probability map; A segmentation module is used to implement cell segmentation based on the probability heat map and the boundary probability map using a segmentation process.
9. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the pathological image processing method according to any one of claims 1 to 7 is implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the pathological image processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Ginkgo leaf extract state real-time monitoring method based on image processing
CN120876482A
A real-time monitoring method for ginkgo leaf extract solution state based on image processing
CN120876482B