OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Gansketching

GANSketching is a Python research project that customizes pre-trained GANs from one or a few hand-drawn sketches, changing an object's shape and pose while preserving visual cues such as color, texture and background.

Independent OpenViST project profile, based on linked sources.

Gansketching — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Clone the GANSketching repository and change into its directory.

  2. Install PyTorch 1.6.0 or later and install the listed packages with pip install -r requirements.txt.

  3. Download the model weights by running bash weights/download_weights.sh.

  4. 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.
Evidence and transparency

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