A Distorted QR Code Correction Method Based on Heatmap Regression
摘要
The decoding of Quick Response (QR) codes frequently fails under complex geometric distortions, such as those caused by surface curvature or folding. To address this challenge, we propose a novel deep learning-based correction network that leverages heatmap regression for high-precision control point localization. Our approach incorporates three key innovations: (1) An Adaptive Dilation Convolution (ADConv) module that dynamically adjusts its receptive field to adapt to varying distortion intensities, thereby preserving the geometric integrity of position detection patterns. (2) A Grouped CBAM Enhancement (GCE) module that processes feature channels in parallel with coordinated attention, significantly amplifying critical features in boundaries and key regions. (3) A heatmap regression mechanism that transforms discrete coordinate prediction into a continuous probability distribution, combined with sub-pixel offset prediction, to achieve superior localization accuracy. The final rectified QR code image is reconstructed via Thin-Plate Spline (TPS) transformation. Extensive experiments on a dataset of 12,000 distorted QR codes demonstrate that our method achieves advanced performance, with a PSNR of 10.35 dB, SSIM of 65.40%, and a decode rate of 91.4%. Our scheme exhibits remarkable robustness in correcting severely deformed QR codes, including those with large curvature distortions or sharp folds, providing reliable technical support for applications in logistics traceability, mobile payment, and industrial scanning.