An Unsupervised Adaptive Stripe Correction Method for Stitching Microscopic Images
Through an unsupervised adaptive adversarial training network, the fringes and artifact problems in fluorescence microscopy images are solved, and high-quality image processing and downstream analysis accuracy are achieved.
Patent Information
- Application Number
- CN202211458018.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-11-16
AI Technical Summary
In the prior art, when splicing fluorescence microscopy images, it is difficult to effectively deal with the fringes, shadows and artifact problems caused by uneven illumination, especially in weak signal areas of unlabeled or large-scale stitching images, resulting in image quality degradation and downstream analysis deviations.
Unsupervised adaptive stripe correction method is adopted to construct non-paired positive and negative samples through data preprocessing and adjacent sampling strategies, and design a circular adversarial training network structure to adaptively process the stripe and artifact problems in the image.
This method does not require adjustment of optical instrument settings or estimating physical parameters. It is suitable for situations where training data is insufficient, effectively improves the quality of spliced fluorescent images, reduces false detection and missed detection rates, and enhances the value of downstream analysis.
Smart Images

Figure CN115760622B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of microscope image processing and computer vision, in particular to an unsupervised adaptive stripe correction method for stitching microscopic images. Background Art
[0002] Fluorescence microscopes are indispensable tools in biomedical research and can be used to obtain high-spatial-resolution information on intracellular biological processes and tissue pathological diagnoses. Currently, the most common method for obtaining large-scale high-resolution microscopic images is to continuously stitch multiple fields of view (FOVs). However, there are still phenomena of shadow or vignetting in fluorescence microscopic images, that is, uneven illumination, which is usually reflected as the attenuation of the brightness intensity from the center of the optical axis to the edge. Therefore, stripes, shadows, and even artifacts often appear in the stitched fluorescence images, especially in the weak signal regions of unlabeled or large-scale stitched images. According to previous research results, even the most stable commercial non-linear optical microscopy equipment may have various stripe problems in the acquired images. In the case of ignoring light correction, it often leads to an increase in the false detection and missed detection rates of cells in the image. Therefore, the stripes generated after stitching not only reduce the image quality but also seriously bring huge deviations to the downstream quantitative analysis.
[0003] In optical imaging experiments, the true recording of this information depends not only on the optical microscope devices used but also on the quality of sample preparation, the duration of the experiment, and the image post-processing algorithm. Although the imaging quality can also be optimized by hardware such as ultrafast lasers, high-numerical-aperture objectives, high-precision stages, and high-sensitivity detectors, the configuration of the microscopic system requires professional optical engineers to operate. Increasing the laser power can stimulate the fluorescence signal to a greater extent, but high power also increases the risk of sample photo-damage. In addition, commercial microscope software can enlarge the scanning range of the scanner, only image the shadow-free field of view in the middle, or increase the stitching overlap of adjacent two regions. Nevertheless, scaling a single region will result in a smaller size of the final stitched image. Therefore, the image post-processing method is the preferred solution for stripe correction.
[0004] Existing stripe correction algorithms can be divided into prospective and retrospective methods. The prospective method requires additional collection of reference images during the image acquisition process to estimate the effective illumination changes of the target image. In a single experimental operation, the imaging parameters vary with the type and quality of the sample, and even the power of the laser. Therefore, it is difficult to obtain accurate reference images under experimental conditions identical to the actual data and within an effective imaging time. The retrospective method only uses the actually acquired image data for correction, or constructs a correction model through a large number of image datasets to more accurately obtain the illumination changes. However, these methods are only applicable to the intensity attenuation starting from the center of the image, that is, uniform shadow stripes. With the development of deep learning technology, models based on deep neural networks can also be applied to this task. However, existing deep learning methods are all based on supervised learning and require the original pre-stitching images and the results repaired by experts to form a large number of paired images for training the model. Such methods that rely too much on a large amount of supervised training data limit their application in actual scenarios. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide an unsupervised adaptive stripe correction method for stitching microscopic images, which does not require adjustment of the settings of optical instruments and does not rely on estimated physical parameters or original stitching information. This method is applicable to the situation of insufficient training data in most imaging experiments.
[0006] To achieve the above purpose, the present invention adopts the following technical solutions: An unsupervised adaptive stripe correction method for stitching microscopic images, comprising the following steps:
[0007] Step S1: Perform data preprocessing on the stitched microscopic image with stripes, and divide the original image according to the positions of the stripes and artifacts; synthesize stripes and artifacts using clean microscopic images, and divide the original image according to the positions of the stripes and artifacts;
[0008] Step S2: Use the strategy of adjacent sampling to sample sufficient abnormal blocks and normal blocks, and construct unpaired positive and negative samples as training data;
[0009] Step S3: Design a stripe correction module, a stripe synthesis module, and a discriminator for evaluating the generated results;
[0010] Step S4: Based on the modules designed in Step S2, design a cyclic adversarial training network structure, and use the training set obtained in Step S1 to train the adversarial network model;
[0011] Step S5: Perform local-to-global correction on the given image to be repaired, and input the image blocks into the stripe correction module in an overlapping manner with a sliding window to output corrected blocks; finally, merge all the corrected blocks to form the final correction result.
[0012] In a preferred embodiment, step S1 specifically includes the following steps:
[0013] Step S11: According to the positions of the horizontal and vertical stripes in the stitched image, sample the image blocks in the stripe area as abnormal blocks; for an image with artifacts, sample the image blocks in the artifact area as abnormal blocks;
[0014] Step S12: Create a mask I that simulates the stripes according to the stripes existing in the fluorescence microscopy image M , take each field of view in the clean image as I R , combine each field of view with the mask to form stripes; create a mask I that simulates bubbles according to the bubble artifacts existing in the fluorescence microscopy image M , randomly select a partial area map in the clean image as I R , combine this area with the mask to form bubbles; create a mask I that simulates defocusing according to the defocusing artifacts existing in the fluorescence microscopy image M , select the corner area map in the clean image as I R , combine this area with the mask to form defocusing; the specific expression is as follows:
[0015] I S = I R *(1 - α)*I M
[0016] where, I M is the mask of the stripes or artifacts, I R is a partial map in the clean image, I S is the resulting map of the synthesized stripes or artifacts, and α is a parameter for adjusting the mask degree;
[0017] Create a mask I that simulates scanning artifacts according to the scanning artifacts existing in the fluorescence microscopy image M , take half of the area of the clean image as I R , combine it with the mask to form scanning artifacts; the specific expression is as follows:
[0018] I S = I R + β*I M * 255
[0019] where, I M is the mask of the scanning artifacts, I R is half of the area in the clean image, I S is the resulting map of the synthesized scanning artifacts, and β is a parameter for adjusting the mask degree.
[0020] In a preferred embodiment, step S2 specifically includes the following steps:
[0021] Step S21: Adopt a strategy of adjacent sampling to sample normal blocks from the non-striped areas of adjacent stripes; for abnormal blocks on horizontal stripes, select the image block closest to the stripe in the vertical direction as its corresponding normal block; for abnormal blocks on vertical stripes, select the image block closest to the stripe in the horizontal direction as its corresponding normal block; for abnormal blocks at the intersection of horizontal and vertical stripes, select the image block on the diagonal closest to it as the corresponding normal block; for the artifact area, sample from the adjacent artifact-free area as its corresponding normal block;
[0022] Step S22: According to the abnormal blocks and normal blocks collected in step S21, construct unpaired positive and negative samples as training data.
[0023] In a preferred embodiment, step S3 specifically includes the following steps:
[0024] Step S31: Design a stripe correction network and a stripe synthesis network. The two network structures are the same and are network structures based on an encoder and a decoder, divided into three stages, consisting of a downsampling layer, an intermediate layer, and an upsampling layer; the input of the network is the image block I, and the output is the corrected image block or the image block of the synthesized stripe Input the original image block into the convolutional layer to perform the conversion from the image to the feature map, and obtain the feature map F0 of C×H×W. The specific expression is:
[0025] F0 = Conv(I)
[0026] where I represents the input image block;
[0027] The downsampling layer of the first stage consists of convolutional layers; every time F0 passes through a convolutional layer, the size of the feature map becomes half of the original, and the number of channels becomes twice the original. Finally, the low-level visual feature map F1 is obtained. The calculation formula is as follows:
[0028] F1 = Conv(Conv(F0)))
[0029] The intermediate layer of the second stage is composed of stacked residual blocks ResnetBlock to extract high-level semantic features that can describe the cell tissue components; the residual block structures are the same and are composed of two convolutional layers; the features are enhanced by the stacked ResnetBlock, and the calculation formula is:
[0030] E0 = F1 + Cony(Conv(F1))
[0031] E1 = E0 + Conv(Conv(E0))
[0032] ……
[0033] E8 = E7 + Conv(Conv(E7))
[0034] Among them, E0, E1, ..., E8 represent the output features of each residual block, and the feature E8 output by the last residual block is used as the feature F2 enhanced by the intermediate layer;
[0035] The upsampling layer in the third stage consists of a transposed convolution layer and is used to integrate the features extracted in the previous layers; every time F2 passes through a convolution layer, the size of the feature map becomes twice the original, and the number of channels becomes half of the original, and finally a feature map F3 of C×H×W is obtained. The calculation formula is as follows:
[0036] F3 = ConvTranspose(ConvTranspose(F2)))
[0037] Input F3 into a convolution layer with the activation function Tanh to complete the conversion from the image to the feature map and reconstruct it to the original dimension of the image patch. The calculation formula is as follows:
[0038]
[0039] Among them, represents the output image patch;
[0040] Step S32: Design two discriminator networks with the same structure, which consist of five convolution layers; the input of the discriminator network is the image patch I. After passing through three convolution layers with a convolution kernel of 4×4 and a stride of 2, and then passing through two convolution layers with a convolution kernel of 4×4 and a stride of 1, a discriminant map with 1 channel is obtained as the evaluation result of the image patch I.
[0041] In a preferred embodiment, step S4 specifically includes the following steps:
[0042] Step S41: Design a cyclic network structure; denote the stripe correction network and the stripe synthesis network designed in step S21 as G C and G S respectively; the cyclic structure consists of two branches, which use the abnormal patch and the normal patch sampled in step S2 as inputs respectively; the first branch inputs the abnormal patch I X into the stripe correction network G C to obtain the corrected patch I′ Y , and then inputs it into the stripe synthesis network G S to obtain the synthesized patch I′ X ; the second branch inputs the normal patch I Y into the stripe synthesis network G S to obtain the synthesized patch I″ X, and then input it into the stripe correction network G C , to obtain the corrected block I″ Y ;
[0043] Step S42: Design the network structure for adversarial training; denote the two discriminator networks designed in step S32 as D Y and D X ; The discriminator D Y uses the normal block I Y as a reference to evaluate the quality of the corrected block I′ Y ; The discriminator D X uses the abnormal block I X as a reference to evaluate the quality of the synthesized block I″ X ; Through the generative adversarial training of G C , G S and D Y , D X , improve the stripe correction ability of G C and the stripe synthesis ability of G S ;
[0044] Step S43: According to the loss function of the cyclic adversarial training network, use the backpropagation method to calculate the gradients of the parameters in the network and update the parameters; the loss function is as follows:
[0045] L cons =E X ||G S (G C (X)) - X||1 + E Y ||G C (G S (Y)) - Y||1
[0046]
[0047]
[0048] L = λL cons +L adv
[0049]
[0050]
[0051] where E is the expected value of calculating the distributions of the abnormal block X and the normal block Y, L cons is the consistency loss function of the cyclic structure, and are the stripe correction network G C and the stripe synthesis network G SThe adversarial loss, where λ is a parameter for balancing the loss, and L is the loss function of the stripe correction network and the stripe synthesis network; and are the loss functions of discriminators D Y and D X respectively.
[0052] In a preferred embodiment, step S5 specifically includes the following steps:
[0053] Step S51: In the given image I to be repaired in , each image patch of the image to be repaired is overlapped and input into the trained stripe correction model in a sliding window manner, and the corrected image patch is output, and the correction count N of the area covered by the image patch is incremented by 1;
[0054] Step S52: The corrected image patches are merged to obtain a merged image I merge . According to the number of times F of overlapping correction for each region, the average value operation is taken for the overlapping regions between the corrected image patches to obtain the final correction result I out , and the calculation formula is:
[0055] I out = I merge / N.
[0056] Compared with the prior art, the present invention has the following beneficial effects: This method uses the normal patches sampled from the target image itself to correct its adjacent abnormal patches, solves the limitations of previous methods that require a large amount of training data or supervised training, realizes the adaptive processing of various stripes and artifacts existing in the spliced fluorescence images, and effectively improves the value of fluorescence pathological images affected by stripes and artifacts in downstream analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a schematic diagram of the overall process of the method of the preferred embodiment of the present invention;
[0058] Figure 2 is a schematic diagram of the unsupervised adaptive stripe correction method for the spliced microscopic image in the preferred embodiment of the present invention;
[0059] Figure 3 is a schematic diagram of the network model structure of the preferred embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0060] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0061] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.
[0062] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0063] An unsupervised adaptive stripe correction method for stitching microscopic images, as Figure 1 , Figure 2 , Figure 3 shown, includes the following steps:
[0064] Step S1: Perform data preprocessing on the stitched microscopic image with stripes, and divide the original image into blocks according to the positions of the stripes and artifacts; synthesize stripes and artifacts using a clean microscopic image, and divide the original image into blocks according to the positions of the stripes and artifacts;
[0065] Step S2: Use the strategy of nearest neighbor sampling to sample enough abnormal blocks and normal blocks, and construct unpaired positive and negative samples as training data;
[0066] Step S3: Design a stripe correction module, a stripe synthesis module, and a discriminator for evaluating the generated results;
[0067] Step S4: Based on the modules designed in Step S2, design a cyclic adversarial training network structure, and use the training set obtained in Step S1 to train the adversarial network model;
[0068] Step S5: Perform local-to-global correction on the given image to be repaired, and input the image blocks into the stripe correction module in an overlapping manner with a sliding window to output corrected blocks. Finally, merge all the corrected blocks to form the final correction result.
[0069] In this embodiment, Step S1 specifically includes the following steps:
[0070] Step S11: Adopt unlabeled multi-photon microscopy images MPM, and sample the image blocks in the stripe area as abnormal blocks according to the positions of the horizontal and vertical stripes in the image. For images with artifacts, sample the image blocks in the artifact area as abnormal blocks. Each abnormal block has the same size, which is 256×256 pixels;
[0071] Step S12: Based on the clean SRS image data, synthesize the stripe and artifact problems according to the MPM image with stripes or artifacts. Given a striped MPM image, sum up the pixel values of all fields of view, calculate the mean value and normalize it to 0 to 1 to obtain the mask I of the stripes M , take each field of view in the SRS image as I R , combine each field of view with the mask to form stripes; according to the bubble artifacts existing in the MPM image, use the gaussian_filter function in scipy.ndimage to create a mask I of uneven bubbles M , randomly select a partial area map in the SRS image as I R , combine this area with the mask to form bubbles; according to the defocus artifacts existing in the MPM image, use the gaussian_filter function in scipy.ndimage to create a mask I of uneven defocus M , select the corner area map in the SRS image as I R , combine this area with the mask to form defocus. The specific expression is as follows:
[0072] I S =I R *(1 - α)*I M
[0073] where, I M is the mask of stripes or artifacts, I R is a partial map in the SRS image, I S is the result map of synthesized stripes or artifacts, and α is a parameter for adjusting the mask degree.
[0074] According to the scanning artifacts existing in the fluorescence microscopy image, use the blue channel map of the ovarian cancer image Ovarian as the basis to create a mask I of simulated scanning artifacts M , take half of the area of the SRS image as I R , combine it with the mask to form scanning artifacts. The specific expression is as follows:
[0075] I S =I R +β*I M *255
[0076] where, I M is the mask of scanning artifacts, I R is half of the area in the SRS image, I S is the result map of synthesized scanning artifacts, and β is a parameter for adjusting the mask degree.
[0077] In this embodiment, step S2 specifically includes the following steps:
[0078] Step S21: Adopt the strategy of adjacent sampling to sample normal blocks from the non-striped areas adjacent to the stripes. For the abnormal blocks on the horizontal stripes, select the image block closest to the stripes in the vertical direction as its corresponding normal block; for the abnormal blocks on the vertical stripes, select the image block closest to the stripes in the horizontal direction as its corresponding normal block; for the abnormal blocks at the intersection of horizontal and vertical stripes, select the image block on the closest diagonal as the corresponding normal block; for the artifact area, sample from the adjacent artifact-free area as its corresponding normal block. Each normal block has the same size, which is 256×256 pixels;
[0079] Step S22: According to the abnormal blocks and normal blocks collected in step S21, construct unpaired positive and negative samples as training data, where the number and picture size of the positive and negative samples are the same.
[0080] In this embodiment, step S3 specifically includes the following steps:
[0081] Step S31: Design a stripe correction network and a stripe synthesis network. The two network structures are the same and are based on the encoder-decoder network structure, which is divided into three stages and consists of a downsampling layer, an intermediate layer, and an upsampling layer. The input of the network is the image block I, and the output is the corrected image block or the image block synthesizing stripes Input the original image block into a convolutional layer with a convolutional kernel of 7×7 and a ReLU activation function to perform the conversion from the image to the feature map, and obtain the feature map F0 of C×H×W. The specific expression is:
[0082] F0 = Conv(I)
[0083] where I represents the input image block.
[0084] The downsampling layer of the first stage consists of two convolutional layers with a convolutional kernel of 3×3 and a stride of 2. Each time F0 passes through a convolutional layer, the size of the feature map becomes half of the original, and the number of channels becomes twice the original. Finally, obtain the low-level visual feature map F1. The calculation formula is as follows:
[0085] F1 = Conv(Conv(F0)))
[0086] The intermediate layer of the second stage consists of 9 stacked residual blocks ResnetBlock, which are used to extract high-level semantic features that can describe the cell tissue components. The residual blocks have the same structure and consist of two convolutional layers with a convolutional kernel of 3×3 and a stride of 1. Enhance the features through 9 stacked ResnetBlock. The calculation formula is:
[0087] E0 = F1 + Cony(Conv(F1))
[0088] E1 = E0 + Conv(Conv(E0))
[0089] ……
[0090] E8 = E7 + Conv(Conv(E7))
[0091] Among them, E0, E1, ..., E8 represent the output features of each residual block, and the feature E8 output by the last residual block is used as the feature F2 after intermediate layer enhancement.
[0092] The upsampling layer in the third stage consists of two transposed convolution layers with a convolution kernel of 3×3 and a stride of 2, which is used to integrate the features extracted in the previous layers. Each time F2 passes through a convolution layer, the size of the feature map becomes twice the original, and the number of channels becomes half of the original, and finally a feature map F3 of C×H×W is obtained. The calculation formula is as follows:
[0093] F3 = ConvTranspose(ConvTranspose(F2))
[0094] Input F3 into a convolution layer with a convolution kernel of 7×7 and an activation function of Tanh to complete the conversion from the image to the feature map and reconstruct it to the original dimension of the image block. The calculation formula is as follows:
[0095]
[0096] Among them, represents the output image block;
[0097] Step S32: Design two discriminator networks with the same structure, which consist of five convolution layers. The input of the discriminator network is the image block I. After passing through three convolution layers with a convolution kernel of 4×4 and a stride of 2, and then passing through two convolution layers with a convolution kernel of 4×4 and a stride of 1, a discriminant map with 1 channel is obtained as the evaluation result of the image block I.
[0098] In this embodiment, step S4 specifically includes the following steps:
[0099] Step S41: Design a cyclic network structure. Denote the stripe correction network and the stripe synthesis network designed in step S21 as G C and G S . The cyclic structure consists of two branches, which take the abnormal block and the normal block sampled in step S2 as inputs respectively. The first branch inputs the abnormal block I X into the stripe correction network G C , and obtains the corrected block I′ Y , and then inputs it into the stripe synthesis network G S , and obtains the synthesized block I′X ; The second branch inputs the normal block I Y into the stripe synthesis network G S to obtain the synthesized block I″ X , and then inputs it into the stripe correction network G C to obtain the corrected block I″ Y ;
[0100] Step S42: Design the network structure for adversarial training. Denote the two discriminator networks designed in step S32 as D Y and D X . The discriminator D Y uses the normal block I Y as a reference to evaluate the quality of the corrected block I′ Y ; The discriminator D X uses the abnormal block I X as a reference to evaluate the quality of the synthesized block I″ X . Through the generative adversarial process of G C , G S and D Y , D X , the stripe correction ability of G C and the stripe synthesis ability of G S are improved;
[0101] Step S43: According to the loss function of the cyclic adversarial training network, use the backpropagation method to calculate the gradients of the parameters in the network, and use the Adam optimization algorithm to update the parameters; the loss function is as follows:
[0102] L cons =E X ||G S (G C (X)) - X||1 + E Y ||G C (G S (Y)) - Y||1
[0103]
[0104]
[0105] L = λL cons +L adv
[0106]
[0107]
[0108] where E is the expected value of calculating the distributions of the abnormal block X and the normal block Y, L consis the consistency loss function of the loop structure, and are the adversarial losses of the stripe correction network G C and the stripe synthesis network G S respectively. λ is the parameter for balancing the losses, and L is the loss function of the stripe correction network and the stripe synthesis network; and are the loss functions of the discriminators D Y and D X respectively.
[0109] In this embodiment, step S5 specifically includes the following steps:
[0110] Step S51: In the given image I to be repaired in , each image block of the image to be repaired is overlapped and input into the trained stripe correction model in a sliding window manner, and the corrected image block is output, and the correction count N of the area covered by the image block is incremented by 1;
[0111] Step S52: The corrected image blocks are merged to obtain the merged image I merge . According to the number of times F of overlapping correction in each area, the average value operation is performed on the overlapping areas between the corrected image blocks to obtain the final corrected result I out , and the calculation formula is:
[0112] I out = I merge / N.
[0113] The above program design solution provided in this embodiment can be stored in a computer-readable storage medium in a codified form, implemented in the form of a computer program, and the basic parameter information required for calculation is input through computer hardware, and the calculation result is output.
[0114] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0115] The present invention will be described with reference to the flowcharts of methods, apparatuses (devices), and computer program products according to embodiments of the present invention. It should be understood that each process in the flowchart and the combination of processes in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one process Figure 1 or multiple processes.
[0116] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in one process Figure 1 or multiple flowcharts.
[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 or multiple processes.
[0118] As described above, it is only the preferred embodiment of the present invention, and it is not a limitation to the present invention in other forms. Any person skilled in the art may use the disclosed technical content to make changes or modifications into equivalent embodiments with equivalent changes. However, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution content of the present invention still belong to the protection scope of the technical solution of the present invention.
[0119] This patent is not limited to the above best implementation manner. Anyone can obtain other various forms of unsupervised adaptive stripe correction methods for stitching microscopic images under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope covered by this patent.
Claims
1. An unsupervised adaptive stripe correction method for stitching microscopic images, characterized in that, It includes the following steps: Step S1: Perform data preprocessing on the spliced microscopic image with stripes, and divide the original image into blocks according to the positions of the stripes and artifacts; synthesize the stripes and artifacts using a clean microscopic image, and divide the original image into blocks according to the positions of the stripes and artifacts; Step S2: Use the strategy of nearest neighbor sampling to sample sufficient abnormal blocks and normal blocks, and construct unpaired positive and negative samples as training data; Step S3: Design a stripe correction module, a stripe synthesis module, and a discriminator for evaluating the generated results; Step S4: Based on the modules designed in Step S3, design a cyclic adversarial training network structure, and use the training set obtained in Step S1 to train the adversarial network model; Step S5: Perform local-to-global correction on the given image to be repaired, and input the image blocks into the stripe correction module in an overlapping manner in a sliding window manner to output corrected blocks; finally, merge all the corrected blocks to form the final correction result; Step S4 specifically includes the following steps: Step S41: Design a cyclic network structure; denote the stripe correction network and the stripe synthesis network designed in Step S21 as G C and G S ; The cyclic structure consists of two branches, which take the abnormal block and the normal block sampled in Step S2 as inputs respectively; The first branch inputs the abnormal block I X into the stripe correction network G C to obtain the corrected block I′ Y , and then inputs it into the stripe synthesis network G S to obtain the synthesized block I′ X ; The second branch inputs the normal block I Y into the stripe synthesis network G S to obtain the synthesized block I″ X , and then inputs it into the stripe correction network G C to obtain the corrected block I″ Y ; Step S42: Design the network structure for adversarial training; Denote the two discriminator networks designed in step S32 as D Y and D X ; The discriminator D Y uses the normal block I Y as a reference to evaluate the quality of the corrected block I′ Y ; The discriminator D X uses the abnormal block I X as a reference to evaluate the quality of the synthesized block I″ X ; Through the generative adversarial training of G C , G S and D Y , D X , improve the stripe correction ability of G C and the stripe synthesis ability of G S ; Step S43: According to the loss function of the cyclic adversarial training network, use the backpropagation method to calculate the gradients of the parameters in the network and update the parameters; the loss function is as follows: L cons = E X || G S (G C (X)) - X || 1 + E Y || G C (G S (Y)) - Y || 1 L = λL cons + L adv Among them, E is the expected value of the distribution of the abnormal calculation block X and the normal block Y, L cons is the consistency loss function of the loop structure, and are the adversarial losses of the stripe correction network G C and the stripe synthesis network G S respectively, λ is the parameter for balancing the losses, and L is the loss function of the stripe correction network and the stripe synthesis network; and are the loss functions of the discriminators D Y and D X respectively.
2. The unsupervised adaptive stripe correction method for stitching microscopic images according to claim 1, characterized in that: Step S1 specifically includes the following steps: Step S11: According to the positions of the horizontal and vertical stripes in the spliced image, sample the image blocks in the stripe area as abnormal blocks; for the image with artifacts, sample the image blocks in the artifact area as abnormal blocks; Step S12: Fabricate a mask I that simulates the stripes according to the stripes present in the fluorescence microscopic image M , take each field of view in the clean image as I R , combine each field of view with the mask to form stripes; Fabricate a mask I that simulates the bubbles according to the bubble artifacts present in the fluorescence microscopic image M , randomly select some area maps in the clean image as I R , combine this area with the mask to form bubbles; Fabricate a mask I that simulates defocus according to the defocus artifacts present in the fluorescence microscopic image M , select the corner area map in the clean image as I R , combine this area with the mask to form defocus; The specific expression is as follows: I S = I R *(1 - α)*I M where I M is a mask for stripes or artifacts, I R is a partial image in the clean image, I S is the resulting image synthesized with stripes or artifacts, and α is a parameter for adjusting the mask degree; According to the scanning artifacts present in the fluorescence microscopic image, a mask I simulating the scanning artifacts is manufactured. M Half of the area of the clean image is taken as I. R It is combined with the mask to form scanning artifacts. The specific expression is as follows: I S = I R + β * I M * 255 where β is a parameter for adjusting the masking degree.
3. The unsupervised adaptive stripe correction method for stitching microscopic images according to claim 1, characterized in that: Step S2 specifically includes the following steps: Step S21: Adopt the strategy of nearest neighbor sampling to sample normal blocks from the non-stripe area adjacent to the stripes; for the abnormal blocks on the horizontal stripes, select the image block closest to the stripe in the vertical direction as its corresponding normal block; for the abnormal blocks on the vertical stripes, select the image block closest to the stripe in the horizontal direction as its corresponding normal block; for the abnormal blocks at the intersection of the horizontal and vertical stripes, select the image block on the closest diagonal as the corresponding normal block; for the artifact area, sample from the adjacent artifact-free area as its corresponding normal block; Step S22: According to the sufficient abnormal blocks and normal blocks collected in Step S21, construct unpaired positive and negative samples as training data.
4. The unsupervised adaptive stripe correction method for stitching microscopic images according to claim 1, characterized in that: Step S3 specifically includes the following steps: Step S31: Design a stripe correction network and a stripe synthesis network. The two network structures are the same and are network structures based on an encoder and a decoder, which are divided into three stages and consist of a downsampling layer, an intermediate layer, and an upsampling layer. The input of the network is the image patch I, and the output is the corrected image patch or the image patch of the synthesized stripe Input the original image patch into the convolutional layer to perform the conversion from the image to the feature map, and obtain the feature map F0 of C×H×W. The specific expression is: F0 = Conv(I) where I represents the input image block; The downsampling layer in the first stage consists of convolutional layers; for each convolutional layer that F0 passes through, the size of the feature map becomes half of the original, and the number of channels becomes twice the original. Finally, the low-level visual feature map F1 of is obtained, and the calculation formula is as follows: F1 = Conv(Conv(F0)) The intermediate layer in the second stage is composed of stacked residual blocks ResnetBlock, which is used to extract high-level semantic features that can describe the cell tissue components; the residual blocks have the same structure and are composed of two convolutional layers; the features are enhanced by stacking ResnetBlock, and the calculation formula is: E0 = F1 + Conv(Conv(F1)) E1 = E0 + Conv(Conv(E0)) …… E8 = E7 + Conv(Conv(E7)) where E0, E1,..., E8 represent the output features of each residual block, and the feature E8 output by the last residual block is used as the enhanced feature F2 of the intermediate layer; The upsampling layer in the third stage consists of a transposed convolution layer, which is used to integrate the features extracted in the previous layers; every time F2 passes through a convolutional layer, the size of the feature map becomes twice the original, and the number of channels becomes half of the original, and finally a feature map F3 of C×H×W is obtained. The calculation formula is as follows: F3 = ConvTranspose(ConvTranspose(F2)) Input F3 into a convolutional layer with the activation function Tanh to complete the conversion from the image to the feature map and reconstruct it to the original dimension of the image patch. The calculation formula is as follows: Among them, represents the output image block; Step S32: Design two discriminator networks with the same structure, which consist of five convolutional layers; the input of the discriminator network is the image patch I. After passing through three convolutional layers with a convolutional kernel of 4×4 and a stride of 2, and then passing through two convolutional layers with a convolutional kernel of 4×4 and a stride of 1, a discriminant map with 1 channel is obtained as the evaluation result of the image patch I.
5. The unsupervised adaptive stripe correction method for stitching microscopic images according to claim 1, characterized in that: Step S5 specifically includes the following steps: Step S51: In the given image I to be repaired in each image patch of the image to be repaired is overlapped and input into the trained stripe correction model in the form of a sliding window, and the corrected image patch is output, and the correction times N of the area covered by the image patch is incremented by 1; Step S52: Merge the corrected image patches to obtain the merged graph I merge , according to the number of times F of regional overlapping correction, perform a mean operation on the overlapping regions between the corrected image patches to obtain the final corrected result I out , and the calculation formula is: I out = I merge / N.
Citation Information
Patent Citations
Structured light illumination super-resolution microscopic imaging system and method based on machine learning
CN110221421A
Fish-eye camera scene depth estimation method based on unsupervised learning
CN115063463A