Microscope automatic imaging processing method and microscope automatic imaging system
Through the automated imaging processing method and image segmentation model of microscope, the problem that the microscope system needs to manually adjust the focal length and magnification during the imaging process is solved, and efficient image segmentation and automated imaging are achieved, improving image analysis efficiency and reducing computing resource requirements.
Patent Information
- Application Number
- CN202510310091.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-13
AI Technical Summary
The existing microscope system needs to manually adjust the focal length and magnification during the imaging process, which leads to high operation difficulty, low image analysis efficiency, and prone to errors caused by insufficient experience.
The microscope automated imaging processing method is adopted to obtain the image to be analyzed through automatic focus and input it into the pre-constructed image segmentation model. The dual fully connected channel attention module, compression and extended convolution attention bridge module and the hollow convolution and effective channel attention module are integrated into the improved U-Net architecture to achieve efficient medical image segmentation.
It improves image segmentation accuracy, enhances the automatic imaging effect of microscopes, and reduces the demand for computer computing resources and reduces the error of manual operation.
Smart Images

Figure CN120147295A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a method for automatic imaging processing of a microscope and an automatic imaging system of a microscope. Background Art
[0002] A microscope system is an overall system composed of microscope hardware (such as lenses, light sources, microscope bodies, etc.) and supporting software (such as image acquisition, processing, and analysis tools). The microscope system can observe tiny objects by adjusting different magnification lenses, thereby assisting scientific research and scientific discovery.
[0003] However, in the imaging process of the microscope system, it is necessary to manually adjust the focal length and magnification, and also manually process and analyze the obtained microscope images. This not only increases the difficulty of operating the equipment, but also greatly reduces the image analysis efficiency of scientific researchers, and moreover, it will also cause errors due to insufficient experience in the image processing process. Summary of the Invention
[0004] In view of this, the present invention provides a method for automatic imaging processing of a microscope and an automatic imaging system of a microscope to solve the problem of poor imaging effect of the images generated by the microscope system in the prior art.
[0005] In a first aspect, the present invention provides a method for automatic imaging processing of a microscope, and the method includes:
[0006] Obtain an image to be analyzed, where the image to be analyzed is acquired after automatic focusing by the microscope;
[0007] Input the image to be analyzed into a pre-constructed image segmentation model to obtain a segmented image; the segmentation model includes: a double fully-connected channel attention module, a compression and expansion convolutional attention bridge module, and a dilated convolution and effective channel attention module; among them, the double fully-connected channel attention module is used to enhance feature representation, the compression and expansion convolutional attention bridge module is used for feature fusion, and the dilated convolution and effective channel attention module is used to extract global feature information and local feature information.
[0008] By integrating these three modules, namely the DFCA module, the DECA module, and the SECAB module, into an improved U-Net architecture, a lightweight and efficient medical image segmentation model LMEAUNet can be realized. Through this model, the extraction, fusion, and refinement of global and local features of the image can be enhanced, the image segmentation accuracy can be effectively improved, the automatic imaging effect of the microscope can be enhanced, and at the same time, the demand for computer computing resources can be effectively reduced.
[0009] In an optional implementation manner, the image segmentation model further includes:
[0010] An input layer for receiving the image to be analyzed;
[0011] An encoding convolutional block, including at least one encoding convolutional layer;
[0012] A decoding convolutional block, including at least one decoding convolutional layer;
[0013] An output layer for outputting a segmented image;
[0014] Wherein, the input layer, the encoding convolutional block, the encoding depth feature extraction block, the decoding depth feature extraction block, and the decoding convolutional block are connected in sequence; the encoding depth feature extraction block includes at least one encoding depth feature extraction layer, and the encoding depth feature extraction layer includes a double fully connected channel attention module and a dilated convolution and effective channel attention module connected in sequence; the decoding depth feature extraction block includes at least one decoding depth feature extraction layer, and the decoding depth feature extraction layer includes a dilated convolution and effective channel attention module and a double fully connected channel attention module connected in sequence;
[0015] Both between the encoding convolutional block and the decoding convolutional block, and between the encoding depth feature extraction block and the decoding depth feature extraction block are bridged by a compression and expansion convolutional attention bridge module.
[0016] In this embodiment, the entire network structure is strategically optimized, the skip connections are enhanced, and multi-level features are incorporated at each stage of the encoding and decoding processes. The features of multiple intermediate layers are aggregated through skip connections, which not only improves the flow of context information but also better ensures the reuse of features throughout the network.
[0017] In an alternative embodiment, the double fully connected channel attention module includes:
[0018] A global average pooling layer for averaging the input feature map in the spatial dimension to aggregate the spatial information;
[0019] A first fully connected layer for processing the feature vector after global average pooling to reduce the channel dimension;
[0020] A ReLU activation layer for introducing non-linearity, screening and retaining effective features, and also for maintaining gradient stability;
[0021] A second fully connected layer for restoring the channel dimension of the feature vector processed by the ReLU activation layer to the original channel dimension to generate a target feature vector;
[0022] A Sigmoid activation layer for generating a target feature vector of the attention weight.
[0023] The DFCA module proposed in this embodiment is a lightweight but efficient mechanism designed to enhance feature representation by adaptively recalibrating channel responses. This DFCA module can effectively extract global context information while preserving local details, ensuring segmentation accuracy without significantly increasing computational overhead.
[0024] In an alternative embodiment, the dilated convolution and effective channel attention module includes:
[0025] A multi-scale unfolded convolutional layer for dividing the input channels into preset groups and extracting different spatial features for each group of channels according to a preset unfolding rate;
[0026] A group normalization layer for dividing the channels into preset groups and performing normalization calculations on the features within each group;
[0027] A signal shuffling block for shuffling the normalized features.
[0028] The DECA module proposed in this embodiment effectively combines computational efficiency and high segmentation accuracy, addressing the dual challenges of feature recognition and scalability in image segmentation tasks.
[0029] In an alternative embodiment, obtaining the image to be analyzed includes:
[0030] Based on a preset fixed step size, recording the initial focus corresponding to the peak image sharpness during the microscope scanning process;
[0031] Based on the initial focus, performing a second focus adjustment to determine the intermediate focus corresponding to the maximum number of image edges;
[0032] Based on the intermediate focus and a preset fixed small step size, performing a third focus adjustment to determine the target focus corresponding to the maximum number of image edges;
[0033] Taking the image collected at the target focus as the image to be analyzed.
[0034] In an alternative embodiment, based on the initial focus, performing a second focus adjustment to determine the intermediate focus corresponding to the maximum number of image edges includes:
[0035] Based on the current microscope magnification, determining the step size array of the microscope;
[0036] Determining the change rate of the image sharpness evaluation value of the image during the second focus adjustment;
[0037] Based on the change rate of the image sharpness evaluation value and the step size array, dynamically adjusting the moving step size to determine the intermediate focus.
[0038] In this embodiment, the optimal focus of the image can be quickly and accurately located through this three-step strategy, ensuring the highest clarity of the image during image processing, thereby improving the accuracy of sample recognition and analysis.
[0039] In a second aspect, the present invention provides a microscope automated imaging system, which includes:
[0040] A microscope body, including an objective lens switching mechanism for controlling the switching of microscope lenses and controlling the magnification displayed by different microscope lenses; an autofocus mechanism for controlling the focusing of the microscope; a motor drive board electrically connected to the objective lens switching mechanism and the autofocus mechanism; an edge computing development board electrically connected to the motor drive board;
[0041] An autofocus control device electrically connected to the edge computing development board, which is used to record the preliminary focus corresponding to when the image clarity reaches the peak during the microscope scanning process based on a preset fixed step size; determine the step size array of the microscope based on the current microscope magnification; determine the change rate of the image clarity evaluation value of the image during the second focusing process; dynamically adjust the moving step size based on the change rate of the image clarity evaluation value and the step size array to determine the intermediate focus; perform a third focusing based on the intermediate focus and a preset fixed small step size to determine the target focus corresponding to the maximum number of image edges; and use the image collected at the target focus as the image to be analyzed;
[0042] An image processing device electrically connected to the edge computing development board, and the image processing device is suitable for executing the microscope automated imaging processing method in any of the above embodiments.
[0043] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the microscope automated imaging processing method in the first aspect or any corresponding embodiment thereof.
[0044] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the microscope automated imaging processing method in the first aspect or any corresponding embodiment thereof.
[0045] In a fifth aspect, the present invention provides a computer program product including computer instructions for causing a computer to execute the microscope automated imaging processing method in the first aspect or any corresponding embodiment thereof.
[0046] It should be noted that since the microscope automated imaging system, computer device, computer-readable storage medium, and computer program product provided by the present invention correspond to the above-mentioned microscope automated imaging method. Therefore, for the beneficial effects of the microscope automated imaging system, computer device, computer-readable storage medium, and computer program product, please refer to the description of the corresponding beneficial effects of the microscope automated imaging method above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0048] Figure 1 is a flowchart of a microscope automated imaging processing method according to an embodiment of the present invention;
[0049] Figure 2 is a schematic diagram of the model architecture of an image segmentation model according to an embodiment of the present invention;
[0050] Figure 3 is a flowchart of the processing of the DECA module according to an embodiment of the present invention;
[0051] Figure 4 is a flowchart of the processing of the SECAB module according to an embodiment of the present invention;
[0052] Figure 5 is a flowchart of the microscope focusing according to an embodiment of the present invention;
[0053] Figure 6 is a schematic diagram of the structure of a microscope according to an embodiment of the present invention;
[0054] Figure 7 is a schematic diagram of the control structure of a microscope automated imaging system according to an embodiment of the present invention;
[0055] Figure 8 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0057] In the field of microscope image acquisition and segmentation, achieving an effective balance between global context understanding and local detail preservation is crucial for subsequent accurate prediction. Traditional segmentation methods often struggle to capture both the global structure of the sample and maintain fine-grained boundary details, leading to segmentation errors in complex scenarios. Although existing attention mechanisms have improved feature representation, they usually increase computational complexity, making them unsuitable for resource-constrained environments.
[0058] In view of this, according to the embodiments of the present invention, an embodiment of a microscope automated imaging processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0059] In this embodiment, a microscope automated imaging processing method is provided, which can be executed by devices such as servers, terminals, and mobile terminals. Figure 1 is a flowchart of the microscope automated imaging processing method according to the embodiments of the present invention, as Figure 1 shown, and this process includes the following steps:
[0060] Step S101, obtain an image to be analyzed, which is obtained by the microscope after automatic focusing. The image to be analyzed can be an image of a tissue sample collected by the microscope. Specifically, first move the microscope lens at a fixed step size and obtain an image, and determine whether there is normal focusing content by detecting the sharpness evaluation value of the obtained image; if effective image edge information is obtained, dynamically adjust the moving step size according to the change rate of the sharpness evaluation value of the image to gradually narrow the search range; when it is determined that the current image has a maximum edge value, switch to a tiny fixed step size for further fine-tuning, and end the focusing process when the preset time limit is exceeded or the best focal plane has been found; after automatic focusing is completed, collect the image to be analyzed. The image to be analyzed obtained by automatic focusing can effectively reduce human error, improve image sharpness, and facilitate subsequent image processing.
[0061] Step S102: Input the image to be analyzed into a pre-constructed image segmentation model to obtain a segmented image. The segmentation model includes: a Dual Fully Connected Channel Attention (DFCA) module, a Squeeze and Extended Convolution Attention Bridge (SECAB) module, and a Dilated Convolution and Effective Channel Attention (DECA) module. Among them, the dual fully connected channel attention module is used to enhance feature representation, the squeeze and extended convolution attention bridge module is used for feature fusion, and the dilated convolution and effective channel attention module is used to extract global feature information and local feature information.
[0062] The particle size and quantity of cells, etc. in the sample are key parameters affecting its application effect. Therefore, it is crucial to precisely process and analyze the image of the sample. In this embodiment, a new lightweight image segmentation model, LMEAUNet, is proposed. This segmentation model can balance high segmentation performance and computational efficiency. This image segmentation model mainly includes the following three key modules:
[0063] The dual fully connected channel attention module, that is, the DFCA module. This module adaptively recalibrates the channel feature map through global average pooling (GAP), feature compression, and reconstruction, highlighting important channels while suppressing channels with less information, and effectively enhancing feature representation.
[0064] The squeeze and extended convolution attention bridge module, that is, the SECAB module. This module uses dilated convolution to extract multi-level fusion features, and then processes these features using adaptive convolution pooling and 1D convolution. Finally, the spatial attention mechanism is used to refine the features to generate efficient channel attention bridge features, which can significantly improve the segmentation accuracy.
[0065] The dilated convolution and effective channel attention module, that is, the DECA module. This module extracts global and local feature information through dilated convolution and an effective channel attention mechanism, enabling the network to capture more discriminative features from the input image.
[0066] By integrating these three modules, namely the DFCA module, the DECA module, and the SECAB module, into an improved U-Net architecture, the lightweight and efficient medical image segmentation model LMEAUNet can be realized. Through this model, the extraction, fusion, and refinement of global and local features of the image can be enhanced, effectively improving the image segmentation accuracy, enhancing the microscope automated imaging effect, and at the same time effectively reducing the demand for computer computing resources.
[0067] Regarding the training and learning of the constructed medical image segmentation model, it can specifically include: collecting a medical image dataset and performing image preprocessing. Divide the preprocessed images into a training set, a validation set, and a test set, and input the divided training set and validation set into the above model architecture for training and validation. Apply the finally trained model to the test set to evaluate its performance on unseen data, and then perform model deployment and application to achieve efficient image segmentation.
[0068] In some alternative embodiments, referring to Figure 2 as shown, the image segmentation model further includes:
[0069] An input layer for receiving the image to be analyzed.
[0070] An encoding convolutional block including at least one encoding convolutional layer. The encoding convolutional block may include three encoding convolutional layers connected in sequence.
[0071] A decoding convolutional block including at least one decoding convolutional layer. The decoding convolutional block may include three decoding convolutional layers connected in sequence.
[0072] An output layer for outputting the segmented image;
[0073] Among them, the input layer, the encoding convolutional block, the encoding depth feature extraction block, the decoding depth feature extraction block, the decoding convolutional block, and the output layer are connected in sequence; the encoding depth feature extraction block includes at least one encoding depth feature extraction layer. For example, the encoding depth feature extraction block may include three encoding depth feature extraction layers, and the encoding depth feature extraction layer includes a fully connected dual-channel attention module and a dilated convolution and effective channel attention module connected in sequence; the decoding depth feature extraction block includes at least one decoding depth feature extraction layer. For example, the decoding depth feature extraction block may include three decoding depth feature extraction layers, and the decoding depth feature extraction layer includes a dilated convolution and effective channel attention module and a fully connected dual-channel attention module connected in sequence;
[0074] Both between the encoding convolutional block and the decoding convolutional block, and between the encoding depth feature extraction block and the decoding depth feature extraction block are bridged by a compression and expansion convolutional attention bridge module.
[0075] In this embodiment, the DFCA module adaptively enhances key features by combining global feature compression, feature reconstruction, and channel attention generation. The DECA module focuses on extracting multi-scale features by combining dilated convolutions with an effective channel attention mechanism, enabling the network to capture more discriminative information. The SECAB module serves as a bridge for multi-level feature fusion, integrating spatial attention to further refine and enhance the features passed to subsequent layers. In this embodiment, the entire network structure is strategically optimized, enhancing skip connections and incorporating multi-level features at various stages of the encoding and decoding processes. The features of multiple intermediate layers are aggregated through skip connections, not only improving the flow of context information but also better ensuring the reuse of features throughout the network. This hierarchical feature integration significantly enhances the model's ability to recover fine-grained details while maintaining global context consistency, balancing local accuracy and global understanding. By effectively leveraging the spatial and channel attention mechanisms in the network, excellent segmentation accuracy is achieved, making it applicable to complex medical imaging tasks.
[0076] Since most current research tends to use increasingly complex models to improve image analysis performance, which requires high computational resources from the computer, especially in embedded devices. However, the image segmentation model proposed in this embodiment, combining the DFCA module, DECA module, and SECAB module, can achieve lightweight and efficient image processing using an efficient encoding and decoding mechanism. It effectively solves the problem of limited computer resources and is crucial for medical image processing in the biomedical field.
[0077] In some alternative embodiments, the fully-connected double channel attention module includes:
[0078] A global average pooling layer GAP for averaging the input feature map over the spatial dimension to aggregate spatial information;
[0079] A first fully-connected layer for processing the feature vector after global average pooling to reduce the channel dimension;
[0080] A ReLU activation layer for introducing non-linearity, filtering and retaining effective features, maintaining gradient stability, enhancing the expressive power of the features output by the first fully-connected layer, and generating a feature vector of attention weights;
[0081] A second fully-connected layer for restoring the channel dimension of the feature vector processed by the ReLU activation layer to the original channel dimension to generate a target feature vector;
[0082] A Sigmoid activation layer for generating a target feature vector of attention weights.
[0083] The DFCA module adaptively enhances key features by combining global feature compression, feature reconstruction, and channel attention generation. First, global average pooling is performed on the input feature map to aggregate spatial information into a compact descriptor. Then, a two-stage fully connected (FC) structure compresses and reconstructs the feature representation. Specifically, the first FC layer reduces the channel dimension using a reduction factor and then applies the ReLU activation non-linearity, while the second FC layer restores the original channel dimension. The activation generates attention weights to recalibrate the input features by amplifying the most informative channels and suppressing irrelevant channels. This computationally efficient design provides strong feature recognition and global dependency modeling, making it well-suited for tasks such as image segmentation. Different from traditional attention mechanisms, the DFCA module focuses only on lightweight channel recalibration, reducing computational requirements while significantly improving the segmentation performance in resource-constrained scenarios. The specific operation can be described by the following formula:
[0084] x = FC(RELU(FC(FL(GAP(x)))));
[0085] DFCA(*) = EP(SIGMOID(x));
[0086] Where, GAP represents global average pooling, FL represents flattening of the fully connected layer, RELU represents fully connected, FC represents fully connected, SIGMOID represents the activation function, and EP represents reshaping and applying as attention.
[0087] The DFCA module proposed in this embodiment is a lightweight but efficient mechanism designed to enhance feature representation by adaptively recalibrating channel responses. The DFCA module can effectively extract global context information while retaining local details, ensuring segmentation accuracy without significantly increasing computational overhead.
[0088] In some alternative embodiments, referring to Figure 3 as shown, the dilated convolution and effective channel attention module includes:
[0089] A multi-scale unfolded convolutional layer for dividing the input channels into a preset number of groups and extracting different spatial features for each group according to a preset unfolding rate;
[0090] A group normalization layer for dividing the channels into a preset number of groups and performing normalization calculations on the features within each group;
[0091] A signal shuffling block for shuffling the normalized features.
[0092] Achieving precise image segmentation requires in-depth understanding of both the global background and local details. Traditional image segmentation methods often fail to balance these aspects well, resulting in poor segmentation accuracy in complex scenes with multi-scale structures and complex boundaries. To address this issue, the DECA module adopts a multi-scale unfolded convolution method, taking Figure 3 as an example, where the expansion rates [7, 5, 2, 1] are strategically used to extract different spatial features. By dividing the input channels into groups and processing each group with a unique expansion rate, the module effectively captures long-range dependencies and fine-grained details. The integration of group normalization ensures the stability of inter-group feature fusion and enhances the robustness of the module in extracting comprehensive feature representations.
[0093] In addition to the multi-scale function, the module also integrates a signal shuffling block, namely the Channel shuffle operation and the Efficient Channel Attention (ECA) mechanism, to maximize inter-channel interaction at minimal computational cost. Channel shuffle promotes better information flow between feature groups, while the ECA layer adaptively recalibrates channel-wise feature responses, focusing on the most informative channels. This lightweight yet powerful design not only improves segmentation accuracy but also maintains processing efficiency, making it suitable for resource-constrained tasks such as medical imaging. The DECA module effectively combines computational efficiency and high segmentation accuracy, addressing the dual challenges of feature recognition and scalability in image segmentation tasks. The above operations can be described by the following formulas:
[0094] x 1 ,x 2 ,x 3 ,x 4 =Chunk 4 (X);
[0095] x' 1 ,x' 2 ,x' 3 ,x' 4 =D 1 (x 1 ),D 2 (x 2 ),D 3 (x 3 ),D 4 (x 4 );
[0096] X'=GELU(GN(CONC AT(x' 1 ,x' 2 ,x' 3 ,x' 4 )));
[0097] DECA(x)=EA(CS(σ(X')));
[0098] Among them, Chunk4 means that the input feature map is divided into four parts along the channel dimension, D i represents the depthwise separable convolution, CONCAT represents the concatenation operation in the channel dimension, GN represents the feature map normalized by grouping channels, CS represents the signal shuffle block, and EA represents the effective channel attention.
[0099] In addition, the acquisition and fusion of multi-stage and multi-scale information are the keys to segmenting targets of different sizes and improving performance. To address this challenge, the SECAB module is also proposed in this embodiment, which enhances cross-scale feature representation by integrating spatial and channel attention mechanisms. This module combines lightweight efficient channel attention (ECA) and simplified spatial attention (SSA) mechanisms, capturing global channel dependencies while emphasizing local spatial features. By concatenating and processing multi-scale input features (t_1, t_2, t_3, t_4, t_5) along the channel axis, the SECAB module ensures computational efficiency and optimizes feature fusion performance, thus better integrating information from each stage. The above operations can be described by the following formula:
[0100] x = DWC(CONCAT(x 1 , x 2 ));
[0101] SECAB(x) = SSA(x × ECA(x));
[0102] Among them, CONCAT is a multi-level concatenation operation, DWC represents depthwise separable convolution, ECA represents effective channel attention, and SSA represents simplified spatial attention.
[0103] Referring to Figure 4 As shown, the SECAB module fuses multi-level features from different stages, capturing fine-grained details and high-level context to improve multi-scale feature representation. Depthwise separable convolution (DWC) is used to effectively process these features, reducing computational cost while retaining important information. The effective channel attention (ECA) module dynamically recalibrates channel dependencies to enhance feature representation, and optional residual connections stabilize the learning process. At the same time, the simplified spatial attention (SSA) mechanism refines spatial features by emphasizing key structures through pooling operations. These components together achieve efficient cross-scale feature alignment and fusion, suitable for resource-constrained multi-scale tasks.
[0104] In some alternative embodiments, obtaining the image to be analyzed includes:
[0105] Step a, based on a preset fixed step size, record the preliminary focus corresponding to the peak image clarity during the microscope scanning process;
[0106] Step b: Based on the preliminary focus, perform a second focus adjustment to determine the intermediate focus corresponding to when the number of image edges reaches the maximum.
[0107] Step c: Based on the intermediate focus and a preset fixed small step size, perform a third focus adjustment to determine the target focus corresponding to when the number of image edges is the largest; use the image captured at the target focus as the image to be analyzed.
[0108] In some alternative embodiments, performing a second focus adjustment based on the preliminary focus to determine the intermediate focus corresponding to when the number of image edges reaches the maximum includes:
[0109] Based on the current microscope magnification, determine the step size array of the microscope.
[0110] Determine the change rate of the image sharpness evaluation value of the image during the second focus adjustment.
[0111] Based on the change rate of the image sharpness evaluation value and the step size array, dynamically adjust the moving step size to determine the intermediate focus.
[0112] The microscope is equipped with a sensor that can detect the presence of an object and perform real-time adjustment of the image through a focus algorithm. Commonly used autofocus algorithms include the image gradient method and the Laplace transform method, etc., which determine the best focal length by finding the region with the largest change in the image. The focused image can clearly show the edges of the object, facilitating subsequent analysis of the object state, but this focus algorithm is still not precise enough. The focus algorithm in this embodiment uses a variable-step hill-climbing algorithm, and the main content of the algorithm includes three steps. The microscope focus process is as shown in Figure 5 shown.
[0113] First, perform a preliminary focus adjustment. The microscope objective lens quickly scans within the observation range, aiming to roughly scan different focal planes of the sample. Then, the edge detection algorithm judges the currently captured image. If there is no edge data in the current image, it means there is no clear image information in the current field of view, so it directly moves with a fixed step size of the motor until edge information of the image is detected, and record the point where the image sharpness peaks during the scanning process.
[0114] Secondly, when different sharpness peak points appear in the image, select the preliminary focus position with the highest peak point for the second focus adjustment. The system will automatically select the step size array according to the current microscope magnification. The higher the microscope magnification, the smaller the step size to improve the focus accuracy. During this process, the algorithm will calculate the change rate of the number of edges in the image in real time and further adjust the moving step size according to the change trend. Specifically, when the number of edges increases rapidly, it indicates that the microscope is approaching the focus area, and at this time, the step size will gradually decrease to ensure finding the area closest to the focus. Through dynamic adjustment, the focus speed can be effectively increased and the accuracy can be guaranteed, making the image gradually tend to be clear.
[0115] Once the image with the largest number of edges (i.e., the preliminary image with the highest clarity) is roughly found, the algorithm enters the final step. At this time, the microscope moves precisely within this area with a fixed and extremely small step size, namely the preset fixed tiny step size, to find the image with the most concentrated number of edges, so as to ensure obtaining the clearest image. Through multiple edge detections and image analyses, the best focus point is finally locked, a high-quality sample image is generated, and the focal length of the clearest image is determined.
[0116] In this embodiment, through this three-step strategy, the best focus of the image can be quickly and accurately located, ensuring the highest clarity of the image during image processing, thereby improving the accuracy of sample recognition and analysis. After focusing is completed, the system automatically processes the captured image.
[0117] The method of automatically adjusting the focal length can effectively reduce the time of manual adjustment, especially when high magnification or rapid objective lens replacement is required. Secondly, autofocus can reduce human errors, ensure that each focus is precisely consistent, and avoid focal length deviations caused by operator differences, thereby improving the reliability of experimental results. Autofocus can also ensure the consistency and repeatability of the focus, especially suitable for high-throughput experiments or research that requires long-term observation, and helps to obtain stable and reproducible image data. In addition, autofocus can quickly adapt to complex or irregular samples, ensuring that each layer of each sample can be clearly presented, which is particularly important when observing multi-layer tissues or dynamic samples. Moreover, automated image technology can help researchers quickly analyze samples, greatly shortening the observation time.
[0118] In this embodiment, a microscope automated imaging system is also provided. This system is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0119] This embodiment provides a microscope automated imaging system, which is applicable to execute the microscope automated imaging processing method in any one of the above-mentioned embodiments. The system includes:
[0120] A microscope body; the microscope body in this embodiment preferably selects a phase-contrast microscope with an autofocus mechanism. The microscope body refers to Figure 6As shown, it includes a phase-contrast switching mechanism, which includes a motor for controlling the selection of the phase-contrast of the camera to adjust the phase difference, enhance the contrast of the sample, and facilitate the switching of different observation modes to adapt to different types of samples; an objective lens switching mechanism, which includes a motor for controlling the switching of the microscope lenses and controlling the magnification displayed by different microscope lenses; an autofocus mechanism, which includes a motor for controlling the autofocus of the microscope; a motor driver board electrically connected to the objective lens switching mechanism and the autofocus mechanism; and an edge computing development board electrically connected to the motor driver board. Refer to Figure 7 As shown, the edge computing development board is used to receive and process sensor information, process microscope image information, and send instructions to the motor driver board, thereby controlling the data calculation, lens switching, and data forwarding during the autofocus process of the microscope; the motor driver board receives the instructions from the edge computing development board and then controls the specific operation of the motor, and feeds back the relevant optocoupler data to the edge computing development board.
[0121] An autofocus control device, electrically connected to the edge computing development board, is used to record the preliminary focus corresponding to the peak image sharpness during the microscope scanning process based on a preset fixed step size; determine the step size array of the microscope based on the current microscope magnification; determine the change rate of the image sharpness evaluation value of the image during the second autofocus process; dynamically adjust the moving step size based on the change rate of the image sharpness evaluation value and the step size array to determine the intermediate focus; perform the third autofocus based on the intermediate focus and a preset fixed small step size to determine the target focus corresponding to the maximum number of image edges; and use the image collected at the target focus as the image to be analyzed;
[0122] An image processing device, electrically connected to an edge computing development board, is used to obtain an image to be analyzed, which is acquired after automatic focusing by a microscope; it is also used to input the image to be analyzed into a pre-constructed image segmentation model to obtain a segmented image; the segmentation model includes: a double fully-connected channel attention module, a compression and expansion convolution attention bridge module, and a dilated convolution and effective channel attention module; among them, the double fully-connected channel attention module is used to enhance feature representation, the compression and expansion convolution attention bridge module is used for feature fusion, and the dilated convolution and effective channel attention module is used to extract global feature information and local feature information. Among them, the image segmentation model further includes: an input layer for receiving the image to be analyzed; an encoding convolution block including at least one encoding convolution layer; a decoding convolution block including at least one decoding convolution layer; an output layer for outputting the segmented image; wherein, the input layer, the encoding convolution block, the encoding depth feature extraction block, the decoding depth feature extraction block, and the decoding convolution block are connected in sequence; the encoding depth feature extraction block includes at least one encoding depth feature extraction layer, and the encoding depth feature extraction layer includes a double fully-connected channel attention module and a dilated convolution and effective channel attention module connected in sequence; the decoding depth feature extraction block includes at least one decoding depth feature extraction layer, and the decoding depth feature extraction layer includes a dilated convolution and effective channel attention module and a double fully-connected channel attention module connected in sequence; both between the encoding convolution block and the decoding convolution block and between the encoding depth feature extraction block and the decoding depth feature extraction block are bridged by a compression and expansion convolution attention bridge module.
[0123] The double fully-connected channel attention module includes: a global average pooling layer for mapping the input features to the spatial dimension for average calculation to aggregate the spatial information; a first fully-connected layer for processing the feature vector after global average pooling to reduce the channel dimension; a ReLU activation layer for introducing non-linearity, screening and retaining effective features, and also for maintaining gradient stability; a second fully-connected layer for restoring the channel dimension of the feature vector processed by the ReLU activation layer to the original channel dimension to generate a target feature vector; a Sigmoid activation layer for generating a target feature vector of the attention weight.
[0124] The dilated convolution and effective channel attention module includes: a multi-scale unfolded convolution layer for dividing the input channels into a preset group and extracting different spatial features for each group of channels according to a preset unfolding rate; a group normalization layer for dividing the channels into a preset group and performing normalization calculation on the features within each group; a signal shuffle block for shuffling the normalized features.
[0125] Specifically, the autofocus control device in this embodiment can be used to execute an autofocus algorithm to achieve precise focusing of the microscope and ensure the clarity of the images captured by the microscope. Further, it can also execute an image processing algorithm to achieve precise segmentation of the captured images and improve the automated imaging effect of the microscope.
[0126] The system provided in this embodiment can ensure that the microscope is at the optimal focal length when capturing images through the autofocus algorithm, so as to obtain the clearest real-object images. At the same time, it also uses the automated imaging algorithm provided by the present invention to precisely segment the images, thereby realizing automated image analysis and processing and achieving high-precision segmentation of the sample images, which can facilitate subsequent high-precision calculations, including the size, quantity, and morphology of objects, etc.
[0127] The system provided by the present invention integrates a series of image processing technologies such as image acquisition, preprocessing, image segmentation, and analysis, and automatically completes real-object focusing and state analysis. This image processing process not only ensures high precision but also has good processing efficiency, providing strong technical support for the research and application of microscope autofocus and processing.
[0128] Through the integrated tool of microscope autofocus, image processing, and statistical analysis, efficient and automated statistical analysis of real objects is achieved. This system not only improves the experimental efficiency and reduces the error of manual intervention but also provides reliable data support for the optimization of automated equipment processes. In the fields of biomedicine and materials science, this system can help researchers more precisely analyze the growth of real objects, improve the operation efficiency, and efficiently complete tasks such as observing the cell culture state, providing a data basis for its performance in specific applications. Through the automated analysis system, the experiment significantly improves the efficiency, reduces manual intervention, and provides reliable support for the optimization of subsequent automated cell culture processes.
[0129] The accuracy and robustness of the focusing algorithm can be effectively improved through machine learning and deep learning methods, especially in the case of complex samples or uneven illumination. In addition, in the preliminary experiments, standard image quality indicators such as contrast, edge sharpness, and blurriness were also used to verify the accuracy and efficiency of the algorithm provided by the present invention. Moreover, the real-time performance of the autofocus system in practical applications was also considered to ensure that it can work stably in high-throughput or dynamic observations. Through these studies, the intelligent level and applicability of the microscope autofocus system have been effectively improved, promoting its wide application in the fields of medical diagnosis, life science, material analysis, etc.
[0130] The autofocus control device and the image processing device in this embodiment are presented in the form of functional units. Here, the unit refers to an ASIC circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0131] The further function descriptions of the above-mentioned modules and units are the same as those in the corresponding embodiments above, and will not be repeated here.
[0132] The embodiment of the present invention also provides a computer device having the above-mentioned autofocus control device and image processing device.
[0133] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As Figure 8 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 8 In
[0134] FIG. 15, one processor 10 is taken as an example.
[0135] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0136] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device and the like. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0137] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above types of memories.
[0138] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0139] An embodiment of the present invention further provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium may further include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiment is implemented.
[0140] A part of the present invention can be applied as a computer program product, for example, computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the present invention through the operations of the computer. Those skilled in the art should understand that the forms of existence of computer program instructions in a computer-readable medium include but are not limited to source files, executable files, installation package files, etc. Correspondingly, the ways for computer program instructions to be executed by a computer include but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible by the computer.
[0141] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A microscope automated imaging processing method, characterized in that: The method comprises: Acquiring an image to be analyzed, wherein the image to be analyzed is acquired by automatically focusing a microscope; The image to be analyzed is input into a pre-built image segmentation model to obtain a segmented image; the segmentation model includes: a dual fully connected channel attention module, a compressed and expanded convolution attention bridge module, and a hole convolution and effective channel attention module; wherein the dual fully connected channel attention module is used to enhance feature representation, the compressed and expanded convolution attention bridge module is used for feature fusion, and the hole convolution and effective channel attention module is used to extract global feature information and local feature information.
2. The method according to claim 1, characterized in that The image segmentation model also includes: An input layer, used for receiving the image to be analyzed; A coded convolution block, comprising at least one coded convolution layer; A decoding convolution block, comprising at least one decoding convolution layer; An output layer, used for outputting the segmented image; The input layer, the encoding convolution block, the encoding depth feature extraction block, the decoding depth feature extraction block, and the decoding convolution block are connected in sequence; the encoding depth feature extraction block includes at least one encoding depth feature extraction layer, and the encoding depth feature extraction layer includes the dual fully connected channel attention module and the hole convolution and effective channel attention module connected in sequence; the decoding depth feature extraction block includes at least one decoding depth feature extraction layer, and the decoding depth feature extraction layer includes the hole convolution and effective channel attention module and the dual fully connected channel attention module connected in sequence; The encoding convolution block and the decoding convolution block, as well as the encoding depth feature extraction block and the decoding depth feature extraction block are bridged by the compression and expansion convolution attention bridge module.
3. The method according to claim 1, characterized in that The dual fully connected channel attention module comprises: The global average pooling layer is used to map the input features to the spatial dimension for average calculation to aggregate the spatial information; The first fully connected layer is used to process the feature vector after global average pooling to reduce the channel dimension; ReLU activation layer, used to introduce nonlinearity, filter and retain effective features, and maintain gradient stability; The second fully connected layer is used to restore the channel dimension of the feature vector processed by the ReLU activation layer to the original channel dimension and generate the target feature vector; Sigmoid activation layer is used to generate the target feature vector of attention weights.
4. The method according to claim 1, characterized in that: The hole convolution and effective channel attention module includes: The multi-scale expanded convolution layer is used to divide the input channels into preset groups and extract different spatial features for each group of channels according to the preset expansion rate; A group normalization layer, used to divide the channels into the preset groups and perform normalization calculation on the features in each group; The signal shuffling block is used to perform shuffling operations on the normalized features.
5. The method according to claim 1, characterized in that The acquiring of the image to be analyzed comprises: Based on a preset fixed step length, the preliminary focus corresponding to when the image clarity reaches a peak during microscope scanning is recorded; Based on the preliminary focus, a second focusing is performed to determine an intermediate focus corresponding to when the number of image edges reaches a maximum; Based on the intermediate focus and the preset fixed micro-step size, a third focusing is performed to determine the target focus corresponding to the maximum number of image edges; The image acquired when the target is in focus is used as the image to be analyzed.
6. The method according to claim 5, characterized in that The performing a second focusing based on the preliminary focus to determine an intermediate focus corresponding to when the number of image edges reaches a maximum includes: Based on the current microscope magnification, determine the microscope step array; determining a rate of change of an image clarity evaluation value of the image during the second focusing process; Based on the image definition evaluation value change rate and the step size array, the moving step size is dynamically adjusted to determine the intermediate focus.
7. A microscope automated imaging system, characterized in that: The system comprises: The microscope body includes an objective lens switching mechanism for controlling the switching of the microscope lens and controlling the display magnification of different lenses of the microscope; an autofocus mechanism for controlling the focus of the microscope; a motor drive board electrically connected to the objective lens switching mechanism and the autofocus mechanism; and an edge computing development board electrically connected to the motor drive board; An autofocus control device is electrically connected to the edge computing development board, and is used to record the initial focus corresponding to the peak value of the image clarity during the microscope scanning process based on a preset fixed step length; determine the step length array of the microscope based on the current microscope magnification; determine the rate of change of the image clarity evaluation value of the image during the second focusing process; dynamically adjust the moving step length based on the image clarity evaluation value change rate and the step length array to determine the intermediate focus; perform a third focusing based on the intermediate focus and a preset fixed micro-step length to determine the target focus corresponding to the maximum number of image edges; and use the image collected at the target focus as the image to be analyzed; An image processing device is electrically connected to the edge computing development board, and the image processing device is suitable for executing the microscope automated imaging processing method described in any one of claims 1 to 4.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the microscope automated imaging processing method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the microscope automated imaging processing method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the microscope automated imaging processing method according to any one of claims 1 to 6.