OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Apdrawinggan

Apdrawinggan is a self-hosted Python and PyTorch implementation of a hierarchical GAN that generates artistic portrait drawings from face photographs.

Independent OpenViST project profile, based on linked sources.

Apdrawinggan — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use the repository when you need a locally run portrait-drawing model and can meet its documented Python, PyTorch, and image-preprocessing requirements.

Who it is for

  • Developers building photo-to-portrait-drawing workflows.
  • Researchers or practitioners who want to test or train the documented GAN implementation.

Documented uses

  • Generate portrait drawings from example face photos using a pretrained checkpoint.
  • Prepare personal photos for inference by aligning them and supplying facial landmarks and background masks.
  • Train or test the model using the project’s dataset and checkpoint workflow.
Before you choose

Requirements & limits

  • The documented environment specifies Python 2.7 and Linux or macOS.
  • Personal-photo inference requires aligned images, facial landmarks, and background masks.
  • The repository includes separate instructions for pretrained-model testing and model training.

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 drawings with the pretrained model

Run the documented pretrained checkpoint on example photos and save the results locally.

Before you start

  • Linux or macOS, Python 2.7, and a CPU or NVIDIA GPU with CUDA and cuDNN.
  • PyTorch 0.4 or newer, torchvision, and the project’s additional dependencies.
  • The Model1 pretrained checkpoint, placed in checkpoints/formal_author.

Steps

  1. Install the dependencies using the repository’s requirements file.

  2. Download Model1 and place it in checkpoints/formal_author.

  3. Run the documented test.py command with dataset/data/test_single as the input directory.

Expected outcome

Generated test results are saved in ./results/formal_author/test_300/index.html.

Guide limitations

  • The example command uses the repository’s example photos.
  • For personal photos, first align the images and prepare facial landmarks and background masks using the preprocessing tutorial.
Source-based practical guide

Prepare and train a model

Follow the repository’s documented setup for training APDrawingGAN on its dataset.

Before you start

  • Linux or macOS, Python 2.7, and a CPU or NVIDIA GPU with CUDA and cuDNN.
  • The APDrawing dataset and the Model2 pretrained and auxiliary network files.
  • PyTorch 0.4 or newer, torchvision, project dependencies, and Visdom.

Steps

  1. Download the APDrawing dataset and place its contents in the dataset folder.

  2. Download Model2 and put the pretrained and auxiliary files in the checkpoint directories described by the repository.

  3. Start the Visdom server with python -m visdom.server.

  4. Run the documented train.py command, choosing the initialized or no-initialization path.

Expected outcome

The documented training workflow produces model checkpoints and provides Visdom views of training results and loss plots.

Guide limitations

  • The repository describes separate checkpoint placement requirements for initialized and no-initialization training.
  • Training options and testing guidance are covered in the repository’s linked tips.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
yiranran/APDrawingGAN · Official homepage title · retained in its source language

Related options

APDrawingGAN-Jittor — A Jittor implementation linked from the APDrawingGAN repository; the featured project implementation uses PyTorch.