Downloads · 30 days
13
24% of all-time downloads
DAIR-Group/FW_GAN
FW_GAN is a machine learning model from DAIR-Group. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
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 co…
Downloads · 30 days
13
24% of all-time downloads
All-time downloads
55
Public
Repo size
416 MB
Likes
3
Public
Click a slice to open those files.
.h5149 MB · 36%
From the Hugging Face model README
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

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.
python train.py --config ./configs/fw_gan_iam.yml
To generate all samples for FID evaluation you can use the following script:
python generate.py --config ./configs/fw_gan_iam.yml



This work is partially based on the code released for HiGAN
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},
}