A deep learning method for identifying densely distributed adhesion cells
By employing techniques such as Feature Pyramid Network (FPN), Non-local Attention (Non-local), Pyramid Split Attention (EPSA), and Deformable Convolutional Network (DCN), the problem of identifying adherent cells in densely distributed structures was solved, improving the recognition accuracy and the network's feature extraction capabilities.
Patent Information
- Application Number
- CN202210961993.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-11
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-08-11
AI Technical Summary
Existing red blood cell identification methods struggle to accurately identify adherent cells in densely distributed environments. Traditional algorithms and deep learning networks such as SSD and RetinaNet exhibit low recognition rates in complex scenarios and are unable to effectively extract image features.
We employ a feature extraction network combined with Feature Pyramid Network (FPN) and non-local attention mechanism (non-local), introduce pyramid split attention mechanism (EPSA) and deformable convolutional network (DCN), and use ROIAlign instead of ROI pooling to build a Fast R-CNN network for classification and regression.
It improved the recognition accuracy of densely distributed adherent cells, enhanced the network's feature extraction capabilities, reduced the burden on hardware devices, and increased the recognition rate.
Smart Images

Figure CN115359264B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of red blood cell image target detection technology, specifically involving a deep learning method for recognizing densely distributed, adherent cells. Background Technology
[0002] In modern medicine, the identification and detection of red blood cells has become an important clinical diagnostic technique. By obtaining crucial information such as their morphology and quantity, it can assist in the diagnosis of various diseases. Computer technology plays a vital role in medical image processing, analysis, and automatic identification.
[0003] When analyzing medical images, professionals use microscopes to simultaneously examine the morphology and number of multiple red blood cells, which is currently one of the main methods for diagnosing diseases. However, manual testing is inefficient and easily affected by subjective factors. In addition, some automated instruments, such as expensive flow cytometers, are also susceptible to interference from other substances in the blood, such as white blood cells, resulting in lower accuracy.
[0004] Traditional red blood cell detection methods primarily focus on watershed segmentation, threshold segmentation, and edge detection. However, these operator-based image processing methods have limited applications, only suitable for simple, sparse cell distribution scenarios, and cannot accurately and efficiently identify densely distributed red blood cells. Current deep learning network algorithms for cell recognition, such as SSD and RetinaNet (one-stage networks), also struggle to accurately distinguish densely packed, adherent cells in complex scenes, resulting in insufficient image feature extraction and reduced recognition rates.
[0005] With the increasing integration of deep learning and the medical field, deep learning-based cell detection methods have been widely applied. By extracting higher semantic cell features through deep neural networks, more useful information can be obtained from cell images, improving the accuracy of cell recognition. Therefore, deep learning algorithms with powerful feature extraction capabilities effectively compensate for the shortcomings of traditional algorithms. In actual medical scenarios, red blood cell targets have the following characteristics: (1) a large number of cells to be identified, densely distributed; (2) cells are adhered and overlapping, and the target size is different; (3) cells themselves change or adhere and squeeze each other, resulting in irregular morphological changes, and some images contain white blood cells or blemishes. These characteristics reflect the real environment of red blood cell distribution and affect the accuracy and precision of cell recognition. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention provides a deep learning method for identifying densely distributed adhering cells. This method first preprocesses the dataset to improve the model's generalization ability. Then, the data is input into a feature extraction network to extract features. To detect numerous, densely distributed red blood cells, a feature pyramid (FPN) is fused with a non-local attention mechanism (non-local), integrating a balanced pyramid (BFP) to correct targets with large spatial differences in the image. To address the issue of varying sizes between individual cells and adhering cells, a pyramid splitting attention mechanism (EPSA) is introduced. By segmenting channels, multi-scale spatial information is extracted from the feature maps of each channel, obtaining more detailed cell features. To address the problem of diverse target morphologies caused by the compression and deformation of adhering cells, a deformable convolutional network (DCN) is used to reshape the C3 and C4 layers of the backbone feature extraction network, compensating for the inability of conventional convolutions to learn multi-pose features. Region of Interest (ROI) Alignment is used instead of Region of Interest Pooling (ROI pooling) to avoid region mismatch caused by two quantization errors during pooling. Finally, the predicted bounding boxes are fed into a Fast R-CNN network to classify the target categories in the candidate regions and perform regression processing on the target coordinates. This method effectively enhances the network feature extraction capability of densely distributed adherent cells and improves the network recognition accuracy.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a deep learning method for identifying densely distributed adhesion cells, comprising the following steps:
[0008] S1: Collect red blood cell medical image datasets and preprocess red blood cell samples to form dataset samples;
[0009] S2, perform data augmentation on the dataset samples extracted by S1;
[0010] S3, performs sample labeling on the dataset processed by S2;
[0011] S4, extract features from red blood cell images and add a deformable convolutional DCN structure;
[0012] S5, the preprocessed dataset samples are processed by the Balanced Pyramid (BFP) network for feature extraction;
[0013] S6, build the pyramid split attention mechanism EPSA, and then send it into the region generation network RPN network;
[0014] S7, use the region of interest (ROI) alignment to obtain more accurate cell localization information;
[0015] S8, build the Fast R-CNN network;
[0016] S9, performs the preprocessing operations S2 and S3 of the training phase on the test data collected by S1;
[0017] S10 takes the samples processed by S9 and feeds them into the model constructed by S4, S5, S6, S7 and S8 to obtain the test results, which are then output by Fast R-CNN for classification and regression.
[0018] Preferably, step S1 specifically includes: collecting medical cell images containing single independent cells and adhering cells with red blood cell targets from the Isfahan Medical Image and Signal Processing MISP dataset as training images; cropping the training images to a size of 779×519 and removing negative samples from the cropped training set to form dataset samples.
[0019] Preferably, step S2 specifically includes: performing horizontal flipping, rotation, scaling, and translation on the images to expand the original dataset to 260 images, forming a complete dataset.
[0020] Preferably, step S3 specifically includes:
[0021] S301, Process medical images, label red blood cells in medical images to form a labeled dataset required for training Faster R-CNN neural network model, label the category and location coordinates of all cell targets in the training images to obtain sample targets;
[0022] S302 divides the labeled dataset into three parts: training set, validation set, and test set. The training set is used as the data sample for model fitting, and gradient descent is used to train the training error and weight parameters during the training process; the validation set is used to adjust the model's hyperparameters and to initially evaluate the model's ability; the test set is used to evaluate the generalization ability of the final model.
[0023] Preferably, step S4 specifically includes: first, replacing VGG16 with a ResNet50 residual network, and selecting the feature maps of the last layer of the last four residual modules to construct a bottom-up network; then, obtaining four feature maps through lateral connections and top-down upsampling, designated as C2, C3, C4, and C5, to form a top-down network; introducing a DCN module in layers C3 and C4, that is, adding an adjustment of the direction vector of the convolution kernel on the basis of traditional convolution.
[0024] Preferably, step S5 specifically includes: based on step 4, establishing lateral connections and generating new feature layers P2, P3, P4, and P5 from top to bottom after layer C5. For the top-down network, the feature maps of the corresponding layers of the bottom-up network are input, and the 1×1 convolution and the upsampling results of the adjacent upper layers are output. After the lateral connections established by layer C5, the results of the four layers P2, P3, P4, and P5 are used as the output of the feature extraction network.
[0025] Feature Pyramid Network (FPN) and non-local attention mechanism leverage their respective advantages to unify feature maps from different levels into layer C4 using adaptive max pooling or downsampling. Interpolation and max pooling are then applied respectively. Pooling is used for small feature maps, while bilinear interpolation is used for large feature maps. The resulting L feature layers are element-wise summed and divided by L, resulting in balanced semantic features:
[0026]
[0027] In equation (1): C l Let l be the number of layers for predicting feature layers, and L be the total number of layers for predicting feature layers. max As the highest level, l min It is a low-level level.
[0028] Preferably, step S6 specifically includes:
[0029] S601, construct the pyramid split attention mechanism EPSA, and use its SPC (split and concat) module to segment channels; first, set the input feature map X, and split it into S parts [X0, X1, ..., X... S-1 Then, features at different scales are extracted from different parts, and finally, the extracted multi-scale features are concatenated. The process is as follows:
[0030] [X0,X1,…,X S-1 ] = Split(X)
[0031] F i =Conv(K i ×K i G i (X) i ), i = 0, 1, ..., S-1;
[0032] F = Cat([F0,F1,...,F) S-1 ])
[0033] S602, based on S601, further extracts attention weights for different feature subsets, as shown below:
[0034] Z i =SEWeight(F i ), i = 0, 1, ..., S-1
[0035] S603, to better achieve attention information interaction and integrate cross-dimensional information, the above attention vectors are concatenated, i.e. Then the obtained attention weights are normalized:
[0036] att = Softmax(Z)
[0037] S604, the corrected feature is obtained: Y = F⊙att;
[0038] S605 performs element-wise dot product on the recalibrated weights and the corresponding feature maps, outputting a multi-scale feature map weighted by attention. Each feature point in each feature map generates an anchor point which is then fed into the Region Generation Network (RPN) to generate region candidate boxes.
[0039] Preferably, step S7 specifically includes: replacing region of interest pooling (ROIPooling) with ROI Align. The principle is to cancel the quantization operation and use bilinear interpolation to obtain the image values of the pixels with floating-point coordinates, thereby transforming the entire feature aggregation process into a continuous operation. When the feature information is input into the pyramid to predict the output, the last four layers of data are input into the ROIAlign layer, thereby increasing the network's feature extraction capability.
[0040] Preferably, step S8 specifically includes:
[0041] S801 flattens the feature map of each candidate region into a one-dimensional vector, passes it through the linear rectified function ReLU, and then through two fully connected layers. One layer classifies the candidate region through the normalized exponential function Softmax, and the other layer performs a more accurate regression of the bounding box coordinates.
[0042] S802, initialize all weights and biases to be trained in the above model, set training parameters, learning rate, batch size, thresholds for positive and negative samples for RPN and Fast R-CNN networks, and start model training.
[0043] Preferably, step S10 specifically includes: calculating the recall, precision, and average accuracy of the red blood cell target;
[0044] S1001, the recall rate for red blood cell test samples is calculated as follows:
[0045]
[0046] In formula (2): TP is the positive sample of red blood cells that is correctly identified as a positive sample, and the image of the cell is correctly identified as a cell. FN is the false negative sample, that is, the positive sample of red blood cells is incorrectly identified as a negative sample, and the background in the image is not identified. The system mistakenly believes that the image that is not identified is the background.
[0047] S1002, the precision of the red blood cell test sample can be calculated as follows:
[0048]
[0049] In equation (3): FP is a false positive sample, that is, a negative sample is incorrectly identified as a positive sample, and white blood cells or blemishes in the image are incorrectly identified as cell images;
[0050] S1003, the average precision is calculated separately for each class at various Intersection over Union (IoU) thresholds (0.5, 0.55, ..., 0.95). The results are sorted by confidence level. The area covered by the interpolated precision curve is estimated by the average interpolation precision of recall on 11 equidistant horizontal axes. t c It can be calculated as:
[0051]
[0052] In equation (4): c is the given number of categories, which is 2 for binary classification detection; t is the IoU threshold; and mAP can be calculated as:
[0053]
[0054] In equation (5): AP i This represents the AP value for the i-th class.
[0055] Compared with the prior art, the beneficial effects of the present invention are:
[0056] (1) In real-world medical scenarios, densely distributed cells may adhere to each other, causing overlapping and occlusion of cell outlines. Traditional algorithms and conventional network models struggle to extract cell adhesion features, making it impossible to distinguish between adhered cells and single cells, thus reducing the target recognition rate. This invention differs from traditional algorithms and conventional network models. Specifically designed for densely distributed cells, it can solve the problem of binary classification of adhered cells and single cells, more effectively extracting multi-scale cell features for easier subsequent counting and other processing.
[0057] (2) Each network improvement in this invention is designed based on the characteristics of cell samples in actual medical scenarios. On the Faster R-CNN network framework, a balanced pyramid structure, a pyramid splitting attention mechanism, and a deformable convolutional structure are added to compensate for the shortcomings of conventional network models in situations where cells are densely distributed, adhered to each other, or deformed after compression. Furthermore, this network adds region of interest calibration to replace the original region of interest pooling, avoiding region mismatch problems caused by quantization errors, thereby obtaining more accurate candidate feature regions. Therefore, the considered processing strategy has better feature extraction capabilities and generalization, maximizing the network recognition rate and reducing the burden on hardware. Attached Figure Description
[0058] Figure 1 This is a network model structure diagram of a deep learning method for identifying densely distributed adherent cells according to an embodiment of the present invention.
[0059] Figure 2 This is a red blood cell sample identification diagram according to an embodiment of the present invention, wherein RBC is the identified single cell and RBC_RBC is the identified adherent cell;
[0060] Figure 3 The best test result for this embodiment of the invention is the mAP result. Detailed Implementation
[0061] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0062] Reference Figure 1 This invention discloses a deep learning method for identifying densely distributed adhesion cells, and the specific implementation steps are as follows:
[0063] S1 collects medical cell images containing single independent cells and adherent cells with red blood cell targets from the Isfahan Medical Image and Signal Processing MISP dataset. Each image is cropped to a size of 779×519 to improve the difficulty of the model reading large images. Negative samples in the training set after cropping are removed, and images without target cells or that are blurry are deleted.
[0064] S2. To improve the generalization ability of the model, the dataset is augmented by horizontal flipping, rotation, scaling, and translation transformations to form a complete dataset. In the selection of training and test sets, it is ensured that the selected training and test set samples cover various cell images.
[0065] Reference Figure 2 Step S3 of the present invention includes:
[0066] S3, the dataset includes white blood cells, single red blood cells, and adherent red blood cells. LabelMe software was used to label single red blood cells and adherent red blood cells with rectangular bounding boxes. White blood cells differ significantly in size and morphology from red blood cells and are not labeled in this invention. The encoding format is UTF-8, and the labeled cell labels are in JSON format. The image label format is then uniformly converted to XML format. The image data is randomly divided into test set, validation set, and training set in a 3:3:20 ratio.
[0067] S4. The feature extraction network of the cell detection model proposed in this invention is ResNet50. The last four convolutional layers of ResNet50 are selected as the bottom-up feature pyramid network, named C2, C3, C4, and C5. After layer C5, a new feature layer with lateral connections and top-down generation is established. Deformable convolutions are built in layers C3 and C4 of the backbone network, which shifts the sampling points of the convolution kernel on the input feature map, thereby concentrating the convolution module in the region where the features are more obvious, and extracting the target features more accurately. Deformable convolution is based on traditional convolution, adding an adjustment to the direction vector of the convolution kernel, making the shape of the convolution kernel closer to the feature. For example, in a 3×3 convolution, the convolution dilation = 1 defaults to not expanding the convolution. The 9 positions are:
[0068] R={(-1,-1),(-1,0),...,(0,1),(1,1)}
[0069] For each position p0 on the output feature map, we have:
[0070]
[0071] Where: R defines the size of the receptive field, w(p) n ) represents the corresponding convolution kernel weight coefficients, p n It is the nth point in the sampling grid;
[0072] Introducing an offset Δp in deformable convolution n This results in irregular sampling positions, and the formula becomes:
[0073]
[0074] S5, the feature extraction network of the cell detection model proposed in this invention is ResNet50. The last four convolutional layers of ResNet50 are selected as the bottom-up feature pyramid network, designated as C2, C3, C4, and C5. After layer C5, a new feature layer with lateral connections and top-down generation is established. The output of each layer is independent, allowing each layer's feature map to have more information. The final output is used for classification and regression parameters for subsequent prediction. This feature extraction network integrates multi-layer feature information, which can obtain more robust high-level semantic features. The feature pyramid is further integrated with a non-local attention mechanism to form a balanced pyramid, thereby balancing the information flow and distinguishing different features. The feature maps of different levels are unified to layer C4 using adaptive max pooling or downsampling methods, and interpolation and max pooling are used respectively. Pooling is used for small-sized feature maps, while bilinear interpolation is used for large-scale feature maps. The processed feature layers obtain balanced semantic features by averaging, as shown below:
[0075]
[0076] In equation (1): C l Let l be the number of layers for predicting feature layers, and L be the total number of layers for predicting feature layers. max As the highest level, l min It is a low-level level.
[0077] The obtained features are rescaled to enhance the original features. Before rescaling, the balanced semantic features are further refined using an embedded non-local attention mechanism as the refinement step. This ensures that the input and output dimensions are the same and integrates global information. Leveraging the advantages of Feature Pyramid Network (FPN) and the non-local attention mechanism, this balanced pyramid feature integration method can utilize richer details and achieve better multi-scale dense cell recognition results.
[0078] S6. The cell detection model proposed in this invention uses the pyramid split attention mechanism EPSA to replace the 3×3 convolution in the hourglass structure Bottleneck of the ResNet network to obtain a new module EPSA.
[0079] S601, For the input feature map X, firstly, the feature map X is divided into S parts, using [X0, X1, ..., X...]. S-1 The number of channels in each segment is represented by ], where . Simultaneously, for each channel feature map, a multi-scale convolution kernel is used for group convolution to extract spatial information from feature maps of different scales. Its main function is to reduce the number of parameters. The final multi-scale fused feature map is: [X0, X1, ..., X...]. S-1] = Split(X);
[0080] The process is as follows:
[0081] F i =Conv(K i ×K i G i (X) i ), i = 0, 1, ..., S-1;
[0082] F = Cat([F0,F1,...,F) S-1 ])
[0083] S602, based on the above features, further extract attention weights for different feature subsets, as shown in the following formula:
[0084] Z i =SEWeight(F i ), i = 0, 1, ..., S-1
[0085] S603, to better achieve attention information interaction and integrate cross-dimensional information, the above attention vectors are concatenated, i.e. The obtained attention weights are then normalized:
[0086] att = Softmax(Z)
[0087] S604, the corrected feature is obtained: Y = F⊙att;
[0088] S605 performs element-wise dot product on the recalibrated weights and the corresponding feature maps, outputting a multi-scale feature map weighted by attention. Each feature point in each feature map generates an anchor point which is then fed into the Region Generation Network (RPN) to generate region candidate boxes.
[0089] S7. The cell detection model proposed in this invention uses ROIAlign instead of ROIPooling for max pooling. Specifically, quantization is canceled, and bilinear interpolation is used to obtain the image values of pixels with floating-point coordinates. This transforms the entire feature aggregation process into a continuous operation. When feature information is input into the pyramid to predict the output, the data from the last four layers is input into the ROI Align layer, thereby increasing the network's feature extraction capability.
[0090] In a specific application example, S7 further includes:
[0091] S701, traverses each candidate region, keeping floating-point boundaries unquantized;
[0092] S702 divides the candidate region into K×K units, and the boundaries of each unit are not quantized;
[0093] S703 calculates four fixed coordinate positions in each cell, uses bilinear interpolation to calculate the coordinate values of these four positions, and performs max pooling operation.
[0094] S8. Build a Fast R-CNN network, and finally output the classification results and regression coordinate parameters processed by Softmax.
[0095] In a specific application example, step S8 further includes:
[0096] S801 flattens the feature map of each candidate region into a one-dimensional vector, and passes it through the linear rectified function ReLU and two fully connected layers. One of the two fully connected layers is the normalized exponential function Softmax to classify the candidate region, and the other is to regress the coordinates for more accurate detection.
[0097] S802, the loss function expression of the red blood cell target detection network is:
[0098]
[0099] The loss function of the object detection network is composed of the classification loss function L. cls and bounding box regression loss function L reg Composition; p i p represents the probability distribution of each category calculated by Softmax; i * The value is 1 when the sample is positive and 0 when the sample is negative; t i The bounding box regression parameters are t. i * Represents the coordinates of the ground truth detection box corresponding to the predicted region; N represents the number of categories. This method has two types of cell data: single and clustered, i.e., N cls =N reg =2; the hyperparameter λ controls the balance between the two losses, and this method uses λ=1 for all losses. L reg It can be represented as:
[0100]
[0101] t i =[t x ,t y ,t w ,t h ]
[0102]
[0103] Reference Figure 3 Step S10 of the present invention includes: calculating the recall, precision, and average accuracy of the red blood cell target. The Faster R-CNN model is evaluated, and the Intersection over Union (IoU) is calculated as a quantitative evaluation metric for target detection. Simultaneously, the false negative rate of the model is evaluated using precision and recall.
[0104] In a specific application example, step S10 further includes:
[0105] S1001, the recall rate for red blood cell test samples is calculated as follows:
[0106]
[0107] In formula (2): TP is the positive sample of red blood cells that is correctly identified as a positive sample, and the image of the cell is correctly identified as a cell. FN is the false negative sample, that is, the positive sample of red blood cells is incorrectly identified as a negative sample, and the background in the image is not identified. The system mistakenly believes that the image that is not identified is the background.
[0108] S1002, the precision of the red blood cell test sample can be calculated as follows:
[0109]
[0110] In equation (3): FP is a false positive sample, that is, a negative sample is incorrectly identified as a positive sample, and white blood cells or blemishes in the image are incorrectly identified as cell images;
[0111] S1003 uses test sets with different proportions for validation. Average precision (AP) represents the comprehensive metric of the actual model, which is the combined value of image precision and recall, i.e., the area contained in the Precision on-recall Curve.
[0112] Mean precision was calculated for each class at various Intersection over Union (IoU) thresholds (0.5, 0.55, ..., 0.95). The results were sorted by confidence level. The area covered by the interpolated precision-recall curve was estimated by the average interpolation precision of recall on 11 equidistant horizontal axes. t c It can be calculated as:
[0113]
[0114] In equation (4): c is the given number of categories, which is 2 for binary classification detection in this invention; t is the IoU threshold; and mAP can be calculated as:
[0115]
[0116] In equation (5): AP i This represents the AP value for the i-th class.
[0117] After the above 10 steps, the target detection model of the deep learning recognition method for densely distributed adhesive cells proposed in this invention can be obtained.
[0118] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection described in the claims.
Claims
1. A deep learning method for identifying densely distributed adhesion cells, characterized in that, Includes the following steps: S1: Collect red blood cell medical image datasets and preprocess red blood cell samples to form dataset samples; S2, perform data augmentation on the dataset samples extracted by S1; S3, performs sample labeling on the dataset processed by S2; S4, extract features from red blood cell images and add a deformable convolutional DCN structure; S5, the preprocessed dataset samples are processed by the Balanced Pyramid (BFP) network for feature extraction; S6, build the pyramid split attention mechanism EPSA, and then send it into the region generation network RPN network; S7, use the region of interest (ROI) alignment to obtain more accurate cell localization information; S8, build the Fast R-CNN network; S9, performs the preprocessing operations S2 and S3 of the training phase on the test data collected by S1; S10 takes the samples processed by S9 and feeds them into the model built by S4, S5, S6, S7 and S8 to obtain the test results, which are then output by Fast R-CNN for classification and regression. Step S4 specifically includes: first, replacing VGG16 with a ResNet50 residual network, and selecting the feature maps of the last layer of the last four residual modules to construct a bottom-up network; then, obtaining four feature maps through lateral connections and top-down upsampling, designated as C2, C3, C4, and C5, forming a top-down network; introducing a DCN module in layers C3 and C4, that is, adding an adjustment of the direction vector of the convolution kernel on the basis of traditional convolution; Step S5 specifically includes: based on step 4, establishing lateral connections and generating new feature layers P2, P3, P4, and P5 from top to bottom after layer C5. For the top-down network, the feature maps of the corresponding layers of the bottom-up network are input, and the 1×1 convolution and the upsampling results of the adjacent upper layers are output. After the lateral connections established by layer C5, the results of the four layers P2, P3, P4, and P5 are used as the output of the feature extraction network. Feature Pyramid Network (FPN) and non-local attention mechanism leverage their respective advantages to unify feature maps from different levels into layer C4 using adaptive max pooling or downsampling. Interpolation and max pooling are then applied respectively, with pooling for small feature maps and bilinear interpolation for large feature maps. The resulting L feature layers are element-wise summed and divided by L, resulting in balanced semantic features: In equation (1): C l Let l be the number of layers for predicting feature layers, and L be the total number of layers for predicting feature layers. max As the highest level, l min It is a low-level level; Step S6 specifically includes: S601, construct the pyramid splitting attention mechanism EPSA, and use its SPC module to segment channels; first, set the input feature map X, and split it into S parts [X0, X1, ..., X...]. S-1 Then, features at different scales are extracted from different parts, and finally, the extracted multi-scale features are concatenated. The process is as follows: [X0,X1,...,X S-1 ]=Split(X) F i =Conv(K i ×K i ,G i )(X i ),i=0,1,...,S-1; F=Cat([F0,F1,...,F S-1 ]) S602, based on S601, further extracts attention weights for different feature subsets, as shown below: Z i =SEWeight(F i ),i=0,1,…,S-1 S603, to better achieve attention information interaction and integrate cross-dimensional information, concatenates the attention vectors, i.e. Then the obtained attention weights are normalized: att = Softmax(Z) S604, the corrected feature is obtained: Y = F⊙att; S605 performs element-wise dot product on the recalibrated weights and the corresponding feature maps, outputting a multi-scale feature map after attention weighting. Each feature point in each feature map generates an anchor point which is then fed into the Region Generation Network (RPN) to generate region candidate boxes. The specific steps of step S7 include: selecting ROI Align instead of Region of Interest Pooling (ROIPooling). The principle is to cancel the quantization operation and use bilinear interpolation to obtain the image values of the pixels with floating-point coordinates, thereby transforming the entire feature aggregation process into a continuous operation. When the feature information is input into the pyramid to predict the output, the last 4 layers of data are input into the ROI Align layer, thereby increasing the network's feature extraction capability. Step S8 specifically includes: S801 flattens the feature map of each candidate region into a one-dimensional vector, passes it through the linear rectified function ReLU, and then through two fully connected layers. One layer classifies the candidate region through the normalized exponential function Softmax, and the other layer performs a more accurate regression of the bounding box coordinates. S802, initialize all weights and biases to be trained in the above model, set training parameters, learning rate, batch size, thresholds for positive and negative samples for RPN and Fast R-CNN networks, and start model training.
2. The deep learning method for recognizing densely distributed adhesion cells according to claim 1, characterized in that, Step S1 specifically includes: collecting medical cell images containing single independent cells and adhering cells with red blood cell targets from the Isfahan Medical Image and Signal Processing MISP dataset as training images; cropping the training images to a size of 779×519 and removing negative samples from the cropped training set to form dataset samples.
3. The deep learning method for identifying densely distributed adhesion cells according to claim 1, characterized in that, Step S2 specifically includes: performing horizontal flipping, rotation, scaling, and translation on the images to expand the original dataset to 260 images, forming a complete dataset.
4. The deep learning method for recognizing densely distributed adhesion cells according to claim 1, characterized in that, Step S3 specifically includes: S301, Process medical images, label red blood cells in medical images to form a labeled dataset required for training Faster R-CNN neural network model, label the category and location coordinates of all cell targets in the training images to obtain sample targets; S302 divides the labeled dataset into three parts: training set, validation set, and test set. The training set is used as the data sample for model fitting, and gradient descent is used to train the training error and weight parameters during the training process. The validation set is used to adjust the hyperparameters of the model and to initially evaluate the model's ability. The test set is used to evaluate the generalization ability of the final model.
5. The deep learning method for identifying densely distributed adhesion cells according to claim 1, characterized in that, Step S10 specifically includes: calculating the recall, precision, and average accuracy of the red blood cell target; S1001, the recall rate for red blood cell test samples is calculated as follows: In formula (2): TP is the positive sample of red blood cells that is correctly identified as a positive sample, and the image of the cell is correctly identified as a cell. FN is the false negative sample, that is, the positive sample of red blood cells is incorrectly identified as a negative sample, and the background in the image is not identified. The system mistakenly believes that the image that is not identified is the background. S1002, the precision of the red blood cell test sample can be calculated as follows: In equation (3): FP is a false positive sample, that is, a negative sample is incorrectly identified as a positive sample, and white blood cells or blemishes in the image are incorrectly identified as cell images; S1003, the average precision is calculated separately for each class at various IoU thresholds of 0.5, 0.55, ..., 0.
95. The results are sorted by confidence level. The area covered by the interpolation precision curve is estimated by the average interpolation precision of recall on 11 equidistant horizontal axes. t c It can be calculated as: In equation (4): c is the given number of categories, which is 2 for binary classification detection; t is the IoU threshold; and mAP can be calculated as: In equation (5): AP i This represents the AP value for the i-th class.
Citation Information
Patent Citations
Modeling method and target detection method and device based on attention balance feature pyramid
CN113378813A
Abnormal cell image feature retrieval method and device, equipment and medium
CN113779295A