Practical overview
When it fits
Use GANSketching when you want to investigate sketch-driven changes to the geometry of GAN-generated objects while retaining other visual cues, or to generate samples from its provided customized checkpoints.
Who it is for
- Researchers exploring sketch-guided GAN customization.
- Developers studying or building image-generation workflows that alter object shape and pose.
Documented uses
- Customize a pre-trained GAN to match one or a few hand-drawn sketches.
- Generate samples from supplied sketch-customized cat or face models.
- Apply latent-space edits to customized models using GANSpace.
Requirements & limits
The public GitHub repository lists an MIT license and identifies Linux as a platform. The documented workflow runs locally with Python and PyTorch.
- The documented setup requires PyTorch 1.6.0 or later, additional packages and downloaded model weights.
- The README demonstrates sample generation from supplied checkpoints and latent edits through GANSpace.
- The authors report difficulty matching a complex cat pose and a horse sketch drawn in a distinctive style.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Generate samples from a customized GAN checkpoint
Set up the repository and generate samples using one of its documented customized model weights.
Before you start
- Linux
- Python
- PyTorch version 1.6.0 or later
- Packages in requirements.txt
- Downloaded GANSketching model weights
Steps
Clone the GANSketching repository and change into its directory.
Install PyTorch 1.6.0 or later and install the listed packages with pip install -r requirements.txt.
Download the model weights by running bash weights/download_weights.sh.
Run generate.py with a documented checkpoint and a save directory, such as weights/photosketch_standing_cat_noaug.pth and output/samples_standing_cat.
Expected outcome
The script generates samples from the selected customized model in the specified save directory.
Guide limitations
- The documented examples use supplied customized checkpoints; this workflow does not cover training a new model from sketches.
- The README lists multiple sample models, including cat and face checkpoints.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- PeterWang512/GANSketching · Official homepage title · retained in its source language

