Giter Site home page Giter Site logo

large's Introduction

LARGE: Latent-Based Regression through GAN Semantics

Open In Colab

LARGE: Latent-Based Regression through GAN Semantics

Yotam Nitzan*, Rinon Gal*, Ofir Brenner, and Daniel Cohen-Or

Abstract: We propose a novel method for solving regression tasks using few-shot or weak supervision. At the core of our method is the fundamental observation that GANs are incredibly successful at encoding semantic information within their latent space, even in a completely unsupervised setting. For modern generative frameworks, this semantic encoding manifests as smooth, linear directions which affect image attributes in a disentangled manner. These directions have been widely used in GAN-based image editing. We show that such directions are not only linear, but that the magnitude of change induced on the respective attribute is approximately linear with respect to the distance traveled along them. By leveraging this observation, our method turns a pre-trained GAN into a regression model, using as few as two labeled samples. This enables solving regression tasks on datasets and attributes which are difficult to produce quality supervision for. Additionally, we show that the same latent-distances can be used to sort collections of images by the strength of given attributes, even in the absence of explicit supervision. Extensive experimental evaluations demonstrate that our method can be applied across a wide range of domains, leverage multiple latent direction discovery frameworks, and achieve state-of-the-art results in few-shot and low-supervision settings, even when compared to methods designed to tackle a single task.

Sorting Examples

Black to Blond hair

Age

Fur Fluffiness

Sickness

Credits

StyleGAN2 implementation:
https://github.com/rosinality/stylegan2-pytorch
Copyright (c) 2019 Kim Seonghyeon
License (MIT) https://github.com/rosinality/stylegan2-pytorch/blob/master/LICENSE

StyleGAN2 Models: https://github.com/NVlabs/stylegan2-ada/ https://github.com/NVlabs/stylegan2 Copyright (c) 2021, NVIDIA Corporation Nvidia Source Code License-NC

pSp model and implementation:
https://github.com/eladrich/pixel2style2pixel
Copyright (c) 2020 Elad Richardson, Yuval Alaluf
License (MIT) https://github.com/eladrich/pixel2style2pixel/blob/master/LICENSE

e4e model and implementation:
https://github.com/omertov/encoder4editing Copyright (c) 2021 omertov
License (MIT) https://github.com/omertov/encoder4editing/blob/main/LICENSE

ReStyle model and implementation:
https://github.com/yuval-alaluf/restyle-encoder/ Copyright (c) 2021 Yuval Alaluf
License (MIT) https://github.com/yuval-alaluf/restyle-encoder/blob/main/LICENSE

Acknowledgement

We would like to thank Raja Gyres, Yangyan Li, Or Patashnik, Yuval Alaluf, Amit Attia, Noga Bar and Zonzge Wu for helpful comments. We additionaly thank Zonzge Wu for the trained e4e models for AFHQ cats and dogs.

Citation

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

@misc{nitzan2021large,
      title={LARGE: Latent-Based Regression through GAN Semantics}, 
      author={Yotam Nitzan and Rinon Gal and Ofir Brenner and Daniel Cohen-Or},
      year={2021},
      eprint={2107.11186},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

large's People

Contributors

yotamnitzan avatar rinongal avatar

Stargazers

 avatar  avatar Jose C. Rubio avatar  avatar  avatar  avatar  avatar  avatar  avatar Zihao Zhang avatar cai avatar Eungbean Lee avatar Joonsu Oh avatar Kuma avatar Jacob A Rose avatar Jerone Andrews avatar Wenzhen  avatar berkayk-flwls avatar  avatar  avatar JiahuiZhan avatar Cengizhan Yurdakul avatar AdaTian avatar  avatar  avatar  avatar Yuxiang Wei avatar  avatar Aditya Grover avatar  avatar Lizhen Wang avatar Edward Seo avatar Nilesh Pandey avatar  avatar Alex Martinelli avatar Peterou avatar Young-Mook Kang avatar Alejandro Gonzales avatar Joshua Levy avatar Jose Cohenca avatar  avatar Jordan Parker avatar Terence Broad avatar Nikita avatar  avatar Doron Adler avatar Romell D.Z. 福笛 avatar Roger GOU avatar Arindam Das avatar Aung Aung Phyo Wai avatar Aaron Hosford avatar Junho Kim avatar  avatar Abdul Hannan avatar Víctor Pérez avatar David Beniaguev avatar J.Liu avatar Chenhui Zhang avatar Gaurav avatar Pankaj Kumar avatar Subin An avatar Theodore Galanos avatar Rishabh Anand avatar Kwon Ko avatar Peter Baylies avatar  avatar Chaofeng Chen avatar  avatar Eugenio Herrera-Berg avatar Shyam Sudhakaran avatar David avatar Miguel Xochicale, PhD avatar Walter Hugo Lopez Pinaya avatar Udon avatar Future Infinity avatar  avatar  avatar Jichao Zhang avatar  avatar Sayantan Das avatar 爱可可-爱生活 avatar aydao avatar  avatar  avatar  avatar Jie Yang avatar  avatar TED Vortex (Teodor-Eugen Duțulescu) avatar  avatar  avatar  avatar

Watchers

James Cloos avatar Miguel Xochicale, PhD avatar  avatar  avatar aydao avatar

large's Issues

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.