Skip to content

Latest commit

 

History

History
77 lines (59 loc) · 3.79 KB

README.md

File metadata and controls

77 lines (59 loc) · 3.79 KB

Super-resolution of NREL Wind Integration National Dataset (WIND) Toolkit

Super-resolution of wind data using machine learning techniques. The repository contains an implementation of two methods:

Acknowledgements

The functions unet.py and sr3.py are adapted from the implementation at: https://github.com/TeaPearce/Conditional_Diffusion_MNIST.

The functions energy_spectrum.py, kinetic_energy_initial.py, and kinetic_energy_initial_with_post_normalization.py are adapted from the implementation at: https://github.com/RupaKurinchiVendhan/WiSoSuper/blob/main/energy.py

The SR3 algorithm was originally put forth by Saharia et al.:

[1] C. Saharia, J. Ho, W. Chan, T. Salimans, D. J. Fleet, and M. Norouzi, “Image Super-Resolution Via Iterative Refinement,” IEEE Trans. Pattern Anal. Mach. Intell., pp. 1–14, 2022, doi: 10.1109/TPAMI.2022.3204461.

Operating the Repository

First, construct a python environment and set up the directory using the "environment.yml" file. If the environment.yml file doesn't work, you need at least the following packages from various sources:

  • numpy
  • scipy
  • matplotlib
  • scikit-learn
  • scikit-image
  • pytorch
  • gdown
  • tqdm
  • p7zip

Next, run the bash script ''dataset.sh.'' This will download the NREL dataset as used by the WiSoSuper Resolution paper. NOTE: there is a lot of data here. If only intending to run testing and validation, the training dataset can be commented out and is unnecessary.

Descriptions of Functions

Models:

  • llr.py: implementation of the local regression models: ridge regression and random forest.
  • unet.py: implementation of the UNet architecture used for the SR3 regression and diffusion models.
  • sr3.py: main implementation of the SR3 regression and diffusion models.
  • diffusion_noise_conditioned.py: alternative implementation of the diffusion model, conditioned on noise rather than timesteps.
  • Trained models are available in the ''models' folder.

Functions:

  • util.py: contains useful functions for the other functions, including bicubic interpolation.
  • exp.py: functions to carry out main experiments in the code.
  • metrics.py: stores the implementations of most metrics.
  • visualization.py: contains functions to plot example data samples or results.
  • energy_spectrum.py: implementation of the kinetic energy spectrum analysis, used to create Fig. 3 in our report.
  • energy_spectrum_postprocess.py: used to post-process the energy_spectrum.py saved data if wanting to plot after the analysis.
  • cosine_similarity.py: implementation of the cosine similarity metrics and analysis, used to create Fig. 4 in our report.

Sample Outputs

title title title title title title title title title title title title title title title title title title title title