Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Rendering issue #7

Closed
Gpoxolcku opened this issue Oct 31, 2018 · 8 comments
Closed

Rendering issue #7

Gpoxolcku opened this issue Oct 31, 2018 · 8 comments

Comments

@Gpoxolcku
Copy link

Gpoxolcku commented Oct 31, 2018

Hi, friend!
Am I getting it right that the "render" flag's purpose is to allow output of rendered extrapolated stereopair images? No matter of the "render_multiples" values, the rendering result is the cropped reference image. Here's an example of the command I use to launch the tool:
python mpi_from_images.py --image1=/path/to/left.png --image2=/path/to/right.png --output_dir=./output/ --render_multiples=10 --render=True
Thanks in advance!

@snaves
Copy link
Contributor

snaves commented Nov 1, 2018

I think you need to set the "--xoffset" flag (if this is a rectified left-right stereo pair), and possibly also the "--yoffset" and "--zoffset" flags if the camera motion is not horizontal. Those flags tell the binary what the camera motion is between the left and right views. They are zero by default, and so you will get degenerate results if you do not set at least "--xoffset". I have just added an example to demonstrate in the examples subdirectory.

@snaves
Copy link
Contributor

snaves commented Nov 1, 2018

Note also that if you want to render multiple images, you can provide multiple offsets in the "--render_multiples" argument (e.g, "--render_multiples="-10,0,10").

@Gpoxolcku
Copy link
Author

Thank you for your reply! Also I'd like to mention that when I try to render multiple images, it fails with (likely) out-of-memory error (I use Google Colab GPU). Is there any possible way to fix it?

@snaves
Copy link
Contributor

snaves commented Nov 1, 2018

Interesting -- I haven't tested on a Colab GPU. I guess the backup is to render a single image and call the binary multiple times. However, I am unsure of why you would run out of memory, though I will give it some thought. Please feel free to propose a fix if you uncover the issue.

@BaileyRobbins
Copy link

Can you explain what the offset values in render_multiples mean? Are they the offsets in world coordinates from camera 0?

@snaves
Copy link
Contributor

snaves commented Nov 2, 2018

The values in --render_multiples indicate viewpoint offset multipliers on the translation vector indicated by [--xoffset, --yoffset, --zoffset]. That is, if render_multiple = 2, then the camera is moved to the location "reference_viewpoint + 2 * [xoffset, yoffset, zoffset]".

@snaves snaves closed this as completed Nov 2, 2018
@FangGet
Copy link

FangGet commented Nov 27, 2018

@Gpoxolcku I came up with an error like "Graphdef cannot be larger than 2GB in tensorflow", if it's also yours, just add "tf.reset_default_graph" after sess.run will fix this problem.

@noobtoob4lyfe
Copy link

Note also that if you want to render multiple images, you can provide multiple offsets in the "--render_multiples" argument (e.g, "--render_multiples="-10,0,10").

Hello. I was googeling around for a way to try out this code and I saw your comment about a Colab notebook. Is this Google Colab Notebook still available? May I try it out? Thanks in advance.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants