The invention discloses a card and
document image processing method,
system and device and a medium, and relates to the technical field of
image processing. Aiming at the problems of
perspective distortion, inclined rotation and incorrect direction of a
card image, the method comprises the following steps: acquiring a card or document image, and preprocessing the card or document image to generate a standard image; constructing a lightweight multi-task model comprising a lightweight
convolutional neural network backbone, a corner regression network
branch and a direction classification network
branch, and training the lightweight multi-task model; a multi-scale shared feature map is extracted through a lightweight
convolutional neural network backbone, then two-dimensional coordinates of four corners are output through a corner regression network
branch, and an image direction category is output through a direction classification network branch; constructing a
perspective transformation matrix by using the two-dimensional coordinates of the four angular points, and performing
perspective distortion correction on the original image; and rotating and outputting the corrected image according to the direction category. According to the invention, the
image processing efficiency and accuracy can be improved.