A method and device for two-stage discrimination of results of detection of sars-cov-2 antigens
By employing a two-stage approach, utilizing irregular quadrilateral detection and a classification network based on depth metric learning, the problem of low image quality in antigen detection results was solved. This approach achieved highly accurate automated discrimination, reduced missed and false detections, and saved labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI NINTH PEOPLES HOSPITAL SHANGHAI JIAO TONG UNIV SCHOOL OF MEDICINE
- Filing Date
- 2022-06-09
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, the image quality of antigen detection results is not high, and is affected by ambient light, shooting angle and device pixel, resulting in low recognition accuracy. In addition, multiple reagent kits may be present in one image, which increases the probability of missed detection and false detection.
A two-stage approach was adopted. First, the reagent kit area was located and perspective transformation correction was performed using an irregular quadrilateral detector. Then, a classification network based on deep metric learning was used for identification. A memory storage module was added to optimize the network and improve the identification accuracy for classes with few samples.
It improves the accuracy of antigen test results identification, reduces the probability of missed and false detections, saves medical staff the cost of secondary judgment, and achieves efficient and accurate automated identification of antigen test results.
Smart Images

Figure CN114863113B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and more particularly to the application of image processing technology in the prevention and control of COVID-19, specifically a method and device for judging the results of two-stage COVID-19 antigen testing. Background Technology
[0002] Due to the rapid spread of COVID-19 and its unpredictable incubation period, virus screening and prevention have become crucial. The Internet of Things (IoT) system, with its high response speed and contactless operation, can play a significant role in epidemic prevention. To quickly cut off the source of infection and prevent further spread of the epidemic, nucleic acid testing and antigen testing are effective solutions. Previously, the commonly used nucleic acid testing method required sending collected samples to specialized testing institutions and undergoing a relatively complex testing process, often taking several hours. The recently emerging antigen testing method provides faster results and is simpler to operate. Compared to the cumbersome nucleic acid testing method, antigen testing significantly reduces the time required, taking only a few minutes, and can be directly distributed to at-risk groups for self-testing. Antigen testing methods are more flexible and practical in dealing with large-scale screening of at-risk populations and the pressure on the healthcare system.
[0003] The heavy workload on the healthcare system and the poor timeliness of test result statistics have made controlling the spread of the epidemic a major challenge. Furthermore, the large-scale deployment of manpower for testing, which may involve individuals carrying the COVID-19 virus, further exacerbates the risk of virus transmission. Therefore, to address the challenge of statistically analyzing a massive number of antigen test results and to quickly and accurately control the spread of the epidemic, it is imperative to design an efficient, contactless, automated antigen test result identification system. The purpose of antigen test result statistics is to quickly determine whether a test subject is infected with the virus. Therefore, an automated antigen result identification system must possess two functions: 1. Linking test results to specific individual identity information; 2. Identifying the imaging results of the antigen test strip to determine whether the individual is infected with the virus. If both aspects of information can be automatically identified, the workflow of this IoT system will be closed-loop, requiring no third-party human intervention, thereby reducing the workload of medical personnel and minimizing the risk of virus infection due to contact.
[0004] Personnel identification information can be directly matched using the barcode or QR code on the antigen test kit. Currently, numerous camera-based QR code or barcode decoding technologies are mature, allowing for direct synchronization of personnel identification information to the system via camera scanning. However, there is currently no solution available for the automatic identification of antigen test results. During the antigen testing data collection phase, because used antigen test kits are potentially virus-carrying items, the test results are collected by the test subjects directly uploading images containing the results. Due to varying shooting habits among test subjects, image quality cannot be guaranteed and may be affected by factors such as ambient lighting, shooting angle, and the pixel count of the acquisition device, resulting in distortions such as blurriness, noise, and geometric deformation in the uploaded images of the test kits. Furthermore, antigen testing is often conducted on a family or residential basis, resulting in a diverse number of test kits and test result types in a single uploaded image. Multiple test kits may appear in a single image, making direct identification of each kit's test result susceptible to various background noises, leading to very low accuracy.
[0005] Therefore, those skilled in the art are dedicated to developing a method for judging COVID-19 antigen test results, saving medical staff in epidemic prevention and control data centers the labor costs incurred in secondary judgment of massive amounts of uploaded antigen test results, and accurately judging test results that are difficult to judge manually, reducing the probability of missed or false detections, and helping epidemic prevention work to be carried out better. Summary of the Invention
[0006] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is how to improve the accuracy and overall efficiency of antigen detection result identification, thereby reducing the probability of missed detection and false detection, when the image quality of the image with antigen detection results is not high, the image quality cannot be guaranteed, and multiple reagent kits may exist on one image.
[0007] To achieve the above objectives, the present invention provides a method for determining the results of a two-stage COVID-19 antigen test, the method comprising the following steps:
[0008] Step 1: Obtain several quadrilateral regions with recorded detection results from the target image, and use the perspective transformation method to adjust the viewing angle of the quadrilateral regions to obtain the corresponding number of rectangular regions;
[0009] Step 2: Use a classification network based on deep metric learning to identify the rectangular region and obtain the detection results.
[0010] Further, step 1 includes the following sub-steps:
[0011] Step 1.1: Use an irregular quadrilateral detector to determine the coordinates of the four vertices of the quadrilateral region where the detection results are recorded, denoted as: The irregular quadrilateral detector uses The network serves as the basic framework, and will... The network's output format has been improved from rectangular detection boxes to detection boxes that can recognize quadrilaterals;
[0012] Step 1.2: Use the perspective transformation method to adjust the viewing angle of the quadrilateral region to obtain a corresponding number of rectangular regions. The coordinates of the rectangular regions are: .
[0013] Further, in step 1.1, the The network uses three different scales of grid to divide the feature map.
[0014] Furthermore, the three different scales of the grid-divided feature map are 20, 40, and 80.
[0015] Further, in step 1.1, each grid in the grid partitioning feature map corresponds to nine predicted values, namely... ,in, is the coordinates of the four vertices of the quadrilateral region, and s represents the probability that a target exists within the bounding box of the quadrilateral region.
[0016] Furthermore, the aforementioned The network's loss function includes localization loss and confidence loss;
[0017] The positioning loss ( )for:
[0018]
[0019] in, The side length of the feature map is defined by the grid. For each of the grids quantity, Representing the The first of the grids indivual The predicted quadrilateral region's first corner points Coordinate information; Representing the The first of the grids indivual The predicted quadrilateral region contains a target. Representing the The first of the grids indivual The predicted quadrilateral region does not contain a target;
[0020] The confidence loss ( )for:
[0021]
[0022] in, The side length of the feature map is defined by the grid. For each of the grids quantity, Representing the The first of the grids indivual There is a confidence level for the target. Representing the The first of the grids indivual The predicted quadrilateral region contains a target. Representing the The first of the grids indivual The predicted quadrilateral region does not contain a target.
[0023] Further, in step 1.2, the perspective transformation matrix of the perspective transformation method is:
[0024] .
[0025] Furthermore, in step 2, the classification network based on deep metric learning uses a module including a memory queue. To store the historical sample dataset during the training process, it is defined as: ,in: Representing the Sample queues for each category, The number of all categories in the historical sample dataset. ,in: Representing the The first in the queue of the first category One sample, Sample queues for each category The capacity size.
[0026] Furthermore, the similarity loss function between sample pairs in the historical sample dataset ( ) is defined as:
[0027]
[0028] in, Representing the The sample and the first one sample Similarity represent The Middle One sample in The corresponding positive samples, represent The Middle One sample in The corresponding negative sample in This refers to a sample queue within the historical sample dataset. The capacity of a sample queue in the historical sample dataset;
[0029] The similarity loss function between samples in a sample queue of the historical sample dataset and samples stored in the memory queue ( ) is defined as:
[0030]
[0031] in, represent The Middle The queue of samples of the same type corresponding to each sample in the memory queue. represent The Middle The set of negative samples corresponding to each sample in the memory queue. This represents the capacity of the queue corresponding to the same type of samples in the memory queue;
[0032] in, , , For hyperparameters;
[0033] Similarity between internal sample pairs and The method for using the similarity between samples within the memory queue and samples in the memory queue is as follows: when iterating... Less than hour, It does not participate in the optimization of the classification network based on deep metric learning; during iteration Greater than or equal to hour, and Together, we will optimize the classification network based on deep metric learning.
[0034] therefore, The definition is as follows:
[0035]
[0036] Among them, α control loss of internal samples and The weighting coefficients between the sample loss of the memory queue and the weighting coefficients.
[0037] Furthermore, the classification loss of the classification network based on deep metric learning ( It consists of two parts, namely and ,Right now:
[0038]
[0039] in, The Softmax function is added after the backbone network and the FC layer, and the classification loss is calculated using cross-entropy loss.
[0040] The present invention also provides a device for judging the results of two-stage COVID-19 antigen testing, the device comprising:
[0041] Processor; and
[0042] A memory is configured to store computer-executable instructions, which, when executed, cause the processor to perform the operations described above.
[0043] The present invention also provides a computer-readable medium for storing instructions that, when executed, cause the system to perform the operations described above.
[0044] The method and device for judging the results of a two-stage COVID-19 antigen test provided by this invention have at least the following technical effects:
[0045] 1. The technical solution provided by this invention establishes a complete system framework for antigen test result discrimination. By analyzing the key problems faced in specific tasks, it proposes targeted solutions. The ultimate goal is to save the labor costs incurred by medical personnel in the epidemic prevention and control data center when performing secondary discrimination on the massive amount of uploaded antigen test results, and to accurately judge test results that are difficult to judge manually, thereby reducing the probability of missed or incorrect detections and helping the epidemic prevention work to be carried out better.
[0046] 2. The technical solution provided by this invention uses a pair-based deep metric learning method to pair samples, measure the similarity between samples, promote similar samples to move closer to each other, and separate samples of different categories from each other, thus processing fine-grained images at the instance level.
[0047] 3. Due to the unbalanced distribution of samples of different categories in the captured photos, for example, the number of negative samples is much greater than that of positive samples and invalid samples, in order to improve the learning effect of neural networks on small samples, the technical solution provided by this invention adds a memory storage module to the fine-grained image retrieval algorithm for optimization, so that the technical solution provided by this invention does not need to make additional supplementary samples, and improves the recognition accuracy of tail samples without sacrificing the performance of head class.
[0048] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description
[0049] Figure 1 This is a schematic flowchart of a preferred embodiment of the present invention;
[0050] Figure 2 This is a flowchart of a quadrilateral detector according to a preferred embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram of the detector prediction result output format of a preferred embodiment of the present invention;
[0052] Figure 4 This is a schematic diagram of a preferred embodiment of the identifier of the present invention;
[0053] Figure 5 This illustrates a functional module of an exemplary system that can be used in the two-stage COVID-19 antigen test result discrimination method of the present invention. Detailed Implementation
[0054] The following description, with reference to the accompanying drawings, illustrates several preferred embodiments of the present invention to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms, and the scope of protection of the present invention is not limited to the embodiments mentioned herein.
[0055] The technical solution provided by this invention addresses the shortcomings of existing related methods by offering a two-stage COVID-19 antigen test result discrimination method based on deep neural networks, which can be used for automated determination of antigen test results. This two-stage antigen test result discrimination method is the result of improvements to existing detection and identification methods based on an in-depth analysis of the problems encountered in the antigen test data collection process. In the antigen test data collection stage, because used antigen test kits are potentially virus-carrying items, the test results are collected by the test subjects directly uploading images containing the test results. Due to different shooting habits of the test subjects, the image quality cannot be guaranteed and may be affected by various factors such as ambient light, shooting angle, and the pixel count of the acquisition device, resulting in distortions such as blurriness, noise, and geometric deformation in the uploaded photos of the test kits. Furthermore, antigen testing is often conducted on a family or residential basis, resulting in a diverse number of test kits and test result types in a single uploaded photo. Multiple test kits may appear in a single photo, so directly identifying the test result for each kit is affected by various background noises, leading to a very low recognition accuracy.
[0056] Therefore, the technical solution provided by this invention discloses a secondary determination of the results obtained from the COVID-19 antigen test kit through positioning, identification, and imaging, which greatly saves the labor costs of medical personnel in data centers for secondary determination of antigen test results. Figure 1 As shown, the localization module improves upon the traditional target detection framework YOLO. Considering that different camera angles during shooting can lead to different orientations and angles of the test kits, the localization module aims to accurately detect the location of the quadrilateral region containing the key area (the detection result box of the antigen test kit). Based on the detected quadrilateral vertex information, perspective transformation is used to correct the key area into a square, obtaining a clearer image of the target area as a sample input to the classification network. In the recognition module, due to the imbalance between antigen test sample categories, this embodiment proposes an image classification method based on deep neural networks and metric learning. Using a pair-based deep metric learning method with an added memory storage module, it fully utilizes rich information at the instance level to improve the recognition accuracy of fewer sample categories, achieving fine-grained image classification. Through a precise quadrilateral localization algorithm and a fine-grained recognition algorithm based on deep metric learning, the technical solution provided by this invention achieves an accuracy of 90% in determining COVID-19 antigen test results.
[0057] In the two-stage method for judging the results of COVID-19 antigen detection provided by this invention, in the first stage, the target detector detects the key region (detection result region) in the photo, extracts the key region after geometric correction, and removes the interference of background noise. In the second stage, the classifier identifies the results of the corrected and extracted key region and classifies the results into three categories: positive, negative, and invalid. Considering the situation where there are multiple targets in a single photo, this embodiment of the invention uses a deep learning-based multi-target detection network as the main framework of the detector, and utilizes the robustness of deep neural networks to distortion to solve the problem of possible blurring, noise, and other distortions in the photo. However, traditional deep learning target detection networks use rectangular boxes for regression, which is difficult to adapt to changes in the actual shooting angle. Since the detected target may undergo various distortions such as rotation and perspective transformation, irrelevant information outside the target may appear in the rectangular markings, which will negatively affect the training of the model. Therefore, this embodiment of the invention improves the general target detector and proposes a deformation correction target detection method based on irregular quadrilaterals, which outputs the precise coordinates of four points of the key region and further eliminates the interference of background noise. In the second stage of result recognition, positive samples are marked with two red lines, while negative and invalid samples are marked with only one red line, differing only slightly in position. The difficulty in distinguishing the image location due to uncontrollable shooting angles and lighting undoubtedly poses a challenge to image classification algorithms. To address this challenge, this invention employs a pair-based depth metric learning method. Pair-based depth metric learning measures the similarity between samples by pairing them, encouraging similar samples to move closer together and different categories to separate, thus processing fine-grained images at the instance level. Furthermore, the uneven distribution of samples of different categories in the captured photos—for example, the number of negative samples far exceeding positive and invalid samples—affects the accuracy of classifying different categories. To improve the learning effect of neural networks on small samples, this invention incorporates a memory storage module into the fine-grained image retrieval algorithm for optimization. This eliminates the need for additional sample creation and improves the recognition accuracy of tail-category samples without sacrificing the performance of head-category samples.
[0058] Specifically, the method for determining the results of a two-stage COVID-19 antigen test provided by this invention includes the following steps:
[0059] Step 1: Obtain several quadrilateral regions with recorded detection results from the target image, and use the perspective transformation method to adjust the viewing angle of the quadrilateral regions to obtain the corresponding number of rectangular regions;
[0060] Step 2: Use a classification network based on deep metric learning to identify the rectangular region and obtain the detection results.
[0061] Step 1 includes the following sub-steps:
[0062] Step 1.1: Use an irregular quadrilateral detector to determine the coordinates of the four vertices of the quadrilateral region where the detection results are recorded, denoted as: The irregular quadrilateral detector uses The network serves as the basic framework, and will... The network's output format has been improved from rectangular detection boxes to detection boxes that can recognize quadrilaterals;
[0063] Step 1.2: Use the perspective transformation method to adjust the viewing angle of the quadrilateral region to obtain a corresponding number of rectangular regions. The coordinates of the rectangular regions are: .
[0064] like Figure 2 The diagram shown illustrates the workflow of an irregular quadrilateral detector in a preferred embodiment of the present invention. The irregular quadrilateral detector is used to locate the coordinates of the four vertices of a key region. In this embodiment, a YOLO network is used as the basic framework of the detector. Because the key region has an irregular shape in the image, rectangular boxes are insufficient to exclude background noise outside the key region. Therefore, this embodiment improves the output format of the YOLO network, transforming the rectangular detection box into a detection box that can recognize quadrilaterals. Figure 2 This is the improved detector, where 20, 40, and 80 represent three different scales of grid feature maps output by the network. Taking 20 as an example, it means dividing the grid feature map into a 20x20 grid. The 9x3 grid represents the coordinates of the four corner points of the quadrilateral at the three different scales, along with a confidence score. For each grid, the YOLO network's prediction output is as follows... Figure 3 As shown, each grid cell corresponds to nine predicted output values, which are: ,in, These are the coordinates of the four vertices of the quadrilateral region, and s represents the probability that the target exists within the bounding box of the quadrilateral region.
[0065] Suppose that a feature map of a certain scale is divided into n×n grids, where each grid corresponds to (5+nc) prediction results, namely (x, y, w, h, s, C), where xy are the coordinates of the center position of the quadrilateral region (bbox) predicted by the network, wh are the width and height of the quadrilateral region predicted by the network, s is the confidence that the target exists in the quadrilateral region, and C is the probability set of nc categories given that the target exists in the quadrilateral region.
[0066] The task of identifying antigen test results also improved the loss function for key region localization. In conventional object detection algorithms, the loss function generally consists of three parts: classification loss, localization loss, and confidence loss. Since the task of identifying antigen test results does not require classification in the first stage framework, the loss function is adjusted to two parts: localization loss and confidence loss. These are used to optimize the localization information predicted by the network and the confidence information of the presence of objects in the quadrilateral region, respectively. The improvement methods for the two loss functions are described below.
[0067] Location loss ( )for:
[0068]
[0069] in, The side length of the feature map is determined by dividing the grid. For each grid quantity, Representing the The first grid indivual The predicted quadrilateral region's first corner points Coordinate information; Representing the The first grid indivual The target is predicted to exist within the quadrilateral region. Representing the The first grid indivual The target is not found in the predicted quadrilateral region;
[0070] Confidence loss ( )for:
[0071]
[0072] in, The side length of the feature map is determined by dividing the grid. For each grid quantity, Representing the The first grid indivual There is a confidence level for the target. Representing the The first grid indivual The target is predicted to exist within the quadrilateral region. Representing the The first grid indivual The target is not found in the predicted quadrilateral region.
[0073] Based on the two-stage framework designed for the actual task, no classification operation is performed on the identified targets in the first stage, thus avoiding target overlap and multi-classification. For a target bounding box, there are only two possibilities: it contains the target or it does not. Therefore, binary cross-entropy loss is used to constrain the confidence level.
[0074] Based on the detection results, geometric correction is performed on the key areas to obtain images of the same size.
[0075] After obtaining the target bounding box of the quadrilateral key region in the first step, it is necessary to perform perspective transformation correction on the quadrilateral target bounding box to eliminate the interference of shooting angle and background environment on the classification model.
[0076] Perspective transformation essentially projects an image onto a new view plane, and its general transformation formula is:
[0077]
[0078] Where (x, y, z) are the homogeneous coordinates of the original image pixels, and (X'=X / Z, Y'=Y / Z, Z'=Z / Z) are the homogeneous coordinates of the transformed image pixels. That is, the homogeneous coordinates (x, y, z) of the original image pixels correspond to the homogeneous coordinates (X', Y', Z') of the transformed image pixels. Where Z'=1, then the point (X', Y') is the two-dimensional plane coordinate of the corresponding pixel in the original image after transformation. The formula is as follows:
[0079]
[0080] To obtain the parameters , , , , , , , ,make =1, expanding the above formula, we get the transformation of a point, as shown in the following formula:
[0081]
[0082] The equation above has 8 unknowns, corresponding to 4 pairs of 8 coordinate points. By using the coordinates of the four vertices before the transformation and their corresponding coordinates after the transformation, the equation can be solved and the parameters obtained. , , , , , , , The coordinates of the four vertices before the transformation are the four vertices of the quadrilateral region predicted by the detection model. .
[0083] The transformed coordinates are set as follows .
[0084] In step 2, the test results are classified to identify the antigen test results in the marked areas after testing.
[0085] First, key region images, after localization and correction, are used as training samples and fed into the classification network. In conventional deep metric learning methods, a batch of images (key regions extracted by the first-stage detection network) are input into the network, passing through the backbone network and fully connected layers to obtain corresponding embedding vectors. Pair-based deep metric learning methods form sample pairs from the obtained embedding vectors; pairs of samples from the same class are called positive pairs, and pairs of samples from different classes are called negative pairs. Next, cosine similarity is used to calculate the similarity between sample pairs. Hard samples (negative sample pairs with low similarity and positive sample pairs with high similarity) are given greater weight in the loss design to be optimized more effectively during network iterations.
[0086] To address the issue of imbalanced class distribution, a Memory Similarity Loss (MSL) is proposed. This loss uses a memory queue to store historical sample information from past batches, simultaneously calculating the similarity between samples in the batch and the memory queue, as well as the similarity between the samples and the original sample pairs in the batch. This improved loss is used to guide network optimization, thereby enhancing classification performance for classes with fewer samples. Furthermore, to complete the classification task, a Softmax function is added after the backbone network and the fully connected (FC) layers, using cross-entropy loss to calculate the classification loss.
[0087] Finally, MSL and Softmax Loss are used together to guide the classification loss of the deep metric learning-based classification network. ),Right now:
[0088] .
[0089] To address the problem of imbalanced sample distribution, this embodiment of the invention introduces a memory sequence module. For a batch of input images... ,in Represents the batch Given 10 samples, where batchSize is the batch size, after passing through the backbone and fully connected (FC) layers, we obtain a set of embedding vectors. ,in Representing the The embedding vector output by a classification network after a sample passes through it.
[0090] In the above process, due to uneven data distribution, some categories have fewer samples. These samples will provide less feature information during the training phase, making it difficult to achieve high classification accuracy when the model is not sufficiently trained. To address this issue, a memory queue structure is designed to classify and store sample information in a batch for continued use in subsequent training iterations.
[0091] In step 2, the classification network based on deep metric learning uses a module that includes a memory queue. To store the historical sample dataset during the training process, it is defined as: ,in: Representing the Sample queues for each category, The number of all categories in the historical sample dataset. ,in: Representing the The first in the queue of the first category One sample, Sample queues for each category The capacity size.
[0092] In the initial stage of training, the memory queue is empty. All embedding vectors obtained from the backbone and fully connected layers are stored in the queue corresponding to the class. When the number of samples in the queue reaches the capacity limit, the embeddings of the samples in the memory queue are replaced with the latest batch information according to the class and the order in which they were added to the queue, in order to ensure the timeliness of the samples in the memory queue.
[0093] Therefore, in the iterations following the initial stage, the number of samples for each category in the memory queue is kept consistent to mitigate the problem caused by class imbalance. To address the fine-grained nature of the data, pair-based metric learning is used. Sample-sample pairs are sampled, weighted, and a loss function is designed to guide network optimization. Utilizing the similarity between samples, subtle differences at the instance level are reflected, leading to the learning of a more discriminative embedding space and improving the performance of fine-grained scene classification tasks. In this section, the present invention proposes MSL.
[0094] MSL consists of two parts: the loss generated by the samples within the batch. And the loss caused by the difference between samples in the batch and samples stored in the memory queue. .
[0095] The similarity loss function between sample pairs within a batch ( ) is defined as:
[0096]
[0097] in, Representing the The sample and the first one sample Similarity represent The Middle One sample in The corresponding positive samples, represent The Middle One sample in The corresponding negative sample in This is a sample queue in a historical sample dataset. The capacity of a sample queue in the historical sample dataset;
[0098] The similarity loss function between samples in a sample queue of a batch and samples stored in a memory queue ( ) is defined as:
[0099]
[0100] in, represent The Middle The queue of samples of the same type in the memory queue. represent The Middle The set of negative samples corresponding to each sample in the memory queue. This represents the capacity of the queue containing the corresponding samples of the same type in the memory queue.
[0101] in, , , This is a hyperparameter.
[0102] In the early stages of training, before the model converges, the sample information stored in the memory queue is unreliable. Using these samples in loss calculations can negatively impact model optimization. Therefore, setting up a memory queue... , Similarity between internal sample pairs and The method for using the similarity between samples in the memory queue and samples in the memory queue is as follows: when iterating... Less than hour, It does not participate in the optimization of classification networks based on deep metric learning; during iteration Greater than or equal to hour, and Together, we will optimize the classification network based on deep metric learning. The definition is as follows:
[0103]
[0104] Among them, α control loss of internal samples and The weighting coefficients between the sample loss of the memory queue and the weighting coefficients.
[0105] This embodiment also provides a computer-readable storage medium storing computer code that, when executed, is performed as described in any of the preceding embodiments.
[0106] This embodiment also provides a computer program product that, when executed by a computer device, performs the method described in any of the preceding embodiments.
[0107] This embodiment also provides a computer device, the computer device comprising:
[0108] One or more processors;
[0109] Memory, used to store one or more computer programs;
[0110] When the one or more computer programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described in any of the preceding methods.
[0111] Figure 5Exemplary systems that can be used to implement the various embodiments described in this invention are shown.
[0112] like Figure 5 As shown, in some embodiments, system 1000 can function as any of the user terminal devices described in each of the embodiments. In some embodiments, system 1000 may include one or more computer-readable media having instructions (e.g., system memory or NVM / storage device 1020) and one or more processors (e.g., one or more processors 1005) coupled to the one or more computer-readable media and configured to execute the instructions to implement the module and thus perform the actions described in this invention.
[0113] In one embodiment, the system control module 1010 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1005 and / or any suitable device or component communicating with the system control module 1010.
[0114] The system control module 1010 may include a memory controller module 1030 to provide an interface to the system memory 1015. The memory controller module 1030 may be a hardware module, a software module, and / or a firmware module.
[0115] System memory 1015 may be used, for example, to load and store data and / or instructions for system 1000. In one embodiment, system memory 1015 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, system memory 1015 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
[0116] In one embodiment, the system control module 1010 may include one or more input / output (I / O) controllers to provide interfaces to the NVM / storage device 1020 and (one or more) communication interfaces 1025.
[0117] For example, the NVM / storage device 1020 may be used to store data and / or instructions. The NVM / storage device 1020 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0118] NVM / storage device 1020 may include storage resources that are physically part of a device on which system 1000 is mounted, or that can be accessed by the device without necessarily being part of the device. For example, NVM / storage device 1020 may be accessed via a network through one or more communication interfaces 1025.
[0119] One or more communication interfaces 1025 may provide the system 1000 with an interface to communicate over one or more networks and / or with any other suitable device. The system 1000 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.
[0120] In one embodiment, at least one of the processors 1005 may be logically packaged with one or more controllers of the system control module 1010 (e.g., memory controller module 1030). In one embodiment, at least one of the processors 1005 may be logically packaged with one or more controllers of the system control module 1010 to form a system-in-package (SiP). In one embodiment, at least one of the processors 1005 may be integrated with the logic of one or more controllers of the system control module 1010 on the same die. In one embodiment, at least one of the processors 1005 may be integrated with the logic of one or more controllers of the system control module 1010 on the same die to form a system-on-a-chip (SoC).
[0121] In various embodiments, system 1000 may be, but is not limited to, a server, workstation, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, system 1000 may have more or fewer components and / or different architectures. For example, in some embodiments, system 1000 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0122] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A method for determining the results of a two-stage COVID-19 antigen test, characterized in that, The method includes the following steps: Step 1: Obtain several quadrilateral regions with recorded detection results from the target image, and use the perspective transformation method to adjust the viewing angle of the quadrilateral regions to obtain the corresponding number of rectangular regions; Step 2: Use a classification network based on deep metric learning to identify the rectangular region and obtain the detection results; in, Step 1 includes the following sub-steps: Step 1.1: Use an irregular quadrilateral detector to determine the coordinates of the four vertices of the quadrilateral region where the detection results are recorded, denoted as: The irregular quadrilateral detector uses The network serves as the basic framework, and will... The network's output format has been improved from rectangular detection boxes to detection boxes that can recognize quadrilaterals. The network uses three different scales of grid to divide the feature map. Each grid in the feature map corresponds to nine predicted values, namely: ,in, is the coordinates of the four vertices of the quadrilateral region, and s represents the probability that a target exists within the bounding box of the quadrilateral region; Step 1.2: Use the perspective transformation method to adjust the viewing angle of the quadrilateral region to obtain a corresponding number of rectangular regions. The coordinates of the rectangular regions are: ; in, The The network's loss function includes localization loss and confidence loss; The positioning loss is: in, The side length of the feature map is defined by the grid. For each of the grids quantity, Representing the The first of the grids indivual The predicted quadrilateral region's first corner points Coordinate information; yes The corresponding real tags; Representing the The first of the grids indivual The predicted quadrilateral region contains a target. Representing the The first of the grids indivual The predicted quadrilateral region does not contain a target; The confidence loss is: in, The side length of the feature map is defined by the grid. For each of the grids quantity, Representing the The first of the grids indivual There is a confidence level for the target. for The corresponding real tags, Representing the The first of the grids indivual The predicted quadrilateral region contains a target. Representing the The first of the grids indivual The predicted quadrilateral region does not contain a target. This is a hyperparameter.
2. The method for determining the results of two-stage COVID-19 antigen testing as described in claim 1, characterized in that, The three different scales of the grid-divided feature map are 20, 40, and 80.
3. The method for determining the results of two-stage COVID-19 antigen testing as described in claim 1, characterized in that, In step 1.2, the perspective transformation matrix of the perspective transformation method is: 。 4. The method for determining the results of two-stage COVID-19 antigen testing as described in claim 1, characterized in that, In step 2, the classification network based on deep metric learning uses a module that includes a memory queue. To store the historical sample dataset during the training process, it is defined as: ,in: Representing the Sample queues for each category, The number of all categories in the historical sample dataset. ,in: Representing the The first in the queue of the first category One sample, Sample queues for each category The capacity size.
5. The method for determining the results of two-stage COVID-19 antigen testing as described in claim 4, characterized in that, The similarity loss function between sample pairs in the historical sample dataset is defined as: in, Representing the The sample and the first one sample Similarity represent The Middle One sample in The corresponding positive samples, represent The Middle One sample in The corresponding negative sample in This refers to a sample queue within the historical sample dataset. The capacity of a sample queue in the historical sample dataset; The similarity loss function between samples in a sample queue of the historical sample dataset and samples stored in the memory queue is defined as: in, represent The Middle The queue of samples of the same type corresponding to each sample in the memory queue. represent The Middle The set of negative samples corresponding to each sample in the memory queue. This represents the capacity of the queue corresponding to the same type of samples in the memory queue; in, , , For hyperparameters; Similarity between internal sample pairs and The method for using the similarity between samples within the memory queue and samples in the memory queue is as follows: when iterating... Less than hour, It does not participate in the optimization of the classification network based on deep metric learning; during iteration Greater than or equal to hour, and Together, we will optimize the classification network based on deep metric learning. therefore, The definition is as follows: Among them, α control loss of internal samples and The weighting coefficients between the sample loss of the memory queue and the weighting coefficients.
6. The method for determining the results of two-stage COVID-19 antigen testing as described in claim 5, characterized in that, The classification loss of the classification network based on deep metric learning consists of two parts, namely: and ,Right now: in, The Softmax function is added after the backbone network and the FC layer, and the classification loss is calculated using cross-entropy loss.
7. A device for interpreting the results of a two-stage COVID-19 antigen test, wherein, The device includes: Processor; and A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the operation of the method according to any one of claims 1 to 6.
8. A computer-readable medium storing instructions that, when executed, cause a system to perform operations according to any one of claims 1 to 6.