Enhancing OCR Accuracy for ID-1 Documents with Security Features through Machine Learning-driven Image Optimization

  • 1 Polytechnic University of Tirana, Albania


OCR technology is widely used in various applications, including document digitization, data extraction, and document management systems. The OCR technology has seen significant advancements in recent years, especially with the integration of machine learning and artificial intelligence techniques. These advancements have led to substantial improvements in accuracy, particularly for standard fonts and clear document images. However, challenges still exist, especially when dealing with low-quality images, noisy images, handwritten text, or documents with unusual fonts. Some documents like ID cards, driving licenses, etc. use some security features like deliberate errors, OVI (Optical Variable Ink), Rainbow print, Guilloche pattern, fine line, and microprint to protect the documents from being counterfeited. These security elements also generate noise on the image to perform the OCR. In this paper, we present a way to enhance the OCR accuracy for ID-1 documents with security features through machine learning-driven image optimization. Albanian driving license images on the personalization process are used as a dataset to train the model. During the training process, the model of the ID-1 card is presented with a dataset containing input features (such as images, texts, or numerical data) along with corresponding labels or outcomes. After training, the model and the implemented algorithm to optimize the image for the OCR process are implemented in real-life application.



  1. H. PACI, Digital signature implementation on ID-1 cards as a personalization security feature, SECURITY & FUTURE, ISSN: 2535-0668, YEAR VI, ISSUE 1 / 2022, pp. 32-34.
  4. Ray Smith Daria Antonova Dar-Shyang Lee, “Adapting the Tesseract Open-Source OCR Engine for Multilingual OCR”, The International Workshop on Multilingual OCR (2009), Barcelona, Spain, 2009, Article No.: 1, Pages 1–8. DOI: 10.1145/1577802.1577804.
  5. Minghao Li, Tengchao Lv, Jingye Chen, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei, “TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models”, The Thirty-Seventh AAAI Conference on Artificial Intelligence, Washington DC, USA, 2023, pp. 13094-13112, DOI: 10.48550/arXiv.2109.10282
  6. Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun. "Deep Residual Learning for Image Recognition.", 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, pp. 770-778, 2016, DOI: 10.1109/CVPR.2016.90
  7. Kartik Dutta, Praveen Krishnan, Minesh Mathew and. Jawahar C. V, "Improving CNN-RNN Hybrid Networks for Handwriting Recognition," 16th International Conference on Frontiers in Handwriting Recognition (ICFHR), Niagara Falls, NY, USA, 2018, pp. 80-85, DOI:10.1109/ICFHR-2018.2018.00023.
  8. Karen Simonyan, Andrew Zisserman “Very Deep Convolutional Networks for Large-Scale Image Recognition”, 3rd International Conference on Learning Representations, {ICLR} 2015, San Diego, CA, USA, 2015, abs/1409.1556
  9. Tao Wang, David J. Wu, Adam Coates, Andrew Y. Ng. “End-to-End Text Recognition with Convolutional Neural Networks”, 21st International Conference on Pattern Recognition (ICPR2012), Tsukuba, Japan, 2012, pp. 3304-3308
  10. Hakik Paci, Dorian Minarolli, Evis Trandafili, Stela Paturri, "Albanian Handwritten Text Recognition using Synthetic Datasets and Pre-Trained Models," WSEAS Transactions on Information Science and Applications, vol. 21, pp. 264-271, 2024, DOI:10.37394/23209.2024.21.25
  11. Hoo-Chang Shin, Holger R. Roth, Mingchen Gao, Le Lu, Ziyue Xu, Isabella Nogues, Jianhua Yao, Daniel Mollura, and Ronald M. Summers, “Deep Convolutional Neural Networks for Computer-Aided Detection: CNN Architectures, Dataset Characteristics and Transfer Learning”, IEEE Transactions on Medical Imaging, vol. 35, pp. 1285-1298, 2016, DOI:10.1109/TMI.2016.2528162
  12. In-Jung Kim, and Xiaohui Xie, “Handwritten Hangul recognition using deep convolutional neural networks”, International Journal on Document Analysis and Recognition (IJDAR), vol.18, pp. 1-3, 2015, DOI:10.1007/s10032-014-0229-4.
  13. Ali Asghar, Leghari Mehwish, Hakro Dil, Awan Shafique, Jalbani Dr, Pakistan Nawabshah, “A Novel Approach for Online Sindhi Handwritten Word Recognition using Neural Network”. Sindh University Research Journal SURJ (Science Series), Vol. 48(1), pp. 213-216, 2016.
  14. Yudong Liang, Jinjun Wang, Sanping Zhou, Yihong Gong, and Namming Zheng, “Incorporating image priors with deep convolutional neural networks for image super resolution”, Neurocomputing, vol. 194, pp. 340-347, 2016, DOI: 10.1016/j.neucom.2016.02.046

Article full text

Download PDF