Target detection method and device for blood cell image, medium and equipment

By replacing the ELAN module with ELAN-GSConv in the YOLOv7 network and adding an attention mechanism, combined with the DIoU-NMS module, the problem of inaccurate object detection in blood cell images is solved, and the generalization ability and detection accuracy of the network are improved to ensure that the correct Efficient identification of blood cells.

CN119206717APending Publication Date: 2024-12-27TONGLING UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411430136.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The problem of inaccurate target detection in blood cell images of YOLOv7 is mainly due to the difficulty in balancing generalization ability and detection accuracy, which leads to a decrease in the recognition accuracy of unseen cell samples.

Method used

By replacing the ELAN module in the YOLOv7 network with the ELAN-GSConv module and adding attention mechanism module to its output, combined with the DIoU-NMS module, an improved YOLOv7 network is built to enhance the generalization ability and detection accuracy of the network.

Benefits of technology

Improve the generalization ability and recognition accuracy of the blood cell images of YOLOv7 network, ensuring high robustness and accuracy when facing new samples, enhancing feature extraction and bounding box screening through attention mechanisms, reducing redundant boxes, and improving Detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206717A_ABST
    Figure CN119206717A_ABST
Patent Text Reader

Abstract

The invention discloses a target detection method and device for a blood cell image, a medium and equipment, and relates to the technical field of target detection. Comprising the following steps: replacing an ELAN module of a backbone network in an original YOLOv7 network with an ELAN-GSConv module; and an attention mechanism module is added to the output end of the ELAN-GSConv module so as to construct an improved YOLOv7 network. The GSConv performs transformation operation through the feature map, helps the network to cope with cell samples not seen in the training process, and enhances the generalization ability. The introduction of the attention mechanism module increases a stronger selective attention capability for the network, and supplements errors caused by feature changes, so that the network focuses on an important region in an input feature map. And the DIOU-NMS eliminates redundant blood cell bounding boxes by considering the distance and the overlapping degree between the bounding boxes, and reserves the optimal box, so that the detection accuracy of the blood cells is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection technology, and in particular to a target detection method, device, medium and equipment for blood cell images. Background Art

[0002] Target detection of blood cell images based on computer vision technology is a technology that can automatically identify and locate blood cells. It can assist doctors in medical diagnosis to more accurately evaluate the status of blood samples, monitor treatment effects, and promptly detect potential health problems.

[0003] Currently, YOLOv7 (You Only Look Once version 7) is one of the most advanced deep learning models in the field of object detection. It represents the latest research results of the YOLO series of models. The network structure of YOLOv7 is as follows: Figure 2 As shown in the figure, it mainly consists of three parts: backbone network, neck network and head network. The backbone network is responsible for feature extraction, the neck network performs feature fusion and multi-scale feature generation, and the head network performs target classification and positioning.

[0004] However, blood cell images usually contain multiple types of cells, and these cells have significant differences in morphology, size and color. This feature requires that the trained YOLOv7 needs to have generalization capabilities to be able to face blood cell samples that have never been seen in the training set. However, the enhancement of generalization capabilities may come at the expense of YOLOv7's recognition accuracy of blood cells, making it difficult to balance generalization capabilities and detection accuracy. Summary of the invention

[0005] Based on this, in order to solve the technical problem of inaccurate target detection in blood cell images using YOLOv7 in the prior art, the present invention provides a target detection method, device, medium and equipment for blood cell images.

[0006] The present invention provides a target detection method for a blood cell image, comprising:

[0007] The ELAN module of the backbone network in the original YOLOv7 network is replaced with the ELAN-GSConv module, wherein the CBS module in the ELAN module is replaced with the GSConv module; and an attention mechanism module is added to the output end of the ELAN-GSConv module to form an improved backbone network; the NMS module at the output end of the head network in the original YOLOv7 network is replaced with the DIoU-NMS module to form an improved head network; an improved YOLOv7 network is constructed including the improved backbone network, the neck network in the original YOLOv7 network, and the improved head network;

[0008] Collect blood cell images to build a dataset, use the dataset to train the improved YOLOv7 network, and obtain the target detection model;

[0009] The blood cell image to be processed is input into the target detection model, and the initial feature extraction is performed on the blood cell image to be processed by improving the ELAN-GSConv module in the backbone network to obtain the initial blood cell feature map; in the process of obtaining the initial blood cell feature map, the feature map generated in the initial feature extraction process is transformed by the GSConv module to enhance the generalization ability of the initial blood cell feature map; the blood cell area in the initial blood cell feature map is weighted by improving the attention mechanism module in the backbone network to obtain a blood cell weighted feature map; the blood cell weighted feature map is enhanced by the neck network to obtain a blood cell enhanced feature map; target detection is performed on the blood cell enhanced feature map by improving the head network to obtain several blood cell bounding boxes; the distance and overlap between the bounding boxes are analyzed by the DIoU-NMS module to screen several blood cell bounding boxes, and a blood cell bounding box containing the blood cell position and blood cell category in the blood cell image to be processed is output.

[0010] Furthermore, the feature map generated in the initial feature extraction process is transformed by the GSConv module, specifically including:

[0011] Perform a standard convolution operation on the feature map of the input GSConv module through the first standard convolution layer in the GSConv module;

[0012] Apply linear operations such as linear transformations to the output of the first standard convolutional layer through the ghost feature layer in the GSConv module to generate a ghost feature map;

[0013] The ghost feature map is concatenated with the output of the first standard convolutional layer through the feature concatenation layer in the GSConv module to obtain a concatenated feature map.

[0014] The channels in the concatenated feature map are rearranged through the shuffle layer in the GSConv module to enhance the information exchange between feature maps of different channels.

[0015] Furthermore, the attention mechanism module is a parameter-free attention mechanism module; the parameter-free attention mechanism module automatically learns the region of interest in the initial blood cell feature map in a parameter-free manner to enhance the ability to characterize blood cells.

[0016] The present invention provides a target detection device for blood cell images, comprising:

[0017] A model building module is used to replace the ELAN module of the backbone network in the original YOLOv7 network with the ELAN-GSConv module, and add a parameter-free attention mechanism module at the output end of the ELAN-GSConv module to form an improved backbone network; construct an improved YOLOv7 network including the improved backbone network, the neck network in the original YOLOv7 network, and the head network in the original YOLOv7 network;

[0018] The model training module is used to collect blood cell images to build a data set, and use the data set to train the improved YOLOv7 network to obtain a target detection model;

[0019] The target detection module is used to input the blood cell image to be processed into the target detection model, extract features of the blood cell image to be processed by improving the ELAN-GSConv module in the backbone network to obtain a first feature map; weight the region of interest in the first feature by improving the parameter-free attention mechanism module in the backbone network to obtain a second feature map; enhance the second feature map by the neck network to obtain a third feature map; perform target detection on the third feature map by the head network, and output the blood cell position and blood cell category in the blood cell image to be processed.

[0020] The present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned target detection method for blood cell images when executing the program.

[0021] At least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects:

[0022] In the target detection method for blood cell images provided by the present invention, the CBS module in the ELAN module is replaced with the GSConv module to improve the generalization ability of the YOLOv7 network. Specifically, GSConv performs transformation operations through feature maps to help the YOLOv7 network better cope with cell samples that have not been seen during training, and enhances the generalization ability of the initial blood cell feature map; even when facing new blood cell image samples, it can maintain high robustness. And adding an attention mechanism module at the output end of the ELAN-GSConv module and replacing the NMS module with a DIoU-NMS module improves the accuracy of blood cell detection. The introduction of the attention mechanism module adds a stronger selective attention ability to the network, supplements the errors caused by feature changes, and enables the YOLOv7 network to focus on important areas in the input feature map, thereby increasing the weight of key cell features; and DIoU-NMS removes redundant blood cell bounding boxes by considering the distance and overlap between bounding boxes, and retains the optimal box, ensuring the recognition accuracy of blood cells under generalization. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0024] Figure 1 A schematic flow chart of a target detection method for blood cell images provided by the present invention;

[0025] Figure 2 A schematic diagram of the structure of the original YOLOv7 network provided by the present invention;

[0026] Figure 3 A schematic diagram of the structure of the improved YOLOv7 network provided by the present invention;

[0027] Figure 4 A schematic diagram of the structure of SimAM provided by the present invention;

[0028] Figure 5 A schematic diagram of the structure of ELAN-GSConv provided by the present invention;

[0029] Figure 6 A schematic diagram of the structure of GSConv provided by the present invention;

[0030] Figure 7 This is an example diagram of data enhancement provided by the present invention, wherein Figure 7 (a) is the original blood cell image, Figure 7 (b) Yes Figure 7 (a) Image after random brightness adjustment; Figure 7 (c) is the original blood cell image. Figure 7 (d) Yes Figure 7 (c) The image after horizontal flipping; Figure 7 (e) is the original blood cell image, Figure 7 (f) is correct Figure 7 (e) Image after scaling and rotating by 30°;

[0031] Figure 8 This is a schematic diagram of the experimental results of Recall and mAP0.5 provided by the present invention, wherein: Figure 8 (a) is the Recall curve; Figure 8 (b) is the mAP0.5 curve. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in combination with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] Blood cell testing is a technology that uses professional instruments to analyze the cell components in the blood. Blood is mainly composed of red blood cells (RBCs), white blood cells (WBCs) and platelets. Abnormal cell count results may indicate that the body has certain diseases. Accurate and efficient identification of these three cells is essential to provide an overview of the patient's overall health status. At present, blood cell testing is mainly divided into traditional methods and deep learning methods. Traditional methods usually involve manual preparation and staining, followed by manual observation and classification under a microscope. This method requires inspectors to have rich knowledge of cell morphology and to continuously learn and practice to master the ability to observe and distinguish morphology. However, due to the huge amount of microscopic image data and the diverse morphology of blood cells, traditional methods are gradually unable to meet the various complex problems encountered by inspectors in blood cell analysis. In recent years, efficient target detection algorithms based on deep learning have emerged and have gradually been applied to blood cell testing.

[0034] Based on this, the present invention proposes a blood cell detection based on the YOLOv7 algorithm with a lightweight parameter-free attention mechanism. On the basis of the YOLOv7 algorithm, a lightweight parameter-free attention mechanism is introduced in the backbone extraction network to enhance the model's anti-interference ability to complex image backgrounds and the ability to extract target features. In addition, the ELAN is replaced by the ELAN-GSConv module to reduce the number of parameters and increase the recognition speed. For the post-processing method, the non-maximum suppression is improved, and the DIOU-NMS method is adopted. The overlapping area between the predicted box and the real box and the center point distance between the boxes are used as the suppression principle, thereby improving the detection accuracy of the target under a complex background, and improving the confidence prediction loss. The binary cross entropy loss is replaced by VariFocalLoss to reduce the target missed detection rate.

[0035] Figure 1 The process of the blood cell imaging method of this embodiment is shown. Figure 1 The method is described in detail and specifically comprises the following steps:

[0036] S1: Replace the ELAN module of the backbone network in the original YOLOv7 network with the ELAN-GSConv module. The ELAN-GSConv module replaces the CBS module in the ELAN module with the GSConv module; and add an attention mechanism module at the output end of the ELAN-GSConv module to form an improved backbone network; replace the NMS module at the output end of the head network in the original YOLOv7 network with the DIoU-NMS module to form an improved head network; construct an improved YOLOv7 network including the improved backbone network, the neck network in the original YOLOv7 network and the improved head network.

[0037] Figure 2 The figure is a schematic diagram of the structure of the original YOLOv7 network. The overall network architecture of the original YOLOv7 network consists of three main parts: input, backbone network, and detection head. First, the input image is preprocessed to make the image size 640*640, and then it is input into the backbone network. The backbone network generates three layers of output, and then continues to process through the Head layer to generate three layers of feature maps of different sizes. These feature maps are used to classify the image, predict the border, and finally output the category after RepVGG blocks and convolution operations.

[0038] The backbone layer consists of multiple CBS layers and ELAN layers, as well as the MP-1 layer. CBS is mainly composed of Conv+BN+SiLU. The ELAN module is composed of multiple CBSs, and its input and output feature sizes remain unchanged. The MP layer is mainly composed of Maxpool and CBS, and the ratio of the number of channels between MP-1 and MP-2 will change. Overall, after passing through 4 CBS layers, an ELAN layer is connected, followed by the outputs of three MP layers and ELAN layers, corresponding to the outputs of C3 / C4 / C5 respectively.

[0039] Neck is a PAFPN structure. The 32-fold downsampled feature map C5 output by the backbone is reduced from 1024 to 512 channels through SPPCSP. First, it is fused with C4 and C3 according to the downsampling method to obtain P3, P4 and P5; then it is fused with P4 and P5 in a bottom-up manner. RepConv adjusts the number of channels of P3, P4 and P5 output by Neck, and then uses 1x1 convolution to predict objectness, class and bbox.

[0040] Figure 3This is a schematic diagram of the improved YOLOv7 network. The improvements include: introducing a lightweight parameter-free attention mechanism in the backbone extraction network to improve the model's ability to resist interference from complex image backgrounds and to extract target features; and replacing ELAN with ELAN-GSConv to reduce a large number of parameters and improve recognition speed.

[0041] Figure 4 Figure 1 is a schematic diagram of the structure of the parameter-free attention mechanism module SimAM. Compared with the channel attention mechanism and the spatial attention mechanism, SimAM directly infers the three-dimensional attention weights in the network, while considering the correlation between the spatial and channel dimensions without adding additional parameters. Its calculation process is:

[0042]

[0043]

[0044] Among them, X is the enhanced feature map of the target; E is the energy function on each channel. The lower the energy, the higher the discrimination between the target neuron and the adjacent neurons. To prevent E from being too large, the sigmoid function is used to limit E; X is the input target feature map; is the dot product operation; λ is the hyperparameter; t is the target neuron; σ 2 is the variance of each channel of the input target feature map; μ is the mean of each channel of the input target feature map; x i are other neurons that input features in the i-th (i=1, 2,…, Q, Q is the number of channels) channel.

[0045] Figure 5 The schematic diagram of the structure of ELAN-GSConv. ELAN-GSConv replaces the CBS module in the backbone feature extraction network ELAN with GSConv convolution, which can improve the detection speed of the model with only a small loss of accuracy. Figure 6 Figure 1 is a schematic diagram of the GSConv structure. In order to solve the problem of losing a lot of channel information in depth separable convolution, GSConv convolution is introduced. The GSConv module specifically includes:

[0046] The first standard convolution layer is used to perform standard convolution operations on the feature map of the input GSConv module; the ghost feature layer is used to apply linear operations such as linear transformation to the output of the first standard convolution layer to generate a ghost feature map; the feature concatenation layer is used to concatenate the ghost feature map with the output of the first standard convolution layer to obtain a concatenated feature map; the shuffle layer is used to rearrange the channels in the concatenated feature map to enhance the information exchange between feature maps of different channels. GSConv performs transformation operations on feature maps to help the YOLOv7 network better cope with cell samples that have not been seen during training, and enhances the generalization ability of the initial blood cell feature map; even when faced with new blood cell image samples, it can maintain high robustness.

[0047] S2: Collect blood cell images to build a dataset, use the dataset to train the improved YOLOv7 network, and obtain the target detection model.

[0048] S201: Collect blood cell images to construct a data set.

[0049] The BCCD blood cell dataset is a public dataset for blood cell detection and classification. It contains 364 images of 640×640×3, which are blood cell images from different patients. These images may be obtained through microscopes or other medical equipment. The images in the dataset have been annotated by professionals, and the location and category of each cell are accurately marked, providing detailed information about blood cell types such as red blood cells, white blood cells, and platelets. The distribution of the BCCD dataset is shown in Table 1:

[0050] Table 1 Distribution of BCCD dataset

[0051] Tag Type Number of tags RBC 4155 WBC 372 Platelets 361

[0052] The BCCD dataset is augmented with data, including random brightness adjustment, horizontal flipping, and scaling and rotating by 30°. There are 1456 images in the dataset after data augmentation. The data augmentation process of the BCCD dataset aims to improve the robustness and generalization ability of the model, so that it can better adapt to different exposures, viewing angles, and diversity. Random brightness adjustment is to simulate the changes in microscope exposure, so that the model can perform well for images under different brightness conditions. By randomly adjusting the brightness of the image, the model can learn the characteristics of objects under different exposure conditions, which increases the robustness of the model. The horizontal flip operation can simulate the different viewing angles of the microscope, so that the model can better understand the different directions and shapes of the object. This helps to improve the model's ability to recognize objects in the image and make it more generalizable. Scaling and rotation operations can enhance the diversity of the dataset. This can effectively cope with the different sizes and rotation angles of objects in actual scenes and improve the adaptability of the model. The enhanced dataset obtained through data augmentation contains more changes and diversity, which helps to improve the effect of the model in practical applications. Some data augmentation examples are shown in 7.

[0053] S202: Improve the YOLOv7 network for training.

[0054] During the training process, the post-processing method of non-maximum suppression in the original YOLOv7 network was improved. The non-maximum suppression (NMS) commonly used in target detection post-processing is prone to false suppression in complex situations such as target occlusion, resulting in missed detection. In order to solve this problem, the idea of ​​DIoU loss function is borrowed and an improved post-processing method DIoU-NMS is proposed to replace the traditional NMS. DIoU-NMS calculates the distance, overlapping area and aspect ratio between the predicted box and the true box. This method combines IoU and center point distance, optimizes IoU loss and guides center point learning to regress the predicted box more accurately:

[0055]

[0056] Where: b is the prediction box; b gt is the real frame; 2 (b,b gt ) is the distance between the center points of the predicted box and the real box; l is the diagonal distance between the minimum circumscribed rectangles of the two boxes. R DIoU (M,H i ) is R DIoU About M and H i The value of; ε is the threshold manually set by NMS operation; p i is the classification score of different target categories; IoU is the intersection over union ratio; i is the number of anchor boxes corresponding to each grid.

[0057] At the same time, the confidence prediction loss is improved and replaced with VariFocalLoss to ensure the accuracy of multi-target detection. The calculation formula is shown as follows:

[0058]

[0059] Among them, p is the predicted classification score, and q is the target IOU score. For positive samples, q is the IoU between the predicted box and the true box. For negative samples, q = 0, and only p is calculated for negative samples. r The positive samples are weighted by q. If the IoU value of the positive samples is large, the training can focus on those high-quality samples. In order to balance the positive and negative samples, α is used to weight the negative samples.

[0060] The experimental platform during the training process is shown in Table 2.

[0061] Table 2 Experimental platform

[0062]

[0063] The training parameter settings during the training process are shown in Table 3.

[0064] Table 3 Training parameter settings

[0065] parameter Numeric weights yolov7.pt hyp hyp.scratch.pt.yaml epochs 100 Batch-size 6 workers 8

[0066] The ablation experiment results of training are shown in Table 4.

[0067] Table 4 Ablation experiment results

[0068]

[0069] The Recall and mAP0.5 of the model proposed in this embodiment are better than other models. Recall is improved by 3.31% and mAP0.5 is improved by 4.47% compared with the original YOLOv7. The experimental results show that the introduction of SimAM in the backbone extraction network, replacing ELAN with ELAN-GSConv, improving the post-processing method of non-maximum suppression, and replacing the binary cross entropy loss with VariFocalLoss can effectively reduce the missed detection rate of blood cells in dense and complex situations. The experimental results are as follows Figure 8 shown.

[0070] S3: The blood cell image to be processed is input into the target detection model, and the initial feature extraction is performed on the blood cell image to be processed by improving the ELAN-GSConv module in the backbone network to obtain the initial blood cell feature map; in the process of obtaining the initial blood cell feature map, the feature map generated in the initial feature extraction process is transformed by the GSConv module to enhance the generalization ability of the initial blood cell feature map; the blood cell area in the initial blood cell feature map is weighted by improving the attention mechanism module in the backbone network to obtain a blood cell weighted feature map; the blood cell weighted feature map is enhanced by the neck network to obtain a blood cell enhanced feature map; target detection is performed on the blood cell enhanced feature map by improving the head network to obtain several blood cell bounding boxes; the distance and overlap between the bounding boxes are analyzed by the DIoU-NMS module to screen several blood cell bounding boxes, and a blood cell bounding box containing the blood cell position and blood cell category in the blood cell image to be processed is output.

[0071] The above is a target detection method for blood cell images provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding target detection device for blood cell images, including:

[0072] A model building module is used to replace the ELAN module of the backbone network in the original YOLOv7 network with the ELAN-GSConv module, wherein the ELAN-GSConv module replaces the CBS module in the ELAN module with the GSConv module; and an attention mechanism module is added to the output end of the ELAN-GSConv module to form an improved backbone network; the NMS module at the output end of the head network in the original YOLOv7 network is replaced with the DIoU-NMS module to form an improved head network; and an improved YOLOv7 network is constructed including the improved backbone network, the neck network in the original YOLOv7 network, and the improved head network;

[0073] The model training module is used to collect blood cell images to build a data set, and use the data set to train the improved YOLOv7 network to obtain a target detection model;

[0074] The target detection module is used to input the blood cell image to be processed into the target detection model, perform initial feature extraction on the blood cell image to be processed by improving the ELAN-GSConv module in the backbone network, and obtain an initial blood cell feature map; in the process of obtaining the initial blood cell feature map, the feature map generated in the initial feature extraction process is transformed by the GSConv module to enhance the generalization ability of the initial blood cell feature map; the blood cell area in the initial blood cell feature map is weighted by improving the attention mechanism module in the backbone network to obtain a blood cell weighted feature map; the blood cell weighted feature map is enhanced by the neck network to obtain a blood cell enhanced feature map; target detection is performed on the blood cell enhanced feature map by improving the head network to obtain several blood cell bounding boxes; the distance and overlap between the bounding boxes are analyzed by the DIoU-NMS module to screen several blood cell bounding boxes, and a blood cell bounding box containing the blood cell position and blood cell category in the blood cell image to be processed is output.

[0075] The specific definition of the target detection device for blood cell images can be found in the definition of the target detection method for blood cell images above, which will not be repeated here. Each module in the above-mentioned target detection device for blood cell images can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0076] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The provided object detection method is used for blood cell images.

[0077] The present invention also provides a computer device structure. At the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The provided object detection method is used for blood cell images.

[0078] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0079] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.

Claims

1. A target detection method for blood cell images, characterized in that: include: The ELAN module of the backbone network in the original YOLOv7 network is replaced with the ELAN-GSConv module, wherein the ELAN-GSConv module replaces the CBS module in the ELAN module with the GSConv module; And add an attention mechanism module at the output end of the ELAN-GSConv module to form an improved backbone network; replace the NMS module at the output end of the head network in the original YOLOv7 network with the DIoU-NMS module to form an improved head network; construct an improved YOLOv7 network including the improved backbone network, the neck network in the original YOLOv7 network, and the improved head network; Collect blood cell images to build a dataset, use the dataset to train the improved YOLOv7 network, and obtain the target detection model; The blood cell image to be processed is input into the target detection model, and the initial feature extraction of the blood cell image to be processed is performed by improving the ELAN-GSConv module in the backbone network to obtain the initial blood cell feature map; In the process of obtaining the initial blood cell feature map, the feature map generated in the initial feature extraction process is transformed through the GSConv module to enhance the generalization ability of the initial blood cell feature map; the blood cell area in the initial blood cell feature map is weighted by improving the attention mechanism module in the backbone network to obtain a blood cell weighted feature map; The blood cell weighted feature map is enhanced through the neck network to obtain a blood cell enhanced feature map; target detection is performed on the blood cell enhanced feature map through the improved head network to obtain several blood cell bounding boxes; the distance and overlap between the bounding boxes are analyzed through the DIoU-NMS module to screen several blood cell bounding boxes, and the blood cell bounding boxes containing the blood cell position and blood cell category in the blood cell image to be processed are output.

2. The target detection method for blood cell images according to claim 1, characterized in that: The transformation operation of the feature map generated in the initial feature extraction process by the GSConv module specifically includes: Perform a standard convolution operation on the feature map of the input GSConv module through the first standard convolution layer in the GSConv module; Apply linear operations such as linear transformations to the output of the first standard convolutional layer through the ghost feature layer in the GSConv module to generate a ghost feature map; The ghost feature map is concatenated with the output of the first standard convolutional layer through the feature concatenation layer in the GSConv module to obtain a concatenated feature map. The channels in the concatenated feature map are rearranged through the shuffle layer in the GSConv module to enhance the information exchange between feature maps of different channels.

3. The target detection method for blood cell images according to claim 1, characterized in that: The attention mechanism module is a parameter-free attention mechanism module; the parameter-free attention mechanism module automatically learns the region of interest in the initial blood cell feature map in a parameter-free manner to enhance the ability to characterize blood cells.

4. A target detection device for blood cell images, characterized in that: include: A model building module, used to replace the ELAN module of the backbone network in the original YOLOv7 network with an ELAN-GSConv module, wherein the ELAN-GSConv module replaces the CBS module in the ELAN module with a GSConv module; And add an attention mechanism module at the output end of the ELAN-GSConv module to form an improved backbone network; replace the NMS module at the output end of the head network in the original YOLOv7 network with the DIoU-NMS module to form an improved head network; construct an improved YOLOv7 network including the improved backbone network, the neck network in the original YOLOv7 network, and the improved head network; The model training module is used to collect blood cell images to build a data set, and use the data set to train the improved YOLOv7 network to obtain a target detection model; The target detection module is used to input the blood cell image to be processed into the target detection model, and extract the initial features of the blood cell image to be processed by improving the ELAN-GSConv module in the backbone network to obtain the initial blood cell feature map; In the process of obtaining the initial blood cell feature map, the feature map generated in the initial feature extraction process is transformed through the GSConv module to enhance the generalization ability of the initial blood cell feature map; the blood cell area in the initial blood cell feature map is weighted by improving the attention mechanism module in the backbone network to obtain a blood cell weighted feature map; The blood cell weighted feature map is enhanced through the neck network to obtain a blood cell enhanced feature map; target detection is performed on the blood cell enhanced feature map through the improved head network to obtain several blood cell bounding boxes; the distance and overlap between the bounding boxes are analyzed through the DIoU-NMS module to screen several blood cell bounding boxes, and the blood cell bounding boxes containing the blood cell position and blood cell category in the blood cell image to be processed are output.

5. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

6. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of claims 1 to 3 is implemented.

Citation Information

Cited By

  • Insect sperm detection tracking method and system based on fine-grained subspace perception

    CN120599609A