fabiotosi92 / NeRF-Supervised-Deep-Stereo

A novel paradigm for collecting and generating stereo training data using neural rendering
https://nerfstereo.github.io/
MIT License
349 stars 19 forks source link

how get render gif/video from left.jpg+right.jpg #8

Closed goometasoft closed 1 year ago

goometasoft commented 1 year ago

thank your NeRF-Supervised-Deep-Stereo !! i like it very much !!

but now, i have a question : i have left.jpg right.jpg and use generate_stereo_pair_matrix.py generate transform_left.json from transform.json how can i generate gif/video below : sds

fabiotosi92 commented 1 year ago

Thank you for your positive feedback on our work. We're glad to hear that you liked it.

Regarding your question about generating a GIF or video, we don't have a specific code snippet for this purpose. However, I can provide you with some general guidance on how you can achieve the desired effect.

Once you have the transform.json, you can follow these steps:

  1. Choose a reference image from transform.json that you would like to use as a base for creating the GIF or video.
  2. Generate multiple different poses by just varying the baseline. You can generate N (N > 30) different poses, ensuring that the baselines are varied by different amounts. For this purpose, you can use generate_stereo_pair_matrix.py
  3. Combine these poses into a sequence or timeline to create the desired effect. There are various tools and libraries available for creating GIFs or videos, such as OpenCV, FFmpeg, or image processing libraries in Python (e.g., PIL, imageio).