← all repositories
dailenson/One-DM

Teach a diffusion model your handwriting using just one sample

It lets you forge anyone’s handwriting from a single photograph, generating arbitrary text in that exact style.

One-DM
Not currently ranked — collecting fresh signals.
star history

What it does

One-DM is a latent-diffusion model that imitates a person’s handwriting from a single reference image and renders new text in that same style. The authors report results on English, Chinese, and Japanese datasets and claim the model outperforms prior approaches even when they are given fifteen times more style samples. The repository provides pretrained weights, training scripts, and links to English handwriting datasets.

The interesting bit

Instead of learning style from raw pixels alone, the model extracts high-frequency components from the reference sample to isolate actual pen-stroke patterns and suppress background noise. It is a neat signal-processing trick wedged inside a diffusion pipeline to solve the one-shot style-extraction problem.

Key highlights

  • Needs only one reference image to capture a handwriting style, whereas previous methods required many samples.
  • Uses high-frequency style enhancement to filter out background noise and focus on stroke patterns.
  • Reportedly beats prior state-of-the-art methods that use 15× more reference samples on English, Chinese, and Japanese datasets.
  • ECCV 2024 official implementation with pretrained checkpoints and training/finetuning scripts included.
  • Released under an MIT license.

Caveats

  • Getting started requires downloading three separate pretrained checkpoints (diffusion model, OCR VAE, and ResNet18) plus datasets from cloud drives; the README warns that access to the Hugging Face-hosted VAE can be spotty.
  • The release notes state the initial open-source version targets English word generation, with Chinese and Japanese support promised for later updates, though exhibition images already show results for both.

Verdict

Handwriting researchers and generative-vision tinkerers who want personalized text generation with minimal user data should look here. If you are after a turnkey API or a general-purpose diffusion wrapper, this is not it.

Frequently asked

What is dailenson/One-DM?
It lets you forge anyone’s handwriting from a single photograph, generating arbitrary text in that exact style.
Is One-DM open source?
Yes — dailenson/One-DM is open source, released under the MIT license.
What language is One-DM written in?
dailenson/One-DM is primarily written in Python.
How popular is One-DM?
dailenson/One-DM has 559 stars on GitHub.
Where can I find One-DM?
dailenson/One-DM is on GitHub at https://github.com/dailenson/One-DM.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.