Microorganism dyeing image processing method

By using continuous convolutional operations in microbial staining image processing, encoder-decoder structure enhances cell characteristics and self-attention mechanism to restore subtle features, the problems of low image quality and noise interference in traditional methods are solved, and microbial Accuracy of recognition and reliability of image data.

CN119130881AInactive Publication Date: 2024-12-13SHANDONG HAOXIN INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411620640.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional microbial staining image processing methods rely on manual operations, are susceptible to subjective factors, have low image quality, noise interference, and it is difficult to accurately identify the subtle structures and textures of microbial cells, affecting the accuracy of identification and classification.

Method used

Continuous convolution operation is used to remove noise, the encoder-decoder structure combines multi-channel attention mechanism to enhance cell characteristics, self-attention mechanism and pooling technology to restore subtle features and textures, and build a microbial staining image processing model.

Benefits of technology

It improves the clarity of images and the visibility of cellular features, enhances the accuracy of microbial identification and classification, reduces information loss, and provides clearer and more detailed image data support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130881A_ABST
    Figure CN119130881A_ABST
Patent Text Reader

Abstract

The invention provides a microbial dyeing image processing method, and relates to the technical field of image enhancement. The invention provides a microbiological dyeing image processing flow. Comprising the following steps: acquiring a microbial staining image, preprocessing the microbial staining image, constructing a noise removal module, constructing a cell feature enhancement module, constructing a fine feature and texture recovery module, constructing a microbial staining image processing model, and training and testing the microbial staining image processing model. Meanwhile, a microbiological staining image processing model is provided, and a noise removal module uses continuous convolution and is used for removing noise in a microbiological staining image; the cell feature enhancement module adopts an encoder-decoder structure and is combined with a multi-channel attention mechanism, and is used for enhancing cell features in the denoised microbial staining image; and the fine feature and texture recovery module is used for recovering fine features and textures in the enhanced microbial staining image by using a method of combining a self-attention mechanism and a pooling technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image enhancement, and in particular relates to a microorganism staining image processing method. Background Art

[0002] In the field of microbiology, the processing of microbial staining images is crucial for the identification, classification and further research of microorganisms. On the one hand, traditional microbial staining image processing methods often rely on manual operations, which is not only time-consuming and labor-intensive, but also easily affected by subjective factors, resulting in low accuracy of the results; on the other hand, although traditional microscope imaging technology can provide intuitive images of microbial samples, these images often have problems such as noise interference, unclear cell features, and difficult to identify fine structures and textures. These problems limit the accuracy and efficiency of image analysis and affect the identification and classification of microorganisms.

[0003] With the development of computer vision and deep learning technologies, image processing technology has shown great potential in improving image quality; however, existing microbial staining image processing technologies face many challenges in practical applications. Microbial staining images often contain a lot of noise, which may come from contamination during sample preparation, optical distortion during microscope acquisition, or interference during image transmission, which seriously affects the image quality; the characteristics of microbial cells are complex and changeable, including differences in morphology, size, color, etc., making it difficult to accurately extract and enhance cell features in images; the subtle features and textures of microbial staining images are crucial for identifying the type and state of microorganisms, but these features are often easily masked by noise and lighting conditions and are difficult to present clearly in images.

[0004] On the basis of existing image processing technology, by constructing an organic combination of three key modules: denoising, feature enhancement and subtle feature recovery, it is hoped that while reducing image noise, the visibility and recognition of cells can be significantly improved, and clearer and more detailed image textures can be restored. This will not only help improve the accuracy of microbial identification and classification, but also provide more reliable and detailed image data support for subsequent biological research and clinical diagnosis. Summary of the invention

[0005] The present invention provides a microorganism staining image processing method, aiming to propose a microorganism staining image processing model, wherein a noise removal module uses continuous convolution operations to remove noise in the microorganism staining image, which is beneficial to improving the clarity of the image and making the details of the microorganism cells more obvious; a cell feature enhancement module adopts an encoder-decoder structure combined with a multi-channel attention mechanism to enhance the cell features in the denoised microorganism staining image, so that the outline, shape and internal structure of the cell are clearer; a subtle feature and texture restoration module uses a self-attention mechanism and a pooling technology combined method to restore the subtle features and textures in the enhanced microorganism staining image, which is beneficial to improving the overall quality of the image and reducing information loss caused by image blur or distortion.

[0006] The present invention aims to propose a microorganism staining image processing model and provide a microorganism staining image processing method, which includes the following steps.

[0007] S1. Obtain a microbial staining image, obtain a microbial sample from a microbial culture medium, process the microbial sample using an appropriate staining technique, collect the microbial staining image using a microscope, prepare a microbial staining image dataset, perform a preprocessing operation on the microbial staining image dataset, and divide the preprocessed microbial staining image dataset into a training set and a test set.

[0008] S2. Construct a noise removal module, wherein the noise removal module is used to remove noise in the microorganism staining image.

[0009] S3. Construct a cell feature enhancement module, wherein the cell feature enhancement module is used to enhance the cell features in the denoised microbial staining image.

[0010] S4. Constructing a subtle feature and texture restoration module, wherein the subtle feature and texture restoration module is used to restore the subtle features and texture of the enhanced microorganism staining image.

[0011] S5. Construct a microbial staining image processing model, which includes input, noise removal module, cell feature enhancement module, subtle feature and texture restoration module and output.

[0012] S6. Training and testing of the microbial staining image processing model. The microbial staining image training set is used to train the microbial staining image processing model. The parameters of the model are updated according to the gradient of the loss function. After the training is completed, the microbial staining image test set is input into the trained microbial staining image processing model to obtain the enhanced microbial staining image.

[0013] Preferably, in step S2, for the noise removal module, the microbial staining image is input , , , and are the height, width and number of channels of the microbial staining image, and the microbial staining image Input to 3 convolution kernels with size In the convolutional layers, each convolutional layer uses the maximum pooling operation and the ReLU activation function. The first convolutional layer is followed by a batch normalization layer to obtain the feature map , , is the number of channels after the convolution operation, and the feature map The input to the convolution kernel size is In the convolution layer, the number of filters is 3, and the denoised feature map is obtained. .

[0014] Preferably, in step S2, for the noise removal module, a convolution operation is used to capture local features of the image and identify noise and details in the image. By using multi-layer convolution operations, the network can learn feature representations from shallow to deep layers, gradually remove noise and retain useful information; the ReLU activation function provides nonlinear processing capabilities, enabling the network to better handle complex noise patterns; batch normalization helps the network converge faster, while reducing sensitivity to initialization weights and improving denoising effects.

[0015] Preferably, in step S3, the cell feature enhancement module is divided into an encoder part and a decoder part. First, the denoised feature map obtained in step S2 is The input is sent to the encoder part and passes through 4 concatenated convolutional layers, where each convolution kernel size is , ReLU activation function is used after each convolution, and multi-channel attention mechanism is used after each convolution layer. The learnable weight matrix is ​​obtained through linear transformation, and the attention weight of each channel is calculated. , , and They are query, key and value, is the key feature dimension, the attention weight is used to weight the sum of the values, and all channels are spliced ​​together. The output of each layer is obtained through the ReLU activation function. The feature map of the final output of the encoder part is , , the feature map Input to the decoder part, through the convolution kernel size In the transposed convolution layer, the feature map is obtained , , the feature map Add the output of the third convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolution layer, the feature map is obtained , , the feature map Add the output of the second convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolution layer, the feature map is obtained , the feature map Added to the output of the first convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolution layer, the feature map is obtained , , the feature map finally output by the cell feature enhancement module is .

[0016] Preferably, in step S3, for the cell feature enhancement module, the convolution operation of the encoder is used to deeply extract the features of the denoised microbial staining image; the multi-channel attention mechanism is used after each convolution layer, which can dynamically adjust the importance of different channels, highlight key features and suppress unimportant information; the transposed convolution operation of the decoder is used to gradually restore the spatial resolution of the image, so that the enhanced image is richer and more accurate in details; the output of the transposed convolution layer in the decoder is added to the output of the convolution layer in the encoder, which can combine the deep features extracted in the encoder with the features reconstructed in the decoder, thereby enhancing the expressive power of the features.

[0017] Preferably, in step S4, for the fine feature and texture recovery module, the feature map finally outputted in step S3 is Perform average pooling along the height direction to obtain the feature map , , the feature map Flattening is performed along the width direction. , and obtain the feature vector , ; The step S3 finally outputs the feature map Perform average pooling along the width direction to obtain the feature map , , the feature map Flattening is performed along the height direction. , and obtain the feature vector , , the feature vector and the eigenvector After layer normalization, it is input into the self-attention mechanism to calculate the correlation features between the two vectors. , get the feature map , the feature map The feature map finally outputted from step S3 Add, , and obtain the final enhanced feature map .

[0018] Preferably, in step S4, for the subtle feature and texture recovery module, the module can capture subtle features in the image through average pooling and feature map expansion operations; the self-attention mechanism enables the model to automatically focus on key areas in the image and enhance the features of these areas; adding the enhanced feature map to the original feature map can retain the useful information of the original image, while introducing enhanced features to improve the overall quality of the image; the module improves computational efficiency and reduces processing time through effective feature processing and fusion strategies, making image processing faster.

[0019] Preferably, in step S5, for the microorganism staining image processing model, the microorganism staining image is input To the noise removal module, , , and are the height, width and number of channels of the microbial staining image, respectively, and the denoised feature map output by the noise removal module is obtained , input the feature map Go to the cell feature enhancement module to obtain the enhanced feature map output by the cell feature enhancement module , input the feature map To the subtle feature and texture restoration module, the final feature map output by the subtle feature and texture restoration module is obtained .

[0020] Preferably, in step S5, for the microbial staining image processing model, the noise removal module uses continuous convolution operations to remove noise in the microbial staining image; the cell feature enhancement module adopts an encoder-decoder structure combined with a multi-channel attention mechanism to enhance the cell features in the denoised microbial staining image; the subtle feature and texture restoration module uses a combination of a self-attention mechanism and pooling technology to restore subtle features and textures in the enhanced microbial staining image.

[0021] Compared with the prior art, the present invention has the following technical effects: The technical solution provided by the present invention proposes a microbial staining image processing model, wherein a noise removal module uses continuous convolution operations to remove noise in the microbial staining image, which is beneficial to improving the clarity of the image and making the details of the microbial cells more obvious; the cell feature enhancement module adopts an encoder-decoder structure combined with a multi-channel attention mechanism to enhance the cell features in the denoised microbial staining image, making the cell outline, shape and internal structure clearer; the subtle feature and texture recovery module uses a method combining a self-attention mechanism and a pooling technology to restore the subtle features and textures in the enhanced microbial staining image, which is beneficial to improving the overall quality of the image and reducing information loss caused by image blur or distortion. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of microorganism staining image processing provided by the present invention.

[0023] Figure 2 It is a structural diagram of the noise removal module provided by the present invention.

[0024] Figure 3 This is a structural diagram of the cell feature enhancement module provided by the present invention.

[0025] Figure 4 This is a rendering of the microorganism staining image provided by the present invention before processing.

[0026] Figure 5 This is a diagram showing the effect of the microorganism staining image processing provided by the present invention. DETAILED DESCRIPTION

[0027] The present invention aims to propose a microbial staining image processing method and a microbial staining image processing model, wherein a noise removal module uses continuous convolution operations to remove noise in the microbial staining image, which is beneficial to improving the clarity of the image and making the details of the microbial cells more obvious; a cell feature enhancement module adopts an encoder-decoder structure combined with a multi-channel attention mechanism to enhance the cell features in the denoised microbial staining image, so that the outline, shape and internal structure of the cell are clearer; a subtle feature and texture restoration module uses a self-attention mechanism combined with a pooling technology to restore the subtle features and textures in the enhanced microbial staining image, which is beneficial to improving the overall quality of the image and reducing information loss caused by image blur or distortion.

[0028] See also Figure 1 As shown, a microorganism staining image processing method in an embodiment of the present application.

[0029] S1. Obtain a microbial staining image, obtain a microbial sample from a microbial culture medium, process the microbial sample using an appropriate staining technique, collect the microbial staining image using a microscope, prepare a microbial staining image dataset, perform a preprocessing operation on the microbial staining image dataset, and divide the preprocessed microbial staining image dataset into a training set and a test set.

[0030] Furthermore, in step S1, in order to obtain the microbial staining image, the microbial sample is taken out from the microbial culture medium, the microbial sample is processed using the Gram staining technique, the stained microbial sample is observed and photographed using a high-power microscope, and the collected microbial staining images are sorted to obtain a microbial staining image data set.

[0031] Furthermore, in step S1, for the microbial staining image preprocessing operation, basic image enhancement operations are performed on the microbial staining image, including rotation, scaling, translation, flipping, cropping, and contrast adjustment. The preprocessed data set is divided into a training set and a test set, with the training set accounting for 80% and the test set accounting for 20%.

[0032] S2. Construct a noise removal module, wherein the noise removal module is used to remove noise in the microorganism staining image.

[0033] Further, in step S2, for the noise removal module, its structure is as follows Figure 2 As shown, input microbial staining image , , , and are the height, width and number of channels of the microbial staining image, and the microbial staining image Input to 3 convolution kernels with size In the convolutional layers of , each convolutional layer uses the maximum pooling operation and the ReLU activation function. The first convolutional layer is followed by a batch normalization layer. The number of filters in the first convolutional layer is , the number of filters in the second and third convolutional layers are , the step size of each convolutional layer is 1, and the feature map is obtained , , is the number of channels after the convolution operation, and the feature map The input to the convolution kernel size is In the convolution layer, the number of filters is 3, and the denoised feature map is obtained. .

[0034] S3. Construct a cell feature enhancement module, wherein the cell feature enhancement module is used to enhance the cell features in the denoised microbial staining image.

[0035] Further, in step S3, for the cell feature enhancement module, its structure is as follows Figure 3 As shown, it is divided into an encoder part and a decoder part. First, the denoised feature map obtained in step S2 is The input is sent to the encoder part and passes through 4 concatenated convolutional layers, where each convolution kernel size is , the number of filters in the first convolutional layer is , the stride is 2, the padding is 1; the number of filters in the second convolutional layer is , the stride is 2, the padding is 1; the number of filters in the third convolutional layer is , the stride is 2, the padding is 1; the number of filters in the fourth convolutional layer is , the step size is 2, the padding is 1, the ReLU activation function is used after each convolution, and the multi-channel attention mechanism is used after each convolution layer. The learnable weight matrix is ​​obtained through linear transformation, and the attention weight of each channel is calculated. , , and They are query, key and value, is the key feature dimension, the attention weight is used to weight the sum of the values, and all channels are spliced ​​together. The output of each layer is obtained through the ReLU activation function. The feature map of the final output of the encoder part is , , the feature map Input to the decoder part, through the convolution kernel size In the transposed convolutional layer of , get the feature map , , the feature map Add the output of the third convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolutional layer of , get the feature map , , the feature map Add the output of the second convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolutional layer of , the feature map Added to the output of the first convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolutional layer of , get the feature map , , the feature map finally output by the cell feature enhancement module is .

[0036] S4. Constructing a subtle feature and texture restoration module, wherein the subtle feature and texture restoration module is used to restore the subtle features and texture of the enhanced microorganism staining image.

[0037] Further, in step S4, for the subtle feature and texture recovery module, the feature map finally outputted in step S3 is converted into Perform average pooling along the height direction to obtain the feature map , , the feature map Flattening is performed along the width direction. , and obtain the feature vector , ; The step S3 finally outputs the feature map Perform average pooling along the width direction to obtain the feature map , , the feature map Flattening is performed along the height direction. , and obtain the feature vector , , the feature vector and the eigenvector After layer normalization, it is input into the self-attention mechanism to calculate the correlation features between the two vectors. , get the feature map , the feature map The feature map finally outputted from step S3 Add, , and obtain the final enhanced feature map .

[0038] S5. Construct a microbial staining image processing model, which includes input, noise removal module, cell feature enhancement module, subtle feature and texture restoration module and output.

[0039] Further, in step S5, for the microbial staining image processing model, the microbial staining image is input To the noise removal module, , 1024, 1024 and 3 are the height, width and number of channels of the microbial staining image respectively, and the denoised feature map output by the noise removal module is obtained , , input the feature map Go to the cell feature enhancement module to obtain the enhanced feature map output by the cell feature enhancement module , , input the feature map To the subtle feature and texture restoration module, the final feature map output by the subtle feature and texture restoration module is obtained , .

[0040] Furthermore, in step S5, for the microbial staining image processing model, it was written in Python language, using the Pytorch framework, using the cross entropy loss function, using the stochastic gradient descent optimizer, with a learning rate of 0.001 and a training batch size of 32.

[0041] S6. Training and testing of the microbial staining image processing model. The microbial staining image training set is used to train the microbial staining image processing model. The parameters of the model are updated according to the gradient of the loss function. After the training is completed, the microbial staining image test set is input into the trained microbial staining image processing model to obtain the enhanced microbial staining image.

[0042] Furthermore, in step S6, for the training and testing of the microbial staining image processing model, the microbial staining image training set is input into the microbial staining image processing model, the value of the loss function is calculated, and the gradient of the loss function is propagated back to each layer of the model through the back propagation algorithm, and the parameters of the model are updated. The above operation is repeated until the training batch size is reached or the model performance is no longer improved, and the microbial staining image test set is input into the trained microbial staining image processing model to obtain the enhanced microbial staining image. The effect diagram of the microbial staining image before processing is shown in FIG. Figure 4 As shown in the figure, the effect of microbial staining image processing is as follows Figure 5 shown.

[0043] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.

Claims

1. A microbial staining image processing method, characterized in that: The following steps are involved: S1, obtaining a microbial staining image, obtaining a microbial sample from a microbial culture medium, treating the microbial sample with an appropriate staining technique, collecting a microbial staining image using a microscope, preparing a microbial staining image dataset, performing a preprocessing operation on the microbial staining image dataset, and dividing the preprocessed microbial staining image dataset into a training set and a test set; S2, constructing a noise removal module, wherein the noise removal module is used to remove noise in the microorganism staining image; S3, constructing a cell feature enhancement module, wherein the cell feature enhancement module is used to enhance the cell features in the denoised microbial staining image; S4, constructing a subtle feature and texture restoration module, wherein the subtle feature and texture restoration module is used to restore the subtle features and texture of the enhanced microbial staining image; S5. Construct a microbial staining image processing model, including input, noise removal module, cell feature enhancement module, subtle feature and texture restoration module and output; S6. Training and testing of the microbial staining image processing model. The microbial staining image training set is used to train the microbial staining image processing model. The parameters of the model are updated according to the gradient of the loss function. After the training is completed, the microbial staining image test set is input into the trained microbial staining image processing model to obtain the enhanced microbial staining image.

2. A microorganism staining image processing method according to claim 1, characterized in that: In step S2, the noise removal module inputs the microbial staining image , , , and are the height, width and number of channels of the microbial staining image, and the microbial staining image Input to 3 convolution kernels with size In the convolutional layers, each convolutional layer uses the maximum pooling operation and the ReLU activation function. The first convolutional layer is followed by a batch normalization layer to obtain the feature map , , is the number of channels after the convolution operation, and the feature map The input to the convolution kernel size is In the convolution layer, the number of filters is 3, and the denoised feature map is obtained. .

3. A microorganism staining image processing method according to claim 2, characterized in that: In step S3, the cell feature enhancement module is divided into an encoder part and a decoder part. First, the denoised feature map obtained in step S2 is The input is sent to the encoder part and passes through 4 concatenated convolutional layers, where each convolution kernel size is , ReLU activation function is used after each convolution, and multi-channel attention mechanism is used after each convolution layer. The learnable weight matrix is ​​obtained through linear transformation, and the attention weight of each channel is calculated. , , and They are query, key and value, is the key feature dimension, the attention weight is used to weight the sum of the values, and all channels are spliced ​​together. The output of each layer is obtained through the ReLU activation function. The feature map of the final output of the encoder part is , , the feature map Input to the decoder part, through the convolution kernel size In the transposed convolution layer, the feature map is obtained , , the feature map Add the output of the third convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolution layer, the feature map is obtained , , the feature map Add the output of the second convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolution layer, the feature map is obtained , the feature map Added to the output of the first convolutional layer in the encoder to get the feature map , the feature map The convolution kernel size is In the transposed convolution layer, the feature map is obtained , , the feature map finally output by the cell feature enhancement module is .

4. A microorganism staining image processing method according to claim 3, characterized in that: In step S4, the fine feature and texture recovery module converts the feature map finally outputted in step S3 into Perform average pooling along the height direction to obtain the feature map , , the feature map Flattening is performed along the width direction. , and obtain the feature vector , ; The step S3 finally outputs the feature map Perform average pooling along the width direction to obtain the feature map , , the feature map Flattening is performed along the height direction. , and obtain the feature vector , , the feature vector and the eigenvector After layer normalization, it is input into the self-attention mechanism to calculate the correlation features between the two vectors. , get the feature map , the feature map The feature map finally outputted from step S3 Add, , and obtain the final enhanced feature map .

5. A microorganism staining image processing method according to claim 4, characterized in that: In step S5, the microorganism staining image processing model inputs the microorganism staining image To the noise removal module, , , and are the height, width and number of channels of the microbial staining image, respectively, and the denoised feature map output by the noise removal module is obtained , input the feature map Go to the cell feature enhancement module to obtain the enhanced feature map output by the cell feature enhancement module , input the feature map To the subtle feature and texture restoration module, the final feature map output by the subtle feature and texture restoration module is obtained .

Citation Information

Patent Citations

  • Deep learning model based on attention mechanism

    CN115240049A

  • Image segmentation method, image segmentation model construction method, image segmentation model construction device and medium

    CN116596846A

  • Low-illumination image enhancement method based on feature fusion and attention embedding

    CN116797488A

  • Personnel target detection method and system

    CN117037211A

  • Sewage treatment fault diagnosis method and system based on machine learning

    CN117952327A