The invention provides a document
image correction method and device based on depth guidance, equipment and a medium, and relates to the technical field of document
image correction, and the method comprises the steps: obtaining a
color image and a depth image of a to-be-corrected document; splicing the
color image and the position prompt image to form a multi-channel input
tensor; inputting the multi-channel input
tensor into the corrective neural
network model to obtain a dense
displacement field; wherein the correction neural
network model comprises a plurality of cascaded geometric attention blocks, and each geometric attention block is configured to generate a rotation position code and a
decomposition attention
mask of
depth perception based on the depth image, and perform geometric self-attention calculation of row-column
decomposition on the feature map by using the code and the
mask; and finally, sampling the
color image according to the
displacement field to generate a corrected document image.
Geometric modeling is guided through depth information, a row-column
decomposition attention mechanism is adopted, the complex deformation correction precision is remarkably improved, the calculation complexity is greatly reduced, and high efficiency and robustness are achieved.