Coder Social home page Coder Social logo

fishgan's Introduction

fishGAN - StyleGAN2 Applied to Fish

Check out my results at This Fish Does Not Exist.

This repo contains files used to scrape 60k images of fish from online and use them to train the StyleGAN neural network to generate images of realistic-looking fish.

Relies on stylegan2-pytorch and lightweight-stylegan2 for the actual StyleGAN2 model architecture.

Running yourself

Collecting data

  1. Create conda environment fish_env
conda create -f environment.yml
  1. Run Python script get_fish_pics.py. You can modify the script to decreaes the amount of images it saves/processes. The full script took several hours to run on a SLURM cluster.
python3 get_fish_pics.py
  1. The raw fish images will be stored at fish_pics/ and the resized (square, zero-padded) images will be in resized_fish_pics/.

Running models

See the section Deploying on AWS in the StyleGAN2 implementation to see how to run the models on AWS.

Results

See the best results at This Fish Does Not Exist. Below are some more!

"Lightweight" StyleGAN2 after 150k iterations (128x128)

Lightweight 128x128

StyleGAN2 after 131k iterations (128x128)

StyleGAN2 128x128

StyleGAN2 after 48k iterations (256x256)

StyleGAN2 256x256

These are the images shown at thisfishdoesnotexist.net.

Website setup

  1. Deploy flask app to AWS EC2
  2. Set up a hosted zone for the domain name and create a record pointing to EC2 IPv4
  3. Create a virtualenv on EC2 instance at ~/fishGAN/venv and install flask. Use command: virtualenv venv.
  4. Enable WSGI server on AWS EC2. Note: instead of sudo apt-get install libapache2-mod-wsgi, use sudo apt-get install libapache2-mod-wsgi-py3.

fishgan's People

Contributors

callanhoskins avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.