Pathological image pixel-level privacy desensitization method and device and readable storage medium thereof
By constructing a feature-decoupled generative adversarial network, the diagnostic semantic features and individual texture features of pathological images are separated, which solves the problems of patient identity tracing and loss of diagnostic value in pathological image desensitization and achieves a balance between privacy protection and diagnostic value.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-07-31
AI Technical Summary
Existing methods for desensitizing pathological images cannot completely reconstruct pixel-level micro-textures to block reverse tracing of patient identity while fully preserving the semantic features of pathological diagnosis. Traditional methods result in the loss of diagnostic value of images.
A generative adversarial network with feature decoupling capability is constructed. The encoder separates the semantic features of pathological diagnosis from the underlying texture features of individual patients. The generator is trained using a multi-objective joint loss function to reconstruct the synthetic image. The diagnostic consistency loss and pixel-level rejection loss are combined to ensure the semantic consistency and security of diagnosis.
It achieves pixel-level privacy protection for pathological images, blocks patient identity tracing, and preserves the microscopic and macroscopic diagnostic features of pathological diagnoses, making it suitable for deep learning model training and scientific research analysis.
Smart Images

Figure CN122312820B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital pathological image processing and data security technology, and in particular to a method, apparatus and readable storage medium for pixel-level privacy desensitization of pathological images. Background Technology
[0002] With the rapid development of computational pathology, deep learning technology has achieved remarkable results in the field of pathological assisted diagnosis, and high-quality digital pathological slide data is a core resource driving research and development in this field. The sharing and circulation of pathological slide data is of significant practical importance in inter-institutional scientific collaborations and the training of medical artificial intelligence models.
[0003] Currently, privacy protection for medical images primarily employs two technical approaches. The first is file-level desensitization, which removes textual identity information stored in the header of medical image files, such as patient names, medical record numbers, and examination identifiers. The second is image-level desensitization, which applies Gaussian blur, mosaic processing, or pixelation to the image itself to mask sensitive information. However, high-resolution digital pathology slides contain unique microscopic biological characteristics of patients at the pixel level, such as specific cellular microenvironment textures, chromatin distribution patterns, and subtle histological variations. These low-level pixel features can be used for reverse identification of patients through image comparison, a risk that file-level desensitization cannot eliminate. Furthermore, while traditional image processing methods like Gaussian blur or mosaic are effective in general image desensitization scenarios, they directly destroy key pathological diagnostic features such as cell nuclear morphology, glandular arrangement, and tissue atypia in pathological images, causing the desensitized images to completely lose their scientific analysis value and artificial intelligence model training utility.
[0004] Therefore, there is an urgent need for a method, apparatus, and readable storage medium for pixel-level privacy desensitization of pathological images based on generative adversarial networks, in order to solve the problems existing in the prior art. Summary of the Invention
[0005] This invention provides a method, apparatus, and readable storage medium for pixel-level privacy desensitization of pathological images, addressing the problem that existing pathological image desensitization methods cannot completely reconstruct pixel-level microtextures to block reverse tracing of patient identity while fully preserving the equivalent pathological diagnostic semantic features of the original image.
[0006] The core technology of this invention is to construct a generative adversarial network with feature decoupling capabilities. The encoder separates the semantic features of pathological diagnosis from the underlying texture features of the patient in the latent space. The synthesized image is reconstructed based solely on the semantic features of pathological diagnosis combined with random noise. The network is trained using a multi-objective joint loss function that includes diagnostic consistency loss and pixel-level rejection loss. This achieves complete reconstruction of the underlying pixel texture while preserving the equivalent diagnostic semantics.
[0007] In a first aspect, the present invention provides a pixel-level privacy desensitization method for pathological images, the method comprising the following steps:
[0008] Obtain raw digital pathology slides containing the patient's biometrics, extract tissue regions, and cut them into multiple raw image blocks; A generative adversarial network (GAN) model with feature decoupling capability is constructed. The GAN model includes a generator and at least two discriminators. The generator adopts an encoder-decoder structure. The encoder is used to map the original image patch to the latent space and separate the pathological diagnosis semantic features and the patient's individual low-level texture features. The decoder is used to discard the patient's individual low-level texture features and reconstruct the synthetic image patch based on the pathological diagnosis semantic features combined with random noise. The discriminators include at least a first discriminator for judging the visual realism of the synthetic image patch and a second discriminator for constraining the synthetic image patch to be equivalent to the original image patch in pathological diagnosis semantics. A multi-objective joint loss function is designed to train the generative adversarial network model. The multi-objective joint loss function includes at least: an adversarial loss term, a diagnostic consistency loss term, and a pixel-level rejection loss term. The adversarial loss term constrains the visual realism of the synthesized image patch based on the discrimination result of the first discriminator. The diagnostic consistency loss term constrains the semantic consistency of the pathological diagnosis between the two based on the differences between multiple different levels of deep feature representations extracted by the second discriminator from the original image patch and the synthesized image patch. The pixel-level rejection loss term is used to force the synthesized image patch to deviate from the original image patch in pixel arrangement. The original image patch to be desensitized is input into the trained generator to generate a desensitized synthetic image patch, which is then stitched together according to the original spatial location information to restore the desensitized digital pathological slide.
[0009] Furthermore, the encoder employs a dual-branch feature extraction structure, including: The semantic feature branch consists of multiple convolutional layers, and each convolutional layer is followed by instance normalization to suppress global texture style information and force the preservation of pathological diagnostic semantic features related to spatial structure. The texture feature branch consists of multiple convolutional layers combined with global pooling layers to disrupt the spatial topology of the feature map and extract the global, individual patient-level texture features.
[0010] Furthermore, after mapping the original image patch to the latent space, the encoder outputs the diagnostic feature vector and the texture feature vector through two parallel output channels, respectively. During the training process, an orthogonal loss constraint is introduced. The orthogonal loss is calculated by the cosine similarity or inner product between the diagnostic feature vector and the texture feature vector, forcing them to be orthogonal to each other in the latent space.
[0011] Furthermore, the encoder training also incorporates an auxiliary discriminator, which is used to predict patient identity information based on the diagnostic feature vector. The training objective of the encoder is to maximize the classification error of the auxiliary discriminator to ensure that the diagnostic feature vector does not contain the patient's individual underlying texture features.
[0012] Furthermore, the second discriminator uses a pre-trained pathological image analysis model, and its internal weight parameters are frozen during the training of the generative adversarial network model. The diagnostic consistency loss term is calculated as follows: the original image patch and the synthesized image patch are input into the second discriminator respectively, and their feature maps on multiple intermediate convolutional layers of different depths are extracted. The sum of the distance metrics between the corresponding feature maps is calculated.
[0013] Furthermore, the pixel-level repulsion loss term adopts the boundary constraint hinge loss function, which is based on a preset pixel difference boundary threshold. When the pixel-level distance between the original image block and the synthesized image block is less than the boundary threshold, a positive penalty gradient is generated. When the pixel-level distance reaches or exceeds the boundary threshold, the penalty value is zero. The pixel-level distance is calculated using the L1 norm.
[0014] Furthermore, the cutting step is performed using an overlapping sliding window method, so that there is a preset ratio of physical overlap between adjacent original image blocks; the stitching and restoration step uses a distance-weighted average fusion algorithm based on a two-dimensional Gaussian weight mask to process the pixel values of the overlapping area, where each synthesized image block corresponds to a two-dimensional Gaussian weight mask with a high center weight and a smooth decay to zero edge weight, and the final pixel value of the overlapping area is the weighted sum of the corresponding pixel values of adjacent synthesized image blocks according to their respective Gaussian weight masks.
[0015] Secondly, the present invention provides a pixel-level privacy desensitization device for pathological images, comprising: The preprocessing module is used to acquire raw digital pathology slides containing patient biometrics, extract tissue regions, and cut them into multiple raw image blocks; The model building and training module is used to build and train a generative adversarial network (GAN) model with feature decoupling capabilities. The GAN model includes a generator and at least two discriminators. The generator adopts an encoder-decoder structure. The encoder maps the original image patch to the latent space and separates the pathological diagnosis semantic features and the patient's individual low-level texture features. The decoder discards the patient's individual low-level texture features and reconstructs a synthetic image patch based on the pathological diagnosis semantic features combined with random noise. The discriminators include at least a first discriminator for judging the visual realism of the synthetic image patch and a second discriminator for constraining the synthetic image patch to be equivalent to the original image patch in pathological diagnosis semantics. The model building and training module is trained using a multi-objective joint loss function, which includes at least an adversarial loss term, a diagnostic consistency loss term, and a pixel-level rejection loss term. The desensitization execution module is used to input the original image block to be desensitized into the trained generator, generate the desensitized synthetic image block, and stitch it together according to the original spatial location information to restore the desensitized digital pathological slide.
[0016] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described pathological image pixel-level privacy desensitization method.
[0017] Fourthly, the present invention provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the above-described pathological image pixel-level privacy desensitization method.
[0018] The main contributions and innovations of this invention are as follows: 1. This invention utilizes a feature decoupling mechanism within generative adversarial networks to separate the semantic features of pathological diagnosis from the underlying texture features of the patient in the latent space. This allows the decoder to reconstruct the image solely based on the diagnostic semantic features, fundamentally achieving a complete "forgery" of the original microscopic pixel texture. This approach effectively blocks the path of pixel-level reverse tracing of patient identity, preventing the anonymized synthetic pathological slides from reconstructing the patient's identity through microscopic biometric comparison. The privacy protection effect is superior to traditional anonymization methods that only remove header text information.
[0019] 2. This invention, by setting a diagnostic consistency discriminator and introducing a diagnostic consistency loss term, constrains the difference in feature representation between the original image and the synthesized image in the high-dimensional feature space corresponding to multiple convolutional layers of different depths. This ensures that the synthesized image not only maintains the macroscopic lesion category determination result but also accurately preserves multi-level microscopic diagnostic features such as cell nuclear morphology, chromatin distribution, and tissue arrangement structure. The desensitized image can directly replace the original image for training deep learning models and scientific research analysis with minimal loss of diagnostic value, overcoming the inherent defects of traditional methods such as Gaussian blurring and mosaic that destroy diagnostic features.
[0020] 3. This invention employs a boundary constraint hinge loss function as the pixel-level repulsion loss. By presetting a safety boundary threshold, gradient penalty is applied only when the pixel-level difference between the synthesized image and the original image does not meet the safety standard. Once the safety threshold is reached, the penalty is automatically truncated. This mechanism avoids the mathematical collapse risks of gradient divergence and numerical instability caused by taking the reciprocal or negative value in traditional repulsion losses. It also prevents the generator from blindly pursuing pixel differences and excessively distorting the image, leading to the loss of diagnostic features. A precise balance is achieved between thorough desensitization and diagnostic preservation.
[0021] 4. This invention employs a collaborative scheme of overlapping sliding window segmentation and distance-weighted average fusion stitching based on a two-dimensional Gaussian weighted mask. In the segmentation stage, physical overlapping areas are generated between adjacent image blocks. In the stitching stage, Gaussian feathering fusion processing is performed on the overlapping areas, effectively eliminating stitching gaps and checkerboard artifacts caused by independent pixel reconstruction of adjacent image blocks, and ensuring the global visual continuity and consistency of the full-view digital pathology slides after desensitization during slide reading.
[0022] Details of one or more embodiments of the present invention are set forth in the following drawings and description, so that other features, objects and advantages of the invention will be more readily understood. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of a pixel-level privacy desensitization method for pathological images according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a GAN network structure with dual discriminators and multi-target loss according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0025] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0026] Example 1 This embodiment details a pixel-level privacy de-identification method for pathological images based on generative adversarial networks. See also... Figure 1 The method mainly includes the following steps: Step 1: Digital pathology slide preprocessing and segmentation.
[0027] First, raw digital pathology slides containing the patient's biometrics are acquired; in this embodiment, full-field digital pathology slides (WSI) are used. The Otsu method is used to remove large areas of blank background from the WSI slides, precisely extracting tissue regions containing the patient's microscopic biological characteristics. Subsequently, an overlapping sliding window method is used to segment the extracted tissue regions, resulting in multiple fixed-size raw image patches. In this embodiment, the size of the raw image patch is set to 256×256 pixels. To ensure a predetermined physical overlap between adjacent raw image patches, the sliding window step size is set to 192 pixels, meaning there is a 25% physical overlap in both the horizontal and vertical directions between two adjacent raw image patches. This overlapping sampling provides the necessary overlapping spatial data for subsequent elimination of tomography and checkerboard artifacts at the edges of the image patches.
[0028] Step 2: Construct a generative adversarial network model with feature decoupling capabilities.
[0029] See Figure 2 The generative adversarial network model consists of a generator and at least two discriminators. The generator employs an encoder-decoder structure. The encoder maps the input raw image patches to a latent space and separates the pathological diagnostic semantic features and the patient's individual low-level texture features from them.
[0030] In this embodiment, the encoder employs a dual-branch feature extraction structure to achieve hard feature stripping. Its specific feature separation mechanism includes: 1. Semantic Feature Branch: This branch consists of multiple convolutional layers, with instance normalization applied after each layer. Instance normalization independently calculates the mean and variance of a single input sample in each channel of the feature map and performs normalization. Its physical mechanism can directly remove the global color tone, staining style, and subtle background style distribution of the image, thus forcing this branch to retain and extract only pathological diagnostic semantic features strongly correlated with spatial topology, namely, the morphological contour information of cells and tissues.
[0031] 2. Texture Feature Branch: This branch consists of multiple convolutional layers combined with a global pooling layer (specifically, a global average pooling layer). The global average pooling layer directly compresses an entire feature map into a one-dimensional vector in spatial dimension. This operation completely destroys the spatial topology of the feature map and erases spatial geometric information such as cell arrangement, thus forcing the network to extract only the global, individual patient-level texture features, including specific staining batch tones, color saturation, and non-critical background noise.
[0032] During the reconstruction rendering stage, the decoder directly discards the real patient's underlying texture features extracted from the texture feature branch. The decoder receives the pure pathological diagnostic semantic features extracted from the semantic feature branch, concatenates them with Gaussian noise randomly sampled from a standard normal distribution, and then inputs them into the various deconvolution layers of the decoding network for upsampling and reconstruction rendering, thereby creating entirely new underlying pixel details and generating synthetic image patches. This approach ensures from the network architecture perspective that the reconstructed synthetic image patches retain both the real pathological diagnostic geometry and completely reconstruct the microscopic pixel texture.
[0033] The discriminator includes at least a first discriminator for judging the visual realism of the synthesized image patch, and a second discriminator for constraining the synthesized image patch to be semantically equivalent to the original image patch in pathological diagnosis. The first discriminator adopts a Markov discriminator architecture to evaluate whether the synthesized image patch has the microscopic visual feature distribution of a real pathological slice, so that the generated image looks like a real pathological image.
[0034] The second discriminator employs a pre-trained pathological image analysis model, and its internal weight parameters are frozen during the training of the generative adversarial network (GAN) model. Specifically, this second discriminator is pre-trained on a large-scale, expert-annotated dataset of real pathological images using a ResNet50 network architecture. During the training of the current desensitized GAN model, the internal network weight parameters of the second discriminator are strictly frozen, keeping them fixed and not participating in gradient updates during backpropagation. The second discriminator serves only as an objective forward propagation feature extractor, used to compute high-dimensional deep feature representations of the input images, to avoid model degradation and mode collapse caused by joint training.
[0035] Step 3: Design a multi-objective joint loss function to iteratively train the generative adversarial network model.
[0036] The multi-objective joint loss function includes at least: an adversarial loss term, a diagnostic consistency loss term, and a pixel-level exclusion loss term. The mathematical expression of the total loss function is as follows:
[0037] In the formula, , , This refers to the preset hyperparameters that balance the weights of various losses. In this embodiment, the preferred range of the weight hyperparameters is... [0.5, 2.0]、 [5.0, 15.0]、 [0.5, 2.0], a typical single-group example has the value [0.5, 2.0]. =1.0、 =10.0、 =1.0.
[0038] Countermeasures against loss items The visual realism of the synthesized image patch is constrained by the discrimination result of the first discriminator.
[0039] Diagnostic consistency loss item Based on the differences between multiple deep feature representations at different levels extracted from the original image patch and the synthesized image patch by the second discriminator, the semantic consistency of their pathological diagnosis is constrained. Specifically, the original image patch X and the synthesized image patch Y are input into the second discriminator, and their activation feature maps on multiple intermediate convolutional layers of different depths (selected as Conv3, Conv4, and Conv5 layers of ResNet50) are extracted. The weighted sum of the mean square error or cosine similarity between the corresponding feature maps is calculated, and its mathematical expression is as follows:
[0040] In the formula, This represents the feature extraction operation of the i-th layer of the second discriminator, where L represents the selected set of intermediate network layers. These are the weighting coefficients for different layers. The shallow feature map (e.g., Conv3) represents microscopic diagnostic features such as the edge, morphology, and chromatin distribution of the cell nucleus; the medium-layer feature map (e.g., Conv4) represents medium-grained histological features such as nuclear atypia and mitotic figures; and the deep feature map (e.g., Conv5) represents macroscopic tissue structures such as glandular arrangement and tumor infiltration margins, and ultimately, the lesion category determination. This constraint of minimizing the spatial distance of multi-level features forces the synthesized image to maintain strict equivalence to the original image in both microscopic diagnostic details and macroscopic tissue structure.
[0041] Pixel-level repulsion loss term This is used to force the synthesized image patch to deviate from the original image patch in pixel arrangement. This embodiment employs the boundary constraint hinge loss function, whose mathematical expression is as follows:
[0042] In the formula, M is the preset pixel difference boundary threshold; This embodiment uses a pixel-level distance metric to represent the distance between the original image patch X and the synthesized image patch Y. The norm is used for calculation. The sum of absolute errors in norm calculations, compared to Norms are more robust to outliers and can generate clearer pathological textures. When the pixel-level distance between the synthesized image patch and the original image patch is less than the boundary threshold M, the formula generates a positive penalty gradient, forcing the generator to modify the underlying pixel arrangement to push them further apart. When the pixel-level distance reaches or exceeds the boundary threshold M, it means that the safe desensitization standard has been met, the penalty value is directly reduced to zero, and the generator is no longer subject to additional repulsion penalties, thus effectively avoiding the loss of diagnostic features caused by excessive image distortion due to endless repulsion.
[0043] Step 4: Digital pathology slide splicing and restoration.
[0044] The original full-view digital pathology slide to be desensitized is cut into raw image blocks and input into a trained generator. The generator automatically separates and discards the patient's individual underlying texture features, reconstructing the slide based solely on the pathological diagnostic semantic features combined with Gaussian noise, and outputs desensitized synthetic image blocks. Subsequently, based on the original spatial coordinate information of each image block recorded during cutting, the synthetic image blocks are fused and stitched together within a preset physical overlap area using distance weighting to reconstruct the desensitized digital pathology slide.
[0045] To eliminate boundary pixel discontinuities and checkerboard artifacts caused by independent reconstruction of adjacent image patches, this step employs a distance-weighted average fusion algorithm based on a two-dimensional Gaussian weight mask. First, a two-dimensional Gaussian weight mask of the same size is created for each 256×256 pixel composite image patch. This mask is characterized by pixels closer to the center of the image patch having a weight value approaching 1, while pixels closer to the edge of the image patch have a weight value that smoothly decays to approach zero. When stitching together horizontally or vertically adjacent composite image patches A and B, the final output pixel values within the overlapping area are calculated using a weighted sum based on the following two-dimensional Gaussian weight mask:
[0046] In the formula, and These are the original pixel values of corresponding positions in the overlapping region of image patches A and B. and This represents the Gaussian weight value at the corresponding location. When there are two or more overlapping image blocks in the overlapping region (e.g., four intersecting grid-like regions), the distance-weighted average fusion algorithm is similarly extended to the sum of the products of the pixel values corresponding to the multiple synthesized image blocks and their corresponding Gaussian weights, divided by the sum of the individual Gaussian weights. Its general mathematical formula is extended as follows:
[0047] In the formula, n is the index of the overlapping image patches. Through this Gaussian feathering fusion mechanism, natural pathological texture gradients are forced at the boundary overlap of adjacent patches, eliminating splicing gaps and ensuring the global visual continuity of the desensitized full-view digital pathology slides during slide reading.
[0048] Example 2 This embodiment provides another pixel-level privacy desensitization method for pathological images based on generative adversarial networks. The core process of this embodiment is basically the same as that of Embodiment 1, the main difference being the non-rigid network structure segmentation method for encoder feature separation in step two.
[0049] In this embodiment, the encoder employs a single encoder structure. After mapping the input raw image patch to the latent space, the encoder outputs diagnostic feature vectors through two parallel output channels (specifically, two parallel fully connected layer output channels). and texture feature vector .
[0050] To ensure that the information contained in these two feature vectors is completely mutually exclusive, thus achieving thorough decoupling of the features, an orthogonal loss constraint term is introduced into the multi-objective joint loss function during model training. This orthogonal loss is calculated by examining the diagnostic feature vectors. With texture feature vector The cosine similarity or matrix inner product between the two forces them to be orthogonal in the latent space. The mathematical expression for orthogonality loss is as follows:
[0051] In the formula, Denotes the Frobenius norm, superscript This represents the transpose operation of a matrix. During backpropagation, this mathematical constraint forces the encoder to compress geometric spatial structure information and global texture style information into completely unrelated orthogonal feature subspaces.
[0052] Meanwhile, in order to further ensure the separation of diagnostic feature vectors The dataset contains absolutely no underlying privacy textures of the patient, and an auxiliary discriminator is introduced during training. This auxiliary discriminator, acting as an attribute adversarial module, is used to analyze diagnostic feature vectors... Predict the staining batch or patient identification information of the original slides. The encoder's training objective is set to maximize the classification error of the auxiliary discriminator, making its prediction accuracy approach the level of random guessing. Through this adversarial learning mechanism, it is mathematically guaranteed that the diagnostic feature vector does not contain any individual low-level texture features that could identify the patient. During the reconstruction phase, the decoder completely discards this texture feature vector. Only the pure diagnostic feature vector The image patch is synthesized by concatenating it with random Gaussian noise and then decoding and reconstructing it.
[0053] Example 3 This embodiment, based on the above method, provides a pixel-level privacy de-identification system for pathological images based on generative adversarial networks. See also... Figure 2 The system includes: Preprocessing module: used to acquire raw digital pathological slides containing patient biometrics, extract tissue regions and cut them into multiple raw image blocks using an overlapping sliding window method, so that adjacent raw image blocks have a preset ratio of physical overlap area; The model building and training module is used to build and train a generative adversarial network (GAN) model with feature decoupling capabilities. The GAN model includes a generator with an encoder-decoder structure, a first discriminator, and a second discriminator with frozen parameters. The encoder maps the original image patches to a latent space and separates pathological diagnostic semantic features and patient-specific low-level texture features. The decoder discards the patient-specific low-level texture features and reconstructs synthetic image patches based on pathological diagnostic semantic features combined with random noise. The first discriminator determines the visual realism of the synthetic image patches, and the second discriminator constrains the synthetic image patches to maintain semantic equivalence with the original image patches in terms of pathological diagnosis. The model building and training module uses a multi-objective joint loss function for iterative training. This multi-objective joint loss function includes at least an adversarial loss term, a diagnostic consistency loss term calculated based on differences in deep feature representations at multiple different levels, and a pixel-level rejection loss term using boundary constraint hinge loss. The desensitization execution module is used to input the original image block after the original digital pathology slide to be desensitized is cut into the trained generator, generate the desensitized synthetic image block, and use the distance-weighted average fusion algorithm based on two-dimensional Gaussian weight mask to smoothly fuse the overlapping areas, and stitch them together according to the original spatial location information to restore the desensitized digital pathology slide.
[0054] Example 4 This embodiment also provides an electronic device, see reference. Figure 3 It includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.
[0055] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.
[0056] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0057] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.
[0058] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the pathological image pixel-level privacy desensitization methods in the above embodiments.
[0059] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.
[0060] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0061] Input / output device 408 is used to input or output information.
[0062] Example 5 This embodiment also provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including a pathological image pixel-level privacy desensitization method according to Embodiment 1.
[0063] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0064] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0065] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 1 Any box in the logical flow can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0066] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been 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.
[0067] The above embodiments are merely illustrative of several implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the appended claims.
Claims
1. A pixel-level privacy desensitization method for pathological images, characterized in that, Includes the following steps: Obtain raw digital pathology slides containing the patient's biometrics, extract tissue regions, and cut them into multiple raw image blocks; A generative adversarial network (GAN) model with feature decoupling capability is constructed. The GAN model includes a generator and at least two discriminators. The generator adopts an encoder-decoder structure. The encoder is used to map the original image patch to a latent space and separate the pathological diagnosis semantic features and the patient's individual low-level texture features. The decoder is used to discard the patient's individual low-level texture features and reconstruct a synthetic image patch based on the pathological diagnosis semantic features combined with random noise. The discriminators include at least a first discriminator for judging the visual realism of the synthetic image patch and a second discriminator for constraining the synthetic image patch to be equivalent to the original image patch in pathological diagnosis semantics. A multi-objective joint loss function is designed to train the generative adversarial network model. This multi-objective joint loss function includes at least: an adversarial loss term, a diagnostic consistency loss term, and a pixel-level rejection loss term. The adversarial loss term constrains the visual realism of the synthesized image patches based on the discrimination result of the first discriminator. The diagnostic consistency loss term constrains the semantic consistency of the pathological diagnosis between the two images based on the differences between multiple different levels of deep feature representations extracted by the second discriminator from the original image patches and the synthesized image patches. The pixel-level rejection loss term forces the synthesized image patches to deviate from the original image patches in pixel arrangement. The original image patch to be desensitized is input into the trained generator to generate the desensitized synthetic image patch, and then spliced and restored to the desensitized digital pathological slide according to the original spatial location information. The pixel-level repulsion loss term employs a boundary constraint hinge loss function, which is based on a preset pixel difference boundary threshold. When the pixel-level distance between the original image block and the synthesized image block is less than the boundary threshold, a positive penalty gradient is generated. When the pixel-level distance reaches or exceeds the boundary threshold, the penalty value is zero. The pixel-level distance is calculated using the L1 norm. The cutting step is performed using an overlapping sliding window method, so that there is a preset ratio of physical overlap between adjacent original image blocks; the stitching and restoration step uses a distance-weighted average fusion algorithm based on a two-dimensional Gaussian weight mask to process the pixel values of the overlapping area, wherein each synthesized image block corresponds to a two-dimensional Gaussian weight mask with high center weight and smooth edge weight decay to zero, and the final pixel value of the overlapping area is the weighted sum of the corresponding pixel values of adjacent synthesized image blocks according to their respective Gaussian weight masks.
2. The method as described in claim 1, characterized in that, The encoder employs a dual-branch feature extraction structure, including: The semantic feature branch consists of multiple convolutional layers, and each convolutional layer is followed by instance normalization to suppress global texture style information and force the preservation of pathological diagnostic semantic features related to spatial structure. The texture feature branch consists of multiple convolutional layers combined with global pooling layers to disrupt the spatial topology of the feature map and extract the global, individual patient-level texture features.
3. The method as described in claim 1, characterized in that, The encoder maps the original image patch to the latent space and outputs diagnostic feature vector and texture feature vector through two parallel output channels. During training, an orthogonal loss constraint is introduced. The orthogonal loss is calculated by the cosine similarity or inner product between the diagnostic feature vector and the texture feature vector, forcing them to be orthogonal to each other in the latent space.
4. The method as described in claim 3, characterized in that, The training of the encoder also incorporates an auxiliary discriminator, which is used to predict patient identity information based on the diagnostic feature vector. The training objective of the encoder is to maximize the classification error of the auxiliary discriminator to ensure that the diagnostic feature vector does not contain the patient's individual underlying texture features.
5. The method as described in claim 1, characterized in that, The second discriminator uses a pre-trained pathological image analysis model and its internal weight parameters are kept frozen during the training of the generative adversarial network model; the diagnostic consistency loss term is calculated as follows: the original image patch and the synthesized image patch are input into the second discriminator respectively, the feature maps of them on multiple intermediate convolutional layers of different depths are extracted, and the sum of the distance metrics between the corresponding feature maps is calculated.
6. A system for implementing the pixel-level privacy desensitization method for pathological images according to any one of claims 1 to 5, characterized in that, include: The preprocessing module is used to acquire raw digital pathology slides containing patient biometrics, extract tissue regions, and cut them into multiple raw image blocks; The model building and training module is used to build and train a generative adversarial network (GAN) model with feature decoupling capabilities. The GAN model includes a generator and at least two discriminators. The generator employs an encoder-decoder structure, where the encoder maps the original image patch to a latent space and separates pathological diagnostic semantic features and patient-specific low-level texture features. The decoder discards the patient-specific low-level texture features and reconstructs a synthetic image patch based on the pathological diagnostic semantic features combined with random noise. The discriminators include at least a first discriminator for judging the visual realism of the synthetic image patch and a second discriminator for constraining the synthetic image patch to be semantically equivalent to the original image patch. The model building and training module is trained using a multi-objective joint loss function, which includes at least an adversarial loss term, a diagnostic consistency loss term, and a pixel-level rejection loss term. The desensitization execution module is used to input the original image block to be desensitized into the trained generator, generate the desensitized synthetic image block, and stitch it together according to the original spatial location information to restore the desensitized digital pathological slide.
7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the pathological image pixel-level privacy desensitization method according to any one of claims 1 to 5.
8. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program code for controlling a process to execute the process, the process including the pathological image pixel-level privacy desensitization method according to any one of claims 1 to 5.