Abstract:To address the problem of low QR code reading rates caused by complex environments and changes in shooting angles during QR code detection, this study proposes an algorithm for correcting and recognizing deformed QR codes based on an improved YOLOv8n-Pose algorithm. First, the efficient channel attention (ECA) module is introduced into the backbone network. This module achieves cross-channel interaction without dimensionality reduction, effectively enhancing the feature extraction capabilities and detection accuracy of the network. Secondly, the Slim-neck architecture is adopted to reconstruct the neck network, reducing model complexity and improving the detection capability for QR codes of different scales. Finally, detected QR code corner points are used for correction through inverse perspective transformation, and the corrected QR codes are read using the ZBar algorithm. Experimental results show that, on a public QR code dataset, the improved algorithm increases mAP50 and mAP50-95 by 1.6% and 1.1%, respectively, compared to the original algorithm. Model parameters and computational costs are reduced by 6.5% and 9.5%, respectively. Detection speed on CPU and GPU is improved by 0.3 f/s and 0.7 f/s, reaching 14.2 f/s and 59.6 f/s, respectively, meeting the requirements for efficient detection of QR code corner points. In addition, on a custom-made dataset of deformed QR codes, the proposed method based on the improved YOLOv8n-Pose algorithm enhances the QR code reading rate by 23.66% compared to the standalone ZBar algorithm, achieving a recognition rate of 87.41%. This method only requires one photo to recognize all the information about the goods, which can effectively improve the efficiency of goods management.