Giter Site home page Giter Site logo

lf_syn's Introduction

Learning-Based View Synthesis for Light Field Cameras - Pytorch

A PyTorch implementation of a LF Camera View Synthesis method proposed by SIGGRAPH Asia 2016 paper Learning-Based View Synthesis for Light Field Cameras.

Requirments

  • Python 3.x
  • CUDA

Other dependencies

  • Pytorch
  • openCV
  • scipy
  • numpy
  • scikit-image
  • h5py
pip3 install -r requirments.txt

Datasets

Training and test datasets are from orginal project page

Training Dataset

Training dataset has 100 light field images. Download the Training set from here, unzip it and copy the png files in the TrainingData/Training directory.

Test Dataset

Test dataset has 30 light field images. Download the Test set from here, unzip it and copy the png files into TrainingData/Test directory.

Usage

Train

Run "PrepareData.m" to process the training and test sets. It takes a long time for the first training image to be processed since a huge h5 file needs to be created first.

python3 prepare_data.py

optional arguments:
--dataset                       choose which dataset to process

Then start the training

python3 train.py

optional arguments:
--is_continue                   if to continue training from existing network[default value is False]

The trained network, PSNR value and loss plot are in TrainingData directory.

Test Single Image

Copy desired png files into Scenes folder. The results shown in the paper can be found in TestSet\PAPER directory.

python3 test.py

The output images and objective quality result are in Results directory.

Results

Original model (iteration: 26,500; Training PSNR: 33.36 ):

  • Seahorse (PSNR: 29.10; SSIM: 0.952)

n_Seahorse

  • Flower1 (PSNR: 29.86; SSIM: 0.945)

n_Flower1

To do list:

  • Move prepare_data.py onto GPU

    This will make training and testing tremendously faster. The key is to implement a cubic interpolation method with PyToch tensors to replace the Scipy one.

lf_syn's People

Contributors

gimps 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.