Skip to content

🌊 Image to β†’ 2.5D Parallax Effect Video. A Free and Open Source LeiaPix/ImmersityAI alternative

License

Notifications You must be signed in to change notification settings

mohakmalviya/DepthFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

γ€β˜°γ€‘Table of Contents πŸ‘†

DepthFlow

Stars Badge License Badge Telegram Channel Badge Discord Badge

πŸ‘† Out of the many Explorers, you can be among the Shining stars who support us! ⭐️


[DepthFlow]: Image to β†’ 2.5D Parallax Effect Video. A Professional [Depthy] Alternative.


πŸ‘‡ Right click and loop me!

DepthFlow.2023.12.19.mp4

Note: Yes, the only input to DepthFlow was the Original Image


🎩 Click to see the Original Image
Original Image
Source: Wallhaven. All images remain property of their original owners. βš–οΈ

πŸͺ„ Click to see the Estimated Depth map
Depth Map
The Depth Map was estimated with ZoeDepth πŸš€


πŸ”₯ Description

πŸ’‘ Base idea:

  1. Given an image and its depth map, have a shader to generate a parallax effect
  2. Estimate Depth Maps with Neural Networks for generic images
  3. Varying the projections over time generates a 2.5D video

As simple as that, we achieve a similar effect as Depthy



πŸ“¦ Installation

πŸ”΄πŸŸ‘πŸŸ’

Download and install our Monorepo with all the code and projects first

Note: You cannot run this project in dev mode without the Framework!


  • DepthFlow directly uses ShaderFlow. Check it out! πŸš€

Running the code

After running the brakeit script on the Monorepo and inside the Virtual Environment,

  • Run the command: broken depthflow

A real time window should pop up.


Selecting the input image

  • Run broken depthflow parallax --help for parallax options

  • You can also drag and drop an Image File or URL From your Browser


Rendering Options

  • Run broken depthflow --help for options and rendering

Full Examples

  • broken depthflow (--render | -r)
  • broken depthflow -r -w 1280 -h 720 -f 30
  • broken depthflow -r -o ./video_name --format mkv
  • broken depthflow parallax --image (url | path) main --render -s 2
  • broken depthflow -r -t 2 --open
  • broken depthflow parallax -i (image) -d (depth) main

Note: A high SSAA -s 1.5 is recommended for antialiasing due the Steep Parallax



πŸš€ Using your GPU

By default, Pytorch will be installed with CPU support.

If you want to Speed Up the Depth Estimation, you can add Pytorch with GPU support:


NVIDIAN1 (CUDA):

  • Have the NVIDIA Drivers installed - Windows might already have installed them
  • Run the command: broken depthflow poe cuda

*N1: Check GPU compatibility (<= GTX 800 series is not supported). Preferably install CUDA from your package manager.


AMDR1 (ROCm):

  • Run the command: broken depthflow poe rocm

*R1: Check GPU compatibility (<= RX 500 series is not supported). Preferably install ROCm from your package manager


CPU / macOS (Default):

  • Run the command: broken depthflow poe cpu


βš–οΈ License

See BrokenSource Repository for the License of the Code Assets, Projects and User Generated Content.

About

🌊 Image to β†’ 2.5D Parallax Effect Video. A Free and Open Source LeiaPix/ImmersityAI alternative

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.8%
  • GLSL 12.2%