A novel GAN-transformer framework for early Brahmi script generation and recognition
Main Article Content
Abstract
Recognizing ancient scripts is crucial for understanding the historical, cultural, and linguistic context of past civilizations. However, the recognition of Early Brahmi letters from Sri Lankan inscriptions faces significant challenges due to scarce digitized data, degradation of inscriptions, and visual similarity among characters. This study introduces BrahmiGAN, a novel Generative Adversarial Network (GAN) designed to generate realistic synthetic Early Brahmi letters, addressing data limitations that hinder recognition model training. Using a benchmark dataset of 73 inscriptions, 21,195 high-quality synthetic images were generated from 888 real samples. These synthetic images demonstrated high fidelity, validated through feature-based, raster-based, and vector-based evaluations, and achieved a 92.15% approval rate from human experts. Furthermore, a vision Transformer-based ensemble model integrating Pyramid Vision Transformer and Swin Transformer is proposed for Early Brahmi letter recognition. A classification accuracy of 96.06% was attained by the ensemble model when trained on combined synthetic and real images, outperforming existing methods and surpassing the same model trained exclusively on real images. The generated dataset is publicly available to support future research (https://zenodo.org/records/14961074).
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
References
Vadineanu S, Kalayci T, Pelt DM, Batenburg KJ. Convolutional neural networks and their activations: an exploratory case study on mounded settlements. J Comput Appl Archaeol. 2024;7(1):262-82. DOI: https://doi.org/10.5334/jcaa.163
Sobotkova A, Kristensen-McLachlan RD, Mallon O, Ross SA. Validating predictions of burial mounds with field data: the promise and reality of machine learning. J Doc. 2024;80(5):1167-89. DOI: https://doi.org/10.1108/JD-05-2022-0096
Aioanei AC, Hunziker-Rodewald RR, Klein KM, Michels DL. Deep Aramaic: towards a synthetic data paradigm enabling machine learning in epigraphy. PLoS ONE. 2024;19(4):e0299297. DOI: https://doi.org/10.1371/journal.pone.0299297
Violatti C, Dharma P. Brahmi script [Internet]. 2016 [cited 2024 Dec 10]. Available from: https://www.worldhistory.org/
Brahmi_Script/
Bandara D, Warnajith N, Minato A, Ozawa S. Creation of precise alphabet fonts of early Brahmi script from photographic data of ancient Sri Lankan inscriptions. Can J Artif Intell Mach Learn Pattern Recognit. 2012;3(3):33-9.
Gunasekara S, Lafir MH, Dulaj C, Haputhanthri L, Alwis D. Deep learning-powered mobile app for early Brahmi Script decipherment in Sri Lanka. 2024 International Research Conference on Smart Computing and Systems Engineering (SCSE); 2024 Apr 4; Colombo, Sri Lanka. USA: IEEE; 2024. p. 1-6. DOI: https://doi.org/10.1109/SCSE61872.2024.10550734
Wickramarathna S, Ranathunga L. Data driven approach to Brahmi OCR error correction and Sinhala meaning generation from Brahmi character array. 2019 19th International Conference on Advances in ICT for Emerging Regions (ICTer); 2019 Sep 2-5; Colombo, Sri Lanka. USA: IEEE; 2019. p. 1-6. DOI: https://doi.org/10.1109/ICTer48817.2019.9023763
Wijerathna KASAN, Sepalitha R, Indika T, Athauda H, Suranjini PD, Silva JADC, et al. Recognition and translation of ancient Brahmi letters using deep learning and NLP. 2019 International Conference on Advancements in Computing (ICAC); 2019 Dec 5-7; Malabe, Sri Lanka. USA: IEEE; 2019. p. 226-31. DOI: https://doi.org/10.1109/ICAC49085.2019.9103340
Surasinghe P, Thanikasalam K. An automated period prediction system for Sinhala epigraphical scripts using ensemble CNNs and attention modules. ECTI Trans Comput Inf Technol. 2024;18(4):555-67. DOI: https://doi.org/10.37936/ecti-cit.2024184.256931
Iandola FN, Han S, Moskewicz MW, Ashraf K, Dally WJ, Keutzer K. SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size [Internet]. arXiv [Preprint]. 2016 [cited 2024 Dec 10]. Available from: https://doi.org/
48550/arXiv.1602.07360.
Wang W, Xie E, Li X, Fan DP, Song K, Liang D, et al. Pyramid vision transformer: a versatile backbone for dense prediction without Convolutions. International conference on computer vision, ICCV 2021; 2021 Oct 11-17; USA: IEEE; 2021. p. 568-78. DOI: https://doi.org/10.1109/ICCV48922.2021.00061
Liu Z, Lin Y, Cao Y, Hu H, Wei Y, Zhang Z, et al. Swin transformer: hierarchical vision transformer using shifted windows. International conference on computer vision, ICCV 2021; 2021 Oct 11-17; USA: IEEE; 2021. p. 10012-22. DOI: https://doi.org/10.1109/ICCV48922.2021.00986
Yuan Z, Kamata SI. Data augmentation for ancient characters via Semi-MixFontGan. 2020 Joint 9th International Conference on Informatics, Electronics & Vision (ICIEV) and 2020 4th International Conference on Imaging, Vision & Pattern Recognition (icIVPR); 2020 Aug 26-29; Kitakyushu, Japan. USA: IEEE; 2020. p. 1-6. DOI: https://doi.org/10.1109/ICIEVicIVPR48672.2020.9306588
Vögtlin L, Drazyk M, Pondenkandath V, Alberti M, Ingold R. Generating synthetic handwritten historical documents with OCR constrained GANs. 16th International Conference on Document Analysis and Recognition, ICDAR 2021; 2021 Sep 5-10; Lausanne, Switzerland. Cham: Springer; 2021. p. 610-25. DOI: https://doi.org/10.1007/978-3-030-86334-0_40
Perrin S, Cudilla L, Xie Y, Mouchère H, Marthot-Santaniello I. Homer restored: virtual reconstruction of Papyrus Bodmer 1. HIP ‘23: 7th International Workshop on Historical Document Imaging and Processing; 2023 Aug 1; San Jose, USA. USA: ACM; 2023. p. 37-42. DOI: https://doi.org/10.1145/3604951.3605518
Vidal-Gorène C, Camps JB, Clérice T. Synthetic Lines from historical manuscripts: an experiment using GAN and style transfer. Image Analysis and Processing, ICIAP 2023 Workshops; 2023 Sep 11-15; Udine, Italy. Cham: Springer; 2023. p.477-88. DOI: https://doi.org/10.1007/978-3-031-51026-7_40
Fogel S, Averbuch-Elor H, Cohen S, Mazor S, Litman R. ScrabbleGAN: semi-supervised varying length handwritten text generation. CVF conference on computer vision and pattern recognition, CVPR 2020; 2020 Jun 14-19; USA: IEEE; 2020. p. 4324-33. DOI: https://doi.org/10.1109/CVPR42600.2020.00438
Zhu JY, Park T, Isola P, Efros AA. Unpaired image-to-image translation using cycle-consistent adversarial networks. International conference on computer vision, ICCV 2017; 2017 Oct 22-29; Venice, Italy. USA: IEEE; 2017. p. 2223-32. DOI: https://doi.org/10.1109/ICCV.2017.244
Preethi P, Mamatha HR. Intelligent recognition of ancient Brahmi characters using transfer learning. 2023 Third International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT); 2023 Jan 5-6; Bhilai, India. USA: IEEE; 2023. p. 1-6. DOI: https://doi.org/10.1109/ICAECT57570.2023.10118090
Devi KD, Supraja G, Vanathi A, Vidhyalakshmi M. Digitization and electronic translation of Brahmi stone inscriptions. AIP Conf Proc. 2023;2917(1):050017. DOI: https://doi.org/10.1063/5.0175629
Nagane AS, Patil CH, Mali SM. Classification of Brahmi script characters using HOG features and multiclass error-correcting output codes (ECOC) model containing SVM binary learners. 2023 International Conference on Intelligent and Innovative Technologies in Computing, Electrical and Electronics (IITCEE); 2023 Jan 27-28; Bengaluru, India. USA: IEEE; 2023. p. 448-51. DOI: https://doi.org/10.1109/IITCEE57236.2023.10091084
Vincen V, Samsuryadi S. Brahmi script classification using VGG16 architecture convolutional neural network. Comput Eng Appl J. 2022;11(2):127-36. DOI: https://doi.org/10.18495/comengapp.v11i2.407
Agrawal Y, Balasubramanian S, Meena R, Alam R, Malviya H, Rohini P. Optical character recognition using convolutional neural networks for Ashokan Brahmi inscriptions [Internet]. arXiv [Preprint]. 2024 [cited 2024 Dec 10]. Available from: https://doi.org/
48550/arXiv.2501.01981.
Gautam N, Chai SS, Jose J. Recognition of Brahmi words by using deep convolutional neural network [Internet]. 2020 [cited 2025 Sep 30]. Available from: https://www.preprints.org/manuscript/202005.0455/v1. DOI: https://doi.org/10.20944/preprints202005.0455.v1
Bhuvaneswari S, Kathiravan K. Enhancing epigraphy: a deep learning approach to recognize and analyze Tamil ancient inscriptions. Neural Comput Appl. 2024;36:19839-61. DOI: https://doi.org/10.1007/s00521-024-10137-x
Murugan B, Visalakshi P. Ancient Tamil inscription recognition using detect, recognize and labelling, interpreter framework of text method. Heritage Sci. 2024;12:430. DOI: https://doi.org/10.1186/s40494-024-01522-9
Lalitha E, Mondal A, Jawahar. Enhancing accuracy in Indic handwritten text recognition. 9th International Conference on Computer Vision and Image Processing, CVIP 2024; 2024 Dec 19-21; Hyderabad, India. Cham: Springer; 2026. p. 234-48. DOI: https://doi.org/10.1007/978-3-031-93688-3_17
Mostafa MT, Rhythm ER, Mehedi MHK, Rasel AA. Advancements in optical character recognition for Bangla scripts. 2023 Innovations in Intelligent Systems and Applications Conference (ASYU); 2023 Oct 11-13; Sivas, Turkiye. USA: IEEE; 2023. p. 1-5. DOI: https://doi.org/10.1109/ASYU58738.2023.10296550
Cheema MDA, Shaiq MD, Mirza F, Kamal A, Naeem MA. Adapting multilingual vision language transformers for low-resource Urdu optical character recognition (OCR). PeerJ Comput Sci. 2024;10:e1964. DOI: https://doi.org/10.7717/peerj-cs.1964
Gulrajani I, Ahmed F, Arjovsky M, Dumoulin V, Courville A. Improved training of Wasserstein GANs. 31st International Conference on Neural Information Processing Systems; 2017 Dec 4-9; Long Beach, California. USA: NeurIPS; 2017. p. 5767-77.
Optuna. A hyperparameter optimization framework [Internet]. 2025 [cited 2025 Sep 30]. Available from: https://optuna.org/.
Heusel M, Ramsauer H, Unterthiner T, Nessler B, Hochreiter S. GANs trained by a two time-scale update rule converge to a local Nash equilibrium. 31st International Conference on Neural Information Processing Systems; 2017 Dec 4-9; Long Beach, California. USA: NeurIPS; 2017. p. 6627-37.
Bińkowski M, Sutherland DJ, Arbel M, Gretton A. Demystifying MMD GANs. 6th International Conference on Learning Representations, ICLR 2018; 2018 Apr 30 - May 3; Vancouver, Canada. USA: ICLR; 2018. p. 1-36.
Huttenlocher DP, Klanderman GA, Rucklidge WJ. Comparing images using the Hausdorff distance. IEEE Trans Pattern Anal Mach Intel. 1993;15(9):850-63. DOI: https://doi.org/10.1109/34.232073
Andreella A, De Santis R, Vesely A, Finos L. Procrustes-based distances for exploring between-matrices similarity. Stat Meth Appl. 2023;32(3):867-82. DOI: https://doi.org/10.1007/s10260-023-00689-y
Paranavitana S. Inscriptions of Ceylon. Vol. 1. Colombo: Department of Archaeology; 1970.
