FW-GAN

FW-GAN is a frequency-aware, one-shot handwriting synthesis framework designed to produce realistic and writer-consistent handwritten text from a single reference public at Expert Systems with Applications Training code is released on GitHub.

FW-GAN: Frequency-Driven Handwriting Synthesis with Wave-Modulated MLP Generator
Huynh Tong Dang Khoa, Dang Hoai Nam, Vo Nguyen Le Duy

test

Installation

conda create --name fwgan python=3.10
conda activate fwgan
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu126
git clone https://github.com/DAIR-Group/FW-GAN.git && cd FW-GAN
pip install -r requirements.txt

We provide our pretrained model weights and datasets here. For training, please download the files the files train.hdf5 and test.hdf5 and place them into the data folder. For quick evaluation, you can also download the pretrained model FW-GAN.pth and place it under /data/weights/FW-GAN.pth on the code released on GitHub.

Training

python train.py --config ./configs/fw_gan_iam.yml

Generate Handwtitten Text Images

To generate all samples for FID evaluation you can use the following script:

python generate.py --config ./configs/fw_gan_iam.yml

Handwriting synthesis and reconstruction results on IAM dataset

test

test

Handwriting synthesis on HANDS-VNOnDB dataset

test

Implementation details

This work is partially based on the code released for HiGAN

Citation

If you find this work useful, please cite our paper:

@article{TONGDANGKHOA2026130175,
title = {FW-GAN: Frequency-driven handwriting synthesis with wave-modulated MLP generator},
journal = {Expert Systems with Applications},
volume = {299},
pages = {130175},
year = {2026},
issn = {0957-4174},
doi = {https://doi.org/10.1016/j.eswa.2025.130175},
url = {https://www.sciencedirect.com/science/article/pii/S095741742503790X},
author = {Huynh {Tong Dang Khoa} and Dang {Hoai Nam} and Vo {Nguyen Le Duy}},
keywords = {Handwritten text synthesis, Wavelet transform, One-shot learning, Vietnamese handwriting, Synthetic data, Generative adversarial networks},
}
Downloads last month
1
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support