Git Product home page Git Product logo

idempotent-generative-network's Introduction

Idempotent Generative Network

paper: Idempotent Generative Network, https://arxiv.org/abs/2311.01462

This is a simple unofficial implementation. We trained it on the Celeba dataset.

Usage

first, download the Celeba dataset and unzip it to the data folder.

then, install the requirements:

pip install -r requirements.txt

train

modify the parameters in config.yml as your needed and run:

python train.py

generate

model checkpoint with 1000 epoch training, download here.

These are the parameters of generate.py:

  • -cp: the path of checkpoint. default: ./checkpoints/model.pth
  • --config: the path of config file. default: ./config.yml
  • -bs: how many images to generate at once. default: 16
  • --nrow: how many images are displayed in a row, only valid when steps=1. default: 4
  • --steps: the times of applying model. default: 1
  • --show: whether to show the generated images. default: False
  • -sp: save path of the result image. default: None
  • --device: the device to use. default: cuda
  • --to_grayscale: whether to convert the generated images to grayscale. default: False

generate one step images:

python generate.py -cp "./checkpoints/model.pth" --config "./config.yml" -bs 128 --nrow 16 --show -sp "./result/one_step.png"

generate multi step images:

python generate.py -cp "./checkpoints/model.pth" --config "./config.yml" -bs 8 --steps 3 --show -sp "./result/three_steps.png"

idempotent-generative-network's People

Contributors

alokia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.