Papers
Topics
Authors
Recent
Search
2000 character limit reached

Conditional VAE-GAN for BanglaWriting

Updated 8 January 2026
  • The paper introduces a two-stage Conditional VAE-GAN pipeline that combines latent diversity with adversarial refinement to synthesize Bangla writing images.
  • The CVAE stage creates coarse sketches using text embeddings, while the CGAN stage upsamples and sharpens these sketches with conditioning augmentation.
  • Evaluation using Inception Score and FID demonstrates the model's ability to produce diverse and photorealistic Bangla handwriting images.

Conditional VAE–GAN for BanglaWriting refers to a two-stage neural architecture adapted for synthesizing images of Bangla writing conditioned on textual input. The methodology combines the strengths of Conditional Variational Autoencoders (CVAE) and Conditional Generative Adversarial Networks (CGAN) in a sequential manner, enabling both diversity in generated stroke layouts and photorealistic sharpness. The architecture extends core principles introduced in the context of text-to-image synthesis for natural images to the domain of Bangla character or handwriting image generation (Tibebu et al., 2022).

1. Two-Stage Conditional Pipeline

The CVAE–CGAN framework decomposes BanglaWriting synthesis into two stages. Stage I leverages CVAE to generate a coarse, low-resolution ā€œsketchā€ reflecting global structural cues given by the textual embedding. Stage II employs CGAN to upsample and refine the sketch, yielding high-resolution, realistic images aligned to the semantic content and stylistic variability of Bangla script. A plausible implication is that this modular design allows controlled diversity in morphological features (via latent variable sampling in CVAE), while GAN-based refinement ensures crisp, visually plausible glyphs representative of handwriting or printed Bangla.

Stage I: Conditional VAE (Sketch Generator)

  • Inputs: xx—low-res Bangla writing image (64Ɨ64Ɨ3)(64\times 64\times 3); Ļ•t\phi_t—text embedding.
  • Encoder fuses Ļ•t\phi_t and image features, outputs Gaussian latent z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c) with conditioning cc.
  • Decoder reconstructs image given (z,c)(z, c), enforcing output diversity due to the KL-divergence regularization.

Stage II: Conditional GAN (Refinement Network)

  • Inputs: CVAE output sketch x~\tilde x and text conditioning cc.
  • Generator GG upsamples and sharpens (64Ɨ64Ɨ3)(64\times 64\times 3)0 to (64Ɨ64Ɨ3)(64\times 64\times 3)1 resolution.
  • Discriminator (64Ɨ64Ɨ3)(64\times 64\times 3)2 evaluates real vs. generated images, concatenated with the text code (64Ɨ64Ɨ3)(64\times 64\times 3)3.
  • Residual blocks and ā€œconditioning augmentationā€ modules in (64Ɨ64Ɨ3)(64\times 64\times 3)4 stabilize training and enhance details.

2. Objective Functions and Training Losses

The system’s objective functions reflect its dual purpose:

CVAE Loss (Stage I)

The Evidence Lower Bound is: (64Ɨ64Ɨ3)(64\times 64\times 3)5 with reconstruction and KL terms driving accurate sketch recovery and latent diversity, respectively.

CGAN Loss (Stage II)

Discriminator aims to maximize: (64Ɨ64Ɨ3)(64\times 64\times 3)6 while Generator minimizes adversarial loss plus a KL regularizer on the conditioning augmentation vector (64Ɨ64Ɨ3)(64\times 64\times 3)7: (64Ɨ64Ɨ3)(64\times 64\times 3)8 This enforces both semantic fidelity and distributional robustness for text conditioning.

3. Conditioning Augmentation Mechanism

Conditioning Augmentation (CA) injects controlled stochasticity:

  • Text embedding (64Ɨ64Ɨ3)(64\times 64\times 3)9 (from char-CNN+RNN; for Bangla, a BiLSTM or Transformer encoder is applicable) is mapped to Ļ•t\phi_t0, Ļ•t\phi_t1 by dense layers.
  • The conditioning vector Ļ•t\phi_t2 is sampled as Ļ•t\phi_t3 and injected into both CVAE and CGAN stages.
  • Regularization via Ļ•t\phi_t4 mitigates mode collapse and keeps Ļ•t\phi_t5 well-behaved.

A plausible implication is that incorporating CA for per-character or per-stroke embeddings enables the generation pipeline to model subtle variations and maintain rich output diversity in Bangla glyph structure.

4. Architectural Specifications

Both stages employ convolutional and residual blocks, batch normalization, and activation strategies optimized for stability and expressivity.

Stage I—CVAE

  • Encoder: 5 convolutions (5Ɨ5, stride 2), downsampling to Ļ•t\phi_t6 spatial size; text embedding reshaped and concatenated; outputs 2048-D latent vectors Ļ•t\phi_t7.
  • Decoder: Concatenated latent Ļ•t\phi_t8 and text code, passed through successive Conv2DTranspose layers, upsampling back to Ļ•t\phi_t9, final Tanh activation.

Stage II—CGAN

  • Generator: Downsampling convolutions, residual blocks at bottleneck, upsampling to Ļ•t\phi_t0.
  • Discriminator: 5 convolutional blocks to Ļ•t\phi_t1 features; concatenation with text code Ļ•t\phi_t2; dense layer with sigmoid output; LeakyReLU activations.

For BanglaWriting generation, per-character or per-stroke text embeddings are utilized in place of English-language descriptors, implying strong adaptability to complex script morphologies.

5. Training Protocols and Hyperparameters

Optimization details include:

  • Noise Ļ•t\phi_t3 (Ļ•t\phi_t4).
  • Conditioning vector Ļ•t\phi_t5 dimensionality Ļ•t\phi_t6–ϕt\phi_t7.
  • Adam optimizer; Ļ•t\phi_t8: learning rate Ļ•t\phi_t9, z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)0: z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)1, decayed every z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)2 epochs.
  • Epochs: z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)3 for each stage.
  • Batch sizes of z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)4–z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)5 (not specified in the cited work).
  • z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)6 for CA-KL regularization set via cross-validation.
  • ReLU in generators, LeakyReLU (z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)7) in discriminator.

This protocol ensures robust convergence and regularization across both diversity and realism objectives.

6. Quantitative Evaluation Metrics

The system outputs are assessed as follows:

z∼qĻ•(z∣x,c)z\sim q_\phi(z|x,c)9

Lower FID values indicate closer correspondence between synthesized and real Bangla writing image distributions.

These metrics enable direct empirical comparison with prior art (e.g., StackGAN, GAN-INT-CLS).

7. Significance and Extension to BanglaWriting

Stacking CVAE with CGAN leverages the coverage of latent mode-space by the VAE and adversarial sharpening by the GAN. Conditioning augmentation further moderates the mapping from Bangla text to images, thus facilitating output diversity and mitigating mode collapse. The architecture’s modularity and explicitly conditioned latent structure—when adapted for Bangla embeddings and appropriate image corpora—can synthesize a broad array of glyph styles and layouts. This suggests strong applicability to digital handwriting synthesis, font generation, or automatic Bangla calligraphy rendering (Tibebu et al., 2022).

A plausible implication is that by training on a curated Bangla writing dataset and employing character or stroke-level embeddings within the CA framework, researchers can obtain image generators capturing the stylistic complexity of Bangla scripts with both high fidelity and expressive variability.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Conditional VAE–GAN for BanglaWriting.