## 3 Implemented Feature Vectors and Data Labelling  
Figure 3 presents the procedure used in this study. This study's focus is on the selection of the feature vector (gray box in the diagram). The EL intensity of each of the pixels is used to determine the intensity distribution across the image. Different derived statistical parameters are then calculated based on the 1D pixel intensity histogram of high-resolution images (see Table 1). The proposed feature vector V1 contains 16 statistical parameters reducing the feature vector's dimension by encoding the information into a smaller latent space to remove the redundant information from the data. This allows an efficient and fast process compared to the traditional methods, which use the 2D spatial information to identify the image's defects. Finally, the developed feature vectors (V1 and V2) are used as an input for the three ML classifiers, as shown in Figure 4, for classifying the defects in the images.  
Figure 3: The training procedure used in this study.  
As discussed, the defects are classified into three classes: (i) cracks (Mode B and C) (Class 0), (ii) finger failures and micro-cracks Mode A (Class 1), and (iii) no failures (Class 2). In total, 1385 defects have been identified (see Table 1).  
Statistical output metrics [47] such as recall, precision, accuracy, and F1 score are defined and used to evaluate the algorithms [47] (see definitions in Table 2).  
The recall metric measures the percentage of total relevant results correctly classified by the algorithm, while precision is the ratio between correctly labeled positive outcomes and the total predicted positive outcomes. Accuracy is defined as the strength of the correlation between the predicted and the actual labels [47]. It is given as the ratio between the number of correct predictions and the total number of predictions. Nevertheless, accuracy is not the best representation of performance on unbalanced datasets. Hence, the F1 score metric, defined as the harmonic mean of precision and recall, is also computed in this study. It has been shown that the F1 score is a better indicator when analyzing unbalanced datasets [47].  
For the training stage, to prevent under-fitting or over-fitting, Class 2 (no failures) is downsampled to 2185 cell images with approximately 700 cell images of each class label (as shown in Table 1). The training is done on 75% of the dataset, while the remaining 25% is used to evaluate the algorithm on previously unseen data (validation dataset) [48].  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Module Images** & **Cell Images** & **‘Class 0’** & **‘Class 1’** & **‘Class 2’** \\ \hline
753 & 45,906 & 756 & 629 & 44,521 \\ Balanced data-set & 2185 & 756 & 629 & 800 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Defect classification.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Accuracy (\%)** & **Recall (\(r\)) (\%)** & **Precision (\(p\)) (\%)** & **F1 Score (\%)** \\ \hline Formulae & \(\left(\frac{t_{p}+t_{n}}{r_{p}+f_{n}+t_{n}}\right)\) & \(\left(\frac{t_{p}}{r_{p}+f_{n}}\right)\) & \(\left(\frac{t_{p}}{r_{p}+f_{p}}\right)\) & \(\left(2\cdot\frac{p^{\prime}}{p+r}\right)\) \\ \hline \hline \end{tabular} \(t_{p}:True\)_positive, \(f_{p}:False\)_positive, \(f_{n}:False\)_negative, \(t_{n}:True\)_negative._  
\end{table}
Table 2: Extracted output metrics and their definition.  
Figure 4: **(A)** Extracted statistical parameters (V1; 16 features); **(B)** combined pixel intensity histogram and statistical parameters (V2; 271 features) used as inputs for three ML classifiers.