Lightweight detection method for blood cell image adhesion overlapping

Through the combination of improved C2f-HCN module, HFMM and LFDH detection heads, the problems of adhesion overlap and edge incompleteness in blood cell images are solved, and efficient and accurate blood cell detection is achieved, suitable for edge devices.

CN120374580APending Publication Date: 2025-07-25SOUTHWEST PETROLEUM UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510501551.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing hemocell detection methods are inaccurate and efficient in the detection when facing problems such as overlapping cell adhesions, complex backgrounds and incomplete marginal cells, and the model is large in size and is difficult to deploy on edge devices.

Method used

The improved C2f-HCN module is used for feature segmentation and multi-scale feature fusion, combined with the hierarchical feature mixing module HFMM and lightweight detection head LFDH, and the detection performance and lightweight of the model are improved through Batch Normalization technology and shared convolution mechanism.

Benefits of technology

It improves the detection accuracy and efficiency of adhesion overlapping blood cells and marginal blood cells, reduces the calculation amount and parameter amount, is suitable for edge devices, and improves the accuracy and speed of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120374580A_ABST
    Figure CN120374580A_ABST
Patent Text Reader

Abstract

The invention provides a lightweight detection method for adhesion and overlapping of blood cell images, which comprises the following steps: firstly, improving a C2f module, designing a C2f-HCN module, and improving the feature extraction capability of the model on adhesion and overlapping blood cells through a mode of performing feature segmentation and then performing multi-scale feature fusion; secondly, in the Neck network, a novel hierarchical feature mixing module HFMM is designed, and local features and global features are adaptively fused through a hierarchical attention mechanism, so that the adaptability of model feature expression is enhanced, and the detection performance of the model on adhesion overlapping blood cell and edge blood cell images is greatly improved. Besides, an LFDH detection head is designed, and light weight of the model is realized by combining a BN technology and a shared convolution mechanism. A visualization graph shows the excellent detection performance of the detection method. According to the method, various targets in the blood cell image can be accurately identified, and the leak detection and false detection conditions of adhered and overlapped blood cells and edge blood cells are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and target detection methods, and particularly to a lightweight detection method for adhesion and overlap of blood cell images. Background Art

[0002] Blood is an important component of the human body, which contains various types of blood cells, such as red blood cells, white blood cells, and platelets. The characteristics of the quantity, morphology, and distribution of these blood cells are closely related to the health status of the human body. For example, abnormal red blood cell count may indicate diseases such as anemia; abnormal white blood cell count may be related to infections, inflammations, or immune system diseases; abnormal platelet count may affect blood coagulation function. Therefore, accurate and efficient detection of blood cells is of great significance for clinical diagnosis, disease monitoring, and treatment plan formulation.

[0003] Currently, blood cell detection mainly relies on manual observation under a microscope and automated blood analyzers. Although manual observation can provide intuitive cell morphology information, the detection speed is slow, the subjectivity is strong, and the labor intensity is high. Automated blood analyzers can quickly count and partially classify cells in batches, but their ability to recognize cell morphology is limited, it is difficult to provide detailed morphological information, and sometimes manual review is required, increasing the complexity and time cost of detection.

[0004] With the development of medical technology and the continuous improvement of clinical requirements, higher requirements are put forward for the efficiency and accuracy of blood cell detection. On the one hand, it is necessary to quickly process a large number of blood samples to meet the daily detection needs of institutions such as hospitals and physical examination centers; on the other hand, it is necessary to provide more accurate and detailed blood cell morphological information to assist doctors in early disease diagnosis and precise treatment.

[0005] In recent years, with the rapid development of computer, image processing, and artificial intelligence technologies, image-based blood cell detection methods have become a research hotspot. By collecting microscope images and using image processing algorithms and machine learning models, automatic detection of blood cells can be achieved, improving the detection efficiency and accuracy. However, existing image-based blood cell detection methods still have some problems and challenges. For example, there are often problems such as cell adhesion and overlap, complex background, and incomplete edge cell images in blood cell images, which bring difficulties to the accurate segmentation and recognition of cells; moreover, the cell detection model is large and not easy to be deployed on edge devices; in addition, different types of blood cells have diverse morphologies and there are differences among individuals. How to construct an effective feature extraction and detection model to improve the accuracy and robustness of detection is still an urgent problem to be solved. Summary of the Invention

[0006] In view of this, an embodiment of the present invention provides a lightweight detection method for adhesion and overlap of blood cell images, aiming to solve the problems of difficult detection of adhered and overlapped blood cells by current detection algorithms and large detection models. An embodiment of the present invention provides a lightweight detection method for adhesion and overlap of blood cell images, and the method includes the following steps:

[0007] S1. Obtain the BCCD dataset, which contains 364 blood cell images obtained from blood samples under a microscope, including three categories: red blood cells (RBC), white blood cells (WBC), and platelets. Perform data augmentation on the dataset to obtain 728 images and process them to obtain a training set, a test set, and a validation set;

[0008] Further, the specific content of processing the BCCD dataset in S1 is as follows:

[0009] Convert the format in the dataset to the YOLO format through processing, and uniformly adjust the pixel size of the images to 640×640;

[0010] Divide the dataset according to a certain ratio to form a training set, a test set, and a validation set.

[0011] S2. Build a blood cell image detection model, and train the training set on the built model;

[0012] Further, the specific steps of building the blood cell image detection model in S2 are as follows:

[0013] Build a YOLOv8 basic network model;

[0014] Improve the C2f module and design a C2f-HCN module;

[0015] In the Neck network, design a new type of hierarchical feature mixing module HFMM;

[0016] Improve the detection head and design an LFDH detection head.

[0017] Furthermore, the C2f module is improved to design the C2f-HCN module. By replacing the Bottleneck part of the C2f module with the designed lightweight convolution H-Conv, redundant information in the detection process is efficiently removed, and at the same time, the lightweight transformation of the model is achieved, enabling the model to quickly feedback the detection results in actual application scenarios, greatly improving the detection efficiency and practicality of adherent and overlapping blood cells; H-Conv innovatively divides the input feature map into two parts, one part is directly processed, and the other part is convolved with multiple convolutional kernels to capture features of different scales. Subsequently, these features are recombined and further fused through a 1x1 convolutional layer to enhance the model's detection ability for adherent and overlapping blood cell images while maintaining high computational performance. The expression of the first step is as follows:

[0018]

[0019] Among them, x group_split is half of the input feature map x after being segmented, used for multi-scale convolution; k i represents the size of the i-th convolutional kernel, and x group_conv is the feature map after multi-scale convolution processing. It is rearranged and concatenated in the second step. The expression of the second step is as follows:

[0020] x out = Conv 1×1 (cat(x cheap , x group_conv ))

[0021] In the above formula, x cheap represents the other half of the input feature map x after being segmented. This part of the feature map does not undergo multi-scale convolution to reduce the computational amount; Conv 1×1 represents the 1x1 convolutional layer; x out represents the finally output feature map.

[0022] Furthermore, in the Neck network, a novel hierarchical feature mixing module HFMM is designed. HFMM can combine local and global attention branches through the GLAT (Global-Local Aware Transformer) sub-module, and perform refined fusion on the input features through a hierarchical feature processing path. This design not only preserves the spatial details of the input features but also enhances the semantic expression ability of the global context through an adaptive weighting mechanism, thus greatly improving the detection performance of the model for images of adherent and overlapping blood cells and edge blood cells. The specific processing process is as follows: the input features first go through a 1x1 convolution for dimensionality reduction, which aims to unify the dimensions of the input features and reduce the complexity of subsequent calculations. Then, a 3x3 convolution is used to preliminarily fuse the dual-input features to obtain the baseline features. Finally, the features passing through the GLAT branch and the baseline features respectively go through a Conv1x1, RepConv3x3, and Conv1x1. The first convolution mainly reduces the dimension of the input features, reducing the complexity of subsequent calculations. The reparameterizable convolution RepConv is used for feature recombination, improving the parameter utilization rate and better recombining features from multiple branches. The last convolution is mainly used to restore the dimension and optimize the feature expression, ensuring that the features can be efficiently transmitted to the subsequent network layers.

[0023] Furthermore, the detection head is improved, and the LFDH detection head is designed. LFDH significantly improves the localization and classification performance of the detection head by innovatively combining the Batch Normalization (BN) technology and the shared convolution mechanism. In the convolutional network, through normalization processing, the BN technology can reduce the internal covariate shift, making the feature distribution more stable at different levels of the network. This helps to accelerate the convergence speed of the model and improve the generalization ability of the model. In addition, the BN technology can also increase the receptive field of the model to a certain extent because the normalized feature map can better capture feature information at different scales and positions, thus helping to improve the performance of network modules such as the detection head. In the specific implementation process, LFDH first processes the detection input. First, it goes through a 1×1 convolution to perform the merging operation, then realizes parameter sharing through the shared convolution, then dynamically generates anchors and strides through the BN technology, and then converts to the convolutional network at the output scale. Finally, the Scale layer is used to enhance the representation ability of the network. Through this design, the network can learn to perform scaling and translation operations on the input data, thus improving the flexibility and fitting ability of the model. When using the shared convolution, to address the problem of inconsistent detection target scales of the detection head, LFDH uses the Scale layer to scale the features. In this way, during the scaling process, the detection head not only realizes the lightweight of the model but also improves the detection accuracy of the adherent and overlapping blood cell images as much as possible.

[0024] S3. Use the test set of S1 to test the blood cell detection model, and evaluate it with evaluation metrics such as accuracy, recall rate, average precision, FPS, etc.;

[0025] S4. Process the blood cell image with the optimal model and apply it to the actual scenario (such as disease diagnosis, treatment monitoring, etc.) to obtain the detection result.

[0026] In summary, the beneficial effects of the present invention are as follows:

[0027] 1. In microscope images, blood cells often show the situations of target adhesion and overlap and incomplete target images at the edges. The detection method of the present invention can accurately capture these characteristics, thereby realizing the accurate detection of blood cells.

[0028] 2. By using the designed lightweight convolution H-Conv to improve the C2f module, the C2f-HCN module is designed, which improves the detection performance of blood cell adhesion and overlap targets while reducing the number of parameters.

[0029] 3. Through a newly designed hierarchical feature mixing module HFMM, the stability and task adaptability of the model feature expression are enhanced, and the detection performance of the model for adhesion and overlap blood cell images and edge blood cell images is greatly improved.

[0030] 4. By designing a lightweight feature extraction detection head LFDH to improve the original model detection head, while realizing the lightweight of the model, the detection accuracy of the model for adhesion and overlap blood cell images is improved as much as possible.

[0031] 5. Based on the test results on the BCCD dataset, the present invention has excellent detection performance for adhesion and overlap blood cell images. Description of the Drawings

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings, and these are all within the protection scope of the present invention.

[0033] Figure 1 It is a flowchart of a lightweight detection method for adhesion and overlap of blood cell images provided by an embodiment of the present invention;

[0034] Figure 2 It is an overall structure diagram of a lightweight detection method for adhesion and overlap of blood cell images provided by an embodiment of the present invention;

[0035] Figure 3It is the H-Conv structure diagram of a lightweight detection method for adhesion and overlap of blood cell images provided by an embodiment of the present invention;

[0036] Figure 4 It is the HFMM structure diagram of a lightweight detection method for adhesion and overlap of blood cell images provided by an embodiment of the present invention;

[0037] Figure 5 It is the LFDH structure diagram of a lightweight detection method for adhesion and overlap of blood cell images provided by an embodiment of the present invention;

[0038] Figure 6 It is the visualization comparison diagram of the detection effect of a lightweight detection method for adhesion and overlap of blood cell images provided by an embodiment of the present invention and the baseline network. Detailed implementation manners

[0039] The features and exemplary embodiments of the present invention in various aspects will be described in detail below. For the purpose of making the objectives, technical solutions and advantages of the present invention clearer and easier to understand, the following content will be elaborated in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by showing examples of the present invention.

[0040] Please refer to Figure 1 , an embodiment of the present invention provides a lightweight detection method for adhesion and overlap of blood cell images. The method is specifically implemented according to the following steps:

[0041] S1. Obtain the BCCD dataset. This dataset contains 364 blood cell images obtained from blood samples under a microscope, including three categories: red blood cells (RBC), white blood cells (WBC), and platelets (Platelets). Perform data augmentation on the dataset to obtain 728 images and process them to obtain a training set, a test set, and a validation set. The specific steps are as follows:

[0042] (1) Convert the format in the dataset through processing into the YOLO format, and uniformly adjust the pixel size of the images to 640×640;

[0043] (2) Divide the dataset according to a certain ratio to form a training set, a test set, and a validation set.

[0044] S2. Build a blood cell image detection model. The model diagram is as shown in Figure 2As shown in the figure, the Backbone part in the figure includes modules such as Conv, C2f-HCN, and SPPF, the Neck part includes C2f-HCN, Concat, Upsample, Conv, and HFMM, and the Head part includes LFDH. Among them, Conv represents the convolution operation, and Concat represents the concatenation operation. The C2f module consists of Conv, Split, H-Conv, and Concat, where Split represents the splitting operation, and H-Conv represents the bottleneck layer, aiming to reduce the computational amount by reducing redundant information while enhancing the feature expression ability. HFMM consists of Conv, GLAT, RepConv, and Concat. The LFDH detection module consists of Conv-GN convolution, shared convolution, Bbox.loss (bounding box loss), and C1s.loss (class loss). The training set is trained on the built model, including the following steps;

[0045] (1) First, an image with a size of 640×640×3 is sequentially passed through multiple convolutional layers (Conv) and C2f-HCN modules to extract features from different levels. The C2f-HCN module improves the efficiency of the model's feature extraction and reduces the generation of redundant information through feature segmentation and multi-scale feature fusion during the feature extraction process. During this process, the model downsamples the feature map through a convolution with a stride of 2, continuously compressing the spatial size of the image and extracting higher-level semantic features. Finally, the SPPF module further adjusts the size of the feature map to prepare for subsequent feature fusion.

[0046] Among them, the structure of the C2f-HCN module is as Figure 3 shown. The essence of the C2f-HCN module is to replace the Bottleneck part in the C2f module with a lightweight convolution H-Conv, achieving efficient removal of redundant information in the detection process and simultaneously completing the lightweight transformation of the model. This design enables the model to deeply extract the feature information of the image and quickly feedback the detection results in practical applications, greatly improving the detection efficiency of the model for adherent and overlapping cells. Specifically, H-Conv processes the input feature map in two parts: one part is directly processed, and the other part is convolved with multiple convolutional kernels to capture features at different scales. Subsequently, these features are recombined and further fused through a 1x1 convolutional layer. This process not only enhances the model's detection ability for adherent and overlapping blood cells but also maintains high computational performance, ensuring the applicability and efficiency of the model in complex scenarios.

[0047] (2) In the Neck part, first, the features extracted from the SPPF module in the Backbone are further processed to generate high-dimensional feature representations. This part uses a multi-layer feature fusion strategy, such as Concat (feature concatenation) and the combination of the C2f-HCN module, to share information among features of different layers, which helps improve the detection effect of adherent and overlapping blood cell images. At the same time, the Upsample operation is used to restore the spatial size of the feature map, enabling features at different levels to be concatenated on the same spatial scale. Then, the HFMM module is used to perform hierarchical feature processing and refined fusion on the feature information between the Backbone and the Neck, and then the processed feature information is fed into the Head.

[0048] Among them, the structure of the HFMM module is as Figure 4 shown. The HFMM can simultaneously utilize the advantages of local and global attention branches and, through a hierarchical feature processing path, perform refined fusion on the input features. It not only retains the spatial details of the input features but also enhances the semantic expression of the global context through an adaptive weighting mechanism, thus greatly improving the model's detection performance for adherent and overlapping blood cells and edge blood cells. Specifically, when the input features enter the HFMM, they first go through a 1x1 convolution for dimensionality reduction to unify the dimensions and reduce the computational complexity. Then, a 3x3 convolution is used to perform preliminary fusion on the dual-input features to obtain the baseline features. Finally, the features of the GLAT branch and the baseline features respectively go through Conv1x1, RepConv3x3, and Conv1x1. Among them, the first convolution reduces the dimension of the input features and reduces the computational burden. The reparameterizable convolution RepConv3x3 is used for feature recombination to improve the utilization rate of parameters, better integrate the features of multiple branches, and enhance the overall performance and feature expression ability of the model. The last convolution is mainly used to restore the dimension and optimize the feature expression to ensure that the features can be efficiently transmitted to the subsequent network layers.

[0049] (3) In the Head part, through a series of Concat, C2f-HCN, convolutional layers, and HFMM, the features are further fused and processed at a deeper level. Finally, the features are fed into the LFDH detection head for object detection. The structure of the LFDH is as Figure 5As shown in the figure. By innovatively adopting the Batch Normalization (BN) technology, LFDH significantly improves the positioning and classification performance of the detection head; in the convolutional network, through normalization processing, the BN technology can reduce the internal covariate shift, making the feature distribution more stable at different levels of the network. This helps to accelerate the convergence speed of the model and improve the generalization ability of the model; in addition, the BN technology can also increase the receptive field of the model to a certain extent, because the normalized feature map can better capture the feature information at different scales and positions, thus helping to improve the performance of network modules such as the detection head; in the specific implementation process, LFDH first processes the detection input. First, a 1×1 convolution is performed to execute the merging operation, and then parameter sharing is achieved through shared convolution. Then, anchor points and strides are dynamically generated through the BN technology, and then it is converted to the convolutional network at the output scale. Finally, the Scale layer is used to enhance the representation ability of the network; through this design, the network can learn to perform scaling and translation operations on the input data, thus improving the flexibility and fitting ability of the model; when using shared convolution, to address the problem of inconsistent detection target scales of the detection head, LFDH uses the Scale layer to scale the features; in this way, during the scaling process, the detection head not only reduces the number of parameters and the amount of calculation, but also improves the detection accuracy of the adherent and overlapping blood cell images as much as possible.

[0050] S3. Use the test set of S1 to test the lightweight blood cell detection model, and evaluate it with evaluation metrics such as accuracy, recall rate, mean average precision, and FPS.

[0051] S4. Use the optimal model to process the blood cell images and apply them to actual scenarios (such as disease diagnosis, treatment monitoring, etc.) to obtain the detection results.

[0052] Aiming at the problems of missed detection and misdetection caused by severe adhesion and overlap of blood cell targets and the shape of edge blood cells in blood cell images, a lightweight blood cell detection method proposed in this application. First, the C2f module is improved, and the C2f-HCN module is designed. By means of feature segmentation and then multi-scale feature fusion, the detection efficiency of adherent and overlapping blood cells is improved. Secondly, in the Neck network, a new type of hierarchical feature mixing module HFFM is designed to enhance the stability and task adaptability of the model feature expression, thus greatly improving the detection performance of the model for adherent and overlapping targets. Finally, the detection head is improved, and the LFDH detection head is designed. Through the Batch Normalization technology and the shared convolution mechanism, while realizing the lightweight of the model, the detection accuracy of the model for adherent and overlapping blood cell images is improved as much as possible.

[0053] The recall rate (Recal1), mAP@0.5, and mAP@0.5:0.95 of the method mentioned in the present invention on the BCCD dataset are 92.6%, 94.7%, and 66.1% respectively, which are 4.0%, 2.5%, and 1.3% higher than those of the original YOLOv8n network. The computational cost is reduced by 17%, and the number of parameters is reduced by 28%. Experiments show that the improved model can better detect various targets in blood cell images and can be effectively applied to the daily blood detection scenarios of institutions such as hospitals and physical examination centers.

[0054] The experimental environment of the present invention is as follows: This experiment is built on the Windows system, and the deep learning framework used is the Pytorch-GPU version 2.4.0. The GPU model used in the experiment is NVIDIA GeForce RTX 1080Ti, with 11GB of video memory. The programming language selected is Python 3.8, and the CUDA version is 11.8. All experiments are carried out under the same hyperparameters.

[0055] In the YOLO series of models, the main indicators for evaluating its network performance are as follows: Precision (P), Recall (R), and Average Precision (mAP). In this experiment, mAP@0.5 and mAP@0.5:0.95 are used as the performance reference indicators. mAP@0.5% and mAP@0.5:0.95% represent the mAP value when the IoU threshold is 0.5 and the average mAP value when IoU starts from 50% and increases by a step of 0.05 to 95%, respectively. The greater the mean average precision, mAP, the higher the overall precision of the model. The calculation formulas for each indicator are as follows:

[0056]

[0057] Where TP represents the number of positive samples correctly detected, that is, true positives; FP represents the number of false samples correctly detected; FN represents the number of true samples misdetected; and N represents the number of categories.

[0058] To verify that the method proposed in this application significantly improves the detection performance of blood cell images, ablation experiments were conducted on the BCCD dataset. Since there are significant differences between the present invention and YOLOv8n as a whole, YOLOv8n was numbered as A for the experiment. Based on A, the network structures obtained by successively adding the C2f-HCN, HFMM module, and LFDH detection head were denoted as B, C, and D respectively. The experimental results are shown in Table 1. After adding C2f-HCN, the accuracy of the model in blood cell detection has been improved. The mAP@0.5 has increased by 0.7%, and the R% has increased by 0.8%. The computational cost and the number of parameters have also decreased significantly, which verifies that adding C2f-HCN is beneficial for deeply extracting the feature information of adhesion and overlapping blood cell images and improving the detection performance of adhesion and overlapping targets. After introducing the HFMM module, the accuracy has been greatly improved, indicating that the model can better capture the details and complex patterns in adhesion and overlapping blood cell images and has a stronger detection ability for adhesion and overlapping and edge blood cell targets. When adding the LFDH detection head, it was found that without reducing the performance indicators, the number of parameters and the computational cost of the model have been significantly optimized, realizing the lightweight of the model. The experiments show that the present invention can better achieve the target detection task of adhesion and overlapping blood cell images.

[0059] Table 1 Comparison of ablation experiment results

[0060] Method mAP@0.5 / % R% Gflops Params(M) A 92.2 88.6 8.7 3.2 B 92.9 89.4 7.8 2.8 C 94.4 92.4 12.0 2.7 D 94.7 92.6 7.2 2.3

[0061] To verify the superiority of the method proposed in the present invention in the detection performance of blood cell images, the method of the present invention was compared with YOLO series algorithms and advanced popular algorithms on the BCCD dataset. The method comparison experiment is shown in Table 2. Compared with other excellent two-stage object detection methods, the mAP@0.5 of the present invention reaches 94.7%. While achieving the best detection performance, the computational cost is reduced by 17% and the number of parameters is reduced by 28%, successfully realizing the lightweight of the model, indicating that the model simplification and performance improvement of the method of the present invention are both very significant.

[0062] Table 2 Comparison of comparison experiment results

[0063] Model mAP@0.5 mAP@0.5:0.95 Gflops Params(M) Yolv5 92.6 65.1 24.1 9.1 Yolov6 92.4 64.8 11.8 3.36 Yolov8n (Baseline) 92.2 64.8 8.7 3.2 Yolov9 93.4 65.6 67.7 15.6 Yolov11s 93.1 65.5 21.3 9.4 The present invention 94.7 66.1 7.2 2.3

[0064] By selecting blood cell images in the BCCD test set for detection, the detection effect is as Figure 6 shown Figure 6The visual comparison diagram clearly shows that in the scenario with uneven distribution, there are obvious problems of missed detection and redundant bounding boxes in the detection results of the baseline network, while the detection results of this discovery have greatly improved this problem; in the scenario of target adhesion and overlap, it is difficult for the baseline network to detect the adhered and overlapped blood cells. In contrast, the detection bounding boxes of the present invention are more stable, the annotation results are more detailed, the detection of adhered and overlapped blood cells has also been greatly improved, and the average detection accuracy is also very excellent. Generally speaking, the present invention is superior to the baseline algorithm in terms of accuracy and detail, providing more reliable results for blood cell detection.

[0065] In summary, the present invention provides a lightweight detection method for adhesion and overlap of blood cell images.

[0066] It should be clear that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.

[0067] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.

[0068] As described above, this is only the specific implementation manner of the present invention. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, modules, and units can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention.

Claims

1. A lightweight detection method for adhesion and overlap of blood cell images, characterized in that, The method includes the following steps: S1. Obtain the BCCD dataset, which contains 364 blood cell images obtained from blood samples under a microscope, including three categories: red blood cells (RBC), white blood cells (WBC), and platelets. Augment the dataset to obtain 728 images and process them to obtain a training set, a test set, and a validation set; S2. Build a blood cell image detection model and train the training set on the built model; S3. Use the test set in S1 to test the blood cell image detection model and evaluate it using evaluation metrics such as accuracy, recall, mean average precision, and FPS; S4. Use the optimal model to process blood cell images, apply them to actual scenarios (such as disease diagnosis, treatment monitoring, etc.), and obtain detection results.

2. The lightweight detection method for adhesion and overlap of blood cell images according to claim 1, characterized in that, The processing of the target image described in S1 is as follows: Convert the format in the dataset to the YOLO format through processing and uniformly adjust the pixel size of the images to 640×640; Divide the dataset according to a certain ratio to form a training set, a test set, and a validation set.

3. A lightweight detection method for adhesion and overlap of blood cell images according to claim 1, characterized in that The lightweight blood cell detection model described in S2 is as follows: Build a basic YOLOv8 network model; Improve the C2f module and design a C2f-HCN module; In the Neck network, design a new hierarchical feature mixing module HFMM; Improve the detection head and design an LFDH detection head.

4. A lightweight detection method for blood cell image adhesion and overlap according to claim 3, characterized in that Improve the C2f module and design a C2f-HCN module. Replace the Bottleneck part of the C2f module with the designed lightweight convolution H-Conv to efficiently remove redundant information during the detection process and simultaneously achieve lightweight transformation of the model, enabling the model to quickly feedback detection results in actual application scenarios and greatly improving the detection efficiency and practicality for adherent and overlapping blood cells; H-Conv innovatively divides the input feature map into two parts, one part is directly processed, and the other part is convolved with multiple convolutional kernels to capture features at different scales. Subsequently, these features are recombined and further fused through a 1x1 convolutional layer to enhance the model's detection ability for adherent and overlapping blood cell images while maintaining high computational performance. The first-step expression is as follows: Among them, x group_split is half of the input feature map x after being segmented, and is used for multi-scale convolution; k i represents the size of the i-th convolution kernel, and x group_conv is the feature map after multi-scale convolution processing. It is rearranged and concatenated in the second step. The expression in the second step is as follows: x out = Conv 1×1 (cat(x cheap ,x group_conv )) In the above formula, x cheap represents the other half of the input feature map x after being segmented. This part of the feature map does not go through multi-scale convolution to reduce the computational complexity; Conv 1×1 represents a 1x1 convolutional layer; x out represents the finally output feature map.

5. A lightweight detection method for adhesion and overlap of blood cell images according to claim 3, characterized in that In the Neck network, a novel hierarchical feature mixing module HFMM is designed. HFMM can combine local and global attention branches through the GLAT (Global-Local Aware Transformer) sub-module, and refine the fusion of input features through a hierarchical feature processing path. This design not only preserves the spatial details of the input features but also enhances the semantic expression ability of the global context through an adaptive weighting mechanism, thus greatly improving the detection performance of the model for images of adherent and overlapping blood cells and edge blood cells. The specific processing process is that the input features first go through a 1x1 convolution for dimensionality reduction. This step aims to unify the dimensions of the input features and reduce the complexity of subsequent calculations. And a 3x3 convolution is used to preliminarily fuse the dual-input features to obtain the baseline features. Finally, the features passing through the GLAT branch and the baseline features respectively go through a Conv1x1, RepConv3x3, Conv1x1. The first convolution mainly reduces the dimension of the input features, reducing the complexity of subsequent calculations. The reparameterizable convolution RepConv is used for feature recombination, improving the parameter utilization rate and better recombining features from multiple branches. The last convolution is mainly used to restore the dimension and optimize the feature expression, ensuring that the features can be efficiently transmitted to the subsequent network layers.

6. A lightweight detection method for adhesion and overlap of blood cell images according to claim 3, characterized in that, The detection head is improved, and the LFDH detection head is designed. LFDH significantly improves the localization and classification performance of the detection head by innovatively combining the Batch Normalization (BN) technology and the shared convolution mechanism. In the convolutional network, through normalization processing, BN can reduce the internal covariate shift, making the feature distribution more stable at different levels of the network. This helps to accelerate the convergence speed of the model and improve the generalization ability of the model. In addition, BN can also increase the receptive field of the model to a certain extent because the normalized feature map can better capture feature information at different scales and positions, thus helping to improve the performance of network modules such as the detection head. In the specific implementation process, LFDH first processes the detection input. First, it goes through a 1×1 convolution to perform the merging operation, then realizes parameter sharing through the shared convolution, then dynamically generates anchors and strides through the BN technology, then converts to the convolutional network at the output scale, and finally uses the Scale layer to enhance the representation ability of the network. Through this design, the network can learn to perform scaling and translation operations on the input data, thus improving the flexibility and fitting ability of the model. When using the shared convolution, to address the problem of inconsistent detection target scales of the detection head, LFDH uses the Scale layer to scale the features. In this way, during the scaling process, the detection head not only realizes the lightweight of the model but also improves the detection accuracy for images of adherent and overlapping blood cells as much as possible.