Method for rapidly recognizing cell capture condition and calculating cell capture rate based on micro-fluidic chip and application
By applying CNN technology on microfluidic chips, the cell capture situation is automatically identified and the cell capture rate is calculated, which solves the problem of inability to quantify the capture situation and low experimental efficiency in cell experiments of microfluidic chips, and achieves efficient and accurate cell capture analyze.
Patent Information
- Application Number
- CN202411615710.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-21
AI Technical Summary
In the microfluidic chip cell experiment, the cell capture situation cannot be quantified, and the experimental results are greatly affected by subjective factors and the experimental efficiency is low.
Convolutional neural network (CNN) technology is used to automatically identify cell capture situations on microfluidic chips and calculate cell capture rate through image acquisition, preprocessing, data annotation and network training.
It realizes rapid and accurate identification of cell capture conditions, reduces manual intervention, improves experimental efficiency, and reduces experimental errors.
Smart Images

Figure CN119495096A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of microfluidic chip analysis, and in particular relates to a method and application of quickly identifying cell capture conditions and calculating cell capture rates based on a microfluidic chip. Background Art
[0002] Microfluidic chip analysis technology originated from the concept of "chip lab" in the United States. Subsequently, under the careful cultivation of Europe, it gradually evolved into a highly integrated micro-analysis platform. Its core, the microfluidic chip, has become a powerful assistant in scientific research and practical applications with its unique advantages. Microfluidic chip is a chip device that manipulates fluids at the micrometer scale. The choice of its construction material directly determines the performance and application scenarios of the chip. At present, silicon wafers, glass, polydimethylsiloxane (PDMS), polymethyl methacrylate, polytetrafluoroethylene and paper-based materials are the main materials for microfluidic chips. Among them, PDMS has the characteristics of simple processing, high optical transparency and excellent elasticity. PDMS is not only easy to process complex microchannel structures through soft lithography technology, but also can improve biocompatibility through surface modification technology, which provides the possibility for stable storage and efficient reaction of biological samples. In addition, its unique elastic properties also enable PDMS to be made into functional components such as microvalves and microperistaltic pumps, further enhancing the automation and intelligence level of microfluidic chips.
[0003] The working principle of the microfluidic chip is to draw on the technology of micro-electro-mechanical system MEMS (Micro-Electro-Mechanical System), and to build a microfluidic system on the chip through precise patterning. This system consists of intricate connection paths and liquid phase chambers, which can simulate and optimize complex analytical processes in the laboratory. After loading the biological sample and the reaction solution, the buffer in the chip is precisely controlled with the help of driving forces such as micromechanical pumps, electric pumps or electroosmotic flow to form a microflow path, thereby realizing the continuous operation of a series of operations such as sample preparation, reaction, separation, and detection. The biggest highlight of the microfluidic chip is its multifunctional integration and high degree of automation. Traditional laboratory analysis often requires multiple devices and multiple steps, which is not only time-consuming and labor-intensive, but also prone to human errors. The microfluidic chip integrates these cumbersome operations in a small space, and realizes a fully automated process from sample injection to result output through the precise layout of the microchannel network. This integrated design not only improves the analysis efficiency, but also significantly reduces the consumption of samples and reagents, and reduces environmental pollution.
[0004] Smart microfluidics is an emerging field formed by the fusion of microfluidics and machine learning (ML). Microfluidics is a technology that uses channels with dimensions less than a few hundred micrometers to process or manipulate small amounts of fluids (Qin et al., 1998). In fact, microfluidic chips are now able to provide capabilities comparable to those of small-scale laboratories. Microfluidics has been used in many different disciplines, such as cell manipulation and analysis (Holmes and Gawad, 2010; Roper, 2016; Sibbitts et al., 2018) analysis of biomacromolecules (DNA, RNA, proteins) (Beebe et al., 2002; Bruijns et al., 2016; Chen et al., 2019; Contreras-Naranjo et al., 2017; Oita et al., 2010), materials science (Hou et al., 2017; Ren et al., 2014), environmental analysis (Jokerst et al., 2012; Kung et al., 2019), and chemistry (Abou-Hassan et al., 2010; Ohno et al., 2008).
[0005] The present invention is mainly used for cell capture analysis and statistics of microfluidic single-cell chips. Currently, no similar method has been found in the prior art through searching the information. Summary of the invention
[0006] The present invention relates to deep learning technology in the field of artificial intelligence, namely convolutional neural network (CNN). The technical solution uses the powerful feature extraction capability of CNN to automatically identify whether cells are successfully captured on a microfluidic chip. By building and training a CNN model, the task of identifying cells can be completed efficiently and accurately without human intervention.
[0007] The present invention relates to a method for quickly identifying cell capture conditions and calculating cell capture rates of a microfluidic chip. Compared with the prior art, the method mainly improves the cell capture recognition method, adopts artificial intelligence instead of the naked eye recognition and counting method, and analyzes whether the cell is captured more precisely, accurately and efficiently, thereby providing ideas for optimizing experimental details and improving chip structures. It also saves manpower and time, and avoids experimental effect errors caused by subjective judgment of personnel.
[0008] In order to solve the problem that the cell capture situation cannot be quantified in the microfluidic chip cell experiment, the experimental results are greatly affected by subjective factors, and the experimental efficiency is low, the present invention provides a method for automatically and quickly identifying the cell capture situation and calculating the cell capture rate. The technical solution of the present invention to solve the above technical problems is as follows:
[0009] A method for rapidly identifying cell capture conditions and calculating cell capture rates based on a microfluidic chip, characterized in that it comprises the following steps:
[0010] Step S1, collecting images: culturing cells on a microfluidic chip, and using a microscope to merge the bright field image and the nuclear staining fluorescence image, and splicing the local microscopic image slices to form a complete chip image;
[0011] Step S2, performing image preprocessing on the collected complete chip image: semi-automatic image microstructure cropping;
[0012] Step S3: annotate all cropped images and organize training samples to establish a data set;
[0013] Step S4: Based on the neural network part of the CNN network model, establish classification recognition of capture or not, and perform network training;
[0014] Step S5, using the validation set and the test set to verify the classification and recognition effect and accuracy of the microstructure cell capture situation;
[0015] Step S6, exporting the cell capture rate analysis results, generating a cell capture heat map, and calculating the cell capture rate.
[0016] Specifically, the step S2 includes:
[0017] S201, performing rotation correction on the complete chip image;
[0018] S202: After the rotation correction, any microstructure in the image is selected as a starting point for image cropping.
[0019] More specifically, step S201 includes:
[0020] The first step is preprocessing: preprocess the input image and use denoising algorithms or contrast enhancement methods to highlight image features;
[0021] The second step is feature detection: use edge detection, Hough transform, corner detection and other algorithms to find significant features in the image;
[0022] The third step is direction estimation: based on the detected features, the overall tilt angle of the image is estimated by fitting a straight line, calculating the direction vector of the straight line and finding the average direction.
[0023] Step 4: Rotation correction: Based on the estimated angle, use any of the methods, bilinear interpolation, nearest neighbor interpolation, or cubic spline interpolation, to rotate the image to the desired direction, ensuring that the flow channel portion in the image is aligned horizontally and vertically.
[0024] More specifically, step S202 includes:
[0025] After rotation correction, select any microstructure in the image as the starting point for image cropping. Set the coordinates of the upper left corner of the cropping starting point, the width and height information of a single microstructure, and the moving step length of each cropping action to batch crop detailed images of all microstructures to ensure a uniform size.
[0026] Specifically, step S3 includes:
[0027] S301: Annotate all cropped images and organize them into training samples to establish a data set;
[0028] S302: Create a data set. After annotating the image, establish a data set based on the ratio of captured and uncaptured images.
[0029] More specifically, step S301 includes:
[0030] Microstructure annotation was performed by writing Python code, and the capture status of each cell image was classified and identified: all cropped microstructure images were loaded, and whether the microstructure captured the cell was manually marked as 0 or 1.
[0031] More specifically, step S302 includes:
[0032] Balance the number of samples of captured cells and uncaptured cells so that the ratio between the two is close to 1:1; randomly divide the labeled image samples into training set, validation set and test set according to the optimal ratio of 8:1:1.
[0033] Specifically, step S4 is: selecting a CNN network model for improvement, and re-customizing a lightweight convolutional neural network according to the complexity of the task.
[0034] More specifically, in step S4: the lightweight convolutional neural network includes a convolutional layer, an activation function layer, a pooling layer and a fully connected layer.
[0035] Furthermore, in the step S4: the first convolution layer conv1 has 3 input channels, CH output channels, a convolution kernel size of 3×3, and a padding of 1; the activation function layer active uses the ReLU activation function, retains only positive values, and sets negative values to 0; the pooling layer pool uses the maximum pooling Max Pooling, the pooling window size is 2×2, and the step size is also 2;
[0036] The subsequent convolutional layer structure is the same as conv1, and each layer is followed by a ReLU activation function and a maximum pooling layer;
[0037] Global average pooling layer avgpool: The global average pooling layer reduces the feature map of each channel to a fixed size;
[0038] Fully connected layer fc1: The first fully connected layer, the input is the feature map after global average pooling, which is flattened into a one-dimensional vector and then mapped to 32 hidden units;
[0039] Fully connected layer fc2: The second fully connected layer maps the previous 32 hidden units to the final number of categories, capturing and not capturing the binary classification task.
[0040] Specifically, the step S5 includes: recording the average loss of each Epoch during the training process, performing verification after each Epoch, and drawing a training loss and verification accuracy curve.
[0041] Specifically, the step S6 includes: using the network to predict the capture situation of the new complete chip image after the previous steps, saving the prediction results into a csv or txt file, and performing counting statistics by reading 0 and 1 in the file; using the Pandas library to read and process data, create and fill heat map data, use Matplotlib to create graphics and set properties, and then use Seaborn to draw the heat map.
[0042] In some specific embodiments, the cell capture, recognition and analysis method of a single cell model chip microstructure provided by the present invention comprises the following steps:
[0043] Step S1: Image sample acquisition: The cell capture process is realized by a microfluidic chip, and single cells are captured by fluid flowing through the microstructure; after the chip is made, the chip is placed in a microscopic image acquisition system for image acquisition and scanning, and a complete chip image is spliced.
[0044] Step S2: Image preprocessing: semi-automatic image microstructure cropping. By writing Python code to implement a cell image microstructure cropping tool, semi-automatic cropping can be achieved for any single cell capture chip with microstructures. When cropping, determine the coordinates of the upper left corner of the starting point, the width and height information of a single microstructure, and the moving step length of each cropping action. You can then crop out a small image of all the microstructures with complete details, such as Figure 1 shown.
[0045] Step S3: Image data annotation: Implement a microstructure annotation tool by writing Python code, such as Figure 2 As shown, the complete detail image samples of all microstructures finally cropped in the previous step S2 can be read, so as to mark whether each image successfully captures the cell. The coding design rule is 0-not captured, 1-captured. The labeled image samples are selected and organized into a data set.
[0046] Step S4: Based on the neural network part of the CNN network model, establish the classification recognition of whether to capture or not, and perform network training. The network model is as follows: Figure 3 shown.
[0047] Step S5: Use the validation set and the test set to verify the classification and recognition effect and accuracy of the microstructure cell capture situation, such as Figure 4 shown.
[0048] Step S6: Export the cell capture rate analysis results and generate a cell capture heat map, such as Figure 5 As shown, the cell capture rate was calculated.
[0049] On the other hand, the present invention provides an application of the aforementioned method for rapidly identifying cell capture conditions and calculating cell capture rates based on a microfluidic chip.
[0050] The applications include biological sample testing.
[0051] Specifically, the biological sample detection includes but is not limited to: cell heterogeneity research, disease diagnosis and treatment, drug development, immunology research, stem cell research, cancer research, microbiology research, and cosmetic efficacy testing.
[0052] Preferably, the types of biological samples include, but are not limited to: various cells from animals or microorganisms, such as immune cells, tumor cells, stem cells, nerve cells, etc., and also include various non-biological microparticles whose sizes match the capture site structure.
[0053] Beneficial effects of the present invention:
[0054] Artificial intelligence is used instead of naked eye recognition. The experimenter only needs to successfully culture the cells in the chip and take an image of the complete chip under a microscope. Then the image is semi-automatically cropped by the image preprocessing operation of step S2, and the detailed image of each microstructure can be quickly obtained. Next, the cell capture state of each microstructure image obtained by cropping is identified through the trained neural network model, and the cell capture result heat map and cell capture rate can be obtained in a very short time. The whole process greatly saves the time of statistical cell capture, and the operation is simple and mostly semi-automatic. You only need to enter the coordinate value and the cropping step length, and click the start recognition button to achieve the function. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The figure is a flow chart of the steps of the analytical method of the present invention.
[0056] Figure 2This is a schematic diagram of the cell microstructure cutting process. Part of this figure was taken and spliced by experimenters. The pipeline itself is incomplete. The core part of the process display is the middle micro-dam, which does not affect the effect of the cutting process display.
[0057] Figure 3 Schematic diagram of the cell capture annotation tool.
[0058] Figure 4 It is a diagram illustrating the network model of the present invention.
[0059] Figure 5 This is an illustration of the network training loss and accuracy curve.
[0060] Figure 6 A heatmap representation of cells captured for network predictions. DETAILED DESCRIPTION
[0061] The present invention will be further described in detail below in conjunction with specific examples. The following examples are not intended to limit the present invention, but are only intended to illustrate the present invention. The experimental methods used in the following examples are generally conventional, unless otherwise specified, and the materials, reagents, etc. used in the following examples are commercially available, unless otherwise specified.
[0062] In the present invention, the "microfluidic chip" has the meaning as conventionally understood by those skilled in the art, such as a set of grooves or microchannels engraved on different materials (glass, silicon or polymers, such as polydimethylsiloxane or PDMS, polymethyl methacrylate or PMMA). The microchannels forming the microfluidic chip are interconnected to each other to obtain the desired results. This microchannel organization captured in the microfluidic chip is associated with the outside through the input and output of the penetrating chip, serving as an interface between the macroscopic world and the microscopic world. With the help of pumps and chips, microfluidic chips help determine the behavioral changes of microfluids. Inside the chip, there are microfluidic channels that can handle fluids, such as mixing and physicochemical reactions.
[0063] In the present invention, "bright field image" refers to the bright field image in microscopic imaging. Compared with the dark field, the bright field is directly imaged by transmitted light during the imaging process, such as the Kohler illumination system. In the bright field, the background is bright and the target is dark. The dark field is imaged by reflected light or emitted light (fluorescence microscope). In the dark field, the background is dark and the target is bright.
[0064] In the present invention, "nuclear staining fluorescence image" refers to a microscopic image of cells in which the cell nucleus is stained with fluorescent dye.
[0065] In the present invention, "heat map" refers to a graphical tool that uses color changes to represent the degree of data matrix or data concentration. The darker the color, the larger the value, and the lighter the color, the smaller the value. Heat maps are often used to display data information on gene expression, protein interaction, metabolic pathway activity, etc. In the present invention, the "cell capture heat map" is used to reflect whether a cell is captured or not. The darker the color, the greater the probability of cell capture, and the lighter the color, the lower the probability of cell capture.
[0066] In the present invention, "training set", "validation set" and "test set" have the general meanings as understood by those skilled in the art. The role of the "training set" is to build a model that can predict, classify or infer unknown data by learning from sample data; the "validation set" is sometimes also called a check set, which is a sample set set aside during the model training process. It can be used to adjust the hyperparameters of the model and to make a preliminary assessment of the model's capabilities. It is usually used to verify the generalization ability of the current model during iterative model training; the "test set" is used to test the performance of the optimal model finally selected.
[0067] In the specific embodiment of the present invention, the effect of the analytical method of the present invention is presented as an example, combining As is known to those skilled in the art, based on the analysis method disclosed in the present invention, those skilled in the art can select other chip types for application according to the description, and the optimized technical solutions are also within the scope of protection of the present invention.
[0068] Example 1 A microfluidics-based Method for rapidly identifying cell capture status and calculating cell capture rate on single cell analysis chip
[0069] This embodiment provides a Methods for rapidly identifying cell capture and calculating cell capture rate on single-cell analysis chips, such as Figure 1 As shown, including:
[0070] Step S1, collecting images, culturing cells on a microfluidic chip, and merging the bright field image and the nuclear staining fluorescence image using a microscope, and splicing the local microscopic image slices to form a complete chip image;
[0071] Step S2, performing image preprocessing on the collected complete chip image, i.e., semi-automatic image microstructure cropping;
[0072] Step S3: annotate all cropped images and organize training samples to establish a data set;
[0073] Step S4: Based on the neural network part of the CNN network model, establish classification recognition of capture or not, and perform network training;
[0074] Step S5, using the validation set and the test set to verify the classification and recognition effect and accuracy of the microstructure cell capture situation;
[0075] Step S6, exporting the cell capture rate analysis results, generating a cell capture heat map, and calculating the cell capture rate.
[0076] Step S2 includes:
[0077] S201, rotation correction is performed on the complete chip image. In order to ensure the accuracy of chip image cropping, it is necessary to ensure that the flow channel part in the image is accurately aligned horizontally and vertically, so it needs to be rotationally corrected. The specific operation steps required for rotation correction are as follows: Step 1, preprocessing: preprocess the input image, and use a denoising algorithm or a contrast enhancement method to highlight the image features; Step 2, feature detection: use edge detection, Hough transform, corner detection and other algorithms to find significant features in the image. For microfluidic chip images, the flow channel shapes detected by different chip structures are inconsistent, but what can be basically determined is the flow channel edge or other regular geometric features; Step 3, direction estimation: based on the detected features, estimate the overall tilt angle of the image, and complete it by fitting a straight line, calculating the direction vector of the straight line and finding the average direction; Step 4, rotation correction: according to the estimated angle, use any of bilinear interpolation, nearest neighbor interpolation or cubic spline interpolation methods to rotate the image to the desired direction to ensure the horizontal and vertical alignment of the flow channel part in the image; Verification and adjustment: after correction, it can be judged whether the image is completely aligned by manual verification, and 1 to 2 degrees of fine adjustment can be performed if necessary.
[0078] S202. After rotation correction, a certain microstructure in the image needs to be selected as the starting point for image cropping. Usually, the arrangement of microstructures in the chip is neat and regular. Therefore, by setting the coordinates of the upper left corner of the cropping starting point, the width and height information of a single microstructure, and the moving step length of each cropping action, the detailed images of all microstructures can be cropped in batches. The images cropped in this way can be guaranteed to be of uniform size. It is necessary to confirm the image naming rules to ensure that all batch cropped images are stored successfully.
[0079] Step S3 includes:
[0080] S301, annotate all cropped images, organize training samples and establish a data set. A microstructure annotation tool is implemented by writing Python code, such as Figure 2As shown, the capture situation of each cell image can be classified and identified. Click Load Image to select a folder to load all cropped microstructure images, and manually mark 0 or 1 to manually mark and classify whether the microstructure has captured the cell. Click the "Next" button to switch to the next image, click the "Last" button to return to the "previous" image, enter the image number and click "Jump" to quickly jump to the image with that number. Click the "Save" button to save all currently labeled images as a csv file. Click the "Load Labels" button to load previously labeled labels and continue to label or modify them. Through the relevant functions of the above tools, you can achieve the labeling of whether the microstructure cells are captured or not.
[0081] S302, create a data set, after labeling several images, establish a data set according to the ratio of captured and uncaptured cells. In order to build a high-quality data set, the number of samples of captured cells and uncaptured cells should be balanced as much as possible to ensure that the ratio of the two is close to 1:1. In addition, it should be noted that the labeled image samples are randomly divided into training set, validation set and test set according to 8:1:1.
[0082] Step S4 includes:
[0083] Establishing the classification recognition of capture or not, network training includes: selecting the CNN network model for improvement, and re-customizing a lightweight convolutional neural network according to the complexity of the task. Figure 3 As shown, the following is a detailed introduction to each layer:
[0084] First, there are convolutional layers and pooling layers. The first convolutional layer is conv1, with 3 input channels (corresponding to the three color channels of RGB images), CH output channels (set to 8), a convolution kernel size of 3×3, and a padding of 1, so that the size of the output feature map can be kept the same as the input. The activation function layer active uses the ReLU activation function, which only retains positive values and sets negative values to 0. The pooling layer pool uses the maximum pooling (Max Pooling), with a pooling window size of 2×2 and a step size of 2. This step will reduce the size of the feature map. The subsequent convolutional layer structure is similar to conv1, using CH 3×3 convolution kernels and the same padding value to maintain the output size. Each layer is followed by a ReLU activation function and a maximum pooling layer. Global average pooling layer avgpool: The global average pooling layer reduces the feature map of each channel to a fixed size (set to 7×7 here). The global average pooling layer is usually used to replace the flattening operation before the fully connected layer, and can reduce the risk of overfitting. Fully connected layer fc1: The first fully connected layer, the input is the feature map after global average pooling, which is flattened into a one-dimensional vector and then mapped to 32 hidden units. Fully connected layer fc2: The second fully connected layer, maps the previous 32 hidden units to the final number of categories, here there are two categories, captured and not captured binary classification tasks.
[0085] This model is not a direct copy of the classic CNN architecture, but a relatively simple and configurable convolutional neural network. It contains the basic components of convolutional layer, activation layer, pooling layer and fully connected layer, which is suitable for image classification tasks. Such a design may be sufficient for some less complex data sets or smaller data sets, but when dealing with large-scale data sets or complex image recognition tasks, a more complex network structure may be required to improve the expressiveness and generalization ability of the model.
[0086] Before training begins, you need to prepare and load the dataset in the code. First, define the dataset class (ImageCSVDataset) to read the image path and its label from the CSV file and convert the image to the PyTorch tensor format. This class also supports repeating certain samples to balance the number of samples of different categories in the dataset. Use transforms.Compose to define a series of image preprocessing steps, including resizing the image and converting it to a tensor. Finally, batch load the training, validation, and test data through the data loader, and support data shuffling.
[0087] When training a network model, set the training parameters, such as learning rate, optimizer, learning rate scheduler, and loss function. In the specified training cycle, traverse the training data, perform forward propagation, loss calculation, back propagation, and parameter update.
[0088] Step S5 includes:
[0089] The validation set and test set are used to verify the classification and recognition effect and accuracy of microstructure cell capture. The average loss of each Epoch is recorded during the training process, and verification is performed after each Epoch. The training loss and verification accuracy curves are plotted, as shown in the figure below. Figure 4 shown.
[0090] Step S6 includes:
[0091] After the new complete chip image has gone through the previous steps, the network is used to predict the capture situation. The prediction results are saved as csv or txt files, and the counting statistics are performed by reading the 0s and 1s in the file. The Pandas library is used to read and process data, create and fill heat map data, use Matplotlib to create graphics and set properties, and then use Seaborn to draw the heat map. The captured heat map is shown below: Figure 5 shown.
[0092] Example 2 Detection of melanocytes using microfluidic chip
[0093] The effect was verified on melanocytes according to the method of Example 1, and the results were as follows:
[0094] Total number of cells captured by the chip: 640;
[0095] Number of chip micro-dam structures: 1292;
[0096] The cell capture rate of the chip was 49.54%.
[0097] Example 3 Microfluidic chip detection of fibroblasts
[0098] The effect was verified on fibroblasts according to the method of Example 1, and the results were as follows:
[0099] Total number of cells captured by the chip: 1029;
[0100] Number of chip snake pipeline micro-wells: 2000;
[0101] The cell capture rate of the chip was 51.45%.
Claims
1. A method for rapidly identifying cell capture conditions and calculating cell capture rates based on a microfluidic chip, characterized in that: The following steps are involved: Step S1, collecting images: culturing cells on a microfluidic chip, and using a microscope to merge the bright field image and the nuclear staining fluorescence image, and splicing the local microscopic image slices to form a complete chip image; Step S2, performing image preprocessing on the collected complete chip image: semi-automatic image microstructure cropping; Step S3: annotate all cropped images and organize training samples to establish a data set; Step S4: Based on the neural network part of the CNN network model, establish classification recognition of capture or not, and perform network training; Step S5, using the validation set and the test set to verify the classification and recognition effect and accuracy of the microstructure cell capture situation; Step S6, exporting the cell capture rate analysis results, generating a cell capture heat map, and calculating the cell capture rate.
2. The method according to claim 1, characterized in that The step S2 includes: S201, performing rotation correction on the complete chip image; S202: After the rotation correction, any microstructure in the image is selected as a starting point for image cropping.
3. The method according to claim 2, characterized in that The step S201 includes: The first step is preprocessing: preprocess the input image and use denoising algorithms or contrast enhancement methods to highlight image features; The second step is feature detection: use edge detection, Hough transform, corner detection and other algorithms to find significant features in the image; The third step is direction estimation: based on the detected features, the overall tilt angle of the image is estimated by fitting a straight line, calculating the direction vector of the straight line and finding the average direction. Step 4: Rotation correction: Based on the estimated angle, use any of the methods, bilinear interpolation, nearest neighbor interpolation, or cubic spline interpolation, to rotate the image to the desired direction, ensuring that the flow channel part in the image is aligned horizontally and vertically. Step S202 includes: after rotation correction, selecting any microstructure in the image as the starting point for image cropping, setting the coordinates of the upper left corner of the cropping starting point, the width and height information of a single microstructure, and the moving step length of each cropping action, so as to batch crop the detailed images of all microstructures to ensure uniform size.
4. The method according to claim 1, characterized in that: Step S3 includes: S301: Annotate all cropped images and organize them into training samples to establish a data set; S302: Create a data set. After annotating the image, establish a data set based on the ratio of whether it is captured or not; The step S301 includes: Microstructure annotation was performed by writing Python code, and the capture status of each cell image was classified and identified: all cropped microstructure images were loaded, and whether the microstructure captured the cell was manually marked as 0 or 1; The step S302 includes: Balance the number of samples of captured cells and uncaptured cells so that the ratio between the two is close to 1:1; randomly divide the labeled image samples into training set, validation set and test set according to the ratio of 8:1:
1.
5. The method according to claim 1, characterized in that: The step S4 is: selecting a CNN network model for improvement, and re-customizing a lightweight convolutional neural network according to the complexity of the task; In step S4: the lightweight convolutional neural network includes a convolution layer, an activation function layer, a pooling layer and a fully connected layer; In the step S4: the first convolution layer conv1 has 3 input channels, CH output channels, 3×3 convolution kernel size, and 1 padding; the activation function layer active uses the ReLU activation function, only retains positive values, and all negative values are set to 0; the pooling layer pool uses the maximum pooling Max Pooling, the pooling window size is 2×2, and the step size is also 2; The subsequent convolutional layer structure is the same as conv1, and each layer is followed by a ReLU activation function and a maximum pooling layer; Global average pooling layer avgpool: The global average pooling layer reduces the feature map of each channel to a fixed size; Fully connected layer fc1: The first fully connected layer, the input is the feature map after global average pooling, which is flattened into a one-dimensional vector and then mapped to 32 hidden units; Fully connected layer fc2: The second fully connected layer maps the previous 32 hidden units to the final number of categories, capturing and not capturing the binary classification task.
6. The method according to claim 1, characterized in that The step S5 includes: recording the average loss of each Epoch during the training process, verifying after each Epoch, and drawing a training loss and verification accuracy curve.
7. The method according to claim 1, characterized in that The step S6 includes: using the network to predict the capture situation of the new complete chip image after the previous steps, saving the prediction results into a csv or txt file, and performing counting statistics by reading 0 and 1 in the file; using the Pandas library to read and process data, create and fill heat map data, use Matplotlib to create graphics and set properties, and then use Seaborn to draw the heat map.
8. Use of the method according to any one of claims 1 to 7 in the detection of biological samples.
9. The use according to claim 8, characterized in that: The biological sample detection includes any one or more of cell heterogeneity research, disease diagnosis and treatment, drug development, immunology research, stem cell research, cancer research, microbial research, and cosmetic efficacy testing.
10. The use according to claim 9, characterized in that: The types of biological samples include cells from animals or microorganisms; the biological samples include any one or more of immune cells, tumor cells, stem cells, and neural cells, or the biological samples include non-biological microparticles whose size matches the capture site structure.