The invention relates to a two-dimensional code image recognition method based on boundary completion and uncertainty modeling, and belongs to the field of
computer vision. The method comprises the following steps: firstly, acquiring an input two-dimensional code image, detecting a
cutting area through
gray level conversion and edge
gradient analysis, complementing the
cutting area by utilizing a generative network, and generating enhanced features by adopting deformable
convolution; and then extracting rotation irrelevant features through rotation isovariant
convolution, fusing spatial information by applying a global attention mechanism, and correcting the angle of a detection
frame based on a positioning mark. Secondly, extracting semantic features of candidate areas, calculating similarity with a standard template to generate semantic scores, detecting positioning mark angle distribution to generate geometric constraint scores, and adjusting candidate box confidence; and finally, establishing a confidence coefficient normal
distribution model through the multi-layer
perception mechanism, calculating a high
confidence interval probability, constructing combined loss including classification, positioning, confidence coefficient and uncertainty loss, optimizing the model according to specified parameters, and storing the optimal model to obtain a two-dimensional code recognition result.