4.1.1 Precision
According to the obtained results, YOLOv8m has reported best precision (0.901),
and recall (0.889) which means it can correctly detect the desired weapons such as
guns and knives with less number of false positive and false negative predictions
compared to other state-of-the-art models. YOLOv8n is less accurate than YOLOv7
but it retains a strong recall (0.845), thus being able to detect most of the weapons in
real time applications, particularly on edge devices. Meanwhile, the second generation
YOLOv8s/YOLOv5s which take a compromise of precision and recall also achieve an
overall better performance for real-time weapon detection.
These evaluation metrics, and, more specifically, the precision-recall trade-off pro-
vide an insight into the strengths and weaknesses of different models. In areas that
treat false positives as a major concern (e.g., security systems in open public environ-
ments), YOLOv8m, with higher precision and recall, should be chosen. But in more
restricted scenarios where computer resource is constrained, YOLOv8n may enable
an acceptable performance without sacrificing speed [12].
one the other hand According to quantitative results, YOLOv8m is the best model
with both accuracy and speed performance which could be used in real-time high-
quality surveillance system. High-speed deployment on the edge is most effectively
achieved by YOLOv8n, while mid-level use can be handled with a trade-off between
speed and precision of YOLOv8s or YOLOV5s [14].
Table 4.1 presents the performance measures of evaluated models:
Table 4.1: Leaderboard of YOLO models on the Guns–Knives dataset (replace with
your Colab outputs).
Model
[email protected] [email protected]:0.95 Precision Recall
YOLOv8n 0.872 0.593 0.860 0.845
YOLOv8s 0.901 0.642 0.884 0.867
YOLOv8m
YOLOv5s 0.895 0.627 0.872 0.860
27