Giter Club home page Giter Club logo

daylight-gan's Introduction

ย 

DaylightGAN

Real-time daylight prediction pipeline, using Rhinoceros 3D, Grasshopper 3D, Ladybug Tools and pyTorch

Downloading the Daylight Autonomy (DA) dataset

If you wish to train your own model on the DA dataset, you can download the files from this location: https://drive.google.com/open?id=1_ND3DuOmRmeSiFpVpRmvooqeJtneHxwn. Extract the files in cycleGAN/datasets folder.

Pretrained model

You can download the Daylight Autonomy (DA) pretrained model from this location: https://drive.google.com/open?id=1_ND3DuOmRmeSiFpVpRmvooqeJtneHxwn. Extract the files into cycleGAN/checkpoints folder.

Training your own model on the DA dataset

After extracting the dataset you can train your own model by running:

python train.py --dataroot ./datasets/da --name p2p_512 --checkpoints_dir ./checkpoints/da --model pix2pix --batch_size 4 --norm instance --init_type kaiming --dataset aligned --direction AtoB --load_size 512 --crop_size 512 --no_flip --display_winsize 512 --gan_mode lsgan --lr_policy linear --netG unet_512 --netD n_layers --n_layers_D 4

This will train a pix2pix model on 512x512 input heightmaps, using a batch size of 4. Feel free to reduce either the batch size or the input image resolution if your GPU memory isn't enough.

Training your own model on a custom dataset

To train your own model you need to generate 3d geometry models using a parametric design of your choice (you can use the ParametricModel.gh file as a starting point). You will also need to run annual daylight simulations for each model, using the process detailed in the xxx.ipynb file. Finally, you can generate your input and output images using the PostProcess.gh file.

After you have all your images, you can use a paired image dataset using the xxx.ipynb file. Make sure to save the folders in cycleGAN/datasets under the name of your choosing, e.g. cycleGAN/datasets/yourNameHere.

To train a 512x512 pix2pix model you can run the following command:

python train.py --dataroot ./datasets/yourNameHere --name p2p_512 --checkpoints_dir ./checkpoints/yourNameHere --model pix2pix --batch_size 4 --norm instance --init_type kaiming --dataset aligned --direction AtoB --load_size 512 --crop_size 512 --no_flip --display_winsize 512 --gan_mode lsgan --lr_policy linear --netG unet_512 --netD n_layers --n_layers_D 4

Again feel free to use a lower resolution or a smaller batch size to fit the model on your GPU.

daylight-gan's People

Contributors

theodoregalanos avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.