All Projects → t04glovern → Aws S3 Cat Images

t04glovern / Aws S3 Cat Images

Generating Cat images using StyleGAN

Labels

Projects that are alternatives of or similar to Aws S3 Cat Images

Lightning Bolts
Toolbox of models, callbacks, and datasets for AI/ML researchers.
Stars: ✭ 829 (+949.37%)
Mutual labels:  ai, gan
Gans In Action
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Stars: ✭ 748 (+846.84%)
Mutual labels:  ai, gan
Man
Multinomial Adversarial Networks for Multi-Domain Text Classification (NAACL 2018)
Stars: ✭ 72 (-8.86%)
Mutual labels:  gan
Dann
Deep Neural Network Sandbox for JavaScript.
Stars: ✭ 75 (-5.06%)
Mutual labels:  ai
Pytorch Pix2pix
Pytorch implementation of pix2pix for various datasets.
Stars: ✭ 74 (-6.33%)
Mutual labels:  gan
Imagedeblurring
A Keras implementation of image deblurring based on ICCV 2017 paper "Deep Generative Filter for motion deblurring"
Stars: ✭ 72 (-8.86%)
Mutual labels:  gan
Caffe2
Caffe2 is a lightweight, modular, and scalable deep learning framework.
Stars: ✭ 8,409 (+10544.3%)
Mutual labels:  ai
Geneva
Code to train and evaluate the GeNeVA-GAN model for the GeNeVA task proposed in our ICCV 2019 paper "Tell, Draw, and Repeat: Generating and modifying images based on continual linguistic instruction"
Stars: ✭ 71 (-10.13%)
Mutual labels:  gan
Semantic Object Accuracy For Generative Text To Image Synthesis
Code for "Semantic Object Accuracy for Generative Text-to-Image Synthesis" (TPAMI 2020)
Stars: ✭ 78 (-1.27%)
Mutual labels:  gan
Quicknat pytorch
PyTorch Implementation of QuickNAT and Bayesian QuickNAT, a fast brain MRI segmentation framework with segmentation Quality control using structure-wise uncertainty
Stars: ✭ 74 (-6.33%)
Mutual labels:  ai
Pytorch Book
PyTorch tutorials and fun projects including neural talk, neural style, poem writing, anime generation (《深度学习框架PyTorch:入门与实战》)
Stars: ✭ 9,546 (+11983.54%)
Mutual labels:  gan
Gan Vis
Visualization of GAN training process
Stars: ✭ 74 (-6.33%)
Mutual labels:  gan
Botwiki.org
Tutorials, articles, datasets and other resources for creating useful, interesting, artistic and friendly online bots.
Stars: ✭ 72 (-8.86%)
Mutual labels:  ai
Mlflow
Open source platform for the machine learning lifecycle
Stars: ✭ 10,898 (+13694.94%)
Mutual labels:  ai
Pytorch Fid
Compute FID scores with PyTorch.
Stars: ✭ 1,175 (+1387.34%)
Mutual labels:  gan
Artediting
Modeling Artistic Workflows for Image Generation and Editing (ECCV 2020)
Stars: ✭ 75 (-5.06%)
Mutual labels:  gan
Darwin
Evolutionary Algorithms Framework
Stars: ✭ 72 (-8.86%)
Mutual labels:  ai
Mage
Magic Another Game Engine
Stars: ✭ 1,180 (+1393.67%)
Mutual labels:  ai
Cycle Gan Tf
Reimplementation of cycle-gan(https://arxiv.org/pdf/1703.10593.pdf) with improved w-gan(https://arxiv.org/abs/1704.00028) loss in tensorflow.
Stars: ✭ 74 (-6.33%)
Mutual labels:  gan
Tensorflowexample
Tensorflow实例
Stars: ✭ 78 (-1.27%)
Mutual labels:  ai

These Cats Don't Exist

Generating Cat images using StyleGAN on AWS SageMaker. Developing a simple and repeatable Data Science pipeline for Generative Adversarial Network outputs

img/catgen

Website

Create Bucket

aws s3 mb s3://thesecatsdonotexist.com

Copy in Files

aws s3 cp index.html s3://thesecatsdonotexist.com/index.html

Generate the Cats

jupyter-notebook notebooks/catgen.ipynb

StyleGAN Model Copy

Obtain the cat gen model from the original repository (or you can get it from my s3 bucket https://s3.amazonaws.com/devopstar/resources/aws-catgen/models/karras2019stylegan-cats-256x256.pkl

aws s3 mb s3://devopstar
aws s3 cp model/karras2019stylegan-cats-256x256.pkl s3://resources/aws-catgen/models/karras2019stylegan-cats-256x256.pkl

AWS SageMaker Generate

WARNING: You will be paying > $2 per hour running this notebook. Ensure you delete it or turn it off when you aren't using it.

Create the SageMaker role that we'll attach to our SageMaker instance. Unfortunately since CloudFormation options for SageMaker do not allow us to attach Git repos as options yet.

aws cloudformation create-stack \
    --stack-name "cat-gen-sagemaker-role" \
    --template-body file://cloudformation/sagemaker_role.yaml \
    --parameters ParameterKey=S3BucketName,ParameterValue="devopstar" \
    --capabilities CAPABILITY_IAM

Once the role has been created successfully, retrieve the ARN for the use in the steps to follow.

aws cloudformation describe-stacks --stack-name "cat-gen-sagemaker-role" \
    --query 'Stacks[0].Outputs[?OutputKey==`MLNotebookExecutionRole`].OutputValue' \
    --output text

It will look something like arn:aws:iam::XXXXXXXXXXXX:role/cat-gen-sagemaker-role-ExecutionRole-PZL3SA3IZPSN.

Next create a Code repository and pass it in the repo https://github.com/t04glovern/stylegan

aws sagemaker create-code-repository \
    --code-repository-name "t04glover-stylegan" \
    --git-config '{"Branch":"master", "RepositoryUrl" : "https://github.com/t04glovern/stylegan" }'

Finally create the notebook instance ensuring you pass in the Role ARN from before, and the default code repository we just created.

aws sagemaker create-notebook-instance \
    --notebook-instance-name "cat-gen" \
    --instance-type "ml.p2.xlarge" \
    --role-arn "arn:aws:iam::XXXXXXXXXXXXX:role/cat-gen-sagemaker-role-ExecutionRole-PZL3SA3IZPSN" \
    --default-code-repository "t04glover-stylegan"

Once completed, open in JupyterLab

Setup 01

You should be presented with the StyleGAN repository that we set as the default when creating the repository. Open the catgen notebook

Setup 02

Select the kernel to use, in our case its conda_tensorflow_p36

Setup 03

Begin to execute the notebook using the controls at the top of the notebook, you might run into some issues when bringing in the role; I've found this to be a benign issue through.

Error 01

Finally after loading in the Pickle, we generate cats by running the last section over and over again.

Setup 04

Removing Resources

Due to costs being really high, we need to destory the resources when we aren't using them. Start by shutting down the notebook (you can also delete it if you want)

UI

Delete 01

Delete 02

CLI

aws sagemaker delete-notebook-instance \
    --notebook-instance-name "cat-gen"

aws sagemaker delete-code-repository \
    --code-repository-name "t04glover-stylegan"

aws cloudformation delete-stack \
    --stack-name "cat-gen-sagemaker-role"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].