Giter Site home page Giter Site logo

luckyadugithub / stereo-image-generation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jonathanfly/stereo_image_generator_from_single_image

0.0 0.0 0.0 10.53 MB

This repository contains code to generate stereo (Side by side) image from a single image.

C++ 5.17% Python 92.11% CMake 0.87% Cython 1.86%

stereo-image-generation's Introduction

Stereo (Side by Side) Image Generation from Single Image

Utilizes AI to instantly fully convert 2D content into stereo 3D

image

Fig) Input image(Left) / Output(Middle) / 3D effect(Right)

Introduce

With the rapid of autostereoscopic 3D monitors, through the specialized optical lens and eye-tracking technology delivers users have an entirely new stereoscopic 3D visualization experience. However, it only works with 3D content inputs (Stereoscopic Images). Such as side-by-side images. But most image or video on the internet is 2D single view content. Making the technology difficult to popularize. In order to solve this problem, this project utilizes "Deep Learning" and "Computer Vision" to enable conversion of 2D content into stereo 3D content.

Changelog

  • [Aug 2020] Release C++ and cython version
  • [Aug 2020] Initial release of stereo image generation base on MiDaS v2.0

Setup

  1. Download the model weights model-f45da743.pt and place the file in the root folder.

  2. Set up dependencies:

    pip install pytorch  
    pip install torchvision
    pip install opencv_python

    The code was tested with Cuda 10.1, Python 3.6.6, PyTorch 1.6.0, Torchvision 0.7.0 and OpenCV 3.4.0.12.

Usage

  1. Place input images in the folder example.

  2. Run the model:

    (Generate depth map from image)

    python depth_estimate_image.py

    (Generate depth map from camera)

    python depth_estimate_cam.py

    (Generate stereo image from image)

    python SBS_generate_image.py

    (Generate stereo image from camera)

    python SBS_generate_cam.py
  3. The resulting depth maps are written to the depth folder.

    The resulting stereo image are written to the stereo folder.

Acknowledgments

Our code builds upon Intel MiDaS

stereo-image-generation's People

Contributors

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