Microorganism image enhancement processing method
By building multiple innovative modules, combining spatial and frequency domain features, an enhanced processing method for microbial images is proposed, which solves the problems of image blurring and detail loss in low light conditions in traditional methods, and realizes efficient detail optimization and global Improved contrast.
Patent Information
- Application Number
- CN202510065345.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-16
AI Technical Summary
The microbial images captured by traditional electron microscopy imaging technology under low light conditions have problems of blurring and detail loss. The existing deep learning-based image enhancement methods cannot effectively process the low-light blurring characteristics of microbial images, resulting in insufficient extraction of detailed information.
A microbial image enhancement processing method combining spatial and frequency domain features is proposed. By constructing attention module MI-SAM, frequency domain feedforward network MI-FDFN, extended attention module MI-ESAM and feedforward network module MIG-FFN, Connect multiple modules in series to achieve image detail optimization and global contrast improvement.
It significantly improves the detail clarity and global contrast of low-light blur images of microbial organisms, improves the training and detection efficiency of models, and maintains efficient information retention and computing efficiency in complex backgrounds.
Smart Images

Figure CN119477735A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a microorganism image enhancement processing method. Background Art
[0002] The quality of microbial images is crucial in microbial research, medical diagnosis and environmental monitoring; however, images taken under low-light conditions using traditional electron microscopy imaging technology usually have problems with blur and loss of detail, making it difficult to meet the requirements of precise analysis and high-resolution display; although some post-processing algorithms can enhance image quality to a certain extent, these methods often rely on global adjustment strategies and have limited effects on detail restoration, especially in complex backgrounds, where it is difficult to ensure the stability of the enhancement results; therefore, developing a microbial image enhancement method that focuses on detail optimization, which can both effectively retain the original image information and improve the clarity of image details, is an important direction of current research.
[0003] In recent years, deep learning technology has made remarkable progress in the field of image processing, especially in applications such as image deblurring, super-resolution and enhancement processing. However, existing deep learning-based image enhancement methods are usually optimized for natural images and lack special design for the low-light blur characteristics of microbial images. When processing microbial images, these methods often fail to extract detailed information due to the limitations of the feature extraction module. In addition, traditional convolutional neural networks lack spatial and frequency domain joint attention modeling of microbial structural features, and cannot comprehensively improve the visual quality of images.
[0004] With the development of artificial intelligence technology, hybrid network architectures that combine spatial and frequency domain feature processing have gradually attracted attention. This type of method can effectively make up for the shortcomings of a single processing method by enhancing local attention in the spatial domain and retaining global image information in the frequency domain. However, there is currently no dedicated network structure for microbial image enhancement, and there is a lack of feature extraction and processing methods for low-light blurry images. To this end, a microbial image enhancement processing method that comprehensively considers spatial and frequency domain features is proposed, which can achieve efficient detail optimization and global contrast enhancement in low-light blurry images, while improving the training and detection efficiency of the model. Summary of the invention
[0005] The present invention provides a microbial image enhancement processing method, which aims to effectively solve the problem of microbial low-light blurry image enhancement by combining an innovative method of spatial and frequency domain features, and realize efficient processing of detail optimization and global information retention.
[0006] The present invention provides a microorganism image enhancement processing method, which specifically comprises the following steps: S1. Preparation of microbial image dataset: using electron microscope imaging equipment to collect microbial low-light blurry images in the microbial image enhancement processing application scenario, and obtaining the microbial low-light blurry image dataset after size normalization; S2. Construct an attention module MI-SAM, introduce an attention adaptive weight parameter to improve the conventional spatial channel attention module, and extract and fuse the local and global spatial features of microbial images by combining spatial grouping enhancement and spatial channel attention through multi-layer convolution operations; S3, constructing a frequency domain feedforward network MI-FDFN, which branches and reorganizes the frequency modules and phase information of microbial image features by combining fast Fourier transform and inverse fast Fourier transform; S4, construct a downsampling encoding module DECONV, serially cascade an attention module MI-SAM and a frequency domain feedforward network MI-FDFN; S5. Construct an extended attention module MI-ESAM, which adjusts and enhances the receptive field through multi-branch deep convolution combined with different expansion coefficients, and integrates the spatial grouping enhancement and spatial channel attention of microbial image features; S6. Construct the feedforward network module MIG-FFN, and achieve efficient fusion of multi-dimensional features of microbial image features through standardization processing combined with local spatial feature extraction and spatial grouping enhancement; S7, construct an upsampling decoding module UDCONV, serially cascade an extended attention module MI-ESAM and a feedforward network module MIG-FFN; S8. Construct a microbial image enhancement processing network model MIEPNM, which includes input, lol stage, deblur stage and output; S9. Train the microbial detection model and conduct tests. Use the constructed microbial low-light blurry image dataset to train the microbial image enhancement processing network model MIEPNM. After the training is completed, input the image to be enhanced into the model, optimize the image through the enhancement processing network, and output a clear enhanced image with prominent details.
[0007] Preferably, in step S2, the attention module MI-SAM is used to extract spatial local features and enhance attention; first, the attention adaptive weight parameter is introduced into the conventional spatial channel attention module , the spatial channel attention SCA module suitable for microbial image enhancement processing is obtained as: ; in is the channel attention weight, is the spatial attention weight, attention adaptive weight parameter The values are: ; in To calculate the global importance of the weights by averaging them; then the attention module MI-SAM is designed to convert the microbial images In the input module, , H is the feature height, W is the feature width, and C is the number of feature channels; then normalization is performed to obtain ,at this time ;Will Input to Extract local spatial features, Indicates that a 3×3 convolution kernel is used for convolution operation, and the number of channels is doubled. ; Then further extract features and Input into the two convolution kernels of 1×1 and 3×3 in turn to get ;at this time ; then Input to the SG module for spatial grouping enhancement ,at this time ; then Input the SCA module to fuse spatial and channel attention to obtain ,at this time ; then Input to a 1×1 convolution to reduce the number of channels from 2C back to C, and we get ,at this time ; Finally, input features Add back output Perform residual connection to get: ; at this time It is the final output of the attention module MI-SAM.
[0008] Preferably, the attention module MI-SAM dynamically adjusts the feature weight distribution by combining the spatial and channel attention mechanisms to achieve a balanced optimization of global information and local details; using the channel attention weight and spatial attention weights Weighted fusion of Through dynamic calculation, this module can accurately extract key feature areas, and further enhance feature expression through 3×3 and 1×1 convolution and spatial grouping SG enhancement modules, while retaining the integrity of input features through residual connection to ensure information fluency and gradient stability; the overall design takes into account the optimization of global and local features, has strong adaptability and efficiency, and can significantly improve the visual quality and detail clarity of low-light blurred images of microorganisms in complex backgrounds.
[0009] Preferably, the frequency domain feedforward network MI-FDFN described in step S3 realizes the fusion of phase and frequency information through frequency domain feature extraction; the output of the attention module MI-SAM As input, the input features are first normalized to obtain ,at this time ; then Perform fast Fourier transform to obtain frequency module and phase information, the formula is: ; in is the fast Fourier transform operation, is the frequency module characteristic, is the phase information feature, j is a complex unit ,at this time , ; then and It is divided into two branches, The branch directly retains the phase information characteristics, The branch is first input into a 1×1 convolution kernel to extract local spatial features, and the number of channels is doubled to obtain ,at this time ; then Input to the ReLu activation function to get ,at this time ; then Input to a 1×1 convolution kernel to reduce the number of channels from 2C back to C, and we get ,at this time ; for The total output can be summarized as: ; Then will Frequency module feature output of the branch and The phase information features of the branches are recombined and returned to the spatial domain through inverse Fourier transform to obtain: ; at this time ; then The initial input of the frequency domain feedforward network MI-FDFN Perform residual multiplication and connection to obtain: ; at this time , and finally The initial input of the frequency domain feedforward network MI-FDFN Perform the residual addition operation to obtain: ; at this time It is the final output of the frequency domain feedforward network MI-FDFN.
[0010] Preferably, the frequency domain feedforward network MI-FDFN maps the input features from the spatial domain to the frequency domain through fast Fourier transform (FFT), extracts frequency modules and phase information, and realizes the separation processing of global features and local features, wherein the frequency module enhances the expression of local spatial features through 1×1 convolution and ReLU activation function, and then recombine with the phase information and return to the spatial domain through inverse Fourier transform (IFFT), and finally fuses with the original input features through residual connection to output frequency domain enhanced features; this module combines the advantages of frequency domain and spatial domain, which not only improves the ability to extract global features, but also strengthens the expression of detail features. It is particularly suitable for microbial image enhancement processing in low-light complex backgrounds. While improving the detail clarity and global contrast of microbial images, it avoids information loss and maintains high computational efficiency.
[0011] Preferably, the downsampling encoding module DECONV described in step S4 includes an attention module MI-SAM at the front end and a frequency domain feedforward network MI-FDFN connected to the tail end.
[0012] Preferably, the extended attention module MI-ESAM described in step S5 is used to adjust the receptive field and enhance the features; first, the output of the DECONV module As input, it is first normalized and subjected to a preliminary convolution operation: ; At this time, the channel characteristics doubled to ; Then the deep convolution of the three parallel branches is combined with different expansion coefficients to adjust the receptive field range to obtain: ; in represents a 3×3 depthwise convolution with a dilation factor of 1, represents a 3×3 depthwise convolution with a dilation factor of 4, represents a 3×3 depth convolution with a dilation factor of 9. ; then Input to the SG module for spatial grouping enhancement ,at this time ; then Input the SCA module to fuse spatial and channel attention to obtain ,at this time ; then Input to a 1×1 convolution to reduce the number of channels from 2C back to C, and we get ,at this time ; Finally, On the initial input with the extended attention module MI-ESAM Perform the residual addition operation to obtain: ; at this time It is the final output of the extended attention module MI-ESAM.
[0013] Preferably, the extended attention module MI-ESAM adjusts the receptive field range through multi-scale dilated convolution to effectively enhance the feature extraction capability; first, after normalizing and preliminarily convolving the input features, three parallel branches are introduced to achieve multi-scale feature capture through 3×3 deep convolutions with dilation coefficients of 1, 4, and 9, respectively, and further optimizes local features through the spatial grouping enhancement module, and combines the channel attention fusion module to enhance the attention expression of global and local features; finally, the module reduces the channel dimension through 1×1 convolution, retains the original input feature information through residual connection, and outputs it with the enhanced feature fusion; the design of this module has both global and local optimization capabilities, which can effectively capture multi-scale information in microbial images with low light and complex backgrounds, significantly improve the detail clarity and feature expression capabilities of microbial images, while maintaining information integrity and computational efficiency.
[0014] Preferably, the feedforward network module MIG-FFN described in step S6 uses the output of the extended attention module MI-ESAM As input, the input features are first normalized to obtain ,at this time ; then Pass input to Extract local spatial features, and the number of channels doubles to ; then Input to the SG module for spatial grouping enhancement ,at this time ; then Input to a 1×1 convolution to reduce the number of channels from 2C back to C to restore the same channel dimension as the input feature, and get ,at this time ; Finally, On the initial input with the extended attention module MI-ESAM Perform the residual addition operation to obtain: ; at this time It is the final output of the feedforward network module MIG-FFN.
[0015] Preferably, the feedforward network MIG-FFN enhances feature expression through normalization and local convolution operations; first, after the input features are normalized, the spatial feature extraction capability is refined through the spatial grouping enhancement module, and then the number of channels is reduced from 2C to C using 1×1 convolution, which is consistent with the input feature channels, thereby efficiently fusing global and local features; finally, the module adds the initial input features to the enhanced features through residual connections, which not only retains the original information but also enhances the feature expression capability; this module is designed to enhance the detailed expression and global consistency of features, and is suitable for microbial image enhancement processing tasks in complex scenarios. It can significantly enhance the model's ability to capture key features while maintaining computational efficiency.
[0016] Preferably, the upsampling decoding module UDCONV described in step S7 includes an extended attention module MI-ESAM at the front end and a feedforward network module MIG-FFN at the tail end.
[0017] Preferably, the microbial image enhancement processing network model MIEPNM described in step S8 is divided into an upsampling stage and a downsampling stage.
[0018] Preferably, in the microbial image enhancement processing network model MIEPNM described in step S8, the downsampling stage first converts the low-light blurred input image Input into a 3×3 convolution for preliminary feature extraction ,at this time ; then The input is obtained from the above downsampling encoding module DECONV ,at this time ,Will Perform downsampling and 2 layers of DECONV depth convolution to obtain: ; in For a 2×2 convolution, set the stride to 2, which reduces the feature space resolution to half of the original and doubles the number of channels. , and similarly Continue with downsampling and 3 layers of DECONV depth convolution to get: ; at this time ; then Continue downsampling and 2 layers of DECONV depth convolution to get: ; at this time , the downsampling phase ends.
[0019] Preferably, in the microbial image enhancement processing network model MIEPNM described in step S8, the upsampling stage first converts Input 2 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; in A 1×1 convolution is used to reduce the dimension of the feature channel to half, and then a layer of pixel rearrangement operation is connected in series to double the width and height of the spatial resolution path. ; then Input 3 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; at this time ; Then continue to Input 2 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; at this time ; Finally, Input to the 1-layer upsampling decoding module UDCONV and 1-layer 1×1 ordinary convolution to get: ; at this time This is the final output image of the microbial image enhancement processing network model MIEPNM.
[0020] Preferably, the up- and down-sampling stages of the microbial image enhancement processing network model MIEPNM effectively realize multi-scale feature extraction and reconstruction through deep convolution modules and specific up- and down-sampling operations; in the down-sampling stage, after the input features are initially extracted through 3×3 convolution, the spatial resolution is gradually reduced by multi-layer DECONV modules and down-sampling operations, while the channel dimension is improved, thereby capturing global features and retaining key information; in the up-sampling stage, the input features are gradually restored to spatial resolution through multi-layer UDCONV modules and up-sampling operations, and the features of the down-sampling stage are integrated into the reconstruction process in combination with residual connections to ensure the integrity of the information flow; the final output stage further refines the features through 1×1 convolution; the overall design takes into account both the extraction of global features and the restoration of local details, and can significantly improve the clarity and enhancement effect of microbial images under complex backgrounds and low-light conditions, while maintaining the efficiency and robustness of the model.
[0021] Preferably, in the training and detection of the microbial detection model described in step S9, that is, using the microbial low-light blurred image dataset constructed in step S1, the microbial image enhancement processing network model MIEPNM is trained. After the training is completed, the image to be enhanced is input into the model, and the image is optimized through the enhancement processing network to output a clear enhanced image with prominent details.
[0022] Compared with the existing technology, this technology proposes a new method that combines spatial and frequency domain feature processing to solve the problem of low-light blur in microbial images; by introducing innovative structures such as attention module (MI-SAM), frequency domain feedforward network (MI-FDFN), and extended attention module (MI-ESAM), the effect of image enhancement processing is significantly improved; compared with traditional enhancement methods based on global adjustment, this technology can more accurately restore details while retaining the global information of the image, especially showing higher robustness in low-light and complex backgrounds. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 The figure is an overall flow chart of a microbial image enhancement processing method.
[0024] Figure 2 Schematic diagram of the structure of the downsampling encoding module DECONV.
[0025] Figure 3 Schematic diagram of the structure of the upsampling decoding module UDCONV.
[0026] Figure 4 This is the network structure diagram of the microbial image enhancement processing network model MIEPNM.
[0027] Figure 5 Schematic diagram of the comparison of low-light blurry image enhancement processing of microorganisms. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0029] Please see attached Figure 1 -Attached Figure 5 , the present invention provides a microbial image enhancement processing method.
[0030] The present invention proposes a microbial image enhancement processing method, as shown in the attached Figure 1 As shown in the overall flow chart, it specifically includes the following steps: S1. Preparation of microbial image dataset: using electron microscope imaging equipment to collect microbial low-light blurry images in the microbial image enhancement processing application scenario, and obtaining the microbial low-light blurry image dataset after size normalization; S2. Construct an attention module MI-SAM, introduce an attention adaptive weight parameter to improve the conventional spatial channel attention module, and extract and fuse the local and global spatial features of microbial images by combining spatial grouping enhancement and spatial channel attention through multi-layer convolution operations; S3, constructing a frequency domain feedforward network MI-FDFN, which branches and reorganizes the frequency modules and phase information of microbial image features by combining fast Fourier transform and inverse fast Fourier transform; S4, construct a downsampling encoding module DECONV, serially cascade an attention module MI-SAM and a frequency domain feedforward network MI-FDFN; S5. Construct an extended attention module MI-ESAM, which adjusts and enhances the receptive field through multi-branch deep convolution combined with different expansion coefficients, and integrates the spatial grouping enhancement and spatial channel attention of microbial image features; S6. Construct the feedforward network module MIG-FFN, and achieve efficient fusion of multi-dimensional features of microbial image features through standardization processing combined with local spatial feature extraction and spatial grouping enhancement; S7, construct an upsampling decoding module UDCONV, serially cascade an extended attention module MI-ESAM and a feedforward network module MIG-FFN; S8. Construct a microbial image enhancement processing network model MIEPNM, which includes input, lol stage, deblur stage and output; S9. Train the microbial detection model and conduct tests. Use the constructed microbial low-light blurry image dataset to train the microbial image enhancement processing network model MIEPNM. After the training is completed, input the image to be enhanced into the model, optimize the image through the enhancement processing network, and output a clear enhanced image with prominent details.
[0031] Furthermore, in the preparation of the microbial image dataset described in step S1, after collecting low-light blurred microbial images using an electron microscope, the images are resized and tensorized using the Resize() and ToTensor() methods in torchvision.transforms of PyTorch to obtain the final dataset.
[0032] Further, as attached Figure 2As shown in the module structure diagram on the left, in this embodiment, in step S2, the attention module MI-SAM uses PyTorch to build a custom module containing 3×3 and 1×1 convolutions, and combines the channel attention mechanism to input the initial microbial image feature map The feature size is 256 in height, 256 in width, and 64 in number of channels. First, the microbial image adaptive parameter is introduced into the conventional spatial channel attention module. , we get the spatial channel attention SCA module suitable for microbial image enhancement processing: ; in is the channel attention weight, is the spatial attention weight, the adaptive parameter of microbial image The values are: ; in In order to calculate the global importance by performing the mean operation on the weights, the adaptive weight parameter in this embodiment is The initial value of is set to 0.5; then the attention module MI-SAM is designed to In the input module, , H is the feature height, W is the feature width, and C is the number of feature channels; then normalization is performed to obtain ,at this time ;Will Input to Extract local spatial features, Indicates that a 3×3 convolution kernel is used for convolution operation, and the number of channels is doubled. ; Then further extract features and Input into the two convolution kernels of 1×1 and 3×3 in turn to get ;at this time ; then Input to the SG module for spatial grouping enhancement ,at this time ; then Input the SCA module to fuse spatial and channel attention to obtain ,at this time ; then Input to a 1×1 convolution to reduce the number of channels from 2C back to C, and we get ,at this time ; Finally, input features Add back output Perform residual connection to get: ; at this time It is the final output of the attention module MI-SAM.
[0033] Further, as attached Figure 2 As shown in the module structure diagram on the right side of , in this embodiment, the frequency domain feedforward network MI-FDFN described in step S3 uses PyTorch's torch.fft to perform FFT and IFFT operations, the initial feature size of the input microbial image is H=256, W=256, C=64, and a custom convolutional layer is used to process the frequency domain features; first, the output microbial image feature map of the inter-attention module MI-SAM is converted into As input, normalization is performed to obtain ,at this time ; then Perform fast Fourier transform to obtain frequency module and phase information, the formula is: ; in is the fast Fourier transform operation, is the frequency module characteristic, is the phase information feature, j is a complex unit ,at this time , ; then and It is divided into two branches, The branch directly retains the phase information characteristics, The branch is first input into a 1×1 convolution kernel to extract local spatial features, and the number of channels is doubled to obtain ,at this time ; then Input to the ReLu activation function to get ,at this time ; then Input to a 1×1 convolution kernel to reduce the number of channels from 2C back to C, and we get ,at this time ; for The total output can be summarized as: ; Then will Frequency module feature output of the branch and The phase information features of the branches are recombined and returned to the spatial domain through inverse Fourier transform to obtain ,at this time ; then The initial input of the frequency domain feedforward network MI-FDFN Perform residual multiplication and connection to obtain ,at this time , and finally The initial input of the frequency domain feedforward network MI-FDFN Perform residual addition operation to obtain ,at this time It is the final output of the frequency domain feedforward network MI-FDFN.
[0034] Further, as attached Figure 2 As shown in the structure diagram, in this embodiment, the downsampling encoding module DECONV described in step S4 includes an attention module MI-SAM at the front end and a frequency domain feedforward network MI-FDFN connected to the tail.
[0035] Further, as attached Figure 3 As shown in the module structure diagram on the left, in this embodiment, the extended attention module MI-ESAM described in step S5 uses PyTorch's torch.nn.Conv2d to set different expansion rates to achieve multi-scale feature extraction; the output microbial image feature map of the DECONV module As input, the initial feature size is H=256, W=256, C=64; first normalization and preliminary convolution operation are performed to obtain: ; At this time, the channel characteristics doubled to ; Then the deep convolution of the three parallel branches is combined with different expansion coefficients to adjust the receptive field range to obtain: ; in represents a 3×3 depthwise convolution with a dilation factor of 1, represents a 3×3 depthwise convolution with a dilation factor of 4, represents a 3×3 depth convolution with a dilation factor of 9. ; then Input to the SG module for spatial grouping enhancement ,at this time ; then Input the SCA module to fuse spatial and channel attention to obtain ,at this time ; then Input to a 1×1 convolution to reduce the number of channels from 2C back to C, and we get ,at this time ; Finally, On the initial input with the extended attention module MI-ESAM Perform residual addition operation to obtain ,at this time It is the final output of the extended attention module MI-ESAM.
[0036] Further, as attached Figure 3 As shown in the module structure diagram on the right side of , in this embodiment, the feedforward network module MIG-FFN described in step S6 is implemented based on the normalization and convolution operation of PyTorch, and the output microbial image feature map of the extended attention module MI-ESAM is converted into As input, the initial feature size is H=256, W=256, C=64; first, the input feature is normalized to obtain ,at this time ; then Pass input to Extract local spatial features, and the number of channels doubles to ; then Input to the SG module for spatial grouping enhancement ,at this time ; then Input to a 1×1 convolution to reduce the number of channels from 2C back to C to restore the same channel dimension as the input feature, and get ,at this time ; Finally, On the initial input with the extended attention module MI-ESAM Perform the residual addition operation to obtain: ; at this time It is the final output of the feedforward network module MIG-FFN.
[0037] Further, as attached Figure 3 As shown in the structure diagram, in this embodiment, the upsampling decoding module UDCONV described in step S7 includes an extended attention module MI-ESAM at the front end and a feedforward network module MIG-FFN at the tail end.
[0038] Further, as attached Figure 4 As shown in the structure diagram, in this embodiment, the microbial image enhancement processing network model MIEPNM described in step S8 uses PyTorch's torch.nn.Sequential to combine the above modules into a complete network and define the forward propagation logic; the model is specifically divided into an upsampling stage and a downsampling stage.
[0039] Further, as attached Figure 4 As shown in the flow chart on the left, in this embodiment, in the microbial image enhancement processing network model MIEPNM described in step S8, the downsampling stage input is a low-light blurred microbial image , input the initial feature size as H=256, W=256, C=64; first Input into a 3×3 convolution for preliminary feature extraction ,at this time ; then The input is obtained from the above downsampling encoding module DECONV ,at this time That is, H=256, W=256, C=64, Perform downsampling and 2 layers of DECONV depth convolution to obtain: ; in For a 2×2 convolution, set the stride to 2, which reduces the feature space resolution to half of the original and doubles the number of channels. That is, H=128, W=128, C=128, and the same Continue with downsampling and 3 layers of DECONV depth convolution to get: ; at this time That is, H=64, W=64, C=256; then Continue downsampling and 2 layers of DECONV depth convolution to get: ; at this time That is, H=32, W=32, C=512, and the downsampling stage ends.
[0040] Further, as attached Figure 4 As shown in the flow chart on the right side of the figure, in this embodiment, in the microbial image enhancement processing network model MIEPNM described in step S8, the initial input of the upsampling stage is the microbial image feature map output in the downsampling stage. , the initial feature size is H=32, W=32, C=512; first Input 2 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; in A 1×1 convolution is used to reduce the dimension of the feature channel to half, and then a layer of pixel rearrangement operation is connected in series to double the width and height of the spatial resolution path. That is, H=64, W=64, C=256; then Input 3 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; at this time That is, H=128, W=128, C=128; then continue to Input 2 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; at this time That is, H=256, W=256, C=64; finally Input to the 1-layer upsampling decoding module UDCONV and 1-layer 1×1 ordinary convolution to get: ; at this time The feature size is H=256, W=256, C=64, which is the final output image of the microbial image enhancement processing network model MIEPNM.
[0041] Furthermore, in this embodiment, the training microbial detection model and detection described in step S9, that is, the microbial low-light blurred image dataset constructed in step S1 is used to train the microbial image enhancement processing network model MIEPNM. The training is performed under python 3.10.12 version, using the PyTorch 2.5.1 framework and the Adam optimizer for 1000 iterations. Because the video memory size is 12GB, the batch size is set to 32, the initial learning rate is 0.004, and the learning rate is dynamically adjusted during the training process. After the training data is completed, the best enhancement model file is obtained, and the image to be enhanced is input into the enhancement model. The image is optimized through the enhancement processing network to output a clear enhanced image with prominent details. The schematic diagram of the result of microbial image enhancement processing is shown in the attached figure. Figure 5 As shown, part a is the input original image, and part b is the output image after enhancement processing.
Claims
1. A microbial image enhancement processing method, characterized in that: The following steps are involved: S1. Preparation of microbial image dataset: using electron microscope imaging equipment to collect microbial low-light blurry images in the microbial image enhancement processing application scenario, and obtaining the microbial low-light blurry image dataset after size normalization; S2. Construct an attention module MI-SAM, introduce an attention adaptive weight parameter to improve the conventional spatial channel attention module, and extract and fuse the local and global spatial features of microbial images by combining spatial grouping enhancement and spatial channel attention through multi-layer convolution operations; S3, constructing a frequency domain feedforward network MI-FDFN, which branches and reorganizes the frequency modules and phase information of microbial image features by combining fast Fourier transform and inverse fast Fourier transform; S4, construct a downsampling encoding module DECONV, serially cascade an attention module MI-SAM and a frequency domain feedforward network MI-FDFN; S5. Construct an extended attention module MI-ESAM, which adjusts and enhances the receptive field through multi-branch deep convolution combined with different expansion coefficients, and integrates the spatial grouping enhancement and spatial channel attention of microbial image features; S6. Construct the feedforward network module MIG-FFN, and achieve efficient fusion of multi-dimensional features of microbial image features through standardization processing combined with local spatial feature extraction and spatial grouping enhancement; S7, construct an upsampling decoding module UDCONV, serially cascade an extended attention module MI-ESAM and a feedforward network module MIG-FFN; S8. Construct a microbial image enhancement processing network model MIEPNM, which includes input, lol stage, deblur stage and output; S9. Train the microbial detection model and conduct tests. Use the constructed microbial low-light blurry image dataset to train the microbial image enhancement processing network model MIEPNM. After the training is completed, input the image to be enhanced into the model, optimize the image through the enhancement processing network, and output a clear enhanced image with prominent details.
2. A microorganism image enhancement processing method according to claim 1, characterized in that: The attention module MI-SAM described in step S2: First, the attention adaptive weight parameter is introduced to the conventional spatial channel attention module , the spatial channel attention SCA module suitable for microbial image enhancement processing is obtained as ; in is the channel attention weight, is the spatial attention weight, attention adaptive weight parameter The values are: ; in To calculate the global importance of the weights by averaging them; then the attention module MI-SAM is designed to convert the microbial images In the input module, , H is the feature height, W is the feature width, and C is the number of feature channels; Then normalization is performed to obtain ,at this time ;Will Input to Extract local spatial features, Indicates that a 3×3 convolution kernel is used for convolution operation, and the number of channels is doubled. ; Then further extract features and Input into the two convolution kernels of 1×1 and 3×3 in turn to get ;at this time ; then Input to the SG module for spatial grouping enhancement ,at this time ; Then will Input the SCA module to fuse spatial and channel attention to obtain ,at this time ; then Input to a 1×1 convolution to reduce the number of channels from 2C back to C, and we get ,at this time ; Finally, input features Add back output Perform residual connection to obtain ,at this time It is the final output of the attention module MI-SAM.
3. A microorganism image enhancement processing method according to claim 1, characterized in that: The frequency domain feedforward network MI-FDFN described in step S3; the output of the attention module MI-SAM As input, the input features are first normalized to obtain ,at this time ; then Perform fast Fourier transform to obtain frequency module and phase information, the formula is: ; in is the fast Fourier transform operation, is the frequency module characteristic, is the phase information feature, j is a complex unit ,at this time , ; then and It is divided into two branches, The branch directly retains the phase information characteristics, The branch is first input into a 1×1 convolution kernel to extract local spatial features, and the number of channels is doubled to obtain ,at this time ; Then will Input to the ReLu activation function to get ,at this time ; Then will Input to a 1×1 convolution kernel to reduce the number of channels from 2C back to C, and we get ,at this time ; for The total output can be summarized as: ; Then will Frequency module feature output of the branch and The phase information features of the branches are recombined and returned to the spatial domain through inverse Fourier transform to obtain: ; at this time ; then The initial input of the frequency domain feedforward network MI-FDFN Perform residual multiplication and connection to obtain: ; at this time , and finally The initial input of the frequency domain feedforward network MI-FDFN Perform the residual addition operation to obtain: ; at this time It is the final output of the frequency domain feedforward network MI-FDFN.
4. The microorganism image enhancement processing method according to claim 1, characterized in that: The extended attention module MI-ESAM described in step S5 converts the output of the DECONV module As input, it is first normalized and subjected to a preliminary convolution operation: ; At this time, the channel characteristics doubled to ; Then the deep convolution of the three parallel branches is combined with different expansion coefficients to adjust the receptive field range to obtain: ; in represents a 3×3 depthwise convolution with a dilation factor of 1, represents a 3×3 depthwise convolution with a dilation factor of 4, represents a 3×3 depth convolution with a dilation factor of 9. ; then Input to the SG module for spatial grouping enhancement ,at this time ; then Input the SCA module to fuse spatial and channel attention to obtain ,at this time ; Then will Input to a 1×1 convolution to reduce the number of channels from 2C back to C, and we get ,at this time ; Finally, On the initial input with the extended attention module MI-ESAM Perform the residual addition operation to obtain: ; at this time It is the final output of the extended attention module MI-ESAM.
5. The microorganism image enhancement processing method according to claim 1, characterized in that: The feedforward network module MIG-FFN described in step S6 first converts the output of the extended attention module MI-ESAM As input, the input features are first normalized to obtain ,at this time ; then Pass input to Extract local spatial features, and the number of channels doubles to ; Then will Input to the SG module for spatial grouping enhancement ,at this time ; Then will Input to a 1×1 convolution to reduce the number of channels from 2C back to C to restore the same channel dimension as the input feature, and get ,at this time ; Finally, On the initial input with the extended attention module MI-ESAM Perform the residual addition operation to obtain: ; at this time It is the final output of the feedforward network module MIG-FFN.
6. The microorganism image enhancement processing method according to claim 1, characterized in that: The microbial image enhancement processing network model MIEPNM described in step S8 is divided into an upsampling stage and a downsampling stage, wherein the downsampling stage first converts the low-light blurred input image Input into a 3×3 convolution for preliminary feature extraction ,at this time ; Then will The input is obtained from the above downsampling encoding module DECONV ,at this time ,Will Perform downsampling and 2 layers of DECONV depth convolution to obtain: ; in For a 2×2 convolution, set the stride to 2, which reduces the feature space resolution to half of the original and doubles the number of channels. , and similarly Continue with downsampling and 3 layers of DECONV depth convolution to get: ; at this time ; then Continue downsampling and 2 layers of DECONV depth convolution to get: ; at this time , the downsampling phase ends; The upsampling stage first converts Input 2 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; in A 1×1 convolution is used to reduce the dimension of the feature channel to half, and then a layer of pixel rearrangement operation is connected in series to double the width and height of the spatial resolution path. ; Then will Input 3 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; at this time ; Then continue to Input 2 layers of upsampling decoding module UDCONV and upsampling operation and Perform residual connection and get: ; at this time ; Finally, Input to 1 layer upsampling decoding module UDCONV and 1 layer 1×1 ordinary convolution to get: ; at this time This is the final output image of the microbial image enhancement processing network model MIEPNM.
Citation Information
Patent Citations
Image-based assay using intelligent monitoring structures
CN113227754A
Dynamic illumination face image quality enhancement method based on multi-scale attention mechanism
CN115880225A
Moving image deblurring model based on Fourier transform
CN117115040A
Microorganism image recognition system and method
CN117132978A
Deep learning-based cervical cancer cell microscopic image deblurring method
CN117788335A
Cited By
Sleep apnea identification method based on multi-modal feature fusion
CN121015165A