--- license: cc-by-nc-4.0 language: - bn library_name: diffusers pipeline_tag: text-to-image inference: false --- # Okkhor Diffusion Okkhor Diffusion is a category of Denoising Diffusion Probabilistic Models designed to generate images of Bangla handwritten characters. This model card corresponds to Okkhor-Diffusion trained on **CMATERdb dataset**. ## Variants - [Okkhor Diffusion trained on Banglalekha-Isolated](https://huggingface.co/ahmedfaiyaz/OkkhorDiffusion) - [Okkhor Diffusion trained on CMATERdb](https://huggingface.co/ahmedfaiyaz/OkkhorDiffusion-CMATERdb) - [Okkhor Diffusion trained on Ekush](https://huggingface.co/ahmedfaiyaz/OkkhorDiffusion-Ekush) ### Usage ```py from diffusers import DiffusionPipeline import torch device="cuda" pipeline = DiffusionPipeline.from_pretrained( "ahmedfaiyaz/OkkhorDiffusion-CMATERdb", custom_pipeline="ahmedfaiyaz/OkkhorDiffusion", embedding=torch.int16 ) pipeline.to(device) pipeline.embedding=torch.tensor([0],device=device) # 'প্র': 0 pipeline(batch_size=1,num_inference_steps=100).images[0] ``` |OkkhorDiffusion-CMATERdb|| |---------|--------| |Character| Serial | |প্র|0| |ঙ্গ|1| |ক্ষ|2| |ত্র|3| |ন্দ|4| |চ্ছ|5| |ন্ত|6| |ন্দ্র|7| |স্ত|8| |ন্তু|9| |গ্র|10| |স্থ|11| |স্ট|12| |ম্ব|13| |স্ব|14| |ত্ত|15| |ক্ত|16| |ন্ট|17| |ল্প|18| |ষ্ট|19| |ন্ত্র|20| |ক্র|21| |ন্ন|22| |দ্ধ|23| |ন্ধ|24| |ঙ্ক|25| |ন্ড|26| |ফ্র|27| |ম্প|28| |স্ক|29| |জ্ঞ|30| |ক্ট|31| |শ্চ|32| |ট্র|33| |ত্ব|34| |ল্ল|35| |ব্র|36| |ঞ্চ|37| |ণ্ড|38| |ক্স|39| |শ্র|40| |দ্র|41| |স্প|42| |ঞ্জ|43| |ন্স|44| |ম্ভ|45| |শ্ব|46| |ব্দ|47| |শ্ন|48| |প্প|49| |ব্ল|50| |প্ত|51| |ক্ল|52| |ষ্ট্র|53| |দ্ব|54| |ট্ট|55| |গ্ল|56| |ল্ট|57| |ষ্ঠ|58| |স্ত্র|59| |প্ল|60| |চ্চ|61| |স্ম|62| |দ্দ|63| |গ্ন|64| |জ্ব|65| |ষ্ক|66| |ত্ম|67| |ড্র|68| |ম্ম|69| |ণ্ট|70| |ম্প্র|71| |প্ন|72| |ন্ম|73| |স্ফ|74| |ল্দ|75| |ত্ত্ব|76| |জ্জ|77| |ক্ষ্ম|78| |ষ্ণ|79| |ন্ব|80| |ক্ক|81| |ন্থ|82| |ড্ড|83| |ব্ব|84| |ন্ট্র|85| |ণ্ঠ|86| |প্ট|87| |স্তু|88| |ধ্ব|89| |হ্ণ|90| |ভ্র|91| |ল্ক|92| |স্ল|93| |হ্ন|94| |ত্ন|95| |ষ্ক্র|96| |ঘ্র|97| |দ্ভ|98| |শ্ল|99| |ব্ধ|100| |ষ্ম|101| |স্ক্র|102| |ড়্গ|103| |জ্জ্ব|104| |শ্ম|105| |দ্ম|106| |ক্ব|107| |ম্র|108| |গ্ধ|109| |ব্জ|110| |স্ন|111| |ন্দ্ব|112| |হ্ম|113| |ঙ্ঘ|114| |খ্র|115| |ত্থ|116| |ল্ব|117| |ম্ন|118| |ঘ্ন|119| |গ্গ|120| |ক্ষ্ণ|121| |গ্রু|122| |চ্ছ্ব|123| |ণ্ণ|124| |ল্ম|125| |স্র|126| |ম্ল|127| |ষ্প্র|128| |ঞ্ঝ|129| |স্প্র|130| |ম্ভ্র|131| |ষ্প|132| |ঙ্খ|133| |জ্র|134| |গ্ব|135| |থ্ব|136| |ণ্ব|137| |হ্ব|138| |দ্দ্ব|139| |দ্ঘ|140| |ধ্র|141| |হ্ল|142| |গ্ম|143| |ল্গ|144| |স্খ|145| |থ্র|146| |ন্ধ্র|147| |ফ্ল|148| |ঙ্ক্ষ|149| |ণ্ম|150| |ঞ্ছ|151| |ম্ফ|152| |হ্র|153| |প্রু|154| |ত্রু|155| |ভ্ল|156| |শ্রু|157| |দ্রু|158| |ঙ্ম|159| |ক্ম|160| |দ্গ|161| |ন্ড্র|162| |ট্ব|163| |চ্ঞ|164| |প্স|165| |ল্ড|166| |ষ্ফ|167| |শ্ছ|168| |জ্ঝ|169| |স্ট্র|170| |অ|171| |আ|172| |ই|173| |ঈ|174| |উ|175| |ঊ|176| |ঋ|177| |এ|178| |ঐ|179| |ও|180| |ঔ|181| |ক|182| |খ|183| |গ|184| |ঘ|185| |ঙ|186| |চ|187| |ছ|188| |জ|189| |ঝ|190| |ঞ|191| |ট|192| |ঠ|193| |ড|194| |ঢ|195| |ণ|196| |ত|197| |থ|198| |দ|199| |ধ|200| |ন|201| |প|202| |ফ|203| |ব|204| |ভ|205| |ম|206| |য|207| |র|208| |ল|209| |শ|210| |ষ|211| |স|212| |হ|213| |ড়|214| |ঢ়|215| |য়|216| |ৎ|217| |ং|218| |ঃ|219| |ঁ|220| # Citation ``` @ARTICLE{10445466, author={Fuad, Md Mubtasim and Faiyaz, A. and Arnob, Noor Mairukh Khan and Mridha, M.F. and Saha, Aloke Kumar and Aung, Zeyar}, journal={IEEE Access}, title={Okkhor-Diffusion: Class Guided Generation of Bangla Isolated Handwritten Characters using Denoising Diffusion Probabilistic Model (DDPM)}, year={2024}, volume={}, number={}, pages={1-1}, abstract={Bangla has a unique script with a complex set of characters, making it a fascinating subject of study for linguists and cultural enthusiasts. Unique in some of its similar characters which are only distinguishable by subtle differences in their shapes and diacritics, there has been a notable increase in research on Bangla character recognition and classification using machine learning-based approaches. However, Handwritten Bangla Character Recognition (HBCR) training requires an adequate amount of data from a diversely distributed dataset. Making diverse datasets for HBCR training is a challenging and tedious task to carry out. Yet, there is limited research on the automatic generation of handwritten Bangla characters. Motivated by this open area of research, this paper proposes a novel approach ’Okkhor-Diffusion’ for class-guided generation of Bangla isolated handwritten characters using a novel Denoising Diffusion Probabilistic Model (DDPM). No prior research has used DDPM for this purpose, making the proposed approach novel. The DDPM is a generative model that uses a diffusion process to transform noise-corrupted data into diverse samples; despite being trained on a small training set. In our experiments, StyleGAN2-ADA had notably inferior performance compared to Okkhor-Diffusion in generating realistic isolated handwritten Bangla characters. Experimental results on the BanglaLekha-Isolated dataset demonstrate that the proposed Okkhor-Diffusion model generates realistic isolated handwritten Bangla characters, with a mean Multi-Scale Structural Similarity Index Measure (MS-SSIM) score of 0.178 compared to 0.177 for the real samples. The Fréchet Inception Distance (FID) score for the synthetic handwritten Bangla characters is 5.426. Finally, the newly proposed Bangla Character Aware Fréchet Inception Distance (BCAFID) score of the proposed Okkhor-Diffusion model is 10.388.}, keywords={Deep learning;Handwritten character generation;Generative Model;Denoising Diffusion Probabilistic Model}, doi={10.1109/ACCESS.2024.3370674}, ISSN={2169-3536}, month={},} ```