Vakkas 
            Doğan
          
        
      a, 
      
        
          
            Elif 
            Yüzer
          
        
      b, 
      
        
          
            Volkan 
            Kılıç
          
        
       *ac and 
      
        
          
            Mustafa 
            Şen
*ac and 
      
        
          
            Mustafa 
            Şen
          
        
       *bd
*bd
      
aDepartment of Electrical and Electronics Engineering Graduate Program, İzmir Katip Çelebi University, 35620 Turkey. E-mail: volkan.kilic@ikcu.edu.tr;  Fax: +90232 325 33 60;   Tel: +90 232 329 35 35
      
bDepartment of Biomedical Engineering Graduate Program, İzmir Katip Çelebi University, 35620 Turkey
      
cDepartment of Electrical and Electronics Engineering, İzmir Katip Çelebi University, 35620 Turkey
      
dDepartment of Biomedical Engineering, İzmir Katip Çelebi University, 35620 Turkey. E-mail: mustafa.sen@ikcu.edu.tr
    
First published on 5th November 2021
In the present study, iodide-mediated 3,3′,5,5′-tetramethylbenzidine (TMB)-H2O2 reaction system was applied to a microfluidic paper-based analytical device (μPAD) for non-enzymatic colorimetric determination of H2O2. The proposed system is portable and incorporates a μPAD with a machine learning-based smartphone app. A smartphone app called “Hi-perox Sens” capable of image capture, cropping and processing was developed to make the system simple and user-friendly. Briefly, circular μPADs were designed and tested with varying concentrations of H2O2. Following the color change, the images of the μPADs were taken with four different smartphones under seven different illumination conditions. In order to make the system more robust and adaptive against illumination variation and camera optics, the images were first processed for feature extraction and then used to train machine learning classifiers. According to the results, TMB + KI showed the highest classification accuracy (97.8%) with inter-phone repeatability at t = 30 s under versatile illumination and maintained its accuracy for 10 minutes. In addition, the performance of the system was also comparable to two different commercially available H2O2 kits in real samples.
In addition to the requirements of being sensitive, selective and affordable, H2O2 sensors need to be portable, reliable, fast and environmentally friendly that can operate in remote locations or resource-limited settings.10 In that sense, microfluidic paper-based analytical devices (μPADs) are found to be adequate to meet the requirements, resulting in the development of various types of sensors. Although different methods are used in the fabrication of μPADs, the most preferred method is the one that was first introduced by Whitesides et al.11 The method is based on printing wax patterns that define the microfluidic channels and the boundaries of the detection zone with a solid ink (wax) printer. In μPADs, the concentration of many different analytes can be quantified at the same time based on the intensity variation due to the concentration-dependent color change.5,12
In colorimetric analysis, intensity information can be utilized with several color spaces including RGB (Red-Green-Blue), HSV (Hue Saturation-Value), and L*a*b* (Lightness, Green-Red, Blue-Yellow).13,14 The conventional approach is to derive a calibration curve based on single or multiple channels which leads to the highest correlation between the intensity and concentration (magnitude).12,15,16 For example, average of R, V and L* was used to obtain the calibration in the quantification of glucose in artificial saliva.12 The V channel was employed for processing the image to detect the harmful dyes in water15 while the calibration curve is constructed using R, G, B channels to detect sodium benzoate in foods.16 Even though the calibration curve performs well in a controlled environment, it has a tendency to deviate in the case of ambient light conditions as the intensity values are sensitive to the illumination sources.17–19 This problem is handled with sophisticated methodologies like machine learning which has emerged as a powerful tool for classification problems due to its flexibility and adaptability to dynamic conditions based on the features extracted from colorimetric information.5,20–23 The alcohol level in saliva was detected using features of four color spaces (RGB, HSV, YUV and L*a*b*) under three machine learning classifiers21 while lead ion concentration was estimated with only RGB values.22 The peroxide concentration was quantified with color features in machine learning classifiers20 while the glucose concentration was determined with different reagents using color and texture features.5 Mølgaard et al.24 also employed machine learning approach to detect the H2O2 using colorimetric sensor technology for air-sampling. One benefit of machine learning is to be compatible with smartphone apps which offers to perform colorimetric analysis in the field without extensive training.25 The GlucoSensing app was developed to determine the glucose concentration5 while the ChemTrainer app was used to detect peroxide according to the color changes in the colorimetric test strips.20SPAQ2 app was developed to test the alcohol level in saliva.21 A custom app was developed to predict lead ion.22 All these apps provide user-friendly interfaces to perform colorimetric analysis with machine learning.
In this study, non-enzymatic μPADs coupled with a machine learning-based smartphone app were developed for high-sensitive and selective determination of H2O2 in transparent liquids such as water. First, circular patterns were printed on a filter paper using a wax printer, and then the patterns were processed at high temperature to obtain hydrophobic boundaries of the μPADs. The use of single or multiple indicators have been reported for the colorimetric detection of H2O2 such as 3,3′-diaminobenzidine, 3,3′,5,5′-tetramethylbenzidine (TMB), potassium iodide (KI), 4-aminoantipyrine (4-AAP)/3,5-dichloro-2-hydroxy-benzenesulfonic acid, 4-AAP/N-ethyl-N-(3-sulfopropyl)-3-methylaniline sodium salt, 2,4,6-tribromo-3-hydroxy benzoic acid.26–29 The μPADs were prepared for testing by adding only two indicators, TMB and KI, to the detection zones (Fig. 1). No enzyme or nanoparticle with catalytic properties were used for the detection, making the system cost-efficient and chemically/thermally stable. The performance of the system was compared with those of using KI only and TMB only. In order to make the process more user friendly, robust and adaptive against illumination variation and camera optics, a machine learning-based smartphone app with a simple interface was developed. Machine learning classifiers were trained using features extracted from images taken under seven different illumination conditions. The trained classifiers were then integrated into the Hi-perox Sens app to be presented to the user. The results clearly showed that the proposed system has high potential for practical use.
|  | ||
| Fig. 1 Schematic illustration of the proposed system. The color change of chromogenic agents can be detected with a smartphone camera under ambient light conditions. | ||
To maintain inter-phone operability, four different smartphones with different brands (Oppo A5 2020, Reeder P10, iPhone 5SE, and iPhone 6S) and operating systems (Android and iOS) were used for capturing. The specifics of cameras for each smartphone are shown in Table 1. Images were captured in automatic mode at t = 30 s and t = 10 min as shown in Fig. 2. 28 images were taken with each smartphone separately under seven different illumination conditions at two-time steps, resulting in fifty-six images. Since the group of eleven concentrations was captured at a single frame, 616 images of each concentration were collected for TMB + KI and KI, respectively. These images were, then, transferred to a computer to process in MATLAB (MathWorks, MA, USA) environment for feature extraction.
| Smartphone brand | Image resolution | Optics | Camera resolution | 
|---|---|---|---|
| iPhone 5SE | 4032 × 3024 | f/2.2 | 7 MP | 
| iPhone 6S | 4032 × 3024 | f/2.2 | 12 MP | 
| Oppo A5 2020 | 4000 × 3000 | f/1.8 | 12 MP | 
| Reeder P10 | 4160 × 3120 | f/2 | 13 MP | 
To determine the H2O2 based on color changes, twenty-three machine learning classifiers were trained with the extracted features and their performances were compared in terms of classification accuracy. Among these classifiers, linear discriminant analysis (LDA) and ensemble bagging classifier (EBC) outperformed the others for KI and TMB + KI, respectively. The LDA is a kind of supervised classifier which applies Bayesian and maximum likelihood rules to estimate the highest likelihood between input and pre-defined classes using discriminant function.36 In maximum likelihood rule, input x is assigned to class j,
|  | (1) | 
|  | (2) | 
EBC is an ensemble technique used to improve the performance of machine learning classifiers in terms of stability and accuracy. It combines the classifications of randomly generated training sets in the estimation of the final prediction37 based on bagging algorithm of which the pseudo code is given in Algorithm 1. The samples are generated with bootstrap methods from the training set S uniformly. The generated T bootstrap samples builds Ci classifiers (C1, C2, …CT) which are used to estimate the final classifier, C*.38
Algorithm 1: The bagging algorithm
Here, y denotes the class label from a discrete space Y associated with x for a given instance.
As the LDA and EBC showed the best classification performance, they were integrated into our smartphone application called Hi-perox Sens.
With a simple and user-friendly interface, Hi-perox Sens is demonstrated in Fig. 3. The homepage is given in Fig. 3(a) where an image can be taken from the gallery of the smartphone (Fig. 3(b)) or a new image can be captured using the smartphone camera. Once the image is selected or captured, it is displayed on the app as shown in Fig. 3(c). Next, the ROI on the image needs to be drawn using an adjustable crop box as shown in Fig. 3(d and e). Then, the ROI is cropped and displayed on the app (Fig. 3(f)) to double-checked the ROI whether the selected area is suitable for the analysis. If not, the ROI can be re-drawn before the cropped patch is transferred to the remote server via a Firebase by tapping the upload icon. Machine learning classifiers running in the remote server quantify the concentration level. As shown in Fig. 3(g), the colorimetric reagent information (TMB + KI or KI) also needs to be sent to the remote server in order to choose the best classifier for the colorimetric analysis. Last, the result is sent back to Hi-perox Sens via a Firebase to display on the app (Fig. 3(h)).
| 2KI + H2O2 ⇌ I2 + 2KOH | (3) | 
| I2 + 5H2O2 ⇌ 2HIO3 + 4H2O | (4) | 
| red-TMB + IO3− + 6H+ ⇌ ox-TMB + I− + 3H2O | (5) | 
In the first step (eqn (3)), KI gets into a reaction with H2O2 and produces I2, which is then once again reacts with H2O2 to produce iodic acid (HIO3) (eqn (4)). As HIO3 ionizes, iodate (IO3−) is formed. In the final stage (eqn (5)), the oxidation of TMB is induced by the reduction of IO3− to I−, resulting in the formation of blue color. According to this reaction, iodide serves as a catalyst for the rapid oxidation of TMB. Unlike the chromogenic agent KI, TMB + KI performed best in the low concentration range of H2O2, and the color intensity became saturated when the H2O2 concentration level exceeded 5 mM (Fig. 2). In addition, the effect of pH and ionic strength on the signal response of μPADs were tested in the presence of 1 mM H2O2. In the pH range of 5 to 11, no significant change in color formation was observed. However, the intensity of the color formed at pH 3 was lower than the rest (ESI Fig. S1†). As for the ionic strength, it appears that the color intensity slightly increased with increasing NaCl concentration. The adopted strategy has the potential to provide an important basis for simple, rapid, cost-effective, sensitive and selective colorimetric assay for the detection of H2O2.
In this study, H2O2 concentration was detected using machine learning classifiers based on the color change that occurred in the μPADs. Machine learning classifiers need to be trained in advance with a dataset which contains similar images that the user might use in testing. Therefore, the dataset was created with four different smartphones (iPhone 5SE, iPhone 6S, Oppo A5 2020, and ReederP10) under seven illumination conditions (H, F, S, HF, HS, FS, HFS). This dataset was transferred to a computer for pre-processing in MATLAB 2021b. The ROI for each concentration was cropped to extract features for the training of machine learning classifiers. First, twenty-three classifiers were trained for TMB + KI and KI with eleven concentrations ranging from 0 to 50 mM at t = 30 s. The best classification results were 81.3% and 91.9% for KI and TMB + KI, respectively. After careful analysis of confusion matrices of the classifiers, it was observed that KI and TMB + KI failed to classify H2O2 in lower and higher concentrations ranges, respectively. Therefore, classifiers were trained again with low concentration values (0, 0.01, 0.05, 0.1, 0.2, 0.5, 1, 5 mM) for TMB + KI, and high concentration values (0, 0.2, 0.5, 1, 5, 10, 25, 50 mM) for KI. As a result, the classification accuracies were improved to 97.3% and 92.4% for TMB + KI and KI, respectively. These results were summarized in Table 2. The same process was repeated with images taken at t = 10 min, and the results were given in Table 3. The system shows similar classification accuracy even after 10 min which proves the robustness of the system.
| H2O2 concentration | 0–50 mM | High | Low | 
|---|---|---|---|
| KI | 81.3 | 92.3 | — | 
| TMB + KI | 91.9 | — | 97.8 | 
| H2O2 concentration | 0–50 mM | High | Low | 
|---|---|---|---|
| KI | 89.1 | 92.4 | — | 
| TMB + KI | 85.1 | — | 97.3 | 
In classification, the EBC gave the highest accuracy for TMB + KI while the LDA outperformed for KI. Besides the classification accuracy (eqn (6)), the performance of these classifiers was also tested in terms of precision (eqn (7)), recall (eqn (8)), and F1 score (eqn (9)).
|  | (6) | 
|  | (7) | 
|  | (8) | 
|  | (9) | 
TP (True Positive) describes the number of predictions that are positive, and also classified as positive by the classifier. FP (False Positive) is the number of predictions that were positive but were not classified as positive by the classifier. TN (True Negative) indicates the number of predictions that are also classified as negative by the classifier. FN (False Negative) is the number of predictions that are negative but not classified as negative by the classifier.39 Accuracy is the most commonly used metric in the classification comparison. It is the ratio of correctly classified samples to the total number of samples. Precision is the ratio of the number of samples labeled as positive to the total samples classified as positive. Sensitivity is the ratio of positively labeled samples to the total number of truly positive samples. The F1 score is calculated using precision and sensitivity metrics. It is used to optimize the system towards precision or sensitivity. As can be seen the performance metrics results (Fig. 5), TMB + KI had the highest accuracy value with 97.8% using EBC. The detailed classification reports and confusion matrices with respect to the type of chromogenic agents, timing and concentration range can be found in ESI Tables S1–8 and ESI Fig. S2–12.†
It should be noted that the performance metric results were lower than the average values in the cases of 0.01 and 0.05 mM H2O2. This can also be observed in the confusion matrix shown in Fig. 4(a), visualizing the performance metrics. Confusion matrix is mostly used to illustrate the relation between the true and predicted outputs of the classifier concerning each class. Robustness of the system can be easily and visually observed when the confusion matrices of TMB + KI at 30 s (Fig. 4(a)) and 10 min (Fig. 4(b)) were compared. Fig. 4(c) and (d) show performance analysis of LDA for KI at 30 s and 10 min, respectively. According to the matrices, much better prediction accuracy and robustness were achieved in high concentration range of H2O2, as in TMB + KI.
Finally, in our study, LDA and EBC classifiers were integrated with Hi-perox Sens, which is a simple and user-friendly mobile app for H2O2 detection. Images of this app are shown in Fig. 3. The photo is selected from the gallery or captured using the camera, then the ROI is cropped and sent via Firebase to the remote server running the machine learning classifier to measure the concentration level. The result is then returned and displayed in Hi-perox Sens. As an example, the processes performed on an uploaded image are shown step by step in Fig. 3. At last, Hi-perox Sens correctly classified the H2O2 concentration as 25 mM. The smartphone-based system successfully worked and quantified H2O2 level in water with machine learning classifiers. The LOD of the sensor with TMB + KI was calculated to be 5.4 μM based on the RGB data of images taken under HFS with iPhone 6S (LOD = 3.3 × σ/slope). Although the system works without a calibration curve, the calculated LOD value clearly demonstrates its potential to be trained for lower concentrations of H2O2. Additionally, the selectivity of the μPAD towards H2O2 was tested in the presence of a number of interfering species such as KCl (2 mM), NaCl (2 mM), CaCl2 (2 mM), sucrose (2 mM), urea (2 mM) and lactate (2 mM) (n = 3). As can be seen in Fig. 6, the μPAD did not respond to any of the interfering molecules as the difference between the control and test groups was not significant. In other words, the μPAD was able to selectively measure H2O2 concentration, further proving the robustness of the proposed system.
|  | ||
| Fig. 5 Evaluation of EBC with error bars in terms of precision, recall, and F1 score at t = 30 s for TMB + KI using low concentrations of H2O2. | ||
The most relevant studies include,20,24,40,41 which, however, still substantially differ from the present study. First of all, either enzymes or catalytic nanoparticles were used in these papers to induce color change in the presence of H2O2. On the contrary, here, iodide-mediated TMB-H2O2 reaction system was applied to μPADs for non-enzymatic H2O2 quantification, which made the system low-cost. In addition, unlike Cheng et al.40 and Bandi et al.,41 where a calibration curve based colorimetric H2O2 detection was performed, our proposed system is based on machine learning, offering more robustness and adaptability against ambient illumination conditions and camera optics. Solmaz et al.20 and Molgaard et al.24 also employed the machine learning classifiers and reported that H2O2 was detected with 95% accuracy in both studies. Therefore, the proposed system is clearly state-of-the-art performance in terms of robustness, adaptability and classification accuracy. To verify the practical applicability of the present system, its performance was compared to two commercially available products in tap and milk samples. As can be seen from Table 4, promising and acceptable recovery of H2O2 in real samples was obtained with the present system. Although it had a slightly lower recovery (89.4% at t = 30 s and 81% at t = 10 min, in average) than the commercially available H2O2 Colorimetric Assay Kit (105.5% in average), the system showed a much better recovery in milk (92.5%). The matrix effect of milk adversely affected the results of the H2O2 Colorimetric Assay Kit (162.4%), where the analysis was performed with a UV spectrophotometer. Quantofix® peroxide test is an enzyme-based assay used to visually determine the H2O2 concentration in a given sample. Since visual observation is prone to error, ImageJ was used to determine the exact interval of H2O2 according to the color scale given on the product. Although the test strips accurately determined the concentration interval of H2O2 in tap water, they misclassified 0.2 mM of H2O2 in milk. Normally, test strips require a reflectometer (test stripreader) for both quantitative analysis and to eliminate the subjectivity of visual reading. As a result, the proposed system had comparable performance in real samples to two commercially available H2O2 kits. Although not done in this study, it should be noted that the accuracy of the system can be significantly improved by including real samples in the machine learning classifier training dataset.
| Real samples | Added (mM) | Hi-perox Sens (t = 30 s) | Hi-perox Sens (t = 10 min) | Peroxide assay kit | Quantofix | |||
|---|---|---|---|---|---|---|---|---|
| Founda (mM) | Recovery | Founda (mM) | Recovery | Found (mM) | Recovery | Interval | ||
| a The average of classification results. | ||||||||
| Tap water | 0 | 0 | — | 0 | — | −0.008571 | — | <0.3 | 
| 0.2 | 0.32 | 57.2 | 0.14 | 71.4 | 0.1628571 | 81.5 | 0.1–0.3 | |
| 0.5 | 0.5 | 100 | 0.5 | 100 | 0.6057143 | 121 | 0.3–0.9 | |
| 1 | 1 | 100 | 1.57 | 63.7 | 1.1819048 | 118.2 | 0.9–3 | |
| 5 | 5 | 100 | 4.43 | 88.6 | 5.0628571 | 101.3 | >3 | |
| Milk | 0 | 0 | — | 0 | 100 | 0.2819048 | — | <0.3 | 
| 0.2 | 0.14 | 71.4 | 0.14 | 71.4 | 0.5104762 | 255.2 | 0.3–0.9 | |
| 0.5 | 0.5 | 100 | 0.5 | 100 | 0.8009524 | 160.2 | 0.3–0.9 | |
| 1 | 1 | 100 | 1 | 100 | 1.3961905 | 139.61 | 0.9–3 | |
| 5 | 5 | 100 | 5 | 100 | 4.7295238 | 94.5 | >3 | |
| Footnote | 
| † Electronic supplementary information (ESI) available. See DOI: 10.1039/d1an01888d | 
| This journal is © The Royal Society of Chemistry 2021 |