Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    ValueError
Message:      Dataset 'imgs' has length 32 but expected 66603
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 478, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/hdf5/hdf5.py", line 80, in _generate_tables
                  num_rows = _check_dataset_lengths(h5, self.info.features)
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/hdf5/hdf5.py", line 359, in _check_dataset_lengths
                  raise ValueError(f"Dataset '{path}' has length {dset.shape[0]} but expected {num_rows}")
              ValueError: Dataset 'imgs' has length 32 but expected 66603

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

SpiS-GAN: Spiral-Modulated Handwriting Synthesis with Star Operation

SpiS-GAN is a GAN-based handwriting synthesis framework designed to generate realistic, legible, and writer-consistent handwriting for improving downstream handwritten text recognition (HTR) systems.

Introduction

This repository contains the reference code and dataset for the paper:

SpiS-GAN: Spiral-Modulated Handwriting Synthesis with Star Operation

Nguyen Duy Hieu, Dang Hoai Nam, Pham Hoang Giap, Quang Huu Hieu, Vo Nguyen Le Duy


Hugging Face Models Hugging Face Datasets GitHub Repo License MIT arXiv

Overview

Overview of SpiS-GAN

Installation

Create a Python environment and install PyTorch for your CUDA version first. Then install the remaining dependencies:

# Install torch/torchvision following the official PyTorch command for your system.
# Example: https://pytorch.org/get-started/locally/
pip install -r requirements.txt

Code

We released in on GitHub : https://github.com/DAIR-Group/SpiS-GAN

Current release status:

Resource Status
32px datasets/checkpoints Available
64px datasets/checkpoints To be updated

Data Preparation

The dataset loader expects HDF5 files under ./data/. Current path settings are defined in lib/path_config.py.

Expected files:

data/
|-- train_32.hdf5         # IAM train/validation split
|-- test_32.hdf5          # IAM test split
|-- train_vn.h5           # Vietnamese train/validation split
|-- test_vn.h5            # Vietnamese test split
|-- english_words.txt     # English lexicon
`-- vietnamese_words.txt  # Vietnamese lexicon

Training

Train on English handwriting data:

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

Train on Vietnamese handwriting data:

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

64px configurations are also available:

python train.py --config configs/SpiS_gan_iam_64.yml
python train.py --config configs/SpiS_gan_vn_64.yml

The 64px configuration files are included for reproducibility and future use. The public 64px datasets/checkpoints will be updated later.

Training outputs are written to runs/<config-name>-<timestamp>/, including generated samples and checkpoints according to each YAML configuration.

Generation

Generate handwriting samples from a config file:

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

Use random lexicon sampling:

python generate.py --config configs/SpiS_gan_vn_32.yml --random_lexicon

Set the ckpt field in the YAML config to the trained checkpoint path before running generation.

Configuration

Main configuration files:

Config Dataset Resolution
configs/SpiS_gan_iam_32.yml IAM English handwriting 32px
configs/SpiS_gan_iam_64.yml IAM English handwriting 64px
configs/SpiS_gan_vn_32.yml Vietnamese handwriting 32px
configs/SpiS_gan_vn_64.yml Vietnamese handwriting 64px

Handwriting synthesis and reconstruction results on IAM dataset

English handwriting generation results

English handwriting reconstruction results

Handwriting synthesis results on HANDS-VNOnDB dataset

Vietnamese handwriting generation results

Repository Structure

.
|-- configs/              # Training and generation configs for IAM and Vietnamese data
|-- docs/               # README figures and result images
|-- data/                 # Lexicons and expected dataset/checkpoint location
|-- fid_kid/              # FID/KID evaluation utilities
|-- font/                 # Font assets used by the pipeline
|-- lib/                  # Dataset, alphabet, path, and utility code
|-- networks/             # Generator, discriminator, recognizer, and model modules
|-- generate.py           # Generate handwriting samples from a trained checkpoint
|-- train.py              # Train SpiS-GAN from a config file
`-- README.md

Citation

If you use this repository, please cite:

@misc{hieu2026spisganspiralmodulatedhandwritingsynthesis,
  title         = {SpiS-GAN: Spiral-Modulated Handwriting Synthesis with Star Operation},
  author        = {Nguyen Duy Hieu and Dang Hoai Nam and Pham Hoang Giap and Quang Huu Hieu and Vo Nguyen Le Duy},
  year          = {2026},
  eprint        = {2607.06949},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2607.06949}
}
Downloads last month
131

Models trained or fine-tuned on DuyHieu63/SpiS_GAN

Paper for DuyHieu63/SpiS_GAN