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

Glcic Pytorch

Glcic Pytorch is a public Python repository implementing Globally and Locally Consistent Image Completion (GLCIC) in PyTorch. Its GAN-based model fills missing image regions, and the repository provides inference code, pretrained generator weights and training workflows.

Independent OpenViST project profile, based on linked sources.

Glcic Pytorch — Command-line inference with the supplied pretrained generator and configuration
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you need code for experimenting with GLCIC image completion, rather than a hosted image-editing service.

Who it is for

  • Developers exploring image inpainting or adapting region-filling functionality into an image workflow.
  • Machine-learning practitioners who want to run the provided inference demo or train the model on CelebA or a custom image dataset.

Documented uses

  • Generate an inpainted image from a masked input using pretrained generator weights.
  • Train the model using the documented CelebA dataset workflow.
  • Prepare a custom dataset with training and test folders and start training.
Before you choose

Requirements & limits

The repository is public and specifies an MIT license.

  • Inference requires the pretrained completion-network generator and configuration; the discriminator is optional for inference and needed only during training.
  • The stated tested environment uses Python 3.7.6, PyTorch 1.9.0 and torchvision 0.10.0 with CUDA 11.1, plus tqdm, Pillow, OpenCV and NumPy.
  • Custom training requires separate train and test folders containing JPG or PNG images.

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

Run inference with the pretrained generator

Use the documented demo workflow to create an inpainted image from a masked input.

Before you start

  • Python and the repository’s listed dependencies; its documented environment is Python 3.7.6, PyTorch 1.9.0 and torchvision 0.10.0 with CUDA 11.1.
  • The pretrained completion-network generator weights and training configuration file.
  • An input image.

Steps

  1. Install the repository requirements using the README’s pip command.

  2. Download the required pretrained generator model and configuration file.

  3. From the repository directory, run the command below, substituting paths for the model, configuration, input and output.

    Documented command
    python predict.py model_cn config.json images/test_2.jpg test_2_out.jpg

Expected outcome

The script writes an inpainted output image; the README illustrates raw, masked and completed image stages.

Guide limitations

  • The pretrained discriminator is not required for inference; it is used during training.
  • The documented pretrained models were trained on CelebA.
Source-based practical guide

Prepare and train on a custom image dataset

Set up the documented input folder structure and start model training on a custom dataset.

Before you start

  • The repository and its listed Python dependencies.
  • A dataset containing separate train and test folders with JPG or PNG images.

Steps

  1. Arrange the dataset as dataset/train/ and dataset/test/.

  2. Place the dataset folder under the repository’s datasets/ directory.

  3. Run the command below from the repository directory, adjusting the dataset and results paths.

    Documented command
    python train.py datasets/dataset/ results/result/

Expected outcome

Training is started using the custom dataset, with results directed to the specified results folder.

Guide limitations

  • The README documents the folder layout and training command, but not a custom-dataset inference recipe in the available instructions.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
20 November 2026
Original website title
otenim/GLCIC-PyTorch · Official homepage title · retained in its source language