The invention discloses a
machine-readable
card image recognition method based on YOLOv7 model positioning and multi-clustering recognition, which comprises the following steps of: firstly, recognizing a user-defined mark through a YOLOv7 model, determining four corners of a
quadrilateral of a selection question region, then extracting an image of a
machine-readable card part according to the four corners, then firstly performing trapezoidal correction on the
machine-readable
card image, and finally performing multi-clustering recognition on the machine-readable
card image. Performing denoising, closed operation and graying preprocessing on the image of the region, converting the original image of the machine-readable card to be identified into a black and white
binary image, searching rectangles of various scales by adopting the contour in the CV2, then determining each rectangle according to a clustering method, finding out a central point on an X axis and a Y axis, and finally, obtaining the original image of the machine-readable card. And according to the rectangular
area ratio of the white points, determining whether filling is carried out, determining a filling position, obtaining an answer, and carrying out comparison. According to the method,
verification of multiple examples is carried out, experiments prove that the method is high in
automation degree, accurate in recognition and high in speed, the test paper cost is greatly reduced, the paper marking efficiency is improved, and the method has wide popularization value.