Augmented Sensitivity of At-Home Rapid SARS-CoV-2 Antigen Test (RAT) Kits with Computer Vision: A Framework and Proof of Concept

At-home rapid antigen test (RAT) kits for severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) are valuable public health tools during the present coronavirus disease (COVID-19) pandemic. They provide fast identification of coronavirus infection, which can help to reduce the transmission rates and burden on the healthcare system. However, they have lower sensitivity compared to the reverse transcription polymerase chain reaction (RT-PCR) tests. One of the reasons for the lower sensitivity is due to the RAT color indicators being indistinct or invisible to the naked eye after the measurements. For this reason, we present a proof of concept of a novel approach, through which we investigated anonymously provided at-home RAT kit results by using our in-house open-source image processing scripts developed for affordable Raspberry Pi computer and Raspberry Pi HQ camera systems. Therefore, we aimed at minimizing the human-related analysis errors for such kits and believe that the present computer vision-based assessment framework can contribute to reducing delayed quarantines of infected individuals and the spread of the current infectious disease.


Introduction
Since being declared as a global pandemic, severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) has caused dramatic public health challenges all over the world [1][2][3][4]. In order to overcome the pandemic and its consequences, various strategies including lockdowns, isolations, and preventive acts (widespread use of face masks, sanitizers, and social distancing) have been implemented worldwide [5][6][7]. Although these strategies have been effectively implemented, they are expected to result in economical and social challenges in the following years due to reduced labor and disruptions in supply-chains [8,9]. Therefore, in order to minimize the spreading of SARS-CoV-2 and constantly maintain it at a baseline level, the medical community has been working on rapid, easy-to-use, and affordable testing [10,11]. For this goal, several assays have been developed in order to identify the infected people, who may have almost no symptoms (asymptomatic), very mild, or distinct symptoms [12][13][14]. The time span of sampling and sensitivity of the assays are crucial, especially for quarantine and contact tracing at early stages [15,16]. Therefore, unprecedented global infectious diseases could be curtailed.
Among the assays, the sensitivity and specificity (referring to the probabilities of positive and negative tests, respectively) of reverse transcription polymerase chain reaction (RT-PCR) tests are undeniable [17][18][19]. RT-PCR tests are accepted as the 'gold standard tests', which require extraction of viral ribonucleic acid (RNA) as well as stationary instrumentation for nucleic acid amplification and detection [20]. Diagnostic laboratories routinely perform RT-PCR tests as being considered the most reliable methodology for testing of cases and contacts [21]. However, requirements for designated laboratories and equipment, specialized staff, and several hours of turnaround time for RT-PCR tests, in turn, may result in delayed diagnosis and quarantine of the infected individuals, which further causes spreading of the disease [22]. In addition, the cost of RT-PCR tests, current global demand, and procurement challenges also result in jeopardizing the health care infrastructure and management [23].
Despite their lower sensitivity compared to RT-PCR tests, rapid SARS-CoV-2 antigen test (RAT) kits, which are immunochromatographic assays, can be an affordable and timely solution for the identification and quarantine of infected individuals with minimal need of training and equipment [24,25]. RAT kits are intended for the comparative detection of nucleocapsid protein from SARS-CoV-2 in nasal swab specimens, for which the samples have to be collected within 7 days of coronavirus disease (COVID-19) symptom onset [26]. RATs detect the presence of a specific viral antigen, which implies current viral infection. They are authorized to be performed on nasopharyngeal or nasal swab specimens placed directly into the extraction buffer or reagent of the assay. The currently authorized tests include point-of-care, laboratory-based, and at-home (self-tests) and are applicable to people of any age [27]. The recently developed RAT kits offer multiple benefits in comparison to RT-PCR tests for the detection of SARS-CoV-2. They are simpler than RT-PCR tests because they do not require specially trained laboratory staff or a specialized laboratory. Results are normally generated in 10 to 30 min after the start of the analysis and at low cost [28]. Therefore, at-home RAT kits have been increasingly available for public use on the market shelves. Several hundreds of CE marked RATs have been recently included in the 'COVID-19 In Vitro Diagnostic Devices and Test Methods Database' of the European Commission [29].
Despite their pros, publicly available off-the-shelf at-home RAT kits quite often produce lower sensitivity compared to the standard RT-PCR tests (while their specificity is generally reported to be high) [30,31]. Unless there are significant symptoms, follow-up RT-PCR tests or RATs are ignored by most individuals, due to the increasing cost of repetitive testing (thus, financial burdens), extensive reservation queues for official testing, and high demand and low level of availability of at-home RAT kits in the market. As a result of initial false negatives (due to lower RAT sensitivity) and challenges with follow-up testing, the delays for preventive action and quarantine are inevitable, which easily result in the spreading of the infectious disease and places a heavy burden on the healthcare infrastructure.
In order to ensure and enhance the observed sensitivity of the at-home RAT kits, we developed a computer vision-based assessment framework, which uses open-source image processing libraries and highly affordable Raspberry Pi computer and camera systems (please, see the schematic illustration in Figure 1). We expect the provided framework and scripts (readily available at https://github.com/kmiikki/ratcv (accessed on 26 February 2022)) to be adopted by other researchers, which can advance the current state of the art.

Foundations of the Evaluated Assays
The immunochromatography devices used in the present study are lateral flow immunoassays (LFIA) for the qualitative detection of specific antigens (nucleocapsid protein, nucleoprotein) of SARS-CoV-2 present in the human nasopharynx. Due to its low cost and simplicity, LFIA is the technology behind most of the commercially available RAT kits for diagnostic self-testing of SARS-CoV-2 infection and other detection devices used in various biomedical and environmental studies [32].
The principle of LFIA is based on the capillary flow of a liquid sample through a polymeric strip containing molecules that interact with the analyte providing a signal, which can be visually detected. As shown in Figure 2, a lateral flow test strip is typically composed of overlapping membranes, which are mounted on an inert backing card for better stability and handling. The main active components of the strip are: sample pad, conjugate release pad, nitrocellulose membrane containing the test line (T line) and control line (C line), and absorption pad [33][34][35]. To start the assay, the sample is first applied on the sample pad. It then migrates through the conjugate release pad, which contains target antigen-specific labeled antibodies. If the antigen is present, the antibody will bind to it and form a molecular complex suitable for interaction with the detection system. As the antibody-antigen complex moves along the nitrocellulose membrane, the binding reagents covering the T line will bind to the complex. A colored line will form, and the density of the line will vary depending on the quantity of the target present. A visual C line should appear next to the T line indicating that the test is valid. The read-out, represented by the appearing of the lines, can be assessed by eye or computer vision for augmented sensitivity as proposed in the present study. Two lines (T + C lines) indicate a positive result, while one line (C line) indicates a negative result.
In RAT kits, the strip is, in general, packaged in a small cartridge that protects its components and makes the test very simple for anyone to perform. The result should be seen with the naked eye within the specified test time, but sometimes this is not the case, for example, if the level of the virus is very low in the nasopharyngeal sample.

Sampling and Color Analysis
To test and demonstrate the practical viability of our framework, we tested it in real-life context using selected RAT kits widely available in the consumer market. The total number of people who participated in COVID-19 in vitro antigen testing was 9, and the tests used were: Boson Biotech Rapid SARS-CoV-2 Antigen Test Card (cases 1 and 2), Alltest SARS-CoV-2 Antigen Rapid Test (Nasal Swab) (cases 3 and 4), and Deepblue COVID-19 (SARS-CoV-2). According to the manufacturers, all these tests met the minimum recommendations for rapid antigen detection tests, given by the European Center for Disease Prevention and Control: ≥90% sensitivity and >98% specificity [36].
The images and videos for the RGB analysis were captured with a Raspberry Pi based system [37]. The optical setup for imaging RAT windows is shown in Figure 3. A 35 mm Waveshare telephoto lens for Pi was used with three C-CS adapters to get a minimum focusing distance close enough for macro photography. The test cartridge was illuminated with three Manfrotto Lumimuse 8 LED lights, and the colors were calibrated by using a gray card (Lastolite Ezybalance).
The color analysis used in this study is based on directional color profiling by red, green, and blue colors; the colors are marked in all figures as R, G, and B, respectively. The mean of the three colors is interpreted as gray and noted here as black and white (BW). Color profiling is normally done in horizontal or vertical directions. Each row or column of pixels is read, its means of R, G, and B are calculated, and these values represent the color values for the current coordinate (x or y). The eluent in a chromatographic test moves in one direction, and the C and T lines are aligned perpendicular to the fluid direction; therefore, color profiling is only needed in one direction, which has been chosen here as horizontal (x) direction.
All captured images were processed and analyzed using Python scripts [38]. Before capturing any pictures, the Raspberry Pi camera sensor red and blue gains were calibrated by using the mapgains.py. Thereafter, manual white balance, with the acquired gain values, were used with a constant shutter speed. In order to perform a decent directional color analysis, the image should be straight, and only the test windows should be analyzed. The corresponding image operations are rotate and crop. The image composition should be composed properly, so there should not be any need to rotate the images. The directional color analysis can be performed with rgbxy.py, the peak properties can be examined with rgbxy-peaks.py, and finally, the internal ratios of red, green, and blue can be inspected by executing rgbxy-iratios.py.

Detection of C Line
Sensitivity of this color analysis method can be used to study how fast the C line is detectable. First, a video was captured; then, its images were extracted and cropped at the C line area. X directional color analysis was performed, and local extrema for RGB channels were detected. The extremum height is the absolute difference between its value and the baseline color intensity level value. In this experiment, all RGB channel extrema were valleys. The results are shown in Figure 5. The RGB valleys were detected starting from t = 55 s, when the eluent was propagating over the C line zone. The Figure 5b indicates very strong changes for all RGB channels, especially the green and blue channel. The decrease in color intensities starts immediately when the eluent reaches the C line area.

Case 1 Negative (Reference Case)
A negative COVID-19 RAT was performed as a reference, by analyzing only the extraction buffer without a biological specimen. The C line appeared in the test window, which can be seen in Figure 6. Only one valley is detected at the same x coordinate range as the C line, as expected. The weakening of the red color is smaller than for blue and green, hence the R/G and R/B ratios give strong peaks, and the C line has a red hue. The RAT was done correctly, and the result was negative.

Case 2 False Negative-Very Weak Positive
In this case, the picture was acquired in auto white balance mode with a smartphone (Nokia 8 Sirocco) after the RAT, and analyzed with a Raspberry Pi computer. The image was cropped, and a directional RGB analysis was performed in x direction. The result was negative with the naked eye, as well with the basic color analysis in Figure 7. However, as seen in R/G and R/B color ratios profile, a very weak signal can be detected at x = 350-400, if the red channel values are divided with green or blue color values. An official RT-PCR test was performed the next day by HUS labs (Finland), and the result was determined to be positive, which confirms the analysis.

Case 3 False Negative-Weak Positive
COVID-19 RAT was performed by a person at home, and two lines appeared in the test window: C line and T line. Both lines were visible for at least 20 min, and the test result was determined to be positive. However, after 12 h, the T line had disappeared from the test window. An image was captured of the aged test window, cropped, and analyzed with rgbxy.py and rgb-iratios.py. The results can be seen in Figure 8, where the second signal is still observable at x ≈ 2000. The detected signal is at the T line. Therefore, the RGB color analysis indicates a positive signal, as well as the original result of the test.

Case 4 Positive
This COVID-19 RAT gave a positive result, and the test window was captured after 20 min from the start of the test. Both C and T lines are visible in Figure 9. The cropped test window was analyzed, and the strong signals appear at C and T lines. The test window and its color profile indicate a positive test result.

Discussion
RT-PCR testing is the key criterion, or 'gold standard test', for identification and hospital discharging for the diagnosed patients. However, repetitive testing leads to increasing costs, jeopardizing the healthcare infrastructure and prolonged hospitalizations [39]. Therefore, alternative test methods have been proposed, out of which RATs emerge as a viable alternative for mass testing. RATs have low cost, short turnaround time, vast availability, and ease of use as some of their pros. However, their reported lower sensitivity in comparison to RT-PCR test results require further investigations for identification and early diagnosis [40]. As a contribution to these investigations on the RATs, we proposed an augmented sensitivity method through computer vision, which uses affordable hardware (Raspberry Pi computer and Raspberry Pi camera or mobile phone camera in our case studies) and open-source scripts readily available at our Github repository. In these investigations, the principal idea is to evaluate the RAT results using color analysis and detect whether there is any presence of viral antigens and color indication, which may not be seen with the naked eye and, thus, result in false negatives and decrease the sensitivity of RAT kits.
Based on our methodology, we managed to detect false negative results, for which there was no clear indicative T line on the result window of the test strip. In Case 2, we examined the RAT result, for which there was no clear indication of a T line with the naked eye. Thus, the patient considered it as a negative result. However, the next day, the RT-PCR test result was positive. Our method showed a very weak signal around the T line as seen in Figure 7b, which was also interpreted as a positive result. In Case 3, an extraordinary case was assessed such that the color indication around the T line disappeared after 12 h. Similar to Case 2, our investigations for this case with the color analysis again showed a signal around the T line, which means that the patient was infected. Therefore, our framework can be used as an inexpensive yet preventive approach, which enhances the current level of sensitivity of RAT kits by analyzing the color of the T line. The analysis of the RAT kits can be done at home using a mobile phone camera and a Raspberry Pi computer. As our proof of concept demonstrates, our framework is a promising, new, highly affordable technique which can be developed to contribute to reducing delayed quarantines of infected individuals and the spread of the current infectious disease. While this proof of concept demonstrates the technical feasibility of our framework, further investigations would be valuable to verify how much enhancement in the sensitivity can be achieved by using the method and how much the analysis system can reduce the false-negative rate.
By means of the present framework, sensitivity investigations of samples collected from patients of varying conditions and age groups can also be used to generate statistical models, which provides a deep insight into the transmission routes and risks of the current viral infection. The present framework can be further developed to generate a centralized database and used to provide early diagnosis, or at least preventive actions just in time. Eventually, delayed quarantine of infected individuals and spreading of the current infectious disease can be reduced.
Additionally, we believe that the framework can, in the future, be successfully applied also to other areas of chromatography.
Author Contributions: K.M., J.W. and A.K. generated the concept. K.M. was the main programmer and tester, while A.K. assisted for the earlier scripts to realize the work. K.M., L.M., J.W. and A.K. All authors have read and agreed to the published version of the manuscript.

Conflicts of Interest:
The authors declare no conflict of interest.