# Diagnosis of Pressure Ulcer Stage Using On-Device AI
## 4 Discussion  
This study presents an on-device AI healthcare platform that helps users to detect the regions of pressure ulcer lesions, predict the classes of pressure ulcers, and check the states of pressure ulcers, with convenience. To the best of our knowledge, there are no such studies about developing an on-device pressure ulcer staging system with great performance. The YOLOv8 models used in this study are the newest versions built by Ultralytics [39]. The YOLOv8 models have been extensively applied in various object detection research fields \begin{table}
\begin{tabular}{c c} \hline \hline
**Operating System** & Android 10 or Newer \\ \hline
**Application processor** & ARMv8a 64 bit or higher performance \\ \hline
**RAM** & 4 GB or more \\ \hline
**Storage** & 1 GB or more \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Several requirements for the mobile app. Figure 5: Development of a mobile app for detecting pressure ulcers. (**a**) Log-in page. (**b**) App home page. (**c**) Detection results after inspection. (**d**) Provision of instructions and information according to the results. because of their high accuracy and fast prediction time [43; 44; 45; 46]. Thus, we applied the YOLOv8 models and tested all of the YOLOv8 models (8n, 8s, 8m, 8l, and 8x). From 8n to 8x, the model size and the number of trainable parameters increase [40]. Using a large enough dataset (e.g., the COCO dataset with 200 k annotated images), the object detection performance is proven to improve with increasing model size [40]. However, the YOLOv8m model performed the best in this study (Table 4) because each YOLOv8 model was fine-tuned with a relatively small pressure ulcer dataset (about 3 k annotated images). For this reason, the trained YOLOv8m model was embedded in the mobile app. The trained YOLOv8m model successfully generated a set of bounding boxes along with pressure ulcer classes and confidence scores under both the desktop (Figure 4) and the smartphone settings (Figure 5c). Compared with other classes, relatively low classification performance was shown in stage 2 (Table 5) because the trained YOLOv8m model misclassified stage 2 (actual class) as mainly background (no detection) class (predicted class, Figure 3). Representative failure cases of detecting stage 2 were described in Figure 6. There are multiple regions of stage 2 in ground-truth labels (Figure 6b,e). However, the YOLOv8m model detected not multiple small regions but one large region of stage 2 (Figure 6c,f). This implies that more magnified or high-resolution images can enhance the pressure ulcer detection performance of the model. Several studies have been conducted to infer both the areas and the classes of pressure ulcers applying the Faster R-CNN [35], YOLOv4 [33], and YOLOv5s [34] models. Table 7 exhibits a comparative analysis of our model (YOLOv8m) with three other studies previously published. All studies utilized thousands of pressure ulcer images to train each model. Compared to the references [33] and [34], we annotated all types of pressure ulcers following the NPUAP staging system [1]. Moreover, our YOLOv8m model performs better than previous models in terms of all five metrics (Table 7). The Faster R-CNN requires a pre-defined size and number of anchor boxes for object detection [35]. However, the YOLOv8m model is an anchor-free model that directly predicts the center point and size of bounding box containing the object. It reduces model complexity and improves the accuracy of inferring the pressure ulcer region. Compared to the previous YOLO models [33; 34], the YOLOv8 model involves separate heads to estimate bounding boxes and classes. It also  
Figure 6: Failure cases of detecting stage 2. (**a**,**d**) Original images. (**b**,**e**) Ground–truth labels. (**c**,**f**) Prediction results. enhances the object detection performance. As a result, the YOLOv8m has shown excellent results detecting pressure ulcers in this study (Tables 5 and 7). We also created the user-friendly mobile app with the light-weight YOLOv8m model (Figure 5).