pytorch-pretrained-BigGAN  by huggingface

PyTorch reimplementation for DeepMind's BigGAN model

created 6 years ago
1,038 stars

Top 36.8% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a PyTorch implementation of DeepMind's BigGAN, offering pre-trained weights for generating high-fidelity images at 128x128, 256x256, and 512x512 resolutions. It's designed for researchers and developers looking to leverage state-of-the-art GANs for image synthesis tasks.

How It Works

The implementation is an op-for-op reimplementation of the original TensorFlow BigGAN, ensuring behavioral similarity. It focuses on the generator component, utilizing conditional batch normalization and pre-computed batch norm statistics for various truncation values to control image fidelity and diversity. The approach allows for direct loading of DeepMind's pre-trained weights, simplifying integration.

Quick Start & Requirements

  • Install via pip: pip install pytorch-pretrained-biggan
  • For conversion scripts and ImageNet utilities, install with full requirements: git clone https://github.com/huggingface/pytorch-pretrained-BigGAN.git && cd pytorch-pretrained-BigGAN && pip install -r full_requirements.txt
  • Requires Python 3.6+ and PyTorch 1.0.1+. Full requirements include TensorFlow and NLTK.
  • Official Docs: https://github.com/huggingface/pytorch-pretrained-BigGAN

Highlighted Details

  • Offers pre-trained BigGAN-deep models for 128x128 (50.4M params), 256x256 (55.9M params), and 512x512 (56.2M params) resolutions.
  • Includes utilities for generating truncated noise samples, converting outputs to images, saving images, and displaying them in compatible terminals.
  • Supports generating images from class names using NLTK for synset lookup.
  • Provides scripts for downloading and converting TensorFlow Hub models.

Maintenance & Community

This project is part of the Hugging Face ecosystem. Further community engagement and roadmap information can typically be found on the main Hugging Face GitHub repository or associated platforms.

Licensing & Compatibility

The repository's license is not explicitly stated in the provided README. Users should verify licensing terms for commercial use or integration into closed-source projects.

Limitations & Caveats

The discriminator component is not implemented due to the unavailability of pre-trained weights. The display_in_terminal utility requires a libsixel-compatible terminal.

Health Check
Last commit

4 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Jiayi Pan Jiayi Pan(Author of SWE-Gym; AI Researcher at UC Berkeley), and
4 more.

taming-transformers by CompVis

0.1%
6k
Image synthesis research paper using transformers
created 4 years ago
updated 1 year ago
Feedback? Help us improve.