Back to portfolio

Journal of Electronic Imaging (SPIE)

Reconstructing Arabic dates with a VAE

A generative model that reads what OCR alone can’t — dotted Arabic expiration dates, decoded to clean, readable text.

Role: Co-author · with Ghada Soliman, PhD (Orange) Read the paper
  • VAE
  • CRNN
  • OCR
  • TensorFlow
٢٠٢٥/٥/٢٨ ENCODER · Conv2D + BatchNorm Flatten · Bi-LSTM · Dropout · Bi-LSTM VAE bottleneck DECODER · Conv2D Transpose Dotted Image 64 × 256 64 128 256 512 Flatten Bidirectional LSTM Dropout Bidirectional LSTM Mean Variance z Latent 1024 512 256 128 64 1 ٢٠٢٥/٥/٢٨ ٢٠٢٥/٥/٢٨ Reconstructed Image 64 × 256
Transcription Layer
Recurrent Layers
Convolutional Layers
٢٠٢٥/٥/٢٨
Predicted Sequence
Per-frame Predictions (Distributions)
Bidirectional LSTM
Feature Sequence
Convolutional Feature Maps
٢٠٢٥/٥/٢٨
Input Image

The problem

Expiration dates printed on products in dotted-matrix Arabic are a worst case for OCR: the ink-dot font fragments each glyph, and Arabic’s cursive, context-dependent letterforms defeat recognizers trained on clean printed text. Read the date wrong and you misjudge whether a product is safe to sell or consume.

The approach

  1. 01

    Frame it as image-domain translation

    Instead of forcing a recognizer to read the noisy dotted image, we first translate it into a clean image domain — turning an OCR problem into a generative-reconstruction one.

  2. 02

    Ladder bottom-up convolutional bidirectional VAE (LCBVAE)

    A ladder-structured, bidirectional convolutional variational autoencoder learns the mapping from dotted Arabic dates to their clean, readable counterparts — reconstructing signal from noise.

  3. 03

    CRNN recognition on the reconstruction

    A convolutional-recurrent recognizer then reads the clean reconstructed dates, so recognition runs on a domain it was actually built for.

  4. 04

    Trained & evaluated on Arabic expiration dates

    The pipeline was trained and measured on real dotted Arabic expiration-date imagery, published and peer-reviewed.

The result

  • 97% domain-translation accuracy
  • Published Journal of Electronic Imaging · SPIE
  • VAE → CRNN generative reconstruction + recognition pipeline
  • Peer-reviewed co-authored research

This is research-grade generative modeling pointed at a stubborn real-world problem — and it’s the idea the whole portfolio is built around: decode a clean signal out of noise. The same move, from a paper to a product.

Next project Merchant AI assistant Back to portfolio