A new coronavirus reagent detection method for dense small targets

By improving the YOLO network and combining it with E-ELAN and SPPCSPC network models and the Fusion Factor, the problem of poor detection performance for dense small targets was solved, and efficient antigen reagent detection was achieved.

CN116342856BActive Publication Date: 2026-11-24GUANGDONG UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310294357.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2026-11-24
Estimated Expiration
2043-03-23

AI Technical Summary

Technical Problem

Existing technologies are not effective for detecting densely packed small targets, especially in antigen reagent images, and the effect is even worse when multiple reagents appear simultaneously.

Method used

An improved YOLO network is adopted, combined with E-ELAN network, SPPCSPC network model and Fusion Factor, to improve the small target detection capability through multi-scale feature extraction and loss function improvement.

Benefits of technology

It improves the ability to identify dense small targets and the efficiency of network computing, thereby enhancing the accuracy of antigen reagent detection and the effectiveness of multi-target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116342856B_ABST
    Figure CN116342856B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing technology and discloses a method for detecting COVID-19 reagents targeting dense small targets. By introducing a Fusion Factor into the YOLO network, the method enhances the network's ability to extract feature information and locate targets, and further improves the network's computational efficiency, enabling the model to have a high ability to recognize small and multiple targets. Furthermore, this invention improves the loss function by adding a CIoU Loss function to the original NMS loss function, which more accurately calculates the final loss of the network model, thereby improving the performance of the network model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method for detecting COVID-19 reagents on densely packed small targets. Background Technology

[0002] The rapid development of computer vision technology has made object detection one of the key research areas in the field and a cornerstone of other visual tasks. With the in-depth research into deep learning, object detection algorithms based on convolutional neural networks have also made significant progress, especially algorithms for detecting large and medium-sized objects, which can basically meet the needs of various scenarios. However, because antigen reagent images often contain densely packed small objects, the localization and classification tasks of object detection pose a considerable challenge.

[0003] Existing technology discloses a method, device, equipment, and storage medium for judging COVID-19 antigen test results. This invention belongs to the field of image processing technology. It acquires test images based on user-input shooting commands on a user interface, performs image recognition, and completes antigen test result acquisition, enabling rapid interpretation of test results. Simultaneously, it verifies the quality of the test images before further detecting the antigen card area. After affine transformation, a corrected scaled image is obtained from the antigen card area for window detection. Finally, the detected window areas are classified. This avoids capturing unqualified images from affecting subsequent recognition results, reduces the probability of false detections, and achieves a coarse-to-fine detection process, improving interpretation accuracy. However, this existing technology only uses a common YOLO network for antigen detection, which has limited effectiveness for small targets like antigen reagents and performs poorly when multiple reagents are present simultaneously. Summary of the Invention

[0004] The purpose of this invention is to provide a COVID-19 reagent detection method for densely packed small targets, in order to solve the problem of poor detection effect for densely packed small targets in the existing technology.

[0005] To achieve the above objectives, the present invention provides a method for detecting COVID-19 reagents targeting dense small targets, comprising: S1. Obtain the dataset, which includes images of reagent results. Label the key regions of the dataset to obtain the labeled dataset. S2. Divide the labeled dataset into training set, validation set and test set, and preprocess the training set to obtain the preprocessed training set; S3. Construct a COVID-19 reagent detection model. The COVID-19 reagent detection model adopts an improved YOLO network, including a backbone network model, an SPPCSPC network model, a Fusion Factor, and a detection network model connected in sequence. The backbone network model adopts an E-ELAN network. The preprocessed training set, validation set, and test set are input into the backbone network model to output the original multi-scale feature map. The original multi-scale feature map is input into the SPPCSPC network model, which uses pooling layers of different sizes simultaneously for pooling. Then, the Fusion Factor is used to further fuse features of different sizes to output a feature map. Finally, the feature map is fed into the detection network model for detection, and the antigen detection result of the reagent is output. The COVID-19 reagent detection model is trained using the preprocessed training set, evaluated using the validation set, and tested using the test set to test the effectiveness of the COVID-19 reagent detection model, resulting in a well-trained COVID-19 reagent detection model. S4. Obtain the image of the reagent result to be tested, input the image of the reagent result to be tested into the trained COVID-19 reagent detection model, and output the detection result of the image of the reagent result to be tested.

[0006] Preferably, in step S1, the image acquisition of the reagent results is carried out by taking pictures with a mobile phone, including single reagent image, multiple reagent image, single result image and multiple result image.

[0007] Preferably, the image size of the reagent result is 600 pixels. 600 pixels to 5000 Between 5000 pixels.

[0008] Preferably, in step S1, the annotation of key regions in the dataset includes the annotation of object bounding boxes for each image and the classification annotation of categories. The classification annotation of categories includes the annotation of the reagent itself, the reagent detection area, and the reagent effectiveness discrimination line.

[0009] Preferably, in step S2, the labeled dataset is randomly divided into a training set, a validation set, and a test set in a ratio of 8:1:1.

[0010] Preferably, in step S3, the backbone network model has already loaded the weights and parameters pre-trained on the ImageNet dataset before training the COVID-19 reagent detection model using the pre-processed training set.

[0011] Preferably, in step S3, the detection network model is automatically labeled using predefined anchor box annotations. The predefined anchor box annotations are adaptive anchor box annotations. The adaptive anchor boxes are based on the original initial fixed length and width, and adopt a learnable method, which can update the length and width of the anchor boxes in reverse after comparing them with the real boxes.

[0012] Preferably, in step S3, the Fusion Factor is calculated by statistically analyzing the number of targets corresponding to each layer. The formula for calculating the Fusion Factor is as follows:

[0013] in, It is the fusion factor between the i-th layer and the (i+1)-th layer. and Representing the network Layers and The number of targets in the layer.

[0014] Preferably, in step S3, when training the COVID-19 reagent detection model using the preprocessed training set, a CIoU loss function is added to the original NMS loss function to form the final loss function.

[0015] Preferably, the formula for the final loss function is:

[0016] in, , , For hyperparameters, It is the error caused by classifying the original image. This is the error caused by judging whether it is a foreground target. This is the error caused by the positioning of the bounding boxes of large and small target areas; The calculation formula is:

[0017] Where B represents the number of ground truth bounding boxes for the large target region and the small target region. This indicates whether the j-th predicted bounding box in the i-th grid is a foreground object. Represents the classification probability. , It is a logarithmic function; The calculation formula is:

[0018] This indicates whether the j-th predicted bounding box in the i-th grid is a background target. For true confidence level, The confidence level of the prediction; The calculation formula is:

[0019]

[0020]

[0021]

[0022] in, This is the ratio of the intersection area and the union area of ​​the ground truth bounding box and the predicted bounding box. This represents the square of the distance between the center points of the predicted bounding box and the ground truth bounding box. This represents the square of the diagonal distance of the smallest closure region that can simultaneously contain both the predicted bounding box and the ground truth box. The aspect ratio of the actual bounding box. To predict the aspect ratio of the bounding box, It is the arctangent function.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention enhances the YOLO network's ability to extract feature information and locate targets by introducing a Fusion Factor, and further improves the network's computational efficiency, enabling the model to have a high ability to recognize small and multiple targets.

[0024] Furthermore, this invention improves the loss function by adding a CIoULoss loss function to the original NMS loss function, thereby more accurately calculating the final loss of the network model and improving the performance of the network model. Attached Figure Description

[0025] Figure 1 This is a flowchart of a COVID-19 reagent detection method for dense small targets according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the design concept of the E-ELAN network according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the design concept of the SPPCSPC network model according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the design concept of the Fusion Factor in this invention. Figure 5This is a geometric schematic diagram of the CIoU according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the dataset (left) and the labeled dataset (right) in an embodiment of the present invention; Figure 7 This is a schematic diagram of the detection process of the COVID-19 reagent detection model according to an embodiment of the present invention. Detailed Implementation

[0026] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0027] In the description of this invention, it should be noted that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0028] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0029] Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0030] Example 1 like Figure 1 As shown, a preferred embodiment of the present invention provides a method for detecting COVID-19 reagents on dense small targets, comprising: S1. Obtain the dataset, which includes images of reagent results. Label the key regions of the dataset to obtain the labeled dataset. S2. Divide the labeled dataset into training set, validation set and test set, and preprocess the training set to obtain the preprocessed training set; S3. Construct a COVID-19 reagent detection model. The COVID-19 reagent detection model adopts an improved YOLO network, including a backbone network model, an SPPCSPC network model, a Fusion Factor, and a detection network model connected in sequence. The backbone network model adopts an E-ELAN network. The preprocessed training set, validation set, and test set are input into the backbone network model to output the original multi-scale feature map. The original multi-scale feature map is input into the SPPCSPC network model, which uses pooling layers of different sizes simultaneously for pooling. Then, the Fusion Factor is used to further fuse features of different sizes to output a feature map. Finally, the feature map is fed into the detection network model for detection, and the antigen detection result of the reagent is output. The COVID-19 reagent detection model is trained using the preprocessed training set, evaluated using the validation set, and tested using the test set to test the effectiveness of the COVID-19 reagent detection model, resulting in a well-trained COVID-19 reagent detection model. S4. Obtain the image of the reagent result to be tested, input the image of the reagent result to be tested into the trained COVID-19 reagent detection model, and output the detection result of the image of the reagent result to be tested.

[0031] like Figure 6 As shown, in step S1, to facilitate use by end users, the images of the reagent results are captured by taking pictures with a mobile phone, including single reagent images, multiple reagent images, single result images, and multiple result images.

[0032] The image size of the reagent result is 600 pixels. 600 pixels to 5000 Between 5000 pixels.

[0033] Meanwhile, in order to solve the problem of identifying different brands of nucleic acid test kits, it is necessary to collect images of different types and angles to improve the network's feature learning ability and generalization ability.

[0034] In step S1, the annotation of key regions in the dataset includes the annotation of object bounding boxes for each image and the classification annotation of categories. The classification annotation of categories includes the annotation of the reagent itself, the reagent detection area, and the reagent effectiveness discrimination line.

[0035] In step S2, the labeled dataset is randomly divided into training set, validation set and test set in a ratio of 8:1:1.

[0036] In this embodiment, the training set is preprocessed. In addition to standard image flipping and image scaling, data augmentation technology is also used. Four images are stitched together into one image to increase the training load of the network and enhance the detection effect of small targets.

[0037] like Figure 2 As shown, the backbone network model adopts the E-ELAN network model. By using the expand, shuffle, and merge cardinality structure, group convolution is used to increase the cardinality of the added features. The features of different groups are combined in the manner of shuffle and merge cardinality, which improves the learning ability of the network without destroying the original gradient path.

[0038] Example 2 The difference between this embodiment and Embodiment 1 is that in step S3, the backbone network model has already loaded the weights and parameters pre-trained on the ImageNet dataset before training the COVID-19 reagent detection model using the pre-processed training set, which effectively increases the convergence speed of the network.

[0039] like Figure 3 As shown, the SPPCSPC network model uses multiple branches to extract features, thereby learning feature information at various scales, improving the model's receptive field, and outputting the final features after fusing different results in the depth direction.

[0040] In step S3, the detection network model is automatically labeled using predefined anchor box annotations. These predefined anchor box annotations are adaptive anchor box annotations. The adaptive anchor boxes are based on the original initial fixed length and width, and adopt a learnable method. After the final comparison with the real boxes, the length and width of the anchor boxes are updated in reverse, which enhances the detection capability of the network.

[0041] In step S3, the Fusion Factor is calculated by statistically analyzing the number of targets corresponding to each layer. The formula for calculating the Fusion Factor is as follows:

[0042] in, It is the fusion factor between the i-th layer and the (i+1)-th layer. and Representing the network Layers and The number of targets in the layer.

[0043] like Figure 4As shown, this embodiment uses Fusion Factor to enhance the network's ability to extract feature information and locate targets. Fusion Factor controls the information passed from deep layers to shallow layers, so that the features extracted from FPN can be fully utilized, making the model more adaptable to the detection of small targets and further improving the network's computational efficiency.

[0044] The other structures in this embodiment are the same as in Embodiment 1, and will not be described again here.

[0045] Example 3 The difference between this embodiment and Embodiment 2 is that, in step S3, when training the COVID-19 reagent detection model using the preprocessed training set, a CIoU loss function is added to the original NMS loss function to form the final loss function. This allows for a more accurate calculation of the final loss of the network model, thereby improving the performance of the network model.

[0046] The formula for the final loss function is:

[0047] in, , , For hyperparameters, It is the error caused by classifying the original image. This is the error caused by judging whether it is a foreground target. This is the error caused by the positioning of the bounding boxes of large and small target areas; The calculation formula is:

[0048] Where B represents the number of ground truth bounding boxes for the large target region and the small target region. This indicates whether the j-th predicted bounding box in the i-th grid is a foreground object. Represents the classification probability. , It is a logarithmic function; The calculation formula is:

[0049] This indicates whether the j-th predicted bounding box in the i-th grid is a background target. For true confidence level, This represents the confidence level of the prediction; a value of 1 is assigned to the foreground target, and a value of 0 is assigned to the background target. The confidence level of the prediction is 1 if it is a foreground target and 0 if it is a background target. The calculation formula is:

[0050]

[0051]

[0052]

[0053] in, This is the ratio of the intersection area and the union area of ​​the ground truth bounding box and the predicted bounding box. This represents the square of the distance between the center points of the predicted bounding box and the ground truth bounding box. This represents the square of the diagonal distance of the smallest closure region that can simultaneously contain both the predicted bounding box and the ground truth box. The aspect ratio of the actual bounding box. To predict the aspect ratio of the bounding box, It is the arctangent function.

[0054] like Figure 5 As shown, The loss is caused by bounding box localization. In this embodiment, CIoU loss is used, which only calculates positive samples. CIoU takes into account the overlap area between the predicted box and the ground truth box, the distance between the center points, and the aspect ratio.

[0055] In step S3, the antigen detection results of the output reagent include bounding box coordinates, category, and target confidence level.

[0056] like Figure 7 As shown, the trained COVID-19 reagent detection model can be packaged and used through mobile or computer application interfaces.

[0057] The other structures in this embodiment are the same as in Embodiment 2, and will not be described again here.

[0058] The working process of this invention is as follows: S1. Obtain the dataset, which includes images of reagent results. Label the key regions of the dataset to obtain the labeled dataset. S2. Divide the labeled dataset into training set, validation set and test set, and preprocess the training set to obtain the preprocessed training set; S3. Construct a COVID-19 reagent detection model. The COVID-19 reagent detection model adopts an improved YOLO network, including a backbone network model, an SPPCSPC network model, a Fusion Factor, and a detection network model connected in sequence. The backbone network model adopts an E-ELAN network. The preprocessed training set, validation set, and test set are input into the backbone network model to output the original multi-scale feature map. The original multi-scale feature map is input into the SPPCSPC network model, which uses pooling layers of different sizes simultaneously for pooling. Then, the Fusion Factor is used to further fuse features of different sizes to output a feature map. Finally, the feature map is fed into the detection network model for detection, and the antigen detection result of the reagent is output. The COVID-19 reagent detection model is trained using the preprocessed training set, evaluated using the validation set, and tested using the test set to test the effectiveness of the COVID-19 reagent detection model, resulting in a well-trained COVID-19 reagent detection model. S4. Obtain the image of the reagent result to be tested, input the image of the reagent result to be tested into the trained COVID-19 reagent detection model, and output the detection result of the image of the reagent result to be tested.

[0059] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and substitutions can be made without departing from the technical principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention.

Claims

1. A method for detecting COVID-19 using a reagent targeting dense small targets, characterized in that, include: S1. Obtain the dataset, which includes images of reagent results. Label the key regions of the dataset to obtain the labeled dataset. S2. Divide the labeled dataset into training set, validation set and test set, and preprocess the training set to obtain the preprocessed training set; S3. Construct a COVID-19 reagent detection model. The COVID-19 reagent detection model adopts an improved YOLO network, including a backbone network model, an SPPCSPC network model, and a detection network model connected in sequence. The backbone network model adopts an E-ELAN network. The preprocessed training set, validation set, and test set are input into the backbone network model to output the original multi-scale feature map. The original multi-scale feature map is input into the SPPCSPC network model. The SPPCSPC network model uses pooling layers of different sizes simultaneously for pooling, and then uses a fusion factor to further fuse features of different sizes to output a feature map. Finally, the feature map is fed into the detection network model for detection, and the antigen detection result of the reagent is output. The COVID-19 reagent detection model is trained using the preprocessed training set, evaluated using the validation set during the training process, and tested using the test set to test the effectiveness of the COVID-19 reagent detection model, thus obtaining a trained COVID-19 reagent detection model. S4. Obtain the image of the reagent result to be tested, input the image of the reagent result to be tested into the trained COVID-19 reagent detection model, and output the detection result of the image of the reagent result to be tested; In step S3, the detection network model is automatically labeled using predefined anchor box annotations. The predefined anchor box annotations are adaptive anchor box annotations. The adaptive anchor boxes are based on the original initial fixed length and width, and adopt a learnable method, which can update the length and width of the anchor boxes in reverse after comparing them with the real boxes. In step S3, the Fusion Factor is calculated by statistically analyzing the number of targets corresponding to each layer. The formula for calculating the Fusion Factor is as follows: in, It is the fusion factor between the i-th layer and the (i+1)-th layer. and Representing the network Layers and Number of targets in the layer; In step S3, when training the COVID-19 reagent detection model using the preprocessed training set, a CIoU loss function is added to the original NMS loss function to form the final loss function. The formula for the final loss function is: in, , , For hyperparameters, It is the error caused by classifying the original image. This is the error caused by judging whether it is a foreground target. This is the error caused by the positioning of the bounding boxes of large and small target areas; The calculation formula is: Where B represents the number of ground truth bounding boxes for the large target region and the small target region. This indicates whether the j-th predicted bounding box in the i-th grid is a foreground object. Represents the classification probability. , It is a logarithmic function; The calculation formula is: This indicates whether the j-th predicted bounding box in the i-th grid is a background target. For true confidence level, The confidence level of the prediction; The calculation formula is: in, This is the ratio of the intersection area and the union area of ​​the ground truth bounding box and the predicted bounding box. This represents the square of the distance between the center points of the predicted bounding box and the ground truth bounding box. This represents the square of the diagonal distance of the smallest closure region that can simultaneously contain both the predicted bounding box and the ground truth box. The aspect ratio of the actual bounding box. To predict the aspect ratio of the bounding box, It is the arctangent function.

2. The method for detecting COVID-19 in dense small targets according to claim 1, characterized in that, In step S1, the images of the reagent results are captured by taking pictures with a mobile phone, including single reagent images, multiple reagent images, single result images, and multiple result images.

3. The method for detecting COVID-19 in dense small targets according to claim 2, characterized in that, The image size of the reagent result is 600 pixels. 600 pixels to 5000 Between 5000 pixels.

4. The method for detecting COVID-19 in densely packed small targets according to claim 1, characterized in that, In step S1, the annotation of key regions in the dataset includes the annotation of object bounding boxes for each image and the classification annotation of categories. The classification annotation of categories includes the annotation of the reagent itself, the reagent detection area, and the reagent effectiveness discrimination line.

5. The method for detecting COVID-19 in densely packed small targets according to claim 1, characterized in that, In step S2, the labeled dataset is randomly divided into training set, validation set and test set in a ratio of 8:1:

1.

6. The method for detecting COVID-19 in densely packed small targets according to claim 1, characterized in that, In step S3, the backbone network model has already loaded the weights and parameters pre-trained on the ImageNet dataset before training the COVID-19 reagent detection model using the pre-processed training set.

Citation Information

Patent Citations

  • PCB surface defect detection method based on improved YOLOv5

    CN115719338A