Coder Social home page Coder Social logo

pratulsrinivasan / local_light_field_synthesis Goto Github PK

View Code? Open in Web Editor NEW
123.0 3.0 19.0 14 KB

Local Light Field Synthesis (Pratul P. Srinivasan, Tongzhou Wang, Ashwin Sreelal, Ravi Ramamoorthi, Ren Ng ICCV 2017)

License: Apache License 2.0

Jupyter Notebook 100.00%

local_light_field_synthesis's Introduction

Learning to Synthesize a 4D RGBD Light Field from a Single Image

Pratul P. Srinivasan, Tongzhou Wang, Ashwin Sreelal, Ravi Ramamoorthi, Ren Ng

In the International Conference on Computer Vision (ICCV) 2017 (Spotlight Oral Presentation)

Paper, Video, Flowers Dataset (~169 GB), Supplementary Material

Example Input 2D Image

Example Input 2D Image

Predicted 4D Ray Depths

Predicted 4D Ray Depths

Synthesized 4D Light Field

Synthesized 4D Light Field

Synthesized Synthetic Depth-of-Field (Focused on Flower)

Synthesized Synthetic Depth-of-Field

Synthesized Synthetic Depth-of-Field (Focused on Background)

Synthesized Synthetic Depth-of-Field

Contents

This repository contains:

  1. Local_Light_Field_Synthesis.ipynb Jupyter notebook with an implementation of our algorithm. Note that this code may contain slight updates and modifications to the code used in our paper.

Dependencies

This code depends on a working installation of Tensorflow and basic Python libraries (numpy, scipy, matplotlib).

Acknowledgments

This work was supported in part by ONR grants N00014152013 and N000141712687, NSF grant 1617234, NSF fellowship DGE 1106400, a Google Research Award, the UC San Diego Center for Visual Computing, and a generous GPU donation from NVIDIA.

local_light_field_synthesis's People

Contributors

pratulsrinivasan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

local_light_field_synthesis's Issues

How to run program

Hello, really thanks for uploading your code, really great work. So, how can I run this code? And how can I put an input image?

Out_of_range error in RandomShuffleQueue when training

Hi,

I try to run the code and it seems fine in beginning iterations.

However, I got an error when I run some iterations. sometimes 10000+ iterations sometimes thousands of iterations.

2017-10-26 08:50:54.668608: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: RandomShuffleQueue '_1_shuffle_batch_join/random_shuffle_queue' is closed and has insufficient elements (requested 1, current size 0)
	 [[Node: shuffle_batch_join = QueueDequeueManyV2[component_types=[DT_FLOAT, DT_FLOAT], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](shuffle_batch_join/random_shuffle_queue, shuffle_batch_join/n)]]
Traceback (most recent call last):
  File "iccv_tf.py", line 379, in <module>
    trainsummary = sess.run(merged, feed_dict={is_training:True})
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 895, in run
    run_metadata_ptr)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1124, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1321, in _do_run
    options, run_metadata)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1340, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: RandomShuffleQueue '_1_shuffle_batch_join/random_shuffle_queue' is closed and has insufficient elements (requested 1, current size 0)
	 [[Node: shuffle_batch_join = QueueDequeueManyV2[component_types=[DT_FLOAT, DT_FLOAT], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](shuffle_batch_join/random_shuffle_queue, shuffle_batch_join/n)]]
	 [[Node: shuffle_batch_join/random_shuffle_queue_Size/_1001 = _HostRecv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_2352_shuffle_batch_join/random_shuffle_queue_Size", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]

Caused by op u'shuffle_batch_join', defined at:
  File "iccv_tf.py", line 323, in <module>
    aif_batch, lf_batch = input_pipeline(train_filenames, lfsize, patchsize, batchsize, num_crops)
  File "iccv_tf.py", line 313, in input_pipeline
    [patchsize[0], patchsize[1], lfsize[2], lfsize[3], 3]])
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/training/input.py", line 1362, in shuffle_batch_join
    name=name)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/training/input.py", line 828, in _shuffle_batch_join
    dequeued = queue.dequeue_many(batch_size, name=name)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/data_flow_ops.py", line 457, in dequeue_many
    self._queue_ref, n=n, component_types=self._dtypes, name=name)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 1342, in _queue_dequeue_many_v2
    timeout_ms=timeout_ms, name=name)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
    op_def=op_def)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2630, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/home/mb55411/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1204, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

OutOfRangeError (see above for traceback): RandomShuffleQueue '_1_shuffle_batch_join/random_shuffle_queue' is closed and has insufficient elements (requested 1, current size 0)
	 [[Node: shuffle_batch_join = QueueDequeueManyV2[component_types=[DT_FLOAT, DT_FLOAT], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](shuffle_batch_join/random_shuffle_queue, shuffle_batch_join/n)]]
	 [[Node: shuffle_batch_join/random_shuffle_queue_Size/_1001 = _HostRecv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_2352_shuffle_batch_join/random_shuffle_queue_Size", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]

I am new in tensorflow and any idea about this error?
Thanks in advance!

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.