*8.4. Object Detection Speed*

During the initial phase, the proposed work was compared with a range of standard algorithms frequently used for image classification. The proposed solution demonstrated exceptional performance, outperforming the other algorithms by up to 15-fold. It also outperformed the YOLOv4 algorithm by approximately 60%, as shown in the comparison presented in Table 10.


**Table 10.** Detection speeds of object algorithms.

To assess the performance of the proposed solution under various scenarios and with varied device specifications, it was tested using both a standard computer CPU (Intel Core i5-3.5 GHz) and GPU (AMD Radeon R9 M290X 2 GB). The results of the experiments showed that the proposed detection solution maintained its high performance, as compared to the YOLOv4 algorithm, as demonstrated in Table 11.

**Figure 6.** Learned features from the first layer.

**Table 11.** Classification performance on neural engine, CPU, and GPU.


The results showed that the proposed solution exhibited a high performance, which was up to 2.3 times faster on the GPU and up to 1.5 times faster on the CPU, as compared to the standard YOLOv4. Additionally, the proposed algorithm demonstrated a significant speed advantage, achieving speeds that were up to 7 times faster due to the high speed of the proposed algorithm and the efficient use of the artificial intelligence processors in modern mobile devices, as compared to recent solutions, such as (VGGCOV19-NET [70] and CAD-based YOLOv4 [71]).

#### *8.5. Object Detection Performance*

In the second phase of the performance comparison, as shown in Table 12, the proposed solution was compared with two recent approaches that made adjustments to classification algorithms to handle X-ray images of COVID-19 patients.

**Table 12.** Image classification performance comparison.


Due to the importance of the TN, TP, FN, and FP values [72], their values had been calculated first, as shown in Figure 7.


In the last part of the comparison, the proposed work was compared to the benchmark examples, based on four performance measures, including recall, precision, F1-score, and accuracy. These represented the best testing factors for evaluating the performance of the classification algorithms and to ensure that the improvements achieved [73] by the proposed algorithm were accurate across all levels, which, in turn, would indicate its potential application in the medical field. The results, as shown in Table 13, illustrated the excellent performance of the proposed algorithm in the classification task of images when applied to the Fold 1–5 levels.


**Table 13.** Recall, precision, F1-score, and accuracy performance of Folds 1–5 of the chest X-ray images.

When the algorithm treated images classified as infected images, it also showed superior accuracy, and the performance measures of the rest of the results are shown in Tables 14 and 15.


**Table 14.** Recall, precision, F1-score, and accuracy performance on COVID-19 images.

An advanced *K*-means clustering [6] combined with YOLOv4 solution enabled the rapid and accurate detection of COVID-19 within milliseconds, making it a useful tool in regions with a shortage of experienced doctors and radiologists. Additionally, the model could be utilized to identify patients in settings with limited healthcare facilities, even when only X-ray technology is available, and it could ensure more timely treatments for positive COVID-19 patients. One practical benefit of the concept was that it allowed for the identification of patients who did not require PCR testing, thereby reducing the overcrowding in medical facilities.

**Table 15.** Recall, precision, F1-score, and accuracy performance on no-findings images.


In the second part of the performance comparison, as shown in Table 16, the proposed solution was compared with recent studies in which classification algorithms were modified to handle CT-scan images of COVID-19 patients. Due to the high speed of the suggested method and the extensive use of artificial intelligence processors prevalent in recent mobile devices, the proposed algorithm demonstrated superiority in its accuracy, recall, and other performance metrics.


**Table 16.** Recall, precision, F1-score, and accuracy performance of Folds (1–5) with CT-scan images.

Figure 8 shows the learning curve accuracy of the proposed solution in both the training and testing stages. The accuracy of the proposed solution had consistent improvement. Furthermore, the learning curve began with an accuracy near 32% and continued to improve, up to 99%.

**Figure 8.** Accuracy learning curve.

In the third part of the performance comparison, as shown in Table 17, the proposed solution was compared with recent studies that used a classification technique on brain MRI images to maximize the generalizability of the proposed solution. This comparison was conducted to show that the proposed solution could be adapted for various datasets and image types, as well as to classify other diseases, such as brain tumors. The results showed that the proposed solution had excellent performance across all four comparison parameters (recall, precision, F1-score, and accuracy). The dataset used in [75], which consisted of 280 samples of MRI images, was also used in this test. The dataset contained 100 images with normal tumors and 180 with abnormal tumors.



Table 17 shows the proposed solution's performance, as compared to a recent solution [75]. The results showed that the proposed solution outperformed the comparable solution, with an accuracy of up to 98%.

The proposed solution was compared with a high-performance and highly accurate solution, which had been proposed in 2020 [76]. For datasets 1 and 2, the solution obtained 98.7%, 98.2%, 99.6%, and 99% for classification accuracy and F1-Score, respectively. However, as shown in Tables 18 and 19 with the best values across 7 folds, the proposed solution had excellent classification performance in terms of accuracy, recall, precision, and F1-score, as compared to the comparable 2020 approach.

**Table 18.** Data classification (recall, precision, accuracy, and F1-score) on dataset 1.


**Table 19.** Data classification (recall, precision, accuracy, and F1-score) on dataset 2.


The excellent performance and accuracy of the proposed solution could be attributed to the optimization of the *k*-means clustering, which enhanced the recognition of the image characteristics by the classifier. Additionally, the optimization of the YOLOv4 algorithm through modified layers improved the ability to detect and recognize features, resulting in an overall improvement in performance.

In order to evaluate the performance of the proposed solution on a vast amount of medical image detection, a set of big-medical-data was used, as described in Section 7.2 and (Table 3). Table 20 shows the performance of the proposed solution, as compared to recent approaches. The performance of the proposed solution in terms of recall, precision, F1-score and accuracy was up to 10% better than the comparable solutions.

The results of the proposed approach using advanced parallel *k*-means clustering, logistic regression, and YOLOv4 for medical data classification and image detection could have important implications for the field of healthcare. The accurate classification and detection of medical data could have a significant impact on patient outcomes by enabling earlier diagnoses and more effective treatment planning. The proposed approach has potential for improving the accuracy and efficiency of these tasks, which could ultimately lead to better patient outcomes and reduced healthcare costs.

Furthermore, the proposed approach has the potential to contribute to the development of new solutions in these areas by providing a more efficient and effective means of pre-processing medical data. The use of advanced parallel *k*-means clustering for preprocessing reduced the dimensionality of the data, which made it easier to classify and detect patterns. This could lead to the development of new algorithms that are more effective for identifying specific medical conditions and abnormalities and could, ultimately, lead to new treatments and therapies.


**Table 20.** Image detection recall, precision, F1-score, and accuracy performance of Folds (1–5) (big-medical-data image sets).

Additionally, the proposed approach could aid in the development of new medical imaging technologies. By improving the accuracy of image detection, the proposed approach could assist in identifying abnormalities that are difficult to detect using traditional imaging methods. This could lead to the development of new imaging technologies that are more accurate and effective and could, ultimately, improve patient outcomes.

In terms of the overall medical-data field, the proposed approach using advanced parallel *k*-means clustering for pre-processing medical data, combined with logistic regression and YOLOv4 for classification and image detection, respectively, could contribute to the development of new solutions for medical data classification and image detection.

Firstly, the use of advanced parallel *k*-means clustering for pre-processing medical data could significantly reduce the processing time and improve the accuracy of subsequent classification and detection tasks. This could be especially beneficial for large-scale medical datasets, where traditional clustering methods may not be feasible due to computational limitations.

Secondly, the combination of logistic regression and YOLOv4 for classification and image detection, respectively, could improve the accuracy of these tasks in medical applications. Logistic regression is a simple and efficient algorithm that could be used for both binary and multi-class classification, while YOLOv4 is a state-of-the-art object detection algorithm that can detect multiple objects in an image with high accuracy.

Thirdly, the proposed approach could potentially aid in the diagnosis, treatment planning, and disease monitoring in healthcare. The accurate classification and detection of medical data could provide clinicians with valuable insights into a patient's condition and assist them in making informed decisions regarding treatments.

Lastly, the proposed approach could also serve as a framework for the development of new solutions in medical data classification and image detection. The combination of advanced clustering methods, logistic regression, and object detection algorithms could be customized and optimized for specific medical applications and datasets. This could lead to the development of innovative solutions that address the unique challenges and complexities of medical data analysis.
