This thesis presents a comparative analysis of five lightweight object detection
models – YOLOv8n, YOLOv8s, YOLOv5n, NanoDet-Plus, and MobileSAM
– in the context of retail video surveillance. We evaluate the models on a
subset of the COCO 2017 dataset comprising 2,693 images with person-class
annotations, using pre-trained weights on an Apple MacBook Pro with an M2
Max processor. The comparison covers five metrics: inference speed (FPS),
accuracy (mAP@0.5, mAP@0.5:0.95), average recall (AR@0.5), model size,
and computational complexity (GFLOPs).
Our results show that NanoDet-Plus is the fastest model (66.0 FPS) with
the lowest computational cost (2.97 GFLOPs), though at the expense of
lower accuracy, particularly at the strict mAP@0.5:0.95 metric (19.97 %).
YOLOv8s achieves the best accuracy (mAP@0.5 = 70.26 %) but at a reduced
speed of 19.6 FPS. For the best overall trade-off between speed and accuracy,
YOLOv8n (30.0 FPS, mAP@0.5 = 64.36 %) proves most suitable for real-
time retail deployment on resource-constrained devices. YOLOv5n offers the
smallest footprint (1.9M parameters, 4.0 MB), while MobileSAM, despite
providing additional segmentation capabilities, is not competitive in inference
speed (2.7 FPS).
We provide detailed descriptions of architectural differences between
the models, discuss the challenges of implementing a unified benchmarking
pipeline, and analyze the trade-offs between individual metrics. Our findings
are relevant for system designers choosing between lightweight detectors for
deployment on edge devices in retail environments.
|