Skip to content

wonderit/maxwellfdfd-controlgan

Repository files navigation

Data download

  1. Download Data
  • download by link

    download and unzip under folder named 'data'

    data.zip

  • download by shell

wget https://drive.google.com/uc?id=1Gs9Per_unwdmlXufDxmYEgLAve0ep8Xx -O data.zip
unzip -d data data.zip

Conda Setting

curl -O https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
sha256sum Anaconda3-2019.10-Linux-x86_64.sh
bash Anaconda3-2019.10-Linux-x86_64.sh

conda create -n maxwellfdfd-controlgan python=3.10
conda activate maxwellfdfd-controlgan
pip install -r requirements.txt

Run script

  • Train

    • wgan
    python wgan.py 
    • conditional gan (cgan)
    python cgan.py
    • controllable gan (controlgan)
    python controlgan.py
    • simulator loss (simgan)
    # train simulator model    
    python train_cnn_torch.ipynb
    # train gan
    python train_simGAN.py
  • Test

    python result_test.py 
  • Sample image to percent match, truth csv

    python result_box_plot.py -fn ./logs/wgan

To generate the data please visit the following GitHub URL :

https://github.com/wonderit/maxwellfdfd

Reference

About

Inverse design of nanophotonic devices using generative adversarial networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published