Electronics, Vol. 13, Pages 4953: Lightweight Detection Counting Method for Pill Boxes Based on Improved YOLOv8n

6 days ago 9

Electronics, Vol. 13, Pages 4953: Lightweight Detection Counting Method for Pill Boxes Based on Improved YOLOv8n

Electronics doi: 10.3390/electronics13244953

Authors: Weiwei Sun Xinbin Niu Zedong Wu Zhongyuan Guo

Vending machines have evolved into a critical element of the intelligent healthcare service system. To enhance the precision of pill box detection counting and cater to the lightweight requirements of its internal embedded controller for deep learning frameworks, an enhanced lightweight YOLOv8n model is introduced. A dataset comprising 4080 images is initially compiled for model training and assessment purposes. The refined YOLOv8n-ShuffleNetV2 model is crafted, featuring the integration of ShuffleNetv2 as the new backbone network, the incorporation of the VoVGSCSP module to bolster feature extraction capabilities, and the utilization of the Wise-IoU v3 loss function for bounding box regression enhancement. Moreover, a model pruning strategy based on structured pruning (SFP) and layer-wise adaptive magnitude pruning (LAMP) is implemented. Comparative experimental findings demonstrate that the enhanced and pruned model has elevated the mean Average Precision (mAP) rate from 94.5% to 95.1%. Furthermore, the model size has been reduced from 11.1 MB to 6.0 MB, and the inference time has been notably decreased from 1.97 s to 0.34 s. The model’s accuracy and efficacy are validated through experiments conducted on the Raspberry Pi 4B platform. The outcomes of the experiments underscore how the refined model significantly amplifies the deployment efficiency of the deep learning model on resource-limited devices, thus greatly supporting the advancement of intelligent medicine management and medical vending machine applications.

Read Entire Article