Giter VIP home page Giter VIP logo

phasegan's Introduction

PhaseGAN: A deep-learning phase-retrieval approach for unpaired datasets

PhaseGAN is a deep-learning phase-retrieval approach allowing the use of unpaired datasets and includes the physics of image formation. For more detailed information about PhaseGAN training and performance, please refer to the PhaseGAN paper.

Colab Notebook

PhaseGAN Tutorial Google Colab | Code

Getting Started

Prerequisites

  • Linux (not tested for MacOS or Windows)
  • Python3
  • NVIDIA GPU (not tested for CPU)

Installation

Clone this repo:

git clone https://github.com/pvilla/PhaseGAN.git
cd PhaseGAN

To install the required python packages:

pip install -r requirements.txt

PhaseGAN training

For the training, our provided data loader Dataset2channel.py support loading data with HDF5 format. An example of the dataset structure could be find in Example dataset folder and PhaseGAN validation dataset (Google Drive). Please note that ground truth images are provided for validation purposes, but we never use it as references in the unpaired training.

We used hdf5 data format for the original training. For the training with other data formats, you may want to create a customized data loader.

To run the training:

python3 train.py

For more training options, please check out:

python3 train.py --help

Results

The training results will be saved in: ./results/fig/run_name/train. The training parameters and losses will be saved to a txt file here: ./results/fig/run_name/log.txt. The models will be saved in ./results/fig/run_name/save.

Citation

If you use this code for your research, please cite our paper.

@article{zhang2020phasegan,
  title={PhaseGAN: A deep-learning phase-retrieval approach for unpaired datasets},
  author={Zhang, Yuhe and Noack, Mike Andreas and Vagovic, Patrik and Fezzaa, Kamel and Garcia-Moreno, Francisco and Ritschel, Tobias and Villanueva-Perez, Pablo},
  journal={arXiv preprint arXiv:2011.08660},
  year={2020}
}

Acknowledgments

Our code is based on pytorch-CycleGAN-and-pix2pix and TernausNet.

phasegan's People

Contributors

yuhez avatar zyhklmy avatar pvilla 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.