Git Product home page Git Product logo

lofgan-pytorch's Introduction

LoFGAN-pytorch

The official pytorch implementation of our paper LoFGAN: Fusing Local Representations for Few-shot Image Generation, ICCV 2021.

framework

LoFGAN: Fusing Local Representations for Few-shot Image Generation

Zheng Gu, Wenbin Li, Jing Huo, Lei Wang, and Yang Gao

Paper

Prerequisites

  • Pytorch 1.5

Preparing Dataset

Download the datasets and unzip them in datasets folder.

Training

python train.py --conf configs/flower_lofgan.yaml \
--output_dir results/flower_lofgan \
--gpu 0
  • You may also customize the parameters in configs.
  • It takes about 30 hours to train the network on a V100 GPU.

Testing

python test.py --name results/flower_lofgan --gpu 0

The generated images will be saved in results/flower_lofgan/test.

Evaluation

python main_metric.py --gpu 0 --dataset flower \
--name results/flower_lofgan \
--real_dir datasets/for_fid/flower --ckpt gen_00100000.pt \
--fake_dir test_for_fid

Citation

If you use this code for your research, please cite our paper.

@inproceedings{gu2021lofgan,
title={LoFGAN: Fusing Local Representations for Few-Shot Image Generation},
author={Gu, Zheng and Li, Wenbin and Huo, Jing and Wang, Lei and Gao, Yang},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
pages={8463--8471},
year={2021}
}

Acknowledgement

Our code is designed based on FUNIT.

The code for calculate FID is based on pytorch-fid

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.