Gastric cancer simulated acetic acid staining method and system based on generative adversarial network
Through the simulated acetic acid staining method of gastric cancer constructed by a generative adversarial network, the time sensitivity and subjectivity of acetic acid staining in the early diagnosis of gastric cancer is solved, efficient and standardized lesion recognition and staining are achieved, and diagnostic accuracy and operational efficiency are improved.
Patent Information
- Application Number
- CN202510621349.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-26
AI Technical Summary
The prior art relies on acetic acid staining in the early diagnosis of gastric cancer, and has time sensitivity and subjectivity, making it difficult to achieve standardized and objective auxiliary diagnosis.
Generative adversarial network is used to construct a simulated acetic acid staining method for gastric cancer. Through image acquisition, preprocessing, lesion detection and simulated staining, combined with a single-stage instance segmentation model and a generative adversarial network, the identification and simulated staining of suspected lesions in the gastric mucosa is achieved.
It improves the accuracy and processing speed of lesion detection, provides continuous and clear image-assisted judgment, reduces operation dependence, improves the standardization level of diagnosis, and is suitable for assisted diagnosis by middle-aged and middle-aged doctors.
Smart Images

Figure CN120543441A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image processing and artificial intelligence technology, and in particular to a method and system for simulating acetic acid staining of gastric cancer based on a generative adversarial network. Background Art
[0002] Gastric cancer is one of the most common malignant tumors of the digestive tract in my country, characterized by high morbidity and mortality. Since early gastric cancer often has no obvious clinical symptoms, most patients are already in the middle or late stages when diagnosed, with limited treatment effectiveness and a low five-year survival rate. With the continuous development of endoscopic technology and the public's increased awareness of early gastrointestinal cancer screening, digestive endoscopy has become an important means of achieving early detection and auxiliary diagnosis of gastric cancer. In order to enhance the visualization of the lesion area, chromoendoscopy is often used in clinical practice. During the endoscopic examination, specific dyes are sprayed to enhance the contrast between the lesion and the normal mucosa, making it easier for doctors to observe the boundaries and morphology of the lesion.
[0003] Currently, commonly used stains in upper gastrointestinal tract examinations include Lugol's iodine solution, indigo carmine, and acetic acid. Among them, acetic acid, when applied to the gastric mucosa, can induce a transient, reversible whitening reaction on the mucosal surface, creating a visual difference between the lesion area and the surrounding tissue, thereby assisting doctors in identifying potential lesions and increasing the positive rate of biopsy. Although chromoendoscopy has improved the lesion detection rate to a certain extent, the process is still highly dependent on the doctor's judgment and the timing of the operation. In particular, the acetic acid whitening reaction is time-sensitive and is most obvious only in the initial stage of spraying. If the doctor fails to obtain image information in a timely and accurate manner, it may affect the judgment effect. In addition, the staining operation process is not repeatable, and the image features are easily affected by factors such as the operator's experience level, shooting angle, mucosal reflection, and liquid obstruction, which is highly subjective and uncertain.
[0004] In the current clinical auxiliary diagnosis scenario, there is an urgent need for an image processing method that can provide auxiliary judgment on the staining status of gastric mucosal lesion areas without the need for actual spraying of acetic acid, so as to alleviate the difficulty of judgment for middle- and junior-level doctors and improve the objectivity and standardization of auxiliary diagnosis. Summary of the Invention
[0005] To address the problems of the prior art, the present invention provides a method and system for simulating acetic acid staining of gastric cancer based on a generative adversarial network. The technical solution is as follows:
[0006] In one aspect, a method for simulating acetic acid staining of gastric cancer based on a generative adversarial network is provided, characterized in that it comprises the following steps:
[0007] S101: Acquire a digestive tract detection sample image;
[0008] S102: performing data enhancement and image standardization processing on the image, including image scaling, image standardization, and data enhancement operations;
[0009] S103: Inputting the preprocessed image into the lesion detection model to detect whether there is a suspected lesion area;
[0010] S104: Determine whether the detection result meets the preset conditions. If there is a suspected lesion, proceed to the next step; otherwise, end the current image processing process;
[0011] S105: inputting the image meeting the conditions into the simulated acetic acid staining model to generate a simulated staining image;
[0012] S106: Outputting the simulated acetic acid staining image.
[0013] Furthermore, the image scaling operation is: scaling the image to 512×512 pixels by bilinear interpolation.
[0014] Furthermore, the image normalization operation is to perform a de-averaging process on the image pixels to achieve centralization.
[0015] Furthermore, the data enhancement operation includes:
[0016] Spatial enhancements, including image translation, rotation, flipping, and stitching;
[0017] Color transformation enhancements include image brightness adjustment, contrast perturbation, random noise addition, and perturbation operations.
[0018] Furthermore, the lesion detection model is a single-stage instance segmentation network, comprising the following structure:
[0019] The backbone network adopts the RegNet structure;
[0020] The feature fusion structure neck adopts FPN structure;
[0021] The prediction head consists of Prediction Head and prototype branch ProtoNet.
[0022] Furthermore, the Prediction Head includes a category prediction branch, a bounding box prediction branch, and a mask coefficient prediction branch. The three branches share a 3×3 convolutional layer and each has an independent 3×3 convolutional layer.
[0023] Furthermore, the prototype branch ProtoNet:
[0024] Receive the deepest feature map in FPN;
[0025] Use full convolution structure to extract features;
[0026] Output k prototype masks, which are linearly weighted combinations of mask coefficients and Sigmoid processed to generate the final mask of each instance.
[0027] Furthermore, the simulated acetic acid dyeing model includes a generator G and a discriminator D:
[0028] The generator G is an encoder-decoder structure, which includes: a 7×7 convolution layer, two 3×3 downsampling convolution layers, nine Resnet blocks, two 3×3 upsampling transposed convolution layers and an output convolution layer;
[0029] The Resnetblock includes two 3×3 convolutions, both of which use instance normalization and ReLU activation functions and contain a residual connection structure.
[0030] Furthermore, a contrastive learning module is introduced in the model training process, and the PatchNCE contrastive loss function is used, which is expressed as:
[0031]
[0032] Among them, L represents the L-layer feature of the Encoder feature map, and Represents a series of positive sample features generated by the source domain and the generated domain feature maps through MLP, Represents other features in the source domain.
[0033] In another aspect, a system for implementing the method is provided, comprising:
[0034] An image acquisition module, used to obtain digestive tract detection sample images;
[0035] Image preprocessing module, used to scale, standardize and enhance images;
[0036] Lesion detection module, which is used to detect whether there are suspected lesion areas in the image based on a single-stage instance segmentation network;
[0037] A judgment module is used to judge whether the preset conditions are met according to the detection results;
[0038] The simulated staining module is used to call the model composed of the generator G and the discriminator D when there is a suspected lesion area to generate a simulated acetic acid staining image;
[0039] The display module is used to output and display the simulated acetic acid staining image.
[0040] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0041] The present invention provides a method and image processing system for simulating acetic acid staining of gastric cancer based on a generative adversarial network. By constructing a processing flow consisting of image acquisition, image preprocessing, lesion detection, judgment screening and simulated staining, and combining a single-stage instance segmentation model with a generative model of unpaired images, the system can realize the identification and simulated staining of suspected lesion areas of the gastric mucosa, and can provide doctors with continuous and clear image-assisted judgment basis during the examination process.
[0042] By introducing an instance segmentation network with a RegNet+FPN structure, combined with mask generation and a multi-branch prediction mechanism, the present invention can efficiently locate and segment early lesion areas, improving the accuracy and processing speed of lesion detection. In image frames that meet the requirements, a generative adversarial network based on the CUT architecture is further introduced. In the absence of paired samples, style transfer is achieved through comparative learning, effectively restoring the whitening visual effect of acetic acid staining. At the same time, through the coordinated optimization of the PatchGAN discriminator and the PatchNCE loss, the semantic consistency and local authenticity of the generated image are improved.
[0043] The overall solution does not require actual acetic acid spraying operations and has the characteristics of non-invasiveness, repeatability, and high robustness. It is particularly suitable for auxiliary applications by middle- and junior-level doctors in the process of endoscopic image interpretation. It helps to alleviate operational dependence and improve the level of diagnostic standardization. It also has good training portability and scalability, and is suitable for deployment in clinical terminal systems or medical teaching platforms for promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] 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 description of the embodiments. 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 creative work.
[0045] Figure 1 This is a flow chart of a method for simulating acetic acid staining of gastric cancer based on a generative adversarial network according to Example 1 of the present invention;
[0046] Figure 2 Schematic diagram of the lesion detection model in Example 1 of the present invention;
[0047] Figure 3 Schematic diagram of a lesion detection-prediction head in Example 1 of the present invention;
[0048] Figure 4 Schematic diagram of the acetic acid staining model in Example 1 of the present invention;
[0049] Figure 5Schematic diagram of the acetic acid dyeing model-generator network structure in Example 1 of the present invention;
[0050] Figure 6 This is a schematic diagram of the network structure of Resnetblock in Example 1 of the present invention;
[0051] Figure 7 Schematic diagram comparing a common GAN discriminator and a PatchGAN-based discriminator in Example 1 of the present invention;
[0052] Figure 8 Schematic diagram of the network structure of the acetic acid dyeing model-generator comparative learning in Example 1 of the present invention;
[0053] Figure 9 This is a module diagram of an image processing system according to embodiment 2 of the present invention. DETAILED DESCRIPTION
[0054] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0055] Example 1
[0056] This example provides a simulated acetic acid staining method for gastric cancer based on a generative adversarial network (GAN). This method aims to improve lesion detection and auxiliary diagnostic efficiency in digestive endoscopic image analysis, particularly for the identification of precancerous lesions and early gastric cancer. By introducing a GAN architecture based on unpaired data, it enables automatic identification and simulated staining of target areas, replacing the traditional manual acetic acid spraying method and improving operational efficiency and diagnostic accuracy.
[0057] like Figure 1 As shown, the overall implementation process of this method includes the following steps:
[0058] Step S101: Acquire a digestive tract detection sample image;
[0059] Step S102: performing data enhancement and image normalization;
[0060] Step S103: inputting the pre-processed image into the lesion detection model;
[0061] Step S104: determining whether there is a suspected lesion;
[0062] Step S105: inputting the image into the simulated acetic acid staining model;
[0063] Step S106: outputting the staining result.
[0064] The implementation process of the present invention will be described one by one below according to the above steps and in combination with the illustrated process.
[0065] Step S101: Obtaining digestive tract detection sample images
[0066] Specifically, the current frame image is obtained, which comes from the real-time video stream of digestive endoscopy and serves as the input of the subsequent image processing model.
[0067] Step S102: Perform data enhancement and image normalization
[0068] Specifically, the current frame image obtained in step S101 is subjected to data enhancement and image normalization processing to enhance the robustness of the model and improve its adaptability to different scenes and image changes.
[0069] The specific operations include:
[0070] Image scaling: Bilinear interpolation is used to scale the image to a uniform size of 512×512 pixels to meet the input dimension requirements of the subsequent deep learning model;
[0071] Image normalization: The image pixels are centralized by removing the mean value to achieve image normalization;
[0072] Data enhancement: including two methods: spatial and color transformation:
[0073] Spatial enhancement includes operations such as translation, rotation, flipping, and splicing of images;
[0074] Color transformation enhancements include adjusting image brightness and contrast, adding random noise, and performing perturbation operations.
[0075] The purpose of this step is to improve the robustness and stability of the model under interference conditions such as image quality fluctuations, lighting changes, and camera jitter by simulating the possible variations of images in real clinical environments.
[0076] Step S103: Input the pre-processed image into the lesion detection model
[0077] The image after image scaling, normalization and data enhancement in step S102 is input into the lesion detection model to determine whether there is a suspected lesion in the current frame; the network structure of the lesion detection model is as follows: Figure 2 As shown;
[0078] The lesion detection model is used to detect whether there are gastric mucosal precancerous lesions or early gastric cancer in the image and segment the target area of the lesion. In this embodiment, the lesion detection model is a single-stage instance segmentation network, the main structure of which includes three parts: backbone, neck and head:
[0079] The backbone network adopts the RegNet network structure to extract shallow image features such as edge, texture, brightness, and deep semantic features such as semantic affinity between pixels;
[0080] The neck adopts the typical FPN (Feature Pyramid Network) structure, which is used to fuse the feature maps output by the last three stages of the backbone network and extract multi-scale information;
[0081] The head consists of a prediction head and a prototype branch protonet. The prediction head is used to output the bounding box, category information, and mask coefficients of each detection instance, where:
[0082] The mask coefficients are used to linearly combine the masks generated by the prototype branches;
[0083] The prototype branch adopts the fully convolutional structure of FCN, only receives the deepest feature map in FPN, and the number of channels is controlled to k to generate k prototype masks.
[0084] Finally, pixel-level segmentation of the lesion area is achieved by linearly combining the mask coefficients output by the prediction head with the prototype mask and generating the final mask of each instance through the sigmoid function.
[0085] The structure of the lesion detection-prediction head is shown in the figure Figure 3 As shown, the prediction head can be divided into three branches: the category branch, the bounding box branch, and the mask coefficient branch. These three branches share a 3×3 convolution, while independent 3×3 convolution structures are set up in parallel within each branch. This structural design achieves real-time processing capabilities while maintaining high detection accuracy.
[0086] Step S104: Determine whether there is a suspected lesion
[0087] In this step, based on the output result of the lesion detection model in step S103, it is determined whether there is any suspected gastric mucosal precancerous lesion or early gastric cancer in the current frame image.
[0088] The specific judgment method is as follows:
[0089] After inferring the image, the lesion detection model outputs detection results, including the target bounding box, category information, and segmentation mask. The system selects the target based on the target category label in the detection result and the confidence score output by the model.
[0090] When any of the following conditions are met in the detection results, the image frame can be judged to have a suspected lesion and enter the subsequent simulated staining process:
[0091] The output category label belongs to the preset target category of precancerous lesions or early gastric cancer;
[0092] The confidence score of the corresponding target is higher than the set threshold (for example, 0.5, the specific threshold is set during the model deployment phase);
[0093] The detection results are accompanied by valid mask areas.
[0094] If the detection model does not output any of the above instances that meet the conditions, it is determined that the current frame image does not contain a suspected lesion area, and this round of image processing ends or returns to step S101 to process the next frame image.
[0095] The purpose of this step is to serve as a judgment branch in the image inference process. It determines whether to perform the simulated acetic acid staining operation based on the output information of the lesion detection model, thereby saving system computing resources, improving overall processing efficiency, and avoiding false triggering of the staining model in lesion-free areas.
[0096] Step S105: Input the image into the simulated acetic acid staining model
[0097] In this step, the pre-processed image determined to contain suspected lesions in step S104 is input into the simulated acetic acid staining model, and the corresponding staining result image is output.
[0098] The network structure of the simulated acetic acid staining model is as follows Figure 4 As shown, the simulated acetic acid staining model adopts a generative adversarial network (GAN) structure, in which the generative network is the generator G and the discriminative network is the discriminator D. In the present invention, the generator G adopts an encoding-decoding U-shaped architecture (U-Net), which includes an encoder and a decoder. Through image feature extraction and deconvolution restoration, the style conversion from the white light image to the target stained image is achieved.
[0099] The network structure of the acetic acid staining model-generator is as follows Figure 5 As shown, the structure and processing flow of the generator G are as follows:
[0100] (1) The source domain image x∈H×W×3 is first input into a 7×7 convolutional layer with a stride of 1 for preliminary feature extraction to generate a feature map f1∈H×W×64;
[0101] (2) Input the f1 feature map into two 3×3 convolutional layers with a stride of 2 to complete image downsampling, and obtain the following:
[0102] f2∈H / 2×W / 2×128;
[0103] f3∈H / 4×W / 4×256;
[0104] (3) The f3 feature map is sequentially input into nine Resnet blocks, and multi-layer convolution operations are used to extract the multi-level features of the input image, including low-level features (such as edges and textures) and high-level semantic features (such as shapes and structures), and the output is f4∈H / 4×W / 4×256;
[0105] (4) The f4 feature map is input into the decoder part, and is upsampled by two 3×3 transposed convolution operations (deconvolution) with a step size of 2 to restore the image size and output f5∈H×W×64;
[0106] (5) Finally, the f5 feature map is passed through a 7×7 convolution to control the number of channels and generate the target domain image y pred ∈H×W×3.
[0107] Among them, Resnetblock is the core module of the encoder. Each block consists of two 3×3 convolutional layers with instance normalization (IN) and ReLU activation function. It adopts residual connection structure to alleviate the gradient disappearance problem in deep networks and enhance feature extraction capabilities. The network structure of Resnetblock is as follows Figure 6 shown.
[0108] like Figure 7 As shown, the structure and function of the discriminator D are as follows:
[0109] The discriminator D uses the PatchGAN architecture to distinguish true from false in local regions of the generated image. This architecture divides the entire image into multiple local regions and independently discriminates each region, thereby better capturing local image details and improving the ability to assess the realism of the generated image.
[0110] The specific network structure of the discriminator D is shown in the following table:
[0111]
[0112]
[0113] Among them, IN represents instance normalization, s is the convolution step size, p is the padding amount, and 4×4 represents the convolution kernel size.
[0114] like Figure 8 As shown, the structure and purpose of the comparative learning module are as follows:
[0115] To further improve semantic consistency in unpaired image generation tasks, this paper introduces feature maps from the generator's intermediate layers for comparative learning during training. The specific process is as follows:
[0116] The source domain image x is processed by the Encoder in the generator G and then the intermediate layer features are extracted;
[0117] Use a multi-layer perceptron (MLP) to map the feature vectors at each position in the feature map to obtain a set of embedded features;
[0118] Similarly, for the generated image y pred Repeat the above steps to extract embedding features of the same dimension;
[0119] Positive sample pairs are formed from image patches at corresponding spatial positions in the source image and the generated image;
[0120] Construct negative sample pairs from image patches at non-corresponding spatial locations in the source image;
[0121] Finally, the contrast loss function is used for optimization training to minimize the feature distance between positive sample pairs and maximize the distance between negative sample pairs, thereby enhancing the ability of the generated image to retain the semantic structure of the source domain image.
[0122] The core purpose of this module is to build an effective semantic matching mechanism under the training condition of no paired image samples, so that the generated images can have the staining style of the target domain while retaining the structural semantic features of the input image, thereby improving the realism and clinical applicability of simulated acetic acid staining.
[0123] To achieve the semantic separation and feature alignment between the positive and negative samples, the contrastive learning loss function used in the present invention can be expressed as:
[0124]
[0125] Among them, L represents the L-layer feature of the Encoder feature map, and Represents a series of positive sample features generated by the source domain and the generated domain feature maps through MLP, Represents other features in the source domain.
[0126] This loss function maximizes the feature similarity between positive samples and minimizes the feature similarity between negative samples, thereby effectively preserving the structural semantics of the source domain image in the target domain image and improving the clinical expression quality of the generated image.
[0127] Step S106: Outputting the staining result
[0128] In this step, the image output by the generator G in step S105 is used as the final result image of the simulated acetic acid staining.
[0129] The output image has visual characteristics similar to those observed after acetic acid spraying, demonstrating a transient whitening reaction in the gastric mucosa. Doctors can use this image to observe and assess the extent, morphology, and boundaries of the lesion, providing support for the diagnosis of precancerous lesions and early gastric cancer.
[0130] After this step is completed, the processing flow of the current frame image ends, and the system can automatically enter the acquisition and processing flow of the next frame image (return to step S101) to achieve continuous processing of the digestive endoscopy image sequence.
[0131] Through the above steps, the present invention utilizes a deep learning model to identify and simulate staining of lesion areas in white-light gastroscopic images, avoiding the operational burden and staining time constraints associated with traditional acetic acid spraying. This method boasts repeatable generation, stable image quality, and sufficient semantic preservation. It is suitable for real-time image processing scenarios and can be widely used in screening for early gastric cancer and precancerous lesions, clinical auxiliary diagnosis, and intelligent medical terminals.
[0132] Example 2
[0133] This embodiment provides an image processing system for implementing the method of the present invention, which is suitable for digestive endoscopy-assisted diagnosis scenarios and can complete image acquisition, lesion identification and simulated staining result output.
[0134] like Figure 9 As shown, the system includes the following functional modules:
[0135] 1. Image acquisition module, used to obtain the current frame image in the digestive endoscopy video stream. The acquired image is a stomach image frame in white light mode;
[0136] 2. Image preprocessing module, used to scale, standardize and perform data enhancement on the input image, including:
[0137] The image scaling operation is to unify the image to 512 × 512 pixels using bilinear interpolation;
[0138] The image normalization operation uses de-averaging to achieve image centering;
[0139] Data enhancement includes two types of operations: spatial (translation, rotation, flipping, splicing) and color (brightness, contrast, perturbation, random noise).
[0140] 3. Lesion detection module, used to determine whether there are gastric mucosal precancerous lesions or early gastric cancer areas in the image. This module uses a single-stage instance segmentation network, and the network structure includes:
[0141] The backbone network (RegNet) is used to extract shallow and deep features of the image;
[0142] Feature fusion network (FPN) is used to fuse image feature maps of different scales;
[0143] The prediction head and the prototype branch (ProtoNet) jointly output the target location, category and segmentation mask.
[0144] 4. The judgment module is used to determine whether there is a suspected lesion area in the current frame based on the lesion detection results. The judgment is based on whether the lesion category label and confidence score meet the set threshold.
[0145] 5. Simulated staining module: When the judgment module confirms the presence of a lesion area, the simulated acetic acid staining model is called. This model consists of a generator G and a discriminator D, where:
[0146] The generator G adopts an encoding-decoding structure, which includes 7×7 convolution, 3×3 downsampling convolution, 9 Resnet blocks, upsampling transposed convolution and output convolution;
[0147] The discriminator D uses the PatchGAN structure to distinguish true from false in local areas;
[0148] A contrastive learning module is introduced during the model training process, and the semantic position relationship between the source image and the generated image is matched and optimized through the PatchNCE loss function.
[0149] 6. Display module, used to output and display the final simulated acetic acid staining image to assist doctors in lesion identification and diagnosis.
[0150] The modules of the above-mentioned system can be connected through data interfaces to form an end-to-end image processing process, which is suitable for clinical endoscopy workstations, intelligent medical imaging terminals or server deployment environments to achieve real-time image analysis and result presentation.
[0151] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A gastric cancer simulated acetic acid staining method based on generative adversarial networks, characterized in that: The steps include: S101: Acquire a sample image of the digestive tract; S102: performing data enhancement and image standardization processing on the image, including image scaling, image standardization, and data enhancement operations; S103: Inputting the preprocessed image into the lesion detection model to detect whether there is a suspected lesion area; S104: Determine whether the detection result meets the preset conditions. If there is a suspected lesion, proceed to the next step; otherwise, end the current image processing process; S105: inputting the image meeting the conditions into the simulated acetic acid staining model to generate a simulated staining image; S106: Outputting the simulated acetic acid staining image.
2. The method according to claim 1, characterized in that The image scaling operation is: scaling the image to 512×512 pixels by bilinear interpolation.
3. The method according to claim 1, characterized in that The image normalization operation is to perform a de-averaging process on the image pixels to achieve centralization.
4. The method according to claim 1, wherein The data enhancement operation includes: Spatial enhancements, including image translation, rotation, flipping, and stitching; Color transformation enhancements include image brightness adjustment, contrast perturbation, random noise addition, and perturbation operations.
5. The method according to claim 1, wherein The lesion detection model is a single-stage instance segmentation network with the following structure: The backbone network adopts the RegNet structure; The feature fusion structure neck adopts FPN structure; The prediction head consists of Prediction Head and prototype branch ProtoNet.
6. The method according to claim 5, characterized in that The Prediction Head includes a category prediction branch, a bounding box prediction branch, and a mask coefficient prediction branch. The three branches share a 3×3 convolutional layer and each has an independent 3×3 convolutional layer.
7. The method according to claim 5, characterized in that The prototype branch ProtoNet: Receive the deepest feature map in FPN; Use full convolution structure to extract features; Output k prototype masks, which are linearly weighted combinations of mask coefficients and Sigmoid processed to generate the final mask of each instance.
8. The method according to claim 1, characterized in that The simulated acetic acid dyeing model includes a generator G and a discriminator D: The generator G is an encoder-decoder structure, which includes: a 7×7 convolution layer, two 3×3 downsampling convolution layers, nine Resnet blocks, two 3×3 upsampling transposed convolution layers and an output convolution layer; The Resnetblock includes two 3×3 convolutions, both of which use instance normalization and ReLU activation functions and contain a residual connection structure.
9. The method according to claim 8, characterized in that The contrastive learning module is introduced in the model training process, and the PatchNCE contrastive loss function is used, which is expressed as: Among them, L represents the L-layer feature of the Encoder feature map, and Represents a series of positive sample features generated by the source domain and the generated domain feature maps through MLP, Represents other features in the source domain.
10. A system for implementing the method according to any one of claims 1 to 9, characterized in that: include: An image acquisition module, used to obtain digestive tract detection sample images; Image preprocessing module, used to scale, standardize and enhance images; Lesion detection module, which is used to detect whether there are suspected lesion areas in the image based on a single-stage instance segmentation network; A judgment module is used to judge whether the preset conditions are met according to the detection results; The simulated staining module is used to call the model composed of the generator G and the discriminator D when there is a suspected lesion area to generate a simulated acetic acid staining image; The display module is used to output and display the simulated acetic acid staining image.
Citation Information
Cited By
Image segmentation-guided virtual staining method
CN122676306A