Optical Mark Recognition with Object Detection and Clustering
Kaifa Tabassum, Zhalok Rahman · 2024
OMR, or optical mark recognition, is the automated analysis of human-marked documents. Presently, many competitive examinations rely on multiple-choice questions, and the answers to these questions are recorded in OMR sheets. In this study, we present an automated answer detection system from an OMR sheet image using computer vision techniques. Typically, evaluating an OMR sheet from an image involves scanning, extracting data, and interpreting the results through various image processing techniques. However, traditional approaches have limitations. They cannot detect empty responses or recognize multiple choices properly without a specified layout or total number of questions stated. We took a unique approach by employing an object detection model, YOLOv8n, to detect and classify OMR marks. To address overlapping bounding boxes, we implemented the DBSCAN clustering algorithm to effectively group the columns and determine question order. Our system is designed to work with multiple layouts, as it can detect columns through clustering. Furthermore, it can identify unanswered questions as well as multiple marked options. To train and evaluate our model, we created a custom dataset with five different OMR sheet layouts. We achieved a remarkable precision of 96.5%, a recall of 99.8%, and an mAP (mean average precision) of 97.3%. These results demonstrate the efficacy of our approach to OMR sheet analysis.